LLVM/project bfb662bcompiler-rt/test/asan lit.cfg.py

[ASan] Register assert lit feature in `lit.cfg.py` (#216529)

Add this feature to test a functional change related to asserts, see
https://github.com/llvm/llvm-project/pull/213546#discussion_r3790705838.

And this will allow other people to add `// REQUIRES: asserts` in
testcases in the future too.

I follow the same pattern already used in `flang/test/lit.cfg.py` and
other configs.
DeltaFile
+2-0compiler-rt/test/asan/lit.cfg.py
+2-01 files

LLVM/project be5ecb9llvm/utils/gn/secondary/llvm/lib/ABI BUILD.gn, llvm/utils/gn/secondary/llvm/unittests BUILD.gn

[gn] port 5f491a454cb8 (ABITests) (#216527)
DeltaFile
+10-0llvm/utils/gn/secondary/llvm/unittests/ABI/BUILD.gn
+1-0llvm/utils/gn/secondary/llvm/unittests/BUILD.gn
+1-0llvm/utils/gn/secondary/llvm/lib/ABI/BUILD.gn
+12-03 files

LLVM/project a5d0398clang/lib/ScalableStaticAnalysis/Analyses/UnsafeBufferUsage UnsafeBufferUsageAnalysis.cpp, clang/test/Analysis/Scalable/TypeConstrainedPointers unsafe-buffer-reachable-excludes-type-constrained-new-delete.cpp unsafe-buffer-reachable-excludes-type-constrained-main.cpp

[SSAF][UnsafeBufferAnalysis] Address follow up questions after the approval of #209354

- The analysis should not create entries for empty contributors, which otherwise is non-empty in the serialized format.
- use std IO instead of a tmp file for regex-ing FileCheck queries.

rdar://179151541 & rdar://179151882
DeltaFile
+3-8clang/test/Analysis/Scalable/TypeConstrainedPointers/unsafe-buffer-reachable-excludes-type-constrained-main.cpp
+3-2clang/lib/ScalableStaticAnalysis/Analyses/UnsafeBufferUsage/UnsafeBufferUsageAnalysis.cpp
+1-2clang/test/Analysis/Scalable/TypeConstrainedPointers/unsafe-buffer-reachable-excludes-type-constrained-new-delete.cpp
+7-123 files

LLVM/project 503c01allvm/include/llvm/Transforms/Utils Local.h, llvm/lib/Transforms/Utils Local.cpp

 [DebugInfo][NFC] Refactor debug record salvage (#215971)

Split address and variable-location salvage into helpers so the ordering
and the kill fallback stay visible in salvageDebugInfoForDbgValues, with the
variable-location helper returning whether it processed the record.
Rename the locals and parameters the move touches to say what they hold, and use
isAddressOfVariable() for the two #dbg_declare tests, which is the same
comparison.

Replace the address helper's single-use template with DbgVariableRecord
and pass it the instruction the caller already checked, rather than
recovering it with a dyn_cast the caller's check already covers.

Add a unit test for the dbg.assign address path.

No regressions on check-llvm or check-lldb; ran about 80 auto-generated C tests with 225ish locations and no differences in DW_AT_location on aarch64 at O2.

Assisted by AI.
DeltaFile
+85-77llvm/lib/Transforms/Utils/Local.cpp
+68-0llvm/unittests/Transforms/Utils/LocalTest.cpp
+2-2llvm/include/llvm/Transforms/Utils/Local.h
+155-793 files

LLVM/project 59d202cclang/lib/CIR/CodeGen CIRGenFunction.h CIRGenFunction.cpp, clang/test/CIR/CodeGenSYCL kernel-caller-entry-point.cpp

[CIR][SYCL] Device kernel caller (#213771)

During device compilation, emit a SYCL kernel caller offload entry point
in
place of each function declared with the sycl_kernel_entry_point
attribute,
mirroring classic CodeGen's `CodeGenModule::EmitSYCLKernelCaller`.

Depends on #213728
DeltaFile
+113-0clang/lib/CIR/CodeGen/CIRGenSYCL.cpp
+63-8clang/test/CIR/CodeGenSYCL/kernel-caller-entry-point.cpp
+15-0clang/lib/CIR/CodeGen/CIRGenTypes.cpp
+7-3clang/lib/CIR/CodeGen/CIRGenModule.cpp
+6-3clang/lib/CIR/CodeGen/CIRGenFunction.cpp
+8-0clang/lib/CIR/CodeGen/CIRGenFunction.h
+212-144 files not shown
+234-1410 files

LLVM/project 1c66431clang/lib/ScalableStaticAnalysis/Analyses/UnsafeBufferUsage UnsafeBufferUsageAnalysis.cpp, clang/test/Analysis/Scalable/TypeConstrainedPointers unsafe-buffer-reachable-excludes-type-constrained-main.cpp

address final comments after approval
DeltaFile
+3-8clang/test/Analysis/Scalable/TypeConstrainedPointers/unsafe-buffer-reachable-excludes-type-constrained-main.cpp
+3-2clang/lib/ScalableStaticAnalysis/Analyses/UnsafeBufferUsage/UnsafeBufferUsageAnalysis.cpp
+6-102 files

LLVM/project cbb5626clang/lib/ScalableStaticAnalysis/Analyses/UnsafeBufferUsage UnsafeBufferUsageAnalysis.cpp, clang/test/Analysis/Scalable/PointerFlow multi-dim-pointer-flow-constraint.test multi-decl-contributor.cpp

[SSAF][UnsafeBufferAnalysis] Filter out type-constrained pointers from reachable unsafe pointers (#209354)

Integrate the TypeConstrainedPointers analysis results into
UnsafeBufferReachableAnalysis. The final result is filtered to exclude
type-constrained pointers.

The pointer flow graph is untouched. Removing type-constrained pointers
from the graph would introduce unsoundness.

Final step for rdar://179151541 and rdar://179151882
DeltaFile
+112-0clang/test/Analysis/Scalable/TypeConstrainedPointers/unsafe-buffer-reachable-excludes-type-constrained-new-delete.cpp
+68-18clang/lib/ScalableStaticAnalysis/Analyses/UnsafeBufferUsage/UnsafeBufferUsageAnalysis.cpp
+60-0clang/test/Analysis/Scalable/TypeConstrainedPointers/unsafe-buffer-reachable-excludes-type-constrained-main.cpp
+26-0clang/test/Analysis/Scalable/ssaf-analyzer/Outputs/empty-pairs.json
+1-1clang/test/Analysis/Scalable/PointerFlow/multi-dim-pointer-flow-constraint.test
+1-1clang/test/Analysis/Scalable/PointerFlow/multi-decl-contributor.cpp
+268-202 files not shown
+270-228 files

LLVM/project 16d1129llvm/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 ca01779llvm/unittests/ADT APFloatTest.cpp

[APFloat][NFC] Add unit test coverage for `getArbitraryFPSemantics` (#216501)

`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.
DeltaFile
+45-0llvm/unittests/ADT/APFloatTest.cpp
+45-01 files

LLVM/project 2393da9llvm/lib/Target/AArch64/GISel AArch64PostLegalizerLowering.cpp, llvm/test/CodeGen/AArch64/GlobalISel arm64-atomic.ll

[AArch64][GlobalISel] Do not create atomic truncstore (#216522)

After #213935 the i64->i32 truncstore was failing to create a COPY
correctly.
We do not have tablegen patterns, so mirror what SDAG does and do not
create
atomic truncstore.
DeltaFile
+2,202-1,876llvm/test/CodeGen/AArch64/GlobalISel/arm64-atomic.ll
+2-0llvm/lib/Target/AArch64/GISel/AArch64PostLegalizerLowering.cpp
+2,204-1,8762 files

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