LLVM/project 6a68b4d — llvm/lib/Target/ARM ARMTargetTransformInfo.cpp, llvm/test/CodeGen/Thumb2/LowOverheadLoops lob_v8main.ll

[ARM] Disable hardware loops without thumbv8.1-m.main instructions. (#243831)

Using +lob with thumbv8-m is not a valid combination, but the hardware
loop pass would attempt to insert instructions that were not selectable.
Make sure we don't try to generate hardware loops without thumbv8.1m
instructions.

Fixes #243545
DeltaFile
+50-0llvm/test/CodeGen/Thumb2/LowOverheadLoops/lob_v8main.ll
+1-1llvm/lib/Target/ARM/ARMTargetTransformInfo.cpp
+51-12 files

LLVM/project 99ecc8f — lldb/packages/Python/lldbsuite/test lldbtest.py dotest_args.py

[lldb][test] Remove leftover benchmark test infrastructure (#243494)

The old benchmark infrastructure were removed in 7e5fe3ec5aed (#108629).
but some supporting pieces were left behind:

* lldbbench.py which has has no users.
* The dotest '-y' option, whose handling was already removed in
923fdbadae3c but whose argparse definition remained.
DeltaFile
+0-120lldb/packages/Python/lldbsuite/test/lldbbench.py
+0-6lldb/packages/Python/lldbsuite/test/dotest_args.py
+2-3lldb/packages/Python/lldbsuite/test/lldbtest.py
+2-1293 files

LLVM/project 944442b — lldb/source/Host/windows PythonRuntimeLoaderWindows.cpp

[lldb][Windows] Also look for py Python (#242415)

It's common for Windows users to use the [Python
Launcher](https://stackoverflow.com/questions/50896496/what-is-the-difference-between-py-and-python-in-the-windows-terminal)
instead of a Python installation from python.org. The Python Launcher
does not put `python3.dll` in the `PATH`.

This patch makes LLDB also search for `python3.dll` in the Windows
Registry (see [PEP 514](https://peps.python.org/pep-0514/)) in order to
also be able to start LLDB on Windows if the user installed Python via
the Windows Store.
DeltaFile
+113-0lldb/source/Host/windows/PythonRuntimeLoaderWindows.cpp
+113-01 files

LLVM/project e9a4a50 — llvm/lib/Target/Hexagon HexagonHardwareLoops.cpp, llvm/test/CodeGen/Hexagon hwloop-dist-check.mir hwloop-unsigned-dist-guard.ll

[Hexagon] Use unsigned compare for unsigned hwloop distance guard (#236824)

The hardware-loop pass guards the trip count of an unsigned less-than or
less-or-equal loop with a signed comparison of the distance register. A
distance of 0xffffffff, such as a bound of UINT32_MAX, is seen as -1, so
the count is clamped to 1 and the loop exits after its first iteration.

Use C2_cmpgtui for unsigned CmpLess so the distance is compared as an
unsigned value. Signed loops and CmpGreater keep C2_cmpgti.

Signed-off-by: Kushal Pal <kushpal at qti.qualcomm.com>
DeltaFile
+27-0llvm/test/CodeGen/Hexagon/hwloop-unsigned-dist-guard.ll
+4-1llvm/lib/Target/Hexagon/HexagonHardwareLoops.cpp
+1-1llvm/test/CodeGen/Hexagon/hwloop-dist-check.mir
+32-23 files

LLVM/project 76e99bb — clang/include/clang/CIR/Dialect/IR CIRDialectBytecode.td, clang/lib/CIR/Dialect/IR CIRDialectBytecode.cpp

[CIR] Add bytecode encodings for types other than records (#243865)

Without a bytecode encoding, MLIR stores a dialect type as its printed
text, nested types included. Every CIR value and many attributes
reference a type, so after the attribute encodings (#229586) types are
most of what is left as text in a CIR bytecode file.

This adds native encodings for every CIR type except !cir.struct and
!cir.union:

- Integer (width, signedness, _BitInt), the floating-point types and
long double, bool, void, vptr.
- Pointer (with its address space), array, complex, function (the return
type is absent for void, so it carries a presence flag), vector (fixed
or scalable), matrix.
- Data member and method pointers, bit-field access units (plus
#cir.bitfield_decl, so they store no text), the CUDA surface/texture
types and the EH token types.


    [13 lines not shown]
DeltaFile
+149-0clang/include/clang/CIR/Dialect/IR/CIRDialectBytecode.td
+85-0clang/test/CIR/Bytecode/types.cir
+18-0clang/lib/CIR/Dialect/IR/CIRDialectBytecode.cpp
+252-03 files

LLVM/project c4feaa1 — llvm/lib/Target/ARM ARMTargetMachine.h ARMTargetMachine.cpp

ARM: Use LastSubtargetCache in getSubtargetImpl (#242561)

Reuse the last subtarget for functions with the same function attribute
set and module, or the same subtarget relevant attributes, float ABI
and ABI, instead of building the subtarget key. This works towards
all targets using a common pattern.

Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
DeltaFile
+30-12llvm/lib/Target/ARM/ARMTargetMachine.cpp
+17-0llvm/lib/Target/ARM/ARMTargetMachine.h
+47-122 files

LLVM/project 2a2152c — .github/workflows libcxx-lnt-refine-commits.yml llvm-test-suite-run.yml, libcxx/utils/ci/lnt README.md run-benchmarks

[libc++] Submit the LNT results of main commits as the main branch (#243970)

LNT now supports a concept of branches. This patch changes the CI jobs
to submit data as being under the `main` branch.

Assisted by Claude
DeltaFile
+14-2.github/workflows/llvm-test-suite-run.yml
+5-2libcxx/utils/ci/lnt/create-lnt-report
+4-2.github/workflows/libcxx-lnt-refine-commits.yml
+2-1libcxx/utils/ci/lnt/run-benchmarks
+1-0libcxx/utils/ci/lnt/README.md
+26-75 files

LLVM/project 07e7c31 — clang/unittests/Lex PPMemoryAllocationsTest.cpp

[NFC][clang] Adjust PPMemoryAllocationsTest ASan threshold (#244162)

The #243000 reduced the BumpPtrAllocator's GrowthDelay from 128 to
8, so the geometrically growing slabs leave the currently open slab
mostly empty. The test measures getTotalMemory(), which counts slab
capacity, and the 1M-#define workload now reports 150.96 bytes per
define under ASan instead of about 136.8, failing the 145.0 bound.
The bytes actually requested are unchanged; only the unused tail of
the last slab is larger.

Raise the ASan bound from 145.0 to 160.0 to cover the slab slack, as
done for the redzone overhead in #209024. The non-ASan bound of 130.0
is unchanged.
DeltaFile
+4-1clang/unittests/Lex/PPMemoryAllocationsTest.cpp
+4-11 files

LLVM/project d1ee282 — llvm/include/llvm/Transforms/IPO Attributor.h, llvm/lib/Target/AMDGPU AMDGPUAttributor.cpp

Attributor: Use types instead of IDs in AAKindSet (#244076)

Some MSVC builds reject the addresses of IDs of abstract attributes in
anonymous namespaces as template arguments. Pass the abstract attribute
types instead and compare the types to find the mask bits, which also
works with older GCC.

Fixes 19901848353e

Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
DeltaFile
+39-43llvm/include/llvm/Transforms/IPO/Attributor.h
+8-8llvm/lib/Target/AMDGPU/AMDGPUAttributor.cpp
+5-7llvm/lib/Transforms/IPO/Attributor.cpp
+52-583 files

LLVM/project aabb960 — llvm/lib/Target/AArch64 AArch64MIPeepholeOpt.cpp, llvm/test/CodeGen/AArch64 pr222095.ll

[AArch64] Share materialized constant between add x,k and sub x,k (#225430)

## Summary

Fixes Issue
#[222095](https://github.com/llvm/llvm-project/issues/222095).

When a function needs the same constant magnitude `k` both added and
subtracted (e.g. `use(a + k, b - k)`), and `k` doesn't fit as a direct
arithmetic immediate on this target, LLVM previously materialized two
unrelated constants -- `k` and `-k` -- into two separate registers, even
though only one ever needed to be built.

Example (from the linked issue, `k = 4097`):

```c
u32 use(u32 a, u32 b);
auto src(u32 a, u32 b) {
    u32 k = (1 << 12) + 1;

    [16 lines not shown]
DeltaFile
+111-4llvm/lib/Target/AArch64/AArch64MIPeepholeOpt.cpp
+105-0llvm/test/CodeGen/AArch64/pr222095.ll
+216-42 files

LLVM/project e817a20 — clang/include/clang/Basic Diagnostic.h, clang/lib/Basic Diagnostic.cpp

Add getOrInsertFile helper and reuse it in getFileUncached

Created using spr 1.3.7
DeltaFile
+5-12clang/lib/Serialization/ASTReader.cpp
+7-0clang/include/clang/Basic/Diagnostic.h
+3-3clang/lib/Basic/Diagnostic.cpp
+15-153 files

LLVM/project 81681b6 — clang/lib/Driver SanitizerArgs.cpp, clang/lib/Driver/ToolChains AMDGPU.cpp

[Driver][AMDGPU] Enable sanitizers AMDGCN flavoured SPIR-V (#241411)

Sanitizer support was not advertised for AMDGCN flavoured SPIR-V, which
is incorrect. The gating was based on XNACK being enabled (which, with
SPIR-V can only be ascertained at finalisation time) and on the triple
being an AMDGPU one. This patch corrects both of those aspects.
DeltaFile
+151-0clang/test/Driver/hip-sanitize-options-amdgcnspirv.hip
+7-3clang/lib/Driver/ToolChains/AMDGPU.cpp
+3-2clang/test/Driver/fsanitize.c
+3-1clang/lib/Driver/SanitizerArgs.cpp
+164-64 files

LLVM/project c8cce79 — mlir/lib/IR OperationSupport.cpp, mlir/test/IR operation-equality.mlir

[mlir] Handle lexical/dominance inversion in OperationEquivalence

Operation equivalence used to traverse blocks in their lexical order, i.e., the
order in which they are stored in the region. This order is not guaranteed to
match the dominance order. Operation equivalence therefore would not have
marked dominating values from a lexically following block as equivalent in the
cache, and would incorrectly consider them as not equivalent.

Traverse all blocks first to record equivalence between arguments and op
results first, then look at operands separately.
DeltaFile
+122-60mlir/lib/IR/OperationSupport.cpp
+86-0mlir/test/IR/operation-equality.mlir
+208-602 files

LLVM/project cb2c9f9 — llvm/test/Transforms/LoopVectorize/WebAssembly/CostModel gemm_int8_2x2.ll

[NFC][WebAssembly] CostModel test (#244143)
DeltaFile
+556-0llvm/test/Transforms/LoopVectorize/WebAssembly/CostModel/gemm_int8_2x2.ll
+556-01 files

LLVM/project 36eef79 — llvm/test/Transforms/SLPVectorizer/X86 vector-call-void-gathered.ll

[SLP][NFC]Add extra test for function vectorization, NFC

Pull-request: https://github.com/llvm/llvm-project/pull/244177
DeltaFile
+83-0llvm/test/Transforms/SLPVectorizer/X86/vector-call-void-gathered.ll
+83-01 files

LLVM/project 451b742 — llvm/test/Transforms/SLPVectorizer/X86 vector-call-void-gathered.ll

[𝘀𝗽𝗿] initial version

Created using spr 2.0.0-beta.1
DeltaFile
+83-0llvm/test/Transforms/SLPVectorizer/X86/vector-call-void-gathered.ll
+83-01 files

LLVM/project c178507 — llvm/lib/Transforms/Utils SimplifyIndVar.cpp, llvm/test/Transforms/IndVarSimplify iv-widen-elim-ext.ll

[IndVarSimplify] Use context to prove a narrow IV def non-negative (#236461)

When IndVars widens an IV, it checks for each narrow def (the IV and its
users) whether it is non-negative on every iteration. If so, zext and
sext of it are equal, so when widening the def’s users they can use
either.
Previously, non-negativity of the def was proved without context, so in
some cases we were unable to prove it and left trunc + zext pairs in the
code.
Now we ask SCEV at the def’s context, which lets it use dominating
guards and assumes.
This allows it to not insert unnecessary truncs/zexts. E.g. in

```
  if (m > 0)
    for (i32 i = 0; i < m; i++)
      use(zext(i + m <nsw>));
```


    [8 lines not shown]
DeltaFile
+19-28llvm/test/Transforms/IndVarSimplify/iv-widen-elim-ext.ll
+2-2llvm/lib/Transforms/Utils/SimplifyIndVar.cpp
+1-1llvm/test/Transforms/LoopFlatten/invalidate-scev-pr203176.ll
+22-313 files

LLVM/project 2ec65c9 — llvm/test/Analysis/ScalarEvolution max-trip-count-smax-exit-bound.ll, llvm/test/Transforms/IndVarSimplify iv-widen-elim-ext.ll

[IndVarSimplify][LoopVectorize][NFC] Add tests for widening a non-negative IV (#236443)

IndVars widens users of a non-negative IV with both sext and zext, but
doesn’t use guards on the IV start to prove it non-negative. It leads to
spare trunc + zext inserted for widened users.

Add tests for widening of the IV and its users with guards showing that
the IV start is non-negative.

Also add vectorizer tests showing that widening i - 32 affects runtime
checks, and tests showing that the widened IV worsens SCEV’s constant
max backedge-taken count after the exit rewrite to an smax bound.
DeltaFile
+488-1llvm/test/Transforms/IndVarSimplify/iv-widen-elim-ext.ll
+174-0llvm/test/Transforms/LoopVectorize/runtime-check-widened-iv-index.ll
+65-0llvm/test/Analysis/ScalarEvolution/max-trip-count-smax-exit-bound.ll
+727-13 files

LLVM/project 833ab40 — llvm/lib/Target/X86 X86ScheduleZnver4.td, llvm/test/tools/llvm-mca/X86/Znver3 dependency-breaking-gpr.s resources-adx.s

[X86] Fix ADC/SBB throughput in the znver3 and znver4 scheduling models (#243093)

WriteADC holds an ALU for 4 cycles (ReleaseAtCycles = [4]), so the model
allows only one ADC/SBB per cycle. ADC8mr/SBB8mr have an override that
holds an ALU for 7 cycles, with latency 1. On Zen 3 and Zen 4, ADC and
SBB use one ALU for one cycle, the same as ADD. This is also true for
the 8-bit RMW form.

This patch sets WriteADC to [1] in the znver3 and znver4 models and
removes the ADC8mr/SBB8mr override. The znver4 model is also the model
for znver5 and znver6. On Zen 5, uops.info also gives ADC about the same
cost as ADD.

Zen 3, measured with llvm-exegesis on a Ryzen 9 5950X (-mode=latency
--repetition-mode=loop --loop-body-size=64, min of 20 runs). Model:
llvm-mca Total Cycles / 1000 iterations; znver3 and znver4 give the same
values. Cycles per snippet; snippets at https://godbolt.org/z/arxd3dGxd.

                                  exegesis  model before  model after

    [36 lines not shown]
DeltaFile
+229-229llvm/test/tools/llvm-mca/X86/Znver4/resources-x86_64.s
+229-229llvm/test/tools/llvm-mca/X86/Znver3/resources-x86_64.s
+17-17llvm/test/tools/llvm-mca/X86/Znver4/resources-adx.s
+17-17llvm/test/tools/llvm-mca/X86/Znver3/resources-adx.s
+12-12llvm/test/tools/llvm-mca/X86/Znver3/dependency-breaking-gpr.s
+1-8llvm/lib/Target/X86/X86ScheduleZnver4.td
+505-5121 files not shown
+506-5207 files

LLVM/project c580306 — llvm/lib/Target/AMDGPU SIInstrInfo.cpp AMDGPUISelDAGToDAG.cpp, llvm/test/CodeGen/AMDGPU flat-global-memory-offset.ll

[AMDGPU] Fix FLAT offsets for constant memory on gfx101x (#242413)

gfx101x ignores FLAT instruction offsets for global memory. Extend the
existing workaround to all global-memory address spaces, including AS4
and AS6, in SelectionDAG matching and the shared offset legality check.

Assisted by: GPT 6.1-Sol
DeltaFile
+169-0llvm/test/CodeGen/AMDGPU/flat-global-memory-offset.ll
+1-1llvm/lib/Target/AMDGPU/SIInstrInfo.cpp
+1-1llvm/lib/Target/AMDGPU/AMDGPUISelDAGToDAG.cpp
+171-23 files

LLVM/project 83a5a3e — llvm/lib/Target/SPIRV/Analysis SPIRVConvergenceRegionAnalysis.cpp, llvm/unittests/Target/SPIRV SPIRVConvergenceRegionAnalysisTests.cpp

[SPIR-V] Avoid exponential path enumeration in findPathsToMatch (#212933)
DeltaFile
+100-0llvm/unittests/Target/SPIRV/SPIRVConvergenceRegionAnalysisTests.cpp
+42-20llvm/lib/Target/SPIRV/Analysis/SPIRVConvergenceRegionAnalysis.cpp
+142-202 files

LLVM/project 4e05c44 — llvm/lib/ExecutionEngine/JITLink COFFLinkGraphBuilder.cpp, llvm/test/ExecutionEngine/JITLink/x86-64 COFF_abs.s COFF_abs_external.s

[JITLink][COFF] Give external absolute symbols default scope (#239718)

Depends on #239712
Please review only the last commit of this set.

COFFLinkGraphBuilder makes every absolute symbol local, but ORC's
object interface lists an external one as a definition. So an object
with `.globl x` / `x = 5` fails to link with "Missing definitions".

Use the storage class, as lld-link does: external absolute symbols get
default scope. Static ones, such as @feat.00, stay local. 

Assisted-by: Claude Code

---------

Co-authored-by: Lang Hames <lhames at gmail.com>
DeltaFile
+24-0llvm/test/ExecutionEngine/JITLink/x86-64/COFF_abs_external.s
+11-1llvm/test/ExecutionEngine/JITLink/x86-64/COFF_abs.s
+3-3llvm/lib/ExecutionEngine/JITLink/COFFLinkGraphBuilder.cpp
+38-43 files

LLVM/project 3378644 — llvm/test/Transforms/FunctionAttrs nocapture.ll, llvm/test/Transforms/InstCombine simplify-demanded-fpclass-fptrunc-round-denormal.ll simplify-demanded-fpclass-fpext-denormal.ll

Merge branch 'main' into users/arsenm/attributor/aakindset-type-args
DeltaFile
+381-370llvm/test/Transforms/FunctionAttrs/nocapture.ll
+646-0llvm/test/Transforms/InstCombine/simplify-demanded-fpclass-fptrunc-denormal.ll
+631-0llvm/test/Transforms/InstCombine/simplify-demanded-fpclass-fpext-denormal.ll
+579-0llvm/test/Transforms/InstCombine/simplify-demanded-fpclass-fptrunc-round-denormal.ll
+0-558orc-rt/lib/connect-socket/sys/posix/sps/SimpleRemoteCAOverSocket.cpp
+558-0orc-rt/lib/connect-socket/host/posix/sps/SimpleRemoteCAOverSocket.cpp
+2,795-928460 files not shown
+16,735-6,616466 files

LLVM/project 82b0ff3 — offload/libompaccsupport/include/OpenMP/OMPT Callback.h, offload/libomptarget/src OffloadRTL.cpp

[Offload][Omp] Fix libomptarget OMPT disconnect segfault (#243190)

Libomp is calling libomptarget `finalizeLibrary` as part of its `atexit`
tear-down process. But because the order of library dependencies,
libomptarget deinitializes first so when `finalizeLibrary` is called,
calling even a simple `ODBG` (with debug enabled) results in a segfault
because the stream has already been destructed.

In this PR, we ensure that OMPT is disconnected (in libomptarget) at
deinit at the latest and avoid doing that again if recalled from libomp.

Also, the LibraryFinalizer was never used (and in any case it should be
called before olShutDown) so simplify the disconnect to the minimum.
DeltaFile
+11-40offload/libomptarget/src/OMPT/Callback.cpp
+5-0offload/libompaccsupport/include/OpenMP/OMPT/Callback.h
+3-0offload/libomptarget/src/OffloadRTL.cpp
+19-403 files

LLVM/project 3c46872 — llvm/lib/Transforms/Utils RelLookupTableConverter.cpp, llvm/test/Transforms/RelLookupTableConverter/X86 relative_lookup_table.ll

[RelLookupTableConverter] Support table with poison elements (#244155)

Support lookup tables with poison holes. We can convert this to a
relative lookup table with poison elements.
DeltaFile
+35-0llvm/test/Transforms/RelLookupTableConverter/X86/relative_lookup_table.ll
+15-0llvm/lib/Transforms/Utils/RelLookupTableConverter.cpp
+50-02 files

LLVM/project 8ffaed7 — offload/unittests/OffloadAPI/common Fixtures.hpp

[Offload] Avoid shadowing of test variables in the unittest ASSERT macros (#243921)

ASSERT_SUCCESS, ASSERT_SUCCESS_OR_UNSUPPORTED, ASSERT_ERROR and
ASSERT_ANY_ERROR store the checked result in a local variable named Res.
This is a ticking bomb: Res is also the name the test code itself uses
for results, e.g. 'ol_result_t Res = olInit(nullptr)' in olInit.cpp and
Environment.cpp, and several helpers in Fixtures.hpp and Properties.hpp.

Passing such a variable to one of the macros, e.g. ASSERT_SUCCESS(Res),
expands to 'ol_result_t Res = Res'. The macro's local shadows the test's
variable, is initialized from itself and is then dereferenced, so the
test crashes instead of checking the result. It only works today because
nobody happened to pass a variable named Res to these macros yet.

Rename the macro local to Res_ so it unlikly to collide.

Assisted-by: Claude
DeltaFile
+16-16offload/unittests/OffloadAPI/common/Fixtures.hpp
+16-161 files

LLVM/project ef73f3e — llvm/lib/CodeGen CodeGenPrepare.cpp, llvm/test/Transforms/CodeGenPrepare/AArch64 strength-reduce-vector-as-data.ll

[CGP] Vector LSR postcommit comments addressed (#240839)

Fixing up postcommit problems found in #226197

* Use CreatePtrAdd instead of CreateGEP
* Use TypeAllocSize of SourceElementType
* Add test for i24 indexing
DeltaFile
+56-0llvm/test/Transforms/CodeGenPrepare/AArch64/strength-reduce-vector-as-data.ll
+3-6llvm/lib/CodeGen/CodeGenPrepare.cpp
+59-62 files

LLVM/project 06b07ca — flang/include/flang/Lower/Support ReductionProcessor.h, flang/lib/Lower/OpenMP ClauseProcessor.h ClauseProcessor.cpp

[flang][OpenMP] Exclude user-defined reductions from assumed bounded recipe effects (#240814)

Currently, user-defined reduction recipes may have their memory effects
assumed to be bounded, for example through the presence of
a`task_reduction_assume_bounded_recipe_effects` attribute. However
user-defined reduction recipes may access storage beyond their operands,
violating the operation contracts of the
`*_reduction_assume_bounded_recipe_effects` attributes.

Add a new flag `hasUserDefinedReduction` tracking whether a construct
with a reduction has any user-defined reduction recipes.

I'm not aware of any other way of doing this, for example in the
existing `canAssumeBoundedRecipeEffects` helper functions a variable
symbol may be involved in multiple reductions.

AI-Assisted-by: Codex
DeltaFile
+135-0flang/test/Lower/OpenMP/recipe-memory-effects-user-reduction.f90
+19-13flang/lib/Lower/OpenMP/OpenMP.cpp
+15-6flang/lib/Lower/Support/ReductionProcessor.cpp
+8-5flang/lib/Lower/OpenMP/ClauseProcessor.cpp
+6-4flang/lib/Lower/OpenMP/ClauseProcessor.h
+5-2flang/include/flang/Lower/Support/ReductionProcessor.h
+188-306 files

LLVM/project bdb0780 — llvm/lib/ExecutionEngine/JITLink JITLinkGeneric.cpp, llvm/test/ExecutionEngine/JITLink/x86-64 MachO_absolute_symbols_only.s

[JITLink] Skip allocation for graphs with only empty sections (#239712)

An object whose only definitions are absolute symbols still has an
empty __text section on MachO. JITLinkerBase sent its graph to the
memory manager, and FinalizedAlloc asserted on the empty allocation.

Skip sections with no blocks, as BasicLayout does.

Assisted-by: Claude Code

Co-authored-by: Lang Hames <lhames at gmail.com>
DeltaFile
+27-0llvm/test/ExecutionEngine/JITLink/x86-64/MachO_absolute_symbols_only.s
+23-0llvm/unittests/ExecutionEngine/JITLink/JITLinkGenericTests.cpp
+1-1llvm/unittests/ExecutionEngine/JITLink/JITLinkTestUtils.h
+1-1llvm/lib/ExecutionEngine/JITLink/JITLinkGeneric.cpp
+52-24 files

LLVM/project 53623ac — llvm/lib/Target/AMDGPU AMDGPUMemoryUtils.cpp, llvm/test/CodeGen/AMDGPU noclobber-barrier.ll

[AMDGPU] Preserve noclobber after acquire operations from a different addrspace (#231855)

Follow-up to #219991 to address reviewer comments:
AMDGPUAnnotateUniformValues should annotate uniform global loads as
`!amdgpu.noclobber` if the memory they are reading is never clobbered (since
kernel launch) before the load is executed.
PR #219991 strengthened the logic to consider acquire operations before the
load as clobbering (because they cause stores from other threads to be observed
by the load without a data race).

This PR weakens this criterion to ignore acquire operations that don't affect
the global address space (because they don't affect what the load in question
may or may not see). This addresses the performance-relevant case of s_barriers
with LDS-only fences.

The logic is still overly pessimistic for one-as load acquires, they could also
be ignored when looking for clobbering operations.

Disclaimer: Claude gave review comments and suggestions that I addressed during

    [4 lines not shown]
DeltaFile
+16-13llvm/test/CodeGen/AMDGPU/noclobber-barrier.ll
+9-2llvm/lib/Target/AMDGPU/AMDGPUMemoryUtils.cpp
+25-152 files