LLVM/project 5735d17llvm/include/llvm/MC MCTargetOptions.h, llvm/include/llvm/Target TargetOptions.h

MC: Move DisableIntegratedAS from TargetOptions to MCTargetOptions (#221547)

The integrated assembler is only meaningful in MC, so this field belongs
in MCTargetOptions alongside the other assembler options rather than in
the codegen-level TargetOptions.

Co-authored-by: Claude (Claude-Opus-4.8)
DeltaFile
+7-11llvm/include/llvm/Target/TargetOptions.h
+0-7llvm/lib/CodeGen/CommandFlags.cpp
+7-0llvm/lib/MC/MCTargetOptionsCommandFlags.cpp
+3-0llvm/include/llvm/MC/MCTargetOptions.h
+1-1llvm/lib/LTO/LTOCodeGenerator.cpp
+1-1llvm/lib/CodeGen/CodeGenTargetMachineImpl.cpp
+19-204 files not shown
+23-2410 files

LLVM/project 2796699llvm/test/Transforms/SLPVectorizer/X86 loop-accumulator-reduction.ll

[SLP][NFC]Add more tests for loop accumulator reductions, NFC



Reviewers: 

Pull Request: https://github.com/llvm/llvm-project/pull/221591
DeltaFile
+1,327-0llvm/test/Transforms/SLPVectorizer/X86/loop-accumulator-reduction.ll
+1,327-01 files

LLVM/project 5840db8llvm/include/llvm/CodeGen SelectionDAG.h, llvm/lib/CodeGen/SelectionDAG SelectionDAG.cpp

[SelectionDAG] Remove dead functions (NFC) (#221541)

SelectionDAG::getBitcastedSExtOrTrunc,
SelectionDAG::getBitcastedZExtOrTrunc: Added on August 11, 2023 in
commit d26a06728da84a7302875a99ea86e887f6bc425a without any callers.

Assisted-by: Antigravity
DeltaFile
+0-30llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
+0-10llvm/include/llvm/CodeGen/SelectionDAG.h
+0-402 files

LLVM/project f0e701aclang/test/OpenMP interchange_codegen.cpp, llvm/test/CodeGen/AMDGPU flat-saddr-atomics.ll flat-saddr-load.ll

Merge remote-tracking branch 'upstream' into users/lukel97/loop-vectorize/simplifyRecipes-worklist
DeltaFile
+17,282-3,458llvm/test/tools/llvm-mca/AArch64/Cortex/C1Premium-sve-instructions.s
+7,983-1,591llvm/test/tools/llvm-mca/AArch64/Cortex/C1Premium-neon-instructions.s
+2,115-2,484llvm/test/CodeGen/AMDGPU/amdgcn.bitcast.1024bit.ll
+3,312-825llvm/test/CodeGen/AMDGPU/flat-saddr-load.ll
+1,704-2,400clang/test/OpenMP/interchange_codegen.cpp
+2,226-1,164llvm/test/CodeGen/AMDGPU/flat-saddr-atomics.ll
+34,622-11,9224,795 files not shown
+241,334-126,6184,801 files

LLVM/project ebb7e0clibc/src/__support/GPU allocator.cpp

[libc] Fix chunk calculation in GPU allocator (#221583)

Summary:
This would pesismistically round up 48 to 64 and the previous s0 case
was unused.
DeltaFile
+7-10libc/src/__support/GPU/allocator.cpp
+7-101 files

LLVM/project 64171f0mlir/include/mlir/Dialect/Affine/IR AffineOps.h AffineOps.td, mlir/lib/Dialect/Affine/IR CMakeLists.txt MemorySlot.cpp

[mlir][affine] Implement PromotableRegionOpInterface for AffineForOp (#221123)

The `mem2reg` pass couldn't promote memory slots accessed within an
`affine.for` because `AffineForOp` did not implement
`PromotableRegionOpInterface`, leading to the stack allocation and its
accesses to not be eliminated.

This change implements `PromotableRegionOpInterface` for `AffineForOp`,
allowing `mem2reg` to promote memory slots through affine loops.
DeltaFile
+116-0mlir/test/Dialect/Affine/mem2reg.mlir
+56-0mlir/lib/Dialect/Affine/IR/MemorySlot.cpp
+3-1mlir/include/mlir/Dialect/Affine/IR/AffineOps.td
+2-0mlir/lib/Dialect/Affine/IR/CMakeLists.txt
+2-0mlir/include/mlir/Dialect/Affine/IR/AffineOps.h
+179-15 files

LLVM/project 7f04c2bllvm/include/llvm/ADT SetOperations.h, llvm/lib/Transforms/IPO MemProfContextDisambiguation.cpp

[ADT][MemProf] Optimize set_subtract with removed-set output and use in MemProf (#221372)

Add a 3-argument set_subtract(A, B, Removed) that computes A := A - B
and records elements of B removed from A (A ^ B) in Removed. When
A.size() < B.size(), B supports contains(), and A supports remove_if(),
we iterate over A via remove_if() instead of iterating over B, improving
efficiency.

Remove the legacy 4-argument set_subtract(A, B, Removed, Remaining),
which was only used by MemProfContextDisambiguation.cpp and is now
redundant since Remaining can be updated via a separate 2-argument
set_subtract.

Update MemProfContextDisambiguation to use the 3-argument set_subtract,
and update SetOperations unit tests.
DeltaFile
+71-16llvm/unittests/ADT/SetOperationsTest.cpp
+32-6llvm/include/llvm/ADT/SetOperations.h
+8-13llvm/lib/Transforms/IPO/MemProfContextDisambiguation.cpp
+111-353 files

LLVM/project de3dd2dllvm/test/CodeGen/AMDGPU madak.ll, llvm/test/CodeGen/LoongArch float-fma.ll double-fma.ll

Reapply "DAGCombiner: Drop AllowFPOpFusion from visitFADDForFMACombine" (#221561) (#221567)

This reverts commit 502e51aa4df687807fbe51fa0b419baf65e9615f.
DeltaFile
+352-1,116llvm/test/CodeGen/LoongArch/lasx/fma-v8f32.ll
+352-1,116llvm/test/CodeGen/LoongArch/lasx/fma-v4f64.ll
+260-872llvm/test/CodeGen/LoongArch/float-fma.ll
+260-872llvm/test/CodeGen/LoongArch/double-fma.ll
+388-471llvm/test/CodeGen/AMDGPU/madak.ll
+178-564llvm/test/CodeGen/LoongArch/lsx/fma-v4f32.ll
+1,790-5,01118 files not shown
+2,495-6,19224 files

LLVM/project 75861cfllvm/lib/Transforms/Utils SimplifyLibCalls.cpp, llvm/test/Transforms/InstCombine scalbn-to-ldexp.ll

[InstCombine] Fold scalbn libcalls to llvm.ldexp (#216573)

This canonicalizes `scalbn`, `scalbnf`, and `scalbnl` libcalls to the
`llvm.ldexp` intrinsic when the call does not access memory.

LLVM floating-point types use radix 2, so `scalbn(x, n)` and `ldexp(x,
n)` produce the same numeric result.
Calls that may access memory are left unchanged because the libcall may
set `errno`, while `llvm.ldexp` does not access memory.

Fixes #216467
DeltaFile
+114-0llvm/test/Transforms/InstCombine/scalbn-to-ldexp.ll
+12-0llvm/lib/Transforms/Utils/SimplifyLibCalls.cpp
+126-02 files

LLVM/project 7333b0bllvm/test/CodeGen/AMDGPU madak.ll, llvm/test/CodeGen/LoongArch float-fma.ll double-fma.ll

Reapply "DAGCombiner: Drop AllowFPOpFusion from visitFADDForFMACombine" (#221561)

This reverts commit 502e51aa4df687807fbe51fa0b419baf65e9615f.
DeltaFile
+352-1,116llvm/test/CodeGen/LoongArch/lasx/fma-v8f32.ll
+352-1,116llvm/test/CodeGen/LoongArch/lasx/fma-v4f64.ll
+260-872llvm/test/CodeGen/LoongArch/float-fma.ll
+260-872llvm/test/CodeGen/LoongArch/double-fma.ll
+388-471llvm/test/CodeGen/AMDGPU/madak.ll
+178-564llvm/test/CodeGen/LoongArch/lsx/fma-v4f32.ll
+1,790-5,01118 files not shown
+2,495-6,19224 files

LLVM/project 502e51allvm/test/CodeGen/AMDGPU madak.ll, llvm/test/CodeGen/LoongArch float-fma.ll double-fma.ll

Revert "DAGCombiner: Drop AllowFPOpFusion from visitFADDForFMACombine" (#221561)

Reverts llvm/llvm-project#221436

Bots failing
DeltaFile
+1,116-352llvm/test/CodeGen/LoongArch/lasx/fma-v8f32.ll
+1,116-352llvm/test/CodeGen/LoongArch/lasx/fma-v4f64.ll
+872-260llvm/test/CodeGen/LoongArch/float-fma.ll
+872-260llvm/test/CodeGen/LoongArch/double-fma.ll
+471-388llvm/test/CodeGen/AMDGPU/madak.ll
+564-178llvm/test/CodeGen/LoongArch/lsx/fma-v4f32.ll
+5,011-1,79017 files not shown
+6,182-2,48523 files

LLVM/project 8d573f5orc-rt/include/orc-rt-internal/support Environment.h, orc-rt/lib/bedrock Error.cpp Logging_printf.cpp

[orc-rt] Split support sources into their own object library (#221442)

This allows support to be used by both bedrock and the upcoming SPIRE
library. Note that support is a CMake object library only, not an
archive or dylib. Clients will always target either Bedrock or SPIRE.

Moves some sources (Error, RTTI, Logging, Environment and the whole sys/
tree), and some headers (Environment.h, and the orc-rt/bedrock/sys
headers) to the support library.

The per-system source composition moves to lib/support/CMakeLists.txt.

An upcomming commit will update the unit tests to reflect this split.
DeltaFile
+0-122orc-rt/lib/bedrock/Logging_printf.cpp
+122-0orc-rt/lib/support/Logging_printf.cpp
+0-82orc-rt/lib/bedrock/Error.cpp
+82-0orc-rt/lib/support/Error.cpp
+68-0orc-rt/include/orc-rt-internal/support/Environment.h
+62-0orc-rt/lib/support/Logging.cpp
+334-20422 files not shown
+622-62928 files

LLVM/project fbf2902llvm/lib/CodeGen/SelectionDAG DAGCombiner.cpp, llvm/test/CodeGen/Hexagon sffms.ll

DAGCombiner: Drop AllowFPOpFusion from visitFSUBForFMACombine

Co-authored-by: Claude (Claude-Opus-4.8) <noreply at anthropic.com>
DeltaFile
+3-3llvm/test/CodeGen/Hexagon/sffms.ll
+3-3llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
+6-62 files

LLVM/project 44888f0llvm/test/CodeGen/AMDGPU madak.ll, llvm/test/CodeGen/LoongArch float-fma.ll double-fma.ll

DAGCombiner: Drop AllowFPOpFusion from visitFADDForFMACombine (#221436)

Rewrites fp-dp3.ll to use flags on individual patterns. It weirdly
used different triples for the fp-contract on and off cases, seemingly
an artifact of the ARM64 and AArch64 merge.
    
fp-contract.cu is essentially a bugfix, the local fp contract(on) pragma
wins over the global flag now.

Co-authored-by: Claude (Claude-Opus-4.8) <noreply at anthropic.com>
DeltaFile
+352-1,116llvm/test/CodeGen/LoongArch/lasx/fma-v8f32.ll
+352-1,116llvm/test/CodeGen/LoongArch/lasx/fma-v4f64.ll
+260-872llvm/test/CodeGen/LoongArch/float-fma.ll
+260-872llvm/test/CodeGen/LoongArch/double-fma.ll
+388-471llvm/test/CodeGen/AMDGPU/madak.ll
+178-564llvm/test/CodeGen/LoongArch/lsx/fma-v2f64.ll
+1,790-5,01117 files not shown
+2,485-6,18223 files

LLVM/project 8d10d1fllvm/include/llvm/IR FMF.h, llvm/lib/Target/AMDGPU AMDGPUCodeGenPrepare.cpp

[AMDGPU] Add FastMathFlags::intersectValue helper for rsq ninf/nsz fix (#217724)
DeltaFile
+7-0llvm/include/llvm/IR/FMF.h
+3-2llvm/lib/Target/AMDGPU/AMDGPUCodeGenPrepare.cpp
+10-22 files

LLVM/project 36efd33llvm/test/CodeGen/VE/Scalar store_stk.ll stackframe_align.ll, llvm/test/CodeGen/VE/Vector store_stk_stvm.ll load_stk_ldvm.ll

VE: Use splitAt in expandExtendStackPseudo

Replace the manual block-splitting in expandExtendStackPseudo with
MachineBasicBlock::splitAt. Reduces boilerplate, but there's some
block renumbering churn in the output.

Co-authored-by: Claude (Claude-Opus-4.8)
DeltaFile
+57-57llvm/test/CodeGen/VE/Scalar/atomic_swap.ll
+57-57llvm/test/CodeGen/VE/Scalar/atomic_cmp_swap.ll
+48-48llvm/test/CodeGen/VE/Vector/store_stk_stvm.ll
+48-48llvm/test/CodeGen/VE/Vector/load_stk_ldvm.ll
+42-42llvm/test/CodeGen/VE/Scalar/store_stk.ll
+42-42llvm/test/CodeGen/VE/Scalar/stackframe_align.ll
+294-29460 files not shown
+753-75666 files

LLVM/project 7dbdc02llvm/lib/Target/VE VEInstrInfo.cpp, llvm/test/CodeGen/VE/Scalar builtin_sjlj.ll

VE: Compute live-ins after splitting for EXTEND_STACK expansion

expandExtendStackPseudo splits its block but left the new blocks without
live-in lists, so their uses of registers live across the split are
rejected by -verify-machineinstrs.

Co-authored-by: Claude (Claude-Opus-4.8)
DeltaFile
+5-0llvm/lib/Target/VE/VEInstrInfo.cpp
+2-2llvm/test/CodeGen/VE/Scalar/builtin_sjlj.ll
+7-22 files

LLVM/project b4cc124llvm/lib/Target/X86 X86ISelLowering.cpp

[X86] Add getUnpack wrapper to select between getUnpackl/h shuffles. NFC. (#221543)

Prep work for improving CLMULH vXi32 lowering.
DeltaFile
+10-6llvm/lib/Target/X86/X86ISelLowering.cpp
+10-61 files

LLVM/project 3afdb99llvm/include/llvm/ADT Hashing.h, llvm/include/llvm/IR Attributes.h

[IR] Unique attribute sets and lists in a UniquingSet. NFC (#221525)

Switch to UniquingSet to remove FoldingSetNodeID serialization overhead
on every AttributeSet::get and AttributeList::get.

Attribute and AttributeSet are single-pointer wrappers whose operator==
is pointer equality. Specializing `is_hashable_data` selects the fast
`hash_combine_range_impl` overload that calls `combine_bytes` directly,
skipping copying element by element.

`hash_combine_range` deduces its element type as `const T`, so
`is_hashable_data<const T>` now follows `is_hashable_data<T>` and a type
need only specialize the unqualified form.

Aided by Opus 5
DeltaFile
+6-36llvm/lib/IR/Attributes.cpp
+13-3llvm/include/llvm/IR/Attributes.h
+4-10llvm/lib/IR/AttributeImpl.h
+3-7llvm/lib/IR/LLVMContextImpl.h
+6-0llvm/unittests/ADT/HashingTest.cpp
+2-0llvm/include/llvm/ADT/Hashing.h
+34-566 files

LLVM/project f9eced2llvm/lib/Target/VE VEISelLowering.cpp

VE: Fix ill-typed setjmp result in emitEHSjLjSetJmp

Partially fixes machine verifier failures in existing tests;
they still fail due to other issues.

emitEHSjLjSetJmp materialized the 0/1 return values with LEAzii, which
defines an i64 register, into vregs with the i32 result register class.
This ill-typed MIR is rejected by -verify-machineinstrs.

Materialize the values in i64 and copy the low 32 bits (sub_i32) into the
i32 result. NFC on the emitted code.

Co-authored-by: Claude (Claude-Opus-4.8)
DeltaFile
+13-4llvm/lib/Target/VE/VEISelLowering.cpp
+13-41 files

LLVM/project 75bb9c6llvm/include/llvm/MC MCTargetOptions.h, llvm/include/llvm/Target TargetOptions.h

MC: Move DisableIntegratedAS from TargetOptions to MCTargetOptions

The integrated assembler is only meaningful in MC, so this field belongs
in MCTargetOptions alongside the other assembler options rather than in
the codegen-level TargetOptions.

Co-authored-by: Claude (Claude-Opus-4.8)
DeltaFile
+7-11llvm/include/llvm/Target/TargetOptions.h
+0-7llvm/lib/CodeGen/CommandFlags.cpp
+7-0llvm/lib/MC/MCTargetOptionsCommandFlags.cpp
+3-0llvm/include/llvm/MC/MCTargetOptions.h
+1-1llvm/lib/LTO/LTOCodeGenerator.cpp
+1-1llvm/lib/CodeGen/CodeGenTargetMachineImpl.cpp
+19-204 files not shown
+23-2410 files

LLVM/project da9625cllvm/include/llvm/Analysis ScalarEvolution.h, llvm/lib/Analysis ScalarEvolution.cpp

[SCEV] Strip unnecessary conversions around SCEVUse (NFC) (#219921)
DeltaFile
+3-14llvm/lib/Analysis/ScalarEvolution.cpp
+0-1llvm/include/llvm/Analysis/ScalarEvolution.h
+3-152 files

LLVM/project eefb335llvm/include/llvm/Support GenericLoopInfoImpl.h GenericLoopInfo.h, llvm/lib/Transforms/Scalar LoopInterchange.cpp

[LoopInfo] Merge changeTopLevelLoop and replaceChildLoopWith. NFC (#221503)

Both replace a loop among its siblings with a new one.
DeltaFile
+11-14llvm/include/llvm/Support/GenericLoopInfo.h
+0-17llvm/include/llvm/Support/GenericLoopInfoImpl.h
+1-4llvm/lib/Transforms/Utils/LoopSimplify.cpp
+1-1llvm/lib/Transforms/Scalar/LoopInterchange.cpp
+13-364 files

LLVM/project 10d3708llvm/include/llvm/Analysis ScalarEvolution.h, llvm/lib/Analysis ScalarEvolution.cpp

[IndVarSimplify] Batch forgetValue calls in sinkUnusedInvariants (#219025)

It looks like every `forgetValue` clears the cached SCEV for an
instruction and everything downstream of it, by walking its def-use
children in `visitAndClearUsers` / `PushDefUseChildren` with a fresh
`Visited` each call. Since `sinkUnusedInvariants` calls `forgetValue`
once per sunk instruction, the overlapping users get re-walked over and
over, so it ends up $O(n^2)$.
```cpp
void ScalarEvolution::forgetValue(Value *V) {
  SmallPtrSet<Instruction *, 8> Visited;
  visitAndClearUsers(Worklist, Visited, ToForget);
  ...
}

// visitAndClearUsers
while (!Worklist.empty()) {
  Instruction *I = Worklist.pop_back_val();
  ...

    [23 lines not shown]
DeltaFile
+13-0llvm/lib/Analysis/ScalarEvolution.cpp
+5-1llvm/lib/Transforms/Scalar/IndVarSimplify.cpp
+4-0llvm/include/llvm/Analysis/ScalarEvolution.h
+22-13 files

LLVM/project 25348f5llvm/docs/CommandGuide llc.md, llvm/include/llvm/Target TargetOptions.h

CodeGen: Remove TargetOptions::NoTrappingFPMath (#221429)

This was replaced by the no-trapping-math attribute.
The one ARMAsmPrinter use already accounts for it.

no-trapping-math should probably replaced by !strictfp, but that's
another problem.
DeltaFile
+33-0llvm/test/CodeGen/ARM/eabi-attribute-no-trapping-math.ll
+0-9llvm/lib/CodeGen/CommandFlags.cpp
+1-6llvm/include/llvm/Target/TargetOptions.h
+0-4llvm/docs/CommandGuide/llc.md
+1-3llvm/test/CodeGen/ARM/build-attributes.ll
+1-2llvm/lib/Target/ARM/ARMAsmPrinter.cpp
+36-241 files not shown
+36-267 files

LLVM/project 50ba64allvm/docs/CommandGuide llc.md, llvm/include/llvm/Target TargetOptions.h

CodeGen: Remove TargetOptions::NoTrappingFPMath

This was replaced by the no-trapping-math attribute.
The one ARMAsmPrinter use already accounts for it.

no-trapping-math should probably replaced by !strictfp, but that's
another problem.
DeltaFile
+33-0llvm/test/CodeGen/ARM/eabi-attribute-no-trapping-math.ll
+0-9llvm/lib/CodeGen/CommandFlags.cpp
+1-6llvm/include/llvm/Target/TargetOptions.h
+0-4llvm/docs/CommandGuide/llc.md
+1-3llvm/test/CodeGen/ARM/build-attributes.ll
+1-2llvm/lib/Target/ARM/ARMAsmPrinter.cpp
+36-241 files not shown
+36-267 files

LLVM/project cb25e7cmlir/cmake/modules AddMLIRPython.cmake

[MLIR][Python] Pass -Wno-unused-template to nanobind build

As with a lot of other warnings, the nanobind build is also not clean
under -Wunused-template. This was enabled by default for clang 23
(although reverted for 23.1.1). Disable it in case it gets enabled again
and also in case anyone enables it manually.

Reviewers: joker-eph, makslevental, dcaballe

Pull Request: https://github.com/llvm/llvm-project/pull/221479
DeltaFile
+2-0mlir/cmake/modules/AddMLIRPython.cmake
+2-01 files

LLVM/project dd4a3eblldb/tools/lldb-fuzzer/lldb-target-fuzzer target.dict, llvm/test/CodeGen/AMDGPU div_i128.ll select-undef.ll

[𝘀𝗽𝗿] changes introduced through rebase

Created using spr 1.3.7

[skip ci]
DeltaFile
+108-72llvm/test/CodeGen/AMDGPU/GlobalISel/regbankselect-select.mir
+52-0lldb/tools/lldb-fuzzer/lldb-target-fuzzer/target.dict
+0-42llvm/test/Transforms/SLPVectorizer/AMDGPU/inst-count-heuristic.ll
+28-0llvm/test/Transforms/Attributor/nofpclass-bitcast-int-to-fp.ll
+23-0llvm/test/CodeGen/AMDGPU/select-undef.ll
+12-8llvm/test/CodeGen/AMDGPU/div_i128.ll
+223-1228 files not shown
+244-13814 files

LLVM/project 76aa59dclang-tools-extra/docs/clang-tidy/checks/readability non-const-parameter.md redundant-control-flow.md

[clang-tidy][docs] Rewrite readability check docs to Markdown [3/5]
DeltaFile
+98-101clang-tools-extra/docs/clang-tidy/checks/readability/qualified-auto.md
+49-50clang-tools-extra/docs/clang-tidy/checks/readability/named-parameter.md
+47-50clang-tools-extra/docs/clang-tidy/checks/readability/operators-representation.md
+34-37clang-tools-extra/docs/clang-tidy/checks/readability/redundant-access-specifiers.md
+34-34clang-tools-extra/docs/clang-tidy/checks/readability/redundant-control-flow.md
+32-34clang-tools-extra/docs/clang-tidy/checks/readability/non-const-parameter.md
+294-3064 files not shown
+380-39810 files

LLVM/project 5d1e048clang-tools-extra/docs/clang-tidy/checks/readability named-parameter.rst named-parameter.md

[clang-tidy][docs] Rename readability check docs to Markdown [3/5]
DeltaFile
+0-141clang-tools-extra/docs/clang-tidy/checks/readability/qualified-auto.rst
+141-0clang-tools-extra/docs/clang-tidy/checks/readability/qualified-auto.md
+0-87clang-tools-extra/docs/clang-tidy/checks/readability/operators-representation.rst
+87-0clang-tools-extra/docs/clang-tidy/checks/readability/operators-representation.md
+0-73clang-tools-extra/docs/clang-tidy/checks/readability/named-parameter.rst
+73-0clang-tools-extra/docs/clang-tidy/checks/readability/named-parameter.md
+301-30114 files not shown
+612-61220 files