LLVM/project 86502ddllvm/lib/Transforms/Vectorize SLPVectorizer.cpp, llvm/test/Transforms/SLPVectorizer/X86 reduction-vals-used-as-load-indices.ll

[𝘀𝗽𝗿] initial version

Created using spr 1.3.7
DeltaFile
+27-30llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
+36-19llvm/test/Transforms/SLPVectorizer/X86/reduction-vals-used-as-load-indices.ll
+63-492 files

LLVM/project b8afe9fllvm/test/Transforms/SLPVectorizer/X86 reduction-vals-used-as-load-indices.ll

[SLP][NFC]Add a test with non-profitable vectorization for GEPs external users, NFC



Reviewers: 

Pull Request: https://github.com/llvm/llvm-project/pull/216518
DeltaFile
+202-0llvm/test/Transforms/SLPVectorizer/X86/reduction-vals-used-as-load-indices.ll
+202-01 files

LLVM/project e1ece3dclang/test/CodeGen/Mips variadic-aggregate.c

[MIPS][NFC] test mips variadic aggregate handling (#216509)

mips64 has some bugs here that I'll address in a followup. The problem
is that we get `inreg {float}` items in the variable argument list. That
breaks for aggregates like `_Complex long double` or just `struct { long
double a; b }`.
DeltaFile
+2,162-0clang/test/CodeGen/Mips/variadic-aggregate.c
+2,162-01 files

LLVM/project 85cffe6llvm/lib/Target/AMDGPU AMDGPUInstructionSelector.cpp

AMDGPU: Use m_GTrunc in selector def check (#216511)

Prefer mi_match over raw getVRegDef + opcode checks.
DeltaFile
+1-1llvm/lib/Target/AMDGPU/AMDGPUInstructionSelector.cpp
+1-11 files

LLVM/project 6d9a775utils/bazel/llvm-project-overlay/libc BUILD.bazel, utils/bazel/llvm-project-overlay/libc/test/src/math BUILD.bazel

[libc][bazel] Update bazel overlay for ceilf128 emulated float128 changes (#216515)

This updates the Bazel overlay following commit
e5174fe683e882f6bbd2ef023c9c9e293b273a98:

- Remove `:llvm_libc_types_float128` from `__support_math_ceilf128` deps
as `include/llvm-libc-types/float128.h` is no longer included.
- Add `:__support_cpp_bit` to `ceilf128` additional_deps for `bit_cast`.
- Add `ceilf128` math MPFR test target in
`libc/test/src/math/BUILD.bazel`.
DeltaFile
+5-0utils/bazel/llvm-project-overlay/libc/test/src/math/BUILD.bazel
+1-1utils/bazel/llvm-project-overlay/libc/BUILD.bazel
+6-12 files

LLVM/project 8f88dfdclang/lib/StaticAnalyzer/Checkers UseAfterLifetimeEnd.cpp, clang/test/Analysis lifetime-bound.cpp

[analyzer] Correctly highlight the variables' range in UseAfterLifetimeEnd reports (#215905)

Currently in the emitted reports from the `UseAfterLifetimeEnd` checker
the highlight range of the variables is incorrect which can lead to
confusion for the user.

```
temp.cpp:5:31: note: Value's lifetime bound to the lifetime of 'y' here
    4 |   int x = 1, y = 2;
      |   ~~~~~~~~~~~~~~~~
```

In this emitted note the highlight of the variable `y` incorrectly spans
to the variable `x` as well and vice versa. This does not meet the
quality requirements of a core Clang Static Analyzer Checker.

In this PR I get the `VarDecl` of the `VarRegion` and then return the
`SourceRange` based on the `VarDecl`'s location through `getLocation`.
This leads to the following emitted notes:

    [5 lines not shown]
DeltaFile
+29-1clang/test/Analysis/lifetime-bound.cpp
+4-2clang/lib/StaticAnalyzer/Checkers/UseAfterLifetimeEnd.cpp
+33-32 files

LLVM/project 2d6ec50llvm/lib/Target/RISCV/GISel RISCVLegalizerInfo.cpp

RISCV: Use m_GImplicitDef instead of getVRegDef + opcode check

Co-authored-by: Claude (Opus 4.8) <noreply at anthropic.com>
DeltaFile
+3-2llvm/lib/Target/RISCV/GISel/RISCVLegalizerInfo.cpp
+3-21 files

LLVM/project d4c0230llvm/lib/CodeGen/GlobalISel Utils.cpp LegalizerHelper.cpp

GlobalISel: Use m_GImplicitDef instead of getVRegDef opcode checks

Co-authored-by: Claude (Opus 4.8) <noreply at anthropic.com>
DeltaFile
+1-2llvm/lib/CodeGen/GlobalISel/LegalizerHelper.cpp
+1-1llvm/lib/CodeGen/GlobalISel/Utils.cpp
+2-32 files

LLVM/project 1567dcallvm/include/llvm/CodeGen/GlobalISel MIPatternMatch.h, llvm/lib/Target/AArch64/GISel AArch64PostLegalizerCombiner.cpp

AArch64: Use MIPatternMatch in PostLegalizerCombiner ext checks

Replace the getVRegDef + opcode-check idiom with mi_match. Add an
m_GSExtInReg matcher for G_SEXT_INREG, which has an extra immediate
operand and so does not fit the plain unary-op matcher shape.

Co-authored-by: Claude (Opus 4.8) <noreply at anthropic.com>
DeltaFile
+21-0llvm/include/llvm/CodeGen/GlobalISel/MIPatternMatch.h
+3-3llvm/lib/Target/AArch64/GISel/AArch64PostLegalizerCombiner.cpp
+24-32 files

LLVM/project 803b185llvm/lib/Target/AMDGPU AMDGPUInstructionSelector.cpp

AMDGPU: Use m_GTrunc in selector def check

Prefer mi_match over raw getVRegDef + opcode checks.
DeltaFile
+1-1llvm/lib/Target/AMDGPU/AMDGPUInstructionSelector.cpp
+1-11 files

LLVM/project 84219fallvm/lib/CodeGen/GlobalISel CombinerHelper.cpp

GlobalISel: Use MIPatternMatch to look up defs in CombinerHelper (#216507)

Replace direct getVRegDef uses that were followed by an opcode check
with the mi_match idiom, mirroring the artifact combiner cleanup in
2e172cd38272124da30cc913f1a372ba9ea59dcf. This handles a subset of
simple cases, others call for some nicer mi_match support.

Co-authored-by: Claude (Opus 4.8) <noreply at anthropic.com>
DeltaFile
+5-5llvm/lib/CodeGen/GlobalISel/CombinerHelper.cpp
+5-51 files

LLVM/project 4b6fe56llvm/lib/CodeGen/GlobalISel CombinerHelper.cpp

GlobalISel: Use MIPatternMatch to look up defs in CombinerHelper

Replace direct getVRegDef uses that were followed by an opcode check with
the mi_match idiom, mirroring the artifact combiner cleanup in
2e172cd38272124da30cc913f1a372ba9ea59dcf. This handles a subset of simple
cases, others call for some nicer mi_match support.

Co-authored-by: Claude (Opus 4.8) <noreply at anthropic.com>
DeltaFile
+5-5llvm/lib/CodeGen/GlobalISel/CombinerHelper.cpp
+5-51 files

LLVM/project 2239699llvm/include/llvm/IR RuntimeLibcalls.td, llvm/test/CodeGen/AArch64 ldexp-f128.ll exp10-f128.ll

RuntimeLibcalls: Fix AArch64 wrongly typed long-double libcalls (#215993)

Respect the triple's LongDoubleFormat.

AArch64SystemLibrary added the fp128-typed frexpl/ldexpl and exp10l
without a long-double-format guard, so triples where long double is IEEE double
(Darwin, Windows, Android) were emitting l suffixed calls with the wrong
type.

Co-authored-by: Claude (Claude-Opus-4.8) <noreply at anthropic.com>
DeltaFile
+24-0llvm/test/CodeGen/AArch64/frexp-f128.ll
+19-0llvm/test/CodeGen/AArch64/ldexp-f128.ll
+19-0llvm/test/CodeGen/AArch64/exp10-f128.ll
+12-2llvm/include/llvm/IR/RuntimeLibcalls.td
+74-24 files

LLVM/project 993ade2llvm/include/llvm/ADT SortedVectorMap.h, llvm/unittests/ADT SortedVectorMapTest.cpp

[ADT] Add const and reverse iterators to SortedVectorMap (#216439)

This patch adds cbegin, cend, rbegin, rend, crbegin, and crend to
SortedVectorMap along with reverse_iterator and const_reverse_iterator
type aliases.

The motivation here is to support const and reverse iteration in
SortedVectorMap, which is needed by tools like llvm-profdata for the
ongoing sample profile migration to SortedVectorMap.

Assisted-by: Antigravity
DeltaFile
+18-0llvm/unittests/ADT/SortedVectorMapTest.cpp
+11-0llvm/include/llvm/ADT/SortedVectorMap.h
+29-02 files

LLVM/project 4b2b396libc/test/src/math/smoke CMakeLists.txt generic_sqrtf128_test.cpp

generic_sqrtf128
DeltaFile
+5-0libc/test/src/math/smoke/generic_sqrtf128_test.cpp
+1-0libc/test/src/math/smoke/CMakeLists.txt
+6-02 files

LLVM/project dbe128blibc/test/src/math CMakeLists.txt, libc/test/src/math/smoke sqrtf128_test.cpp CMakeLists.txt

nits
DeltaFile
+2-0libc/test/src/math/CMakeLists.txt
+0-1libc/test/src/math/smoke/sqrtf128_test.cpp
+1-0libc/test/src/math/smoke/CMakeLists.txt
+3-13 files

LLVM/project 84176d9libc/config/baremetal/riscv entrypoints.txt, libc/config/darwin/aarch64 entrypoints.txt

entrypoints
DeltaFile
+1-1libc/config/linux/x86_64/entrypoints.txt
+1-1libc/config/linux/riscv/entrypoints.txt
+1-1libc/config/linux/aarch64/entrypoints.txt
+1-1libc/config/freebsd/x86_64/entrypoints.txt
+1-1libc/config/darwin/aarch64/entrypoints.txt
+1-1libc/config/baremetal/riscv/entrypoints.txt
+6-67 files not shown
+13-813 files

LLVM/project 83e1178utils/bazel/llvm-project-overlay/libc BUILD.bazel, utils/bazel/llvm-project-overlay/llvm BUILD.bazel

[bazel] Fix bazelisk failures after ORC RTBridge removal and libc float128 (#216505)

…at128

Commit f406aaec5f6dcb8dbe5d7267afdfdf80cea29d32 removed the ORC/RTBridge
directory and relocated its headers directly under
include/llvm/ExecutionEngine/Orc/. This updates OrcJIT and OrcShared in
llvm/BUILD.bazel to remove the obsolete RTBridge header glob patterns.

Additionally, this adds the missing :__support_fputil_float128 target in
libc/BUILD.bazel and includes it in the dependencies of
:__support_math_ceilf128 and :shared_math_headers_for_apfloat.

TAG=agy
CONV=cdc6d2a4-4a43-464a-ae1b-a56f935ee140
DeltaFile
+19-0utils/bazel/llvm-project-overlay/libc/BUILD.bazel
+2-4utils/bazel/llvm-project-overlay/llvm/BUILD.bazel
+21-42 files

LLVM/project 22ac4eclibc/shared/math sqrtf128.h, libc/src/__support/math sqrtf128.h

Modify sqrtf128 for emulated float128 type
DeltaFile
+148-65libc/test/src/math/smoke/sqrtf128_test.cpp
+46-20libc/test/src/math/sqrtf128_test.cpp
+6-9libc/src/__support/math/sqrtf128.h
+0-6libc/shared/math/sqrtf128.h
+4-1libc/src/math/generic/sqrtf128.cpp
+5-0libc/src/math/sqrtf128.h
+209-1015 files not shown
+214-10311 files

LLVM/project 13b45f5llvm/lib/Transforms/Vectorize SLPVectorizer.cpp, llvm/test/Transforms/SLPVectorizer/X86 split-node-reused-in-later-vector.ll copyable-extractelement-in-stores.ll

[𝘀𝗽𝗿] initial version

Created using spr 1.3.7
DeltaFile
+94-21llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
+22-15llvm/test/Transforms/SLPVectorizer/X86/same-values-sub-node-with-poisons.ll
+11-9llvm/test/Transforms/SLPVectorizer/X86/split-node-reused-and-reordered-operand.ll
+2-16llvm/test/Transforms/SLPVectorizer/X86/copyable-extractelement-in-stores.ll
+9-9llvm/test/Transforms/SLPVectorizer/X86/select-copyable-cmp-poison.ll
+6-8llvm/test/Transforms/SLPVectorizer/X86/split-node-reused-in-later-vector.ll
+144-786 files not shown
+162-10012 files

LLVM/project c20c479clang/docs AutomaticReferenceCounting.md AutomaticReferenceCounting.rst, clang/include/clang/Basic AttrDocs.td

Rebase

Created using spr 1.3.7
DeltaFile
+4,251-4,283clang/include/clang/Basic/AttrDocs.td
+21-3,157llvm/test/CodeGen/X86/fp128-libcalls-strict.ll
+0-2,674clang/docs/AutomaticReferenceCounting.rst
+2,591-0clang/docs/AutomaticReferenceCounting.md
+5-2,046llvm/test/CodeGen/X86/fp128-libcalls.ll
+1,725-0llvm/test/CodeGen/X86/scalar-minmax-simd.ll
+8,593-12,1601,621 files not shown
+62,749-38,1411,627 files

LLVM/project 6368d67clang/include/clang/CIR/Dialect/IR CIRTypes.td, clang/lib/CIR/CodeGen CIRGenRecordLayoutBuilder.cpp

[CIR] Mark bit-field access units as their own member kinds

A bit-field access unit is as wide as the compiler decides, which can be
narrower than the declared type of the bit-fields in it, and the member marks
say nothing about that: a unit with a named occupant is `data` and one with only
unnamed occupants is `empty`, the same marks a declared field gets.  So a member
holding a 32-bit bit-field of `long long` looks exactly like an `unsigned`
field, and the two are not the same to the ABI.  `BitsContainNoUserData`
recurses on the declared type, finds user data past bit 32 in the first and none
in the second, and classic CodeGen coerces the enclosing records to `i64` and
`i32`.

Split the unit cases out as `bitfield` and `empty_bitfield`.  A unit holds data
exactly when a named bit-field lands in it, so `isEmptyForABI` answers the same
for every record once it asks `holdsDataForABI` instead of testing for `data`
alone, and padding is untouched.  Nothing classifies on the new marks yet, so no
ABI treatment changes.  What needs them is pad-aware eightbyte classification,
which cannot tell a record's declared extents from its access units without
them.

    [2 lines not shown]
DeltaFile
+64-0clang/test/CIR/CodeGen/no-unique-address.cpp
+34-12clang/test/CIR/CodeGen/record-member-kinds.c
+27-16clang/lib/CIR/CodeGen/CIRGenRecordLayoutBuilder.cpp
+26-15clang/include/clang/CIR/Dialect/IR/CIRTypes.td
+15-16clang/test/CIR/CodeGen/record-member-kinds.cpp
+26-0clang/unittests/CIR/RecordMemberKindTest.cpp
+192-5913 files not shown
+262-9119 files

LLVM/project 6b1466fllvm/lib/CodeGen/SelectionDAG TargetLowering.cpp, llvm/lib/Support APFloat.cpp

[APFloat][SelectionDAG] Support Float8E5M3FNU in convert.{to,from}.arbitrary.fp

Float8E5M3FNU was already accepted by the IR verifier, because
isValidArbitraryFPFormat is defined in terms of
getArbitraryFPFormatSizeInBits and that table covers it. It was missing
from getArbitraryFPSemantics, so SelectionDAGBuilder rejected
it with "not implemented format" and the verifier-clean IR failed to
compile. Add the mapping and the corresponding entries in the
expandCONVERT_{TO,FROM}_ARBITRARY_FP format allowlists.

Unlike every other format the expansions handle so far, Float8E5M3FNU is
unsigned: it has no sign bit, so all 8 bits go to a 5-bit exponent and a
3-bit significand.

Since an unsigned format cannot represent a negative value, a negative
input now saturates to zero when the saturate flag is set, and is poison
otherwise. -0.0 is excluded from that and still converts to +0, and the
check is ordered before the NaN case so a negative NaN still produces the
NaN encoding. APFloat treats constructing a negative value in an unsigned

    [3 lines not shown]
DeltaFile
+263-0llvm/test/CodeGen/AMDGPU/float-to-arbitrary-fp-e5m3fnu.ll
+189-0llvm/test/CodeGen/X86/float-to-arbitrary-fp.ll
+37-11llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
+2-2llvm/lib/Support/APFloat.cpp
+2-1llvm/unittests/ADT/APFloatTest.cpp
+493-145 files

LLVM/project a479bcellvm/unittests/ADT APFloatTest.cpp

[APFloat][NFC] Add unit test coverage for getArbitraryFPSemantics

isValidArbitraryFPFormat and getArbitraryFPFormatSizeInBits have unit
tests, but getArbitraryFPSemantics, the mapping the conversion
intrinsics actually lower through, had none. Cover the formats it
supports, the valid formats it does not support yet, and invalid format
strings, and check that the two tables agree on the size of every
format with lowerable semantics.

Also add the missing Float8E5M3FNU case to the
getArbitraryFPFormatSizeInBits test.

Change-Id: I8fa9580ca6f03fd5e7b1de5354b71283cebb0f95
DeltaFile
+45-0llvm/unittests/ADT/APFloatTest.cpp
+45-01 files

LLVM/project e5174felibc/shared/math ceilf128.h, libc/src/__support/math ceilf128.h

[libc] Make ceilf128 use the emulated float128 type (#207735)

This tests the emulated float128 type using ceilf128
DeltaFile
+10-2libc/test/shared/shared_math_constexpr_test.cpp
+4-7libc/src/__support/math/ceilf128.h
+8-1libc/test/shared/shared_math_test.cpp
+0-6libc/shared/math/ceilf128.h
+5-1libc/test/src/math/smoke/ceilf128_test.cpp
+5-0libc/test/src/math/ceilf128_test.cpp
+32-1720 files not shown
+60-2726 files

LLVM/project 091ad3blibc/shared/math ceilf128.h

intial commit
DeltaFile
+0-6libc/shared/math/ceilf128.h
+0-61 files

LLVM/project b837679libc/src/math/generic CMakeLists.txt ceilf128.cpp

replace with bit_cast
DeltaFile
+2-1libc/src/math/generic/ceilf128.cpp
+1-0libc/src/math/generic/CMakeLists.txt
+3-12 files

LLVM/project 0c2e521lldb/test/API/tools/lldb-server TestGdbRemoteThreadsInStopReply.py

[lldb][test] Skip the frame 0 stack expedite test with an out-of-tree debugserver (#216496)

test_threads_info_expedites_stopped_frame_stack asserts that
jThreadsInfo
carries frame 0's stack memory for the stopped thread. debugserver only
does
that since b631e0cbd1c9, so a system debugserver sends the backchain
alone and
the test fails with "no frame 0 stack memory for stopped thread".
DeltaFile
+3-0lldb/test/API/tools/lldb-server/TestGdbRemoteThreadsInStopReply.py
+3-01 files

LLVM/project 4ba253cllvm/lib/Analysis ValueTracking.cpp, llvm/test/Transforms/Attributor nofpclass-powi.ll

[IR][Intrinsics] Fix llvm.powi to require a scalar integer exponent (#216160)

Fix llvm.powi intrinsic to enforce a scalar integer exponent,
aligning the implementation with the LangRef specification.
DeltaFile
+19-19llvm/test/Transforms/Attributor/nofpclass-powi.ll
+24-0llvm/test/Transforms/InstCombine/pow_fp_int.ll
+3-4llvm/test/Transforms/VectorCombine/X86/shuffle-of-intrinsics.ll
+3-4llvm/test/Transforms/VectorCombine/RISCV/shuffle-of-intrinsics.ll
+3-4llvm/test/Transforms/VectorCombine/AArch64/shuffle-of-intrinsics.ll
+3-4llvm/lib/Analysis/ValueTracking.cpp
+55-357 files not shown
+72-4313 files

LLVM/project 5dad114clang/include/clang/Basic AttrDocs.td, clang/test/CodeGen/LoongArch/lasx builtin-alias.c

Merge main into the derive-record-padding branch

Main has moved 931 commits and both parents of this branch landed with it, the
mark list in #215174 and the CIRGen marks in #215175, so this branch keeps only
the change that drops the stored `padded` bit and derives it from the `pad`
marks instead.

Assisted-by: Cursor / claude-opus-5
DeltaFile
+13,767-6,856llvm/test/tools/llvm-mca/AArch64/Cortex/C1Nano-sve-instructions.s
+6,347-3,146llvm/test/tools/llvm-mca/AArch64/Cortex/C1Nano-neon-instructions.s
+4,432-4,282clang/include/clang/Basic/AttrDocs.td
+5,067-2,506llvm/test/tools/llvm-mca/AArch64/Cortex/C1Nano-basic-instructions.s
+6,869-0llvm/test/tools/llvm-mca/AArch64/HiSilicon/hip12-sve-instructions.s
+2,728-2,728clang/test/CodeGen/LoongArch/lasx/builtin-alias.c
+39,210-19,5185,075 files not shown
+260,355-129,0085,081 files