LLVM/project 560004bflang/lib/Lower/OpenMP OpenMP.cpp, flang/test/Lower/OpenMP omp-declarative-allocate-align.f90

[Flang] [OpenMP] [MLIR] Add lowering support for OMP ALLOCATE directives and its clauses (#187167)

This patch implementation is primarily focused on

- Lowering to LLVM IR, by generating appropriate kmpc_alloc() and kmpc_alligned_alloc() calls for variable(s) and before the end of scope generating kmpc_free() for the same variable(s).
- Also handled, usage of array variables in the OMP ALLOCATE directive.
- Define omp.allocate_free operation in MLIR and slight changes to existing MLIR definition of ALLOCATOR clause.
- Add test cases for variations of usage of OMP ALLOCATE directive and its clauses ALIGN and ALLOCATOR.
DeltaFile
+162-0mlir/lib/Target/LLVMIR/Dialect/OpenMP/OpenMPToLLVMIRTranslation.cpp
+117-0mlir/test/Target/LLVMIR/openmp-allocate-directive.mlir
+51-2flang/lib/Lower/OpenMP/OpenMP.cpp
+51-0flang/test/Lower/OpenMP/omp-declarative-allocate-align.f90
+32-8mlir/test/Dialect/OpenMP/ops.mlir
+23-2llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp
+436-129 files not shown
+515-3615 files

LLVM/project 05c982allvm/lib/IR Instruction.cpp, llvm/test/Transforms/InstCombine freeze.ll

[IR] treat nofpclass as a poison-generating return attribute (#192016)

- For: #191338

Failing nofpclass attribute will generate poison.
This change adds nofpclass attributes to
`hasPoisonGeneratingReturnAttributes`/`dropPoisonGeneratingReturnAttributes`.
DeltaFile
+12-0llvm/test/Transforms/InstCombine/freeze.ll
+3-1llvm/lib/IR/Instruction.cpp
+15-12 files

LLVM/project 1e8bcecclang/lib/CIR/CodeGen CIRGenBuiltin.cpp, clang/test/CIR/CodeGen builtin-verbose-trap.cpp

[CIR] Implement __builtin_verbose_trap (#191935)

Route BI__builtin_verbose_trap to the existing emitTrap() path so that
it no longer hits the NYI fallback. Debug info message attachment from
the string arguments is not yet implemented (tracked by
MissingFeatures::generateDebugInfo).

This is the single largest NYI category in libcxx testing, unblocking
~1,008 test failures.
DeltaFile
+35-0clang/test/CIR/CodeGen/builtin-verbose-trap.cpp
+3-0clang/lib/CIR/CodeGen/CIRGenBuiltin.cpp
+38-02 files

LLVM/project 9145467llvm/include/llvm/TargetParser RISCVTargetParser.h, llvm/lib/Target/RISCV RISCVInsertVSETVLI.cpp RISCVInstrInfo.cpp

[RISCV] Prevent emitting vsetvli with e32alt or e64alt. (#191960)

The e32alt and e64alt encodings for vtype are reserved.

Non-fp instructions ignore altfmt and we want to use that to avoid
vtype toggle when using load, store, slide, gather, etc. to manipulate
bf16 vectors. This is why we have a Demanded bit for AltFmt.

We need to make sure we don't keep the AltFmt set when we're changing
SEW to 32 or 64.

A new isValidVType function has been added to help catch illegal
vtype earlier.
DeltaFile
+23-0llvm/test/CodeGen/RISCV/rvv/mixed-float-bf16-arith.ll
+11-5llvm/include/llvm/TargetParser/RISCVTargetParser.h
+6-3llvm/lib/Target/RISCV/RISCVInsertVSETVLI.cpp
+2-2llvm/lib/Target/RISCV/RISCVInstrInfo.cpp
+1-2llvm/lib/Target/RISCV/MCTargetDesc/RISCVInstPrinter.cpp
+43-125 files

LLVM/project 516c4d9lldb/include/lldb/Target RegisterContextUnwind.h, lldb/source/Target RegisterContextUnwind.cpp

[lldb] Replace remaining uses of `UnwindLogMsg()` with UNWIND_LOG macro (#192038)

This mostly replaces `"0x%" PRIx64` with `"{:x}"`, but also replaces
'%d' (used for register / scheme numbers and CFA offsets) and '%s' with
simple `{}`, removing the now redundant casts and calls to
`GetCString()` / `AsCString()`.

`UnwindLogMsg()` is no longer used and has been removed.
DeltaFile
+88-105lldb/source/Target/RegisterContextUnwind.cpp
+0-2lldb/include/lldb/Target/RegisterContextUnwind.h
+88-1072 files

LLVM/project 2b77a52clang/lib/CIR/Lowering/DirectToLLVM LowerToLLVM.cpp, clang/test/CIR/CodeGenBuiltins builtin-memchr.c

[CIR] Add noundef to memchr declaration and call sites (#191457)

The memchr LLVM declaration created by MemChrOp lowering had no
arg_attrs, so the lowered IR was missing `noundef` on all three
parameters.  OGCG emits `noundef` on them.

Adds `noundef` to both the `@memchr` declaration and each
`call @memchr` instruction.

Made with [Cursor](https://cursor.com)
DeltaFile
+25-6clang/lib/CIR/Lowering/DirectToLLVM/LowerToLLVM.cpp
+2-2clang/test/CIR/CodeGenBuiltins/builtin-memchr.c
+27-82 files

LLVM/project 472aa4eclang/lib/CIR/Dialect/IR CIRTypes.cpp, clang/unittests/CIR UnionTypeSizeTest.cpp CMakeLists.txt

[CIR] Fix union RecordType::getTypeSizeInBits to return bits (#191516)

RecordType::getTypeSizeInBits for unions was calling
dataLayout.getTypeSize (which returns bytes) instead of
dataLayout.getTypeSizeInBits.  This returned a value 8x too
small.  Also handle the empty-union case where
getLargestMember returns nullptr.
DeltaFile
+79-0clang/unittests/CIR/UnionTypeSizeTest.cpp
+6-2clang/lib/CIR/Dialect/IR/CIRTypes.cpp
+1-0clang/unittests/CIR/CMakeLists.txt
+86-23 files

LLVM/project 39c0ba5llvm/docs LFI.rst, llvm/lib/Target/AArch64 AArch64InstrInfo.cpp

Revert "[LFI][AArch64] Add AArch64 LFI rewrites for system instructions (#186…"

This reverts commit 3fe0bdfaa592cc0d7ce9f695a94522fa92366c6f.
DeltaFile
+0-210llvm/lib/Target/AArch64/MCTargetDesc/AArch64MCLFIRewriter.cpp
+36-72llvm/docs/LFI.rst
+0-81llvm/lib/Target/AArch64/MCTargetDesc/AArch64MCLFIRewriter.h
+0-45llvm/test/MC/AArch64/LFI/reserved.s
+0-25llvm/lib/Target/AArch64/AArch64InstrInfo.cpp
+0-13llvm/test/MC/AArch64/LFI/tp.s
+36-4463 files not shown
+36-4659 files

LLVM/project d24d4b6compiler-rt/lib/sanitizer_common/tests sanitizer_bitvector_test.cpp

[sanitizer] Add missing bitcast to sanitizer_bitvector_test.cpp (#192090)

Fixes buildbot report
(https://lab.llvm.org/buildbot/#/builders/66/builds/29379):


/home/b/sanitizer-x86_64-linux/build/llvm-project/compiler-rt/lib/sanitizer_common/tests/sanitizer_bitvector_test.cpp:64:29:
error: format specifies type 'unsigned long' but the argument has type
'uptr' (aka 'unsigned int') [-Werror,-Wformat]
   64 |     fprintf(stderr, "%lu ", idx);
      |                      ~~~    ^~~
      |                      %u
DeltaFile
+1-1compiler-rt/lib/sanitizer_common/tests/sanitizer_bitvector_test.cpp
+1-11 files

LLVM/project 1a233a8mlir/include/mlir/IR BuiltinTypes.td, mlir/test/Dialect/Quant parse-uniform.mlir

[mlir][quant] Print actual quant storage type when signed (#187300)

Without the fix, bytecode serialization roundtrip breaks for types that
don't have custom bytecode serializers and contain quant types, since
the fallback mechanism prints the type and the quant printer coerces
signed to signless types. E.g. `!custom<!quant.uniform<ui8:f32, 0.1>>`
will print as `u8` when serializing and later be created as a signless
`i8` when deserializing.
DeltaFile
+18-0mlir/test/Dialect/Quant/parse-uniform.mlir
+12-0mlir/test/Dialect/Quant/Bytecode/types.mlir
+7-1mlir/include/mlir/IR/BuiltinTypes.td
+37-13 files

LLVM/project ae1e3ebllvm/lib/Transforms/Vectorize LoopVectorize.cpp VPlanTransforms.cpp, llvm/test/Transforms/LoopVectorize/AArch64 ordered-reduction-with-invariant-stores.ll predication_costs.ll

[NFCI][VPlan] Split initial mem-widening into a separate transformation (#182592)

Preparation change before implementing stride-multiversioning as a
VPlan-based transformation. Might help
https://github.com/llvm/llvm-project/pull/147297/ as well.
DeltaFile
+107-0llvm/test/Transforms/LoopVectorize/AArch64/ordered-reduction-with-invariant-stores.ll
+45-32llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
+54-0llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp
+20-12llvm/lib/Transforms/Vectorize/VPRecipeBuilder.h
+5-0llvm/lib/Transforms/Vectorize/VPlanTransforms.h
+3-2llvm/test/Transforms/LoopVectorize/AArch64/predication_costs.ll
+234-461 files not shown
+235-467 files

LLVM/project b29bfa5libc/include/llvm-libc-types __futex_word.h

[libc][NFC] Fix GCC build in __futex_word.h (#192078)

Included __llvm-libc-common.h in __futex_word.h to fix a build failure
with GCC.

GCC in C++ mode does not recognize _Alignas without the mapping to
alignas provided in __llvm-libc-common.h.

The failure was introduced in commit 91c0fdfe1392.
DeltaFile
+2-0libc/include/llvm-libc-types/__futex_word.h
+2-01 files

LLVM/project 934f795clang/lib/Basic Targets.cpp, clang/lib/Basic/Targets OSTargets.h

[clang] Add support for SerenityOS (#187941)

Adds support for the $arch-unknown-serenity target to the Clang front
end. This makes the compiler look for libraries and headers in the right
places, and enables some security mitigations like stack-smashing
protection and position-independent code by default.

----

A first attempt at upstreaming this patch was made
[here](https://reviews.llvm.org/D154396). I hope I fixed everything
mentioned there.

I intentionally kept `/usr/local/` in the default lookup path. I
consider it the more practical option, and I’d prefer to have the patch
merged as is and revisit the FIXME later. If this is absolutely
unacceptable to the maintainers, I will happily drop it and keep it as a
local patch until we address the underlying issue.


    [7 lines not shown]
DeltaFile
+276-0clang/test/Driver/serenity.cpp
+198-0clang/lib/Driver/ToolChains/Serenity.cpp
+89-0clang/lib/Driver/ToolChains/Serenity.h
+17-0clang/lib/Basic/Targets/OSTargets.h
+10-0clang/lib/Basic/Targets.cpp
+4-1clang/lib/Driver/ToolChain.cpp
+594-112 files not shown
+604-118 files

LLVM/project 40a585eclang/lib/Frontend CompilerInvocation.cpp, clang/test/CIR/Driver clangir.c

[CIR] Disable CIR pipeline for LLVM IR inputs (#187729)

When -fclangir is passed and the input is LLVM IR (e.g. during the
backend phase of OpenMP offloading), the CIR frontend pipeline is not
applicable.


Co-authored-by: Claude Opus 4.6 <noreply at anthropic.com>
DeltaFile
+18-0clang/test/CIR/Driver/clangir.c
+6-0clang/lib/Frontend/CompilerInvocation.cpp
+24-02 files

LLVM/project 1859c66llvm/lib/Transforms/InstCombine InstCombineAddSub.cpp, llvm/lib/Transforms/Scalar LoopUnrollPass.cpp

Merge branch 'main' into users/eas/split-mem-widen-transform
DeltaFile
+366-0llvm/test/Transforms/InstCombine/add.ll
+22-0mlir/test/Dialect/MLProgram/pipeline-globals.mlir
+18-0llvm/test/Transforms/LoopUnroll/debug.ll
+17-0llvm/lib/Transforms/InstCombine/InstCombineAddSub.cpp
+11-3mlir/lib/Dialect/MLProgram/Transforms/PipelineGlobalOps.cpp
+3-2llvm/lib/Transforms/Scalar/LoopUnrollPass.cpp
+437-53 files not shown
+441-89 files

LLVM/project 8a69fb0llvm/lib/Transforms/InstCombine InstCombineAddSub.cpp, llvm/test/Transforms/InstCombine add.ll

[InstCombine] Fold (X + C) + (Y & ~C) to X + (Y | C) (#191334)

Add an InstCombine fold for masked overwrite patterns where the add
constant matches the cleared bits in the mask:

  (X + C) + (Y & ~C) -> X + (Y | C)

Since `Y & ~C` clears all bits set in C, adding C cannot generate carry
through those bits and is equivalent to setting them with `or`.

Proof: https://alive2.llvm.org/ce/z/277UFK
Fixed: https://github.com/llvm/llvm-project/issues/191171
DeltaFile
+366-0llvm/test/Transforms/InstCombine/add.ll
+17-0llvm/lib/Transforms/InstCombine/InstCombineAddSub.cpp
+383-02 files

LLVM/project 142d3c2llvm/include/llvm/Frontend/OpenMP OMPIRBuilder.h, llvm/lib/Frontend/OpenMP OMPIRBuilder.cpp

[NFC][OMPIRBuilder][OpenMP] Pass AffinityData by reference instead of… (#191863)

… value
DeltaFile
+1-1llvm/include/llvm/Frontend/OpenMP/OMPIRBuilder.h
+1-1llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp
+2-22 files

LLVM/project 3ba18a6llvm/lib/Transforms/Scalar LoopUnrollPass.cpp, llvm/test/Transforms/LoopUnroll debug.ll

[LoopUnroll] Fix misleading runtime unroll debug message (#190709)

Avoid the confusing `Runtime unrolling with count: 0` `LLVM_DEBUG`
statement.
DeltaFile
+18-0llvm/test/Transforms/LoopUnroll/debug.ll
+3-2llvm/lib/Transforms/Scalar/LoopUnrollPass.cpp
+21-22 files

LLVM/project c47c334mlir/include/mlir/Dialect/AMDGPU/IR AMDGPUEnums.h

[mlir][AMD] Add missing includes to AMDGPUEnums.h (NFC) (#191077)

This header assumed these had been imported
DeltaFile
+2-1mlir/include/mlir/Dialect/AMDGPU/IR/AMDGPUEnums.h
+2-11 files

LLVM/project 04a2e03llvm/lib/Transforms/Vectorize VPRecipeBuilder.h

Update doc comment for replaceWithFinalIfReductionStore
DeltaFile
+4-4llvm/lib/Transforms/Vectorize/VPRecipeBuilder.h
+4-41 files

LLVM/project cb11242llvm/lib/Transforms/Vectorize VPlanTransforms.cpp

Expand `auto *MiddleBlock = ...`
DeltaFile
+1-1llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp
+1-11 files

LLVM/project 2208daellvm/lib/Transforms/Vectorize VPRecipeBuilder.h VPlanTransforms.cpp

Swap operands order in VPRecipeBuilder::replaceWithFinalIfReductionStore
DeltaFile
+2-2llvm/lib/Transforms/Vectorize/VPRecipeBuilder.h
+2-2llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp
+1-1llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
+5-53 files

LLVM/project 00b0c5fllvm/lib/Transforms/Vectorize VPlanTransforms.cpp VPlanTransforms.h

Apply code review suggestions
DeltaFile
+5-7llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp
+3-4llvm/lib/Transforms/Vectorize/VPlanTransforms.h
+1-1llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
+9-123 files

LLVM/project 1475157llvm/test/Transforms/LoopVectorize/AArch64 memop_widening.ll ordered-reduction-with-invariant-stores.ll

noalias + updated comment in/rename the test
DeltaFile
+0-114llvm/test/Transforms/LoopVectorize/AArch64/memop_widening.ll
+107-0llvm/test/Transforms/LoopVectorize/AArch64/ordered-reduction-with-invariant-stores.ll
+107-1142 files

LLVM/project 1cc17f4llvm/lib/Transforms/Vectorize VPlanTransforms.h

Add doc comment
DeltaFile
+2-0llvm/lib/Transforms/Vectorize/VPlanTransforms.h
+2-01 files

LLVM/project 8e91986llvm/lib/Transforms/Vectorize VPlanTransforms.cpp, llvm/test/Transforms/LoopVectorize/AArch64 memop_widening.ll

Fix bug/add test
DeltaFile
+114-0llvm/test/Transforms/LoopVectorize/AArch64/memop_widening.ll
+1-1llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp
+115-12 files

LLVM/project 966fe98llvm/lib/Transforms/Vectorize LoopVectorize.cpp

Drop leftover comment
DeltaFile
+0-1llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
+0-11 files

LLVM/project e474f4cllvm/lib/Transforms/Vectorize VPlanTransforms.cpp

Reduction store needs to be processed on scalar VPlan
DeltaFile
+6-5llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp
+6-51 files

LLVM/project c285d96llvm/lib/Transforms/Vectorize VPlanTransforms.cpp VPRecipeBuilder.h

Avoid exposing `RecipeBuilder.getVPBuilder()`
DeltaFile
+1-2llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp
+0-2llvm/lib/Transforms/Vectorize/VPRecipeBuilder.h
+1-0llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
+2-43 files

LLVM/project 989eef5llvm/lib/Transforms/Vectorize LoopVectorize.cpp VPRecipeBuilder.h

Fold one `Legal` use into `tryToWidenHistogram` renamed to `widenIfHistogram`
DeltaFile
+10-2llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
+6-6llvm/lib/Transforms/Vectorize/VPRecipeBuilder.h
+3-5llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp
+19-133 files