LLVM/project 4e0d78flld/ELF/Arch SPARCV9.cpp, lld/test/ELF sparcv9-tls-ie.s

[ELF,SPARC] Handle TLS IE relocations (#213500)

An initial-exec reference loads the symbol's TP-relative offset from the
GOT and adds the thread pointer:

```
sethi %tie_hi22(sym), %o0             # R_SPARC_TLS_IE_HI22
add   %o0, %tie_lo10(sym), %o0        # R_SPARC_TLS_IE_LO10
ldx   [%l7 + %o0], %o0, %tie_ldx(sym) # R_SPARC_TLS_IE_LDX
add   %g7, %o0, %o0, %tie_add(sym)    # R_SPARC_TLS_IE_ADD
```

The sethi and add form the GOT offset. In an executable a
non-preemptible symbol is optimized to Local Exec, as GNU ld does: the
sethi holds the complement, the add becomes an xor, and the load becomes
a register move, or a nop when source and destination are the same. The
thread pointer add is unchanged.

Co-authored-by: Kirill A. Korinsky <kirill at korins.ky>
Co-authored-by: LemonBoy <thatlemon at gmail.com>
Co-authored-by: Alex Rønne Petersen <alex at alexrp.com>
DeltaFile
+98-0lld/test/ELF/sparcv9-tls-ie.s
+40-0lld/ELF/Arch/SPARCV9.cpp
+138-02 files

LLVM/project b32d4f0mlir/include/mlir/Dialect/X86/TransformOps X86TransformOps.td, mlir/lib/Dialect/X86/Transforms VectorContractBF16ToFMA.cpp VectorContractToPackedTypeDotProduct.cpp

[mlir][x86] Decouple Accumulator from ADD-Based Vector Contractions (over loops) (#204327)

This path transforms `vector.contract(A, B, Acc)` into
`vector.contract(A, B, 0) + Acc` to decouple the contraction computation
from the accumulator update for contractions over the loop.
DeltaFile
+323-0mlir/test/Dialect/X86/move-acc-for-contract-loop.mlir
+118-0mlir/lib/Dialect/X86/Transforms/MoveAccumulatorForContractLoop.cpp
+51-17mlir/lib/Dialect/X86/Utils/X86Utils.cpp
+19-15mlir/lib/Dialect/X86/Transforms/VectorContractToPackedTypeDotProduct.cpp
+11-15mlir/lib/Dialect/X86/Transforms/VectorContractBF16ToFMA.cpp
+10-0mlir/include/mlir/Dialect/X86/TransformOps/X86TransformOps.td
+532-476 files not shown
+550-5212 files

LLVM/project 676d48flld/ELF/Arch SPARCV9.cpp, lld/test/ELF sparcv9-gotdata.s

[ELF,SPARC] Handle GOTDATA relocations (#213497)

A PIC data reference forms the symbol's GOT offset with
R_SPARC_GOTDATA_OP_HIX22 and R_SPARC_GOTDATA_OP_LOX10 and loads through
it, with R_SPARC_GOTDATA_OP marking the load:

```
sethi %gdop_hix22(sym), %g1
xor   %g1, %gdop_lox10(sym), %g1
ldx   [%l7 + %g1], %g1, %gdop(sym)
```

When the symbol is neither preemptible nor absolute, optimize the load
to `add %l7, %g1, %g1` over the symbol's GOT-relative address. An
absolute symbol keeps the GOT load, as it can be arbitrarily far from
.got and we don't want the X86_64::relaxOpt complexity.

Co-authored-by: Kirill A. Korinsky <kirill at korins.ky>
Co-authored-by: LemonBoy <thatlemon at gmail.com>
Co-authored-by: Alex Rønne Petersen <alex at alexrp.com>
DeltaFile
+141-0lld/test/ELF/sparcv9-gotdata.s
+32-0lld/ELF/Arch/SPARCV9.cpp
+173-02 files

LLVM/project 303e63dllvm/lib/ExecutionEngine/JITLink JITLinkGeneric.h JITLinkGeneric.cpp

[JITLink] Remove LTmp workaround now that LLVM requires C++17 (#213428)

C++17 guarantees the postfix-expression naming the called function is
sequenced before evaluation of its arguments, so
L->linkPhase1(std::move(L)) is well-formed without the LTmp indirection.
This should also be implemented by MSVC now. See here (P0145R3 and
P0400R0):

https://learn.microsoft.com/ar-sa/cpp/overview/visual-cpp-language-conformance?view=msvc-170
Disclaimer: As I have no LLVM Windows machine with MSVC at hand, I was
not able to test it myself.

Co-authored-by: Claude <noreply at anthropic.com>
DeltaFile
+4-26llvm/lib/ExecutionEngine/JITLink/JITLinkGeneric.cpp
+3-5llvm/lib/ExecutionEngine/JITLink/JITLinkGeneric.h
+7-312 files

LLVM/project 1ac9b99lldb/source/Plugins/ScriptInterpreter/Python ScriptInterpreterPython.cpp PythonDataObjects.h, lldb/test/API/commands/register/register_command TestRegisters.py

[lldb] Reimplement PythonCallable::GetArgInfo without executing Python code (#213378)

`b05a5d0a` added an arity-trimming step to the shared
`ScriptedPythonInterface::Dispatch`: extensions are now allowed to
define methods with trailing parameters as optional
(`num_children(self)` vs. `num_children(self, max_count)`), so before
calling into a method, `Dispatch` needs to know how many positional
arguments it actually accepts and drop any trailing ones we'd otherwise
pass.

That check calls `PythonCallable::GetArgInfo`, which ran a whole
embedded Python script through `inspect.signature` on every call, since
every scripted-extension dispatch goes through it.

For the common case `GetArgInfo()` actually needs to handle fast (plain
Python functions/methods, classes used as constructors, and callable
instances defining `__call__`, i.e. everything `Dispatch<T>()` and
`CreatePluginObject()` ever pass it), the answer is available as plain
data attributes, with no Python bytecode execution required:

    [15 lines not shown]
DeltaFile
+101-7lldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.cpp
+36-1lldb/unittests/ScriptInterpreter/Python/PythonDataObjectsTests.cpp
+9-0lldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.h
+8-0lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp
+0-1lldb/test/API/commands/register/register_command/TestRegisters.py
+154-95 files

LLVM/project aaabd24llvm/lib/Target/AMDGPU SILowerSGPRSpills.cpp, llvm/test/CodeGen/AMDGPU wwm-regalloc-error.ll sgpr-spill-vmem-large-frame.mir

[AMDGPU] Support partial and empty WWM pools for SGPR spills

SGPR lane spilling currently treats the WWM VGPR pool as all-or-nothing. This
can fail compilation when the requested pool cannot be formed, even though
scratch spilling or a smaller spillable pool could make progress.

This PR lets ordinary SGPR spills fall back to scratch when the pool is empty
and lets WWM register allocation use a nonempty partial pool. It keeps the
full-pool requirement for strict WWM/WQM and explicit spill-carrier
preallocation.

The no-pool fallback is recorded in SIMachineFunctionInfo so frame lowering can
provide enough emergency scavenging slots. The state is also serialized to
preserve the behavior across MIR round trips.
DeltaFile
+213-0llvm/test/CodeGen/AMDGPU/wwm-regalloc-memory-fallback.ll
+95-49llvm/lib/Target/AMDGPU/SILowerSGPRSpills.cpp
+101-0llvm/test/CodeGen/AMDGPU/wwm-regalloc-preallocation-guard.mir
+50-0llvm/test/CodeGen/AMDGPU/wwm-regalloc-partial-pool.mir
+36-0llvm/test/CodeGen/AMDGPU/sgpr-spill-vmem-large-frame.mir
+17-3llvm/test/CodeGen/AMDGPU/wwm-regalloc-error.ll
+512-526 files not shown
+549-6112 files

LLVM/project 11038ccllvm/include/llvm/CodeGen MachinePipeliner.h TargetInstrInfo.h, llvm/lib/CodeGen MachinePipeliner.cpp

Revert "[llvm][AArch64] Add pipeliner remarks" (#213485)

Reverts llvm/llvm-project#213157

Reverting to fix build bots.
DeltaFile
+0-168llvm/test/CodeGen/AArch64/sms-analyzeloop-remarks.mir
+12-94llvm/lib/Target/AArch64/AArch64InstrInfo.cpp
+0-83llvm/test/CodeGen/AArch64/sms-schedule-remark.mir
+3-22llvm/lib/CodeGen/MachinePipeliner.cpp
+2-6llvm/include/llvm/CodeGen/TargetInstrInfo.h
+0-6llvm/include/llvm/CodeGen/MachinePipeliner.h
+17-37913 files not shown
+32-41719 files

LLVM/project d21e392llvm/test/CodeGen/AMDGPU llc-pipeline.ll, llvm/test/CodeGen/ARM O3-pipeline.ll

add extra cycle analyses from MachineLICM not preserving CI

Created using spr 1.3.8-wip
DeltaFile
+11-0llvm/test/CodeGen/AMDGPU/llc-pipeline.ll
+2-0llvm/test/CodeGen/X86/opt-pipeline.ll
+2-0llvm/test/CodeGen/ARM/O3-pipeline.ll
+1-0llvm/test/CodeGen/SPIRV/llc-pipeline.ll
+1-0llvm/test/CodeGen/RISCV/O3-pipeline.ll
+1-0llvm/test/CodeGen/PowerPC/O3-pipeline.ll
+18-03 files not shown
+21-09 files

LLVM/project 41ededallvm/include/llvm/Analysis BlockFrequencyInfoImpl.h, llvm/lib/CodeGen MachineBlockFrequencyInfo.cpp LazyMachineBlockFrequencyInfo.cpp

[spr] initial version

Created using spr 1.3.8-wip
DeltaFile
+53-30llvm/include/llvm/Analysis/BlockFrequencyInfoImpl.h
+19-19llvm/test/CodeGen/AArch64/late-taildup-computed-goto.ll
+12-25llvm/lib/CodeGen/LazyMachineBlockFrequencyInfo.cpp
+16-20llvm/test/CodeGen/AMDGPU/llc-pipeline.ll
+12-11llvm/lib/CodeGen/MachineBlockFrequencyInfo.cpp
+8-14llvm/lib/Transforms/Instrumentation/PGOInstrumentation.cpp
+120-11939 files not shown
+240-25645 files

LLVM/project dbe7da3utils/bazel/llvm-project-overlay/libc BUILD.bazel

[Bazel] Fixes 350089d (#213482)

This fixes 350089d0cb1652e6ff44888f46d6487db5e696e6 (#213456).

Buildkite error link:
https://buildkite.com/llvm-project/upstream-bazel/builds?commit=350089d0cb1652e6ff44888f46d6487db5e696e6

Co-authored-by: Google Bazel Bot <google-bazel-bot at google.com>
DeltaFile
+1-0utils/bazel/llvm-project-overlay/libc/BUILD.bazel
+1-01 files

LLVM/project e3bde09mlir/include/mlir-c IR.h, mlir/lib/CAPI/IR IR.cpp

[mlir-c] Add structural operation equivalence (#206537)

Exposes `OperationEquivalence` through the MLIR C API so callers can compare operations structurally rather than by handle identity.

Assisted by: Claude
DeltaFile
+183-0mlir/test/CAPI/ir.c
+38-1mlir/include/mlir-c/IR.h
+19-0mlir/lib/CAPI/IR/IR.cpp
+240-13 files

LLVM/project ca9e76bllvm/include/llvm/CodeGen MachinePipeliner.h TargetInstrInfo.h, llvm/lib/CodeGen MachinePipeliner.cpp

Revert "[llvm][AArch64] Add pipeliner remarks (#213157)"

This reverts commit 25aec49d40d52ab730d360fc362ecd8b46e00db5.
DeltaFile
+0-168llvm/test/CodeGen/AArch64/sms-analyzeloop-remarks.mir
+12-94llvm/lib/Target/AArch64/AArch64InstrInfo.cpp
+0-83llvm/test/CodeGen/AArch64/sms-schedule-remark.mir
+3-22llvm/lib/CodeGen/MachinePipeliner.cpp
+2-6llvm/include/llvm/CodeGen/TargetInstrInfo.h
+0-6llvm/include/llvm/CodeGen/MachinePipeliner.h
+17-37913 files not shown
+32-41719 files

LLVM/project 84afdb4lld/MachO InputSection.cpp, lld/test/MachO icf-scale-same-class.s

[lld][MachO] Avoid quadratic iteration over already-folded symbols during ICF (#213339)

`ConcatInputSection::foldIdentical()` clears the folded functions
`originalUnwindEntry`.
However, it cleared every symbol: with N members, the repeated clearing
is **O(N²)**.
This is redundant: we should only remove the incoming `copy->symbols`.

This patch moves the removing loop ahead and adds more clear comments on
why we need to skip the first element.
Also added a new `lld/test/MachO/icf-scale-same-class.s` with 500K
identical functions as a stress test, which would've taken minutes to
link, and less than a second with the patch.

Testing on real-world app (IRPGO instrumentation + ICF) find that we
achieved a 19x speed up (1:14:42 -> 3:55)
DeltaFile
+37-0lld/test/MachO/icf-scale-same-class.s
+10-6lld/MachO/InputSection.cpp
+47-62 files

LLVM/project 89acefdclang/include/clang/Basic BuiltinsAMDGPU.td, clang/test/Sema builtins-amdgcn-d16-image-16bit-error.c

clang/AMDGPU: Require 16-bit-insts for half typed image builtins

Typed image load/store operations with 16-bit elements require d16
support which was introduced in gfx8. They were previously gated only
on image-insts, so they were wrongly accepted on targets that have
images but lack 16-bit support (e.g. gfx700), where the backend then
fails to select.

Co-Authored-By: Claude (Opus 4.8) <noreply at anthropic.com>
DeltaFile
+59-0clang/test/Sema/builtins-amdgcn-d16-image-16bit-error.c
+24-24clang/include/clang/Basic/BuiltinsAMDGPU.td
+83-242 files

LLVM/project b03b97bclang/include/clang/Basic BuiltinsAMDGPU.td, clang/lib/Sema SemaAMDGPU.cpp

clang/AMDGPU: Require 16-bit-insts for half typed buffer format builtins

Typed buffer format load/store operations with 16-bit elements require
d16 support which was introduced in gfx8. These builtins previously had
no required features at all, so they were accepted (and then crashed the
backend) on targets without 16-bit support.

Diagnose these in Sema, parallel to the image builtins. The manual
verification here suprised me. The automatic builtin feature verification
is enforced in codegen, which seems like a layering violation which
should be fixed.

Co-Authored-By: Claude (Opus 4.8) <noreply at anthropic.com>
DeltaFile
+19-0clang/test/Sema/builtins-amdgcn-d16-buffer-format-16bit-error.c
+14-0clang/lib/Sema/SemaAMDGPU.cpp
+4-4clang/include/clang/Basic/BuiltinsAMDGPU.td
+1-1clang/test/SemaHIP/builtins-amdgcn-buffer-format.hip
+1-1clang/test/CodeGenOpenCL/builtins-amdgcn-struct-buffer-store-format.cl
+1-1clang/test/CodeGenOpenCL/builtins-amdgcn-struct-buffer-load-format.cl
+40-73 files not shown
+43-109 files

LLVM/project 6ca4be6clang/include/clang/Basic OffloadArch.h, clang/lib/Basic Cuda.cpp

clang: Replace Is*OffloadArch free functions with OffloadArch methods

Drop the IsNVIDIAOffloadArch/IsAMDOffloadArch/IsIntel*OffloadArch free
functions in favor of the OffloadArch member predicate functions.

Co-authored-by: Claude (Claude-Opus-4.8) <noreply at anthropic.com>
DeltaFile
+29-19clang/unittests/Basic/OffloadArchTest.cpp
+6-6clang/lib/Driver/Driver.cpp
+0-9clang/include/clang/Basic/OffloadArch.h
+4-4clang/tools/clang-sycl-linker/ClangSYCLLinker.cpp
+2-2clang/lib/Basic/Cuda.cpp
+1-1clang/lib/Driver/ToolChains/Clang.cpp
+42-411 files not shown
+43-427 files

LLVM/project 2782614llvm/lib/Analysis InstructionSimplify.cpp ConstantFolding.cpp, llvm/test/Transforms/LoopVectorize constantfolder.ll interleaved-accesses-requiring-scev-predicates.ll

[InstSimplify] Defer to ConstantFold in simplifyInstrinsic (#205061)

Defer to ConstantFolding on all-constant operands, in
llvm::simplifyIntrinsic. The patch adds a context-function argument to
ConstantFoldIntrinsic for strictfp information, which is used by a new
canConstantFoldIntrinsic under canConstantFoldCallTo: it was
necessitated by exposing the constant-folder via
llvm::simplifyIntrinsic. The patch only has impact on passes that use
simplifyIntrinsic via InstSimplifyFolder, other than InstCombine, which
already constant-folds intrinsics.
DeltaFile
+68-142llvm/test/Transforms/LoopVectorize/hoist-predicated-loads-with-predicated-stores.ll
+30-34llvm/test/Transforms/LoopVectorize/interleaved-accesses-requiring-scev-predicates.ll
+40-20llvm/lib/Analysis/ConstantFolding.cpp
+37-2llvm/test/Transforms/LoopVectorize/constantfolder.ll
+2-13llvm/test/Transforms/LoopVectorize/RISCV/truncate-to-minimal-bitwidth-cost.ll
+7-0llvm/lib/Analysis/InstructionSimplify.cpp
+184-2113 files not shown
+189-2169 files

LLVM/project 7c64aeacompiler-rt/cmake/Modules CompilerRTUtils.cmake

[compiler-rt][cmake] filter libc-backed builtins superseded by assembly
DeltaFile
+2-0compiler-rt/cmake/Modules/CompilerRTUtils.cmake
+2-01 files

LLVM/project 8cb8e87llvm/test/tools/llubi gep-16-bit-addrspace.ll, llvm/tools/llubi/lib Context.cpp

[llubi]  Truncate struct field offsets exceeding the pointer index width (#213471)

Update computeGEP to implicitly truncate struct field offsets. This
fixes crashes in the new test, where the field offset does not fit in
the index width.

Related https://github.com/llvm/llvm-project/pull/213436

PR: https://github.com/llvm/llvm-project/pull/213471
DeltaFile
+18-0llvm/test/tools/llubi/gep-16-bit-addrspace.ll
+2-1llvm/tools/llubi/lib/Context.cpp
+20-12 files

LLVM/project 4671437libc/src/__support/math expm1.h tan.h

[libc] Add missing LIBC_INLINE to functions defined in .h files (#213442)
DeltaFile
+3-2libc/src/__support/math/tan.h
+2-2libc/src/__support/math/expm1.h
+5-42 files

LLVM/project 350089dlibc/src/__support common.h

[libc] Fix LLVM_LIBC_FUNCTION on 32-bit x86 Windows (#213456)

Previously, trying to compile libm with LIBC_COPT_PUBLIC_PACKAGING
defined failed on 32-bit Windows with

    error: alias must point to a defined variable or function

This is because 32-bit Windows adds a leading underscore to __cdecl C
functions, making the alias declaration not find its target symbol name.
The same problem exists on Apple platforms, which as solution don't emit
the alias for the C++ LIBC_NAMESPACE:: symbol.

Do the same on 32-bit Windows as on Apple platforms: Emit only
the underscore-prefixed symbol, not the LIBC_NAMESPACE:: alias.
DeltaFile
+17-14libc/src/__support/common.h
+17-141 files

LLVM/project 004ebf7llvm/test/TableGen RegClassByHwMode.td, llvm/utils/TableGen AsmMatcherEmitter.cpp

[𝘀𝗽𝗿] initial version

Created using spr 1.3.8-beta.1-arichardson
DeltaFile
+5-1llvm/utils/TableGen/AsmMatcherEmitter.cpp
+1-1llvm/test/TableGen/RegClassByHwMode.td
+6-22 files

LLVM/project 007c684mlir/include/mlir/Dialect/XeGPU/IR XeGPUAttrs.td XeGPUOps.td, mlir/lib/Dialect/XeGPU/IR XeGPUOps.cpp

[mlir][xegpu] Add xegpu.lane_shuffle op (#210777)

Add a lane-level XeGPU operation that re-distributes a subgroup's
fragments across its lanes without changing the element type.

The op takes a 1D vector — the fragment held by one lane — and returns a
fragment of the same type. A pack/unpack mode selects the direction:
viewing the subgroup as an S x N element grid (S = subgroup size, N =
elements per lane), pack moves element j of lane i from logical position
j*S + i to i*N + j, so a lane's elements end up at consecutive
positions; unpack is the reverse.
  
This implements xegpu.convert_layout semantics at the lane level when
lane_layout is unchanged but lane_data differs.
  
assisted-by-claude

---------

Co-authored-by: Claude Opus 4.8 <noreply at anthropic.com>
DeltaFile
+72-0mlir/include/mlir/Dialect/XeGPU/IR/XeGPUOps.td
+42-0mlir/test/Dialect/XeGPU/ops.mlir
+36-0mlir/test/Dialect/XeGPU/canonicalize.mlir
+23-0mlir/lib/Dialect/XeGPU/IR/XeGPUOps.cpp
+21-0mlir/include/mlir/Dialect/XeGPU/IR/XeGPUAttrs.td
+7-0mlir/test/Dialect/XeGPU/invalid.mlir
+201-01 files not shown
+204-07 files

LLVM/project cfd7f8blibc/test/shared shared_builtins_test.cpp

fix conflicts
DeltaFile
+2-5libc/test/shared/shared_builtins_test.cpp
+2-51 files

LLVM/project 1984097compiler-rt/lib/builtins comparetf2.cpp, libc/shared/builtins letf2.h getf2.h

[compiler-rt][builtins] libc-backed quad-float comparison builtins
DeltaFile
+49-0compiler-rt/lib/builtins/comparetf2.cpp
+36-0libc/src/__support/builtins/unordtf2.h
+36-0libc/src/__support/builtins/letf2.h
+36-0libc/src/__support/builtins/getf2.h
+35-0libc/shared/builtins/letf2.h
+35-0libc/shared/builtins/getf2.h
+227-06 files not shown
+321-012 files

LLVM/project 01d882acompiler-rt/lib/builtins comparedf2.cpp, libc/shared/builtins gedf2.h ledf2.h

[compiler-rt][builtins] libc-backed double-float comparison builtins
DeltaFile
+54-0compiler-rt/lib/builtins/comparedf2.cpp
+30-0libc/src/__support/builtins/ledf2.h
+30-0libc/src/__support/builtins/unorddf2.h
+30-0libc/src/__support/builtins/gedf2.h
+29-0libc/shared/builtins/gedf2.h
+29-0libc/shared/builtins/ledf2.h
+202-06 files not shown
+280-012 files

LLVM/project 63d6e8dcompiler-rt/lib/builtins comparesf2.cpp, libc/shared/builtins gesf2.h lesf2.h

[compiler-rt][builtins] libc-backed single-float comparison builtins
DeltaFile
+54-0compiler-rt/lib/builtins/comparesf2.cpp
+30-0libc/src/__support/builtins/lesf2.h
+30-0libc/src/__support/builtins/unordsf2.h
+30-0libc/src/__support/builtins/gesf2.h
+29-0libc/shared/builtins/gesf2.h
+29-0libc/shared/builtins/lesf2.h
+202-06 files not shown
+280-012 files

LLVM/project 8fd4c22libc/src/__support/builtins CMakeLists.txt cmp_helper.h

[libc][builtins] add cmp_helper for compiler-rt soft-float comparisons
DeltaFile
+63-0libc/src/__support/builtins/cmp_helper.h
+7-0libc/src/__support/builtins/CMakeLists.txt
+70-02 files

LLVM/project e2564f0libc/src/__support/builtins cmp_helper.h

fix format
DeltaFile
+2-2libc/src/__support/builtins/cmp_helper.h
+2-21 files

LLVM/project 6545f29llvm/lib/IR Operator.cpp, llvm/test/Transforms/ConstraintElimination gep-struct-offset-index-width.ll

[IR] Truncate struct field offsets exceeding the pointer index width. (#213436)

Update accumulateConstantOffset and collectOffset to implicitly truncate
struct field offsets. This fixes crashes in the new tests, where the
field offset does not fit in the index width.

PR: https://github.com/llvm/llvm-project/pull/213436
DeltaFile
+31-0llvm/test/Transforms/ConstraintElimination/gep-struct-offset-index-width.ll
+28-0llvm/test/Transforms/InstCombine/gep-struct-offset-index-width.ll
+6-4llvm/lib/IR/Operator.cpp
+65-43 files