LLVM/project 3fd07e3clang/lib/AST/ByteCode Compiler.cpp

[clang][bytecode] Only override constant-context state if we have an EvalEmitter (#211475)

This does not make sense when emitting bytecode, as the bytecode would
just contain a `PushCC`/`PopCC` pair with nothing in between.
DeltaFile
+8-4clang/lib/AST/ByteCode/Compiler.cpp
+8-41 files

LLVM/project 6cdc7bdllvm/lib/Target/AArch64 AArch64SchedNeoverseN2.td, llvm/test/tools/llvm-mca/AArch64/Neoverse N2-cas.s

[AArch64] Add CAS instructions to NeoverseN2 schedule model (#211195)

CAS instructions (B, H, W, X variants) are not described in the ARM
Neoverse N2 Software Optimization Guide. There used to be no schedule
model for them, so `llvm-mca` was unable to analyze code containing
these instructions:

    llvm-mca  -mtriple=aarch64 -mcpu=cortex-a78 -mattr=+lse casb.s

    error: found an unsupported instruction in the input assembly
    sequence, use -skip-unsupported-instructions=lack-sched to ignore
    these on the input.

    note: instruction:  casb    w0, w1, [sp]

The patch adds a basic schedule model of 14 cycles (as measured on
Cortex-A78 with llvm-exegesis) and L/S utilized pipelines (this is a
guess, the reality is likely more complicated).
DeltaFile
+86-0llvm/test/tools/llvm-mca/AArch64/Neoverse/N2-cas.s
+12-0llvm/lib/Target/AArch64/AArch64SchedNeoverseN2.td
+98-02 files

LLVM/project 2ad6998.github/workflows libclang-abi-tests.yml

workflows/libclang-abi-tests: Fix missing environment variable (#211959)

This was accidentally removed in
f6af6cedfd2fa731bf323608116d373379838b9a.
DeltaFile
+1-0.github/workflows/libclang-abi-tests.yml
+1-01 files

LLVM/project bab258a.github/workflows release-tasks.yml

workflows/relase-tasks: Fix variable name typo (#211732)
DeltaFile
+1-1.github/workflows/release-tasks.yml
+1-11 files

LLVM/project ae0f00d.github/workflows release-documentation.yml

workflows/release-documentation: Fix variable name typo (#211729)
DeltaFile
+1-1.github/workflows/release-documentation.yml
+1-11 files

LLVM/project 5602aeallvm/lib/Target/AMDGPU AMDGPURegBankLegalize.cpp, llvm/test/CodeGen/AMDGPU llvm.amdgcn.intersect_ray.ll packed-fp32.ll

[AMDGPU][GlobalISel] Fold redundant uniform G_AMDGPU_READANYLANE in RegBankCombiner
DeltaFile
+69-144llvm/test/CodeGen/AMDGPU/llvm.amdgcn.intersect_ray.ll
+60-137llvm/test/CodeGen/AMDGPU/packed-fp32.ll
+80-97llvm/test/CodeGen/AMDGPU/GlobalISel/insertelement.i8.ll
+58-0llvm/test/CodeGen/AMDGPU/GlobalISel/readanylane-combines.mir
+45-1llvm/lib/Target/AMDGPU/AMDGPURegBankLegalize.cpp
+6-10llvm/test/CodeGen/AMDGPU/GlobalISel/mul.ll
+318-3891 files not shown
+322-3937 files

LLVM/project 8def962.github CODEOWNERS

[Github] Add myself and lforg37 as mlir wasmssa codeowners (#212079)

Adding @flemairen6 and @lforg37 as codeowners of WasmSSA

Co-authored-by: Ferdinand Lemaire <flemairen6 at gmail.com>
DeltaFile
+3-0.github/CODEOWNERS
+3-01 files

LLVM/project abd6e74mlir/include/mlir/Dialect/WasmSSA/IR WasmSSAOps.td, mlir/lib/Conversion/RaiseWasm RaiseWasmMLIR.cpp

[MLIR][WasmSSA] Add global_set and select ops (#196613)

Adds two missing ops to the WasmSSA dialect.

- `wasmssa.global_set`
- `wasmssa.select`

---------

Co-authored-by: Ferdinand Lemaire <flscminecraft at gmail.com>
DeltaFile
+65-0mlir/test/Conversion/RaiseWasm/wasm-select-to-arith-select.mlir
+55-0mlir/test/Dialect/WasmSSA/global-invalid.mlir
+43-0mlir/include/mlir/Dialect/WasmSSA/IR/WasmSSAOps.td
+38-0mlir/lib/Dialect/WasmSSA/IR/WasmSSAOps.cpp
+37-0mlir/lib/Conversion/RaiseWasm/RaiseWasmMLIR.cpp
+37-0mlir/test/Dialect/WasmSSA/custom_parser/select.mlir
+275-03 files not shown
+323-09 files

LLVM/project dc26bf5lld/ELF Relocations.cpp, lld/test/ELF x86-64-gotpc-relax-too-far.s

[ELF] Retain .got for revertible no-PIC GOTPCRELX optimization (#212077)

Commit 9d6ec280fc537b55ef8641ea85d3522426bc5766 (2023) sets
GotSection::hasGotOffRel when adjustGotPcExpr returns R_RELAX_GOT_PC,
keeping .got alive for an optimization that X86_64::relaxOnce may
revert.

R_RELAX_GOT_PC_NOPIC (e.g. `addq`) in -no-pie mode has the same issue.
DeltaFile
+16-0lld/test/ELF/x86-64-gotpc-relax-too-far.s
+3-3lld/ELF/Relocations.cpp
+19-32 files

LLVM/project 7af5c42mlir/lib/Dialect/Tosa/IR TosaCanonicalizations.cpp, mlir/test/Dialect/Tosa canonicalize.mlir

[mlir][tosa] Fix mul/intdiv folds crashing on dynamic-shaped results (#212073)

`tosa.mul` and `tosa.intdiv` fold constant splat operands by building a
`DenseElementsAttr` of the result type, which asserts when that type has
a dynamic shape. When the operands are constants but the result type is
dynamic, folding aborted. Guard `mulBinaryFolder` and the `IntDivOp`
splat path on a static result shape, matching the other fold paths in
these ops.

Signed-off-by: Víctor Pérez Carrasco <victor.pc.upm at gmail.com>
DeltaFile
+25-0mlir/test/Dialect/Tosa/canonicalize.mlir
+4-1mlir/lib/Dialect/Tosa/IR/TosaCanonicalizations.cpp
+29-12 files

LLVM/project 40f8720lld/ELF Thunks.cpp Thunks.h

[ELF] Replace getAArch64ThunkDestVA with Thunk::getDestVA. NFC (#212071)

Suggested by
https://github.com/llvm/llvm-project/pull/209962/changes#r3595552131
DeltaFile
+9-15lld/ELF/Thunks.cpp
+2-0lld/ELF/Thunks.h
+11-152 files

LLVM/project a8a36f1llvm/lib/Transforms/Vectorize VPlan.cpp VPlanHelpers.h

[LV] Extract fixupHeaderPhiBackedges from VPlan::execute (NFC) (#212063)

Hoist the header-phi backedge fixup loop at the end of VPlan::execute
into a helper VPTransformState::fixupHeaderPhiBackedges.
DeltaFile
+22-18llvm/lib/Transforms/Vectorize/VPlan.cpp
+5-0llvm/lib/Transforms/Vectorize/VPlanHelpers.h
+27-182 files

LLVM/project 0a7d5c7llvm/test/CodeGen/Hexagon swp-epilog-phi12.mir

[Hexagon] Fix missing requires assert for swp-epilog-phi12.mir (#212062)
DeltaFile
+1-0llvm/test/CodeGen/Hexagon/swp-epilog-phi12.mir
+1-01 files

LLVM/project 01e63aaclang/test/OffloadTools/clang-linker-wrapper linker-wrapper.c linker-wrapper-hip-no-rdc.c, clang/test/OffloadTools/clang-offload-bundler basic.c zlib.c

clang/AMDGPU: Migrate clang-linker-wrapper tests to amdgpu triples (15)

Co-authored-by: Claude (Opus 4.8) <noreply at anthropic.com>
DeltaFile
+59-59clang/test/OffloadTools/clang-offload-bundler/basic.c
+33-33clang/test/OffloadTools/clang-linker-wrapper/linker-wrapper.c
+21-21clang/test/OffloadTools/clang-offload-bundler/zlib.c
+16-16clang/test/OffloadTools/clang-linker-wrapper/linker-wrapper-hip-no-rdc.c
+13-13clang/test/OffloadTools/clang-offload-bundler/zstd.c
+8-8clang/test/OffloadTools/clang-offload-bundler/asserts-on.c
+150-1504 files not shown
+158-15810 files

LLVM/project 1c7cd7fclang/test/CodeGen link-builtin-bitcode.c, clang/test/CodeGenCUDA link-builtin-bitcode-denormal-fp-mode.cu

clang/AMDGPU: Rename amdgcn triples to amdgpu in cc1 tests (14)

Replace the legacy amdgcn architecture name with amdgpu in various
test triples. This set of updates covers cases that did not have
a set -target-cpu.

Co-authored-by: Claude (Opus 4.8) <noreply at anthropic.com>
DeltaFile
+12-21clang/test/CodeGenCUDA/link-builtin-bitcode-denormal-fp-mode.cu
+11-11clang/test/Misc/amdgcn.languageOptsOpenCL.cl
+10-10clang/test/CodeGenOpenCL/amdgpu-sizeof-alignof.cl
+10-10clang/test/CodeGen/link-builtin-bitcode.c
+8-8clang/test/CodeGenOpenCL/sqrt-fpmath.cl
+8-8clang/test/Headers/openmp_device_math_isnan.cpp
+59-68261 files not shown
+485-495267 files

LLVM/project 8f4b357llvm/include/llvm/CodeGen SelectionDAG.h, llvm/lib/CodeGen/SelectionDAG SelectionDAG.cpp DAGCombiner.cpp

DAG: Use poison in getLoad/getStore for offsets

The painful part of this is due to a few unfortunate things.

1. poison is legalized to undef
2. Non-indexed load/store encode the offset as an undef (which is
   not like a TargetConstant, and does get legalized)
3. 2 asserts in DAGCombiner expect identical load/store nodes,
   which assumes the offset will be preserved and not converted
   between poison and undef
4. The getLoad/getStore overloads are a mess, and a path was missing
   to recreate the store case with the original offset.
DeltaFile
+36-20llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
+9-8llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
+7-7llvm/lib/Target/AMDGPU/R600ISelLowering.cpp
+12-0llvm/include/llvm/CodeGen/SelectionDAG.h
+4-4llvm/test/CodeGen/X86/merge-store-partially-alias-loads.ll
+2-2llvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp
+70-412 files not shown
+72-438 files

LLVM/project 2f3f97fclang/test/CodeGenCUDA struct-mangling-number.cu builtin-mangled-name.cu, clang/test/CodeGenHIP hip_weak_alias.cpp

clang/AMDGPU: Migrate -aux-triple amdgcn in cc1 tests to amdgpu (13) (#212052)

Update to the new architecture name.

Co-authored-by: Claude (Opus 4.8) <noreply at anthropic.com>
DeltaFile
+4-4clang/test/CodeGenCUDA/struct-mangling-number.cu
+3-3clang/test/SemaHIP/amdgpu-feature-builtins-cant-jump.hip
+2-2clang/test/CodeGenHIP/hip_weak_alias.cpp
+2-2clang/test/CodeGenCUDA/builtin-mangled-name.cu
+2-2clang/test/CodeGenCUDA/device-stub.cu
+2-2clang/test/CodeGenCUDA/unnamed-types.cu
+15-1527 files not shown
+43-4333 files

LLVM/project f704f39clang/test/OpenMP declare_variant_construct_codegen_1.c amdgpu_exceptions.cpp

clang/AMDGPU: Migrate OpenMP cc1 tests to amdgpu triples (12) (#212051)

Migrate the OpenMP offload cc1 tests to the new amdgpu triple scheme:

* -fopenmp-targets=amdgcn-amd-amdhsa ->
-fopenmp-targets=amdgpu-amd-amdhsa
    (the offload toolchain triple, the generic amdgpu arch).
  * The device -triple amdgcn-amd-amdhsa -> amdgpu-amd-amdhsa, or to the
specific subarch triple (dropping -target-cpu) where a -target-cpu was
    present.

Autogenerated CHECK lines are regenerated, and the few -Wopenmp-target-
exception diagnostics that embed the triple string are updated. Tests
that
intentionally assert the "target-cpu" function attribute are left
unchanged.

Co-authored-by: Claude (Opus 4.8) <noreply at anthropic.com>
DeltaFile
+24-24clang/test/OpenMP/declare_variant_construct_codegen_1.c
+11-11clang/test/OpenMP/amdgpu_exceptions.cpp
+10-10clang/test/OpenMP/amdgpu_throw.cpp
+10-10clang/test/OpenMP/amdgpu_try_catch.cpp
+8-8clang/test/OpenMP/amdgpu-unsafe-fp-atomics.cpp
+6-6clang/test/OpenMP/target_parallel_num_threads_strict_messages.cpp
+69-6948 files not shown
+173-17554 files

LLVM/project 96a8547llvm/lib/Transforms/Vectorize VPlanTransforms.cpp VPlan.h

[VPlan] Add VPRegionBlock::getEntryBranchOnMask helper (NFC) (#212060)

Add an accessor returning the VPBranchOnMaskRecipe guarding a replicate
region, i.e. the sole recipe of the region's entry block.
DeltaFile
+2-13llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp
+8-0llvm/lib/Transforms/Vectorize/VPlan.h
+7-0llvm/lib/Transforms/Vectorize/VPlan.cpp
+17-133 files

LLVM/project 353729bllvm/lib/Target/AMDGPU SIInstrInfo.h SIInstrInfo.cpp

[AMDGPU] Avoid quadratic erase in SIInstrWorklist (#211801)
DeltaFile
+10-8llvm/lib/Target/AMDGPU/SIInstrInfo.h
+2-1llvm/lib/Target/AMDGPU/SIInstrInfo.cpp
+12-92 files

LLVM/project 56f4b9cclang/test/CodeGenOpenCL builtins-amdgcn-s-buffer-load.cl builtins-amdgcn-gfx1250-load-monitor.cl

clang/AMDGPU: Migrate cc1 tests to subarch triples (11) (#211956)

Rewrite the second half of CodeGenOpenCL cc1 test RUN lines to the new
subarch triple form, dropping the redundant -target-cpu.

Co-authored-by: Claude (Opus 4.8) <noreply at anthropic.com>
DeltaFile
+97-97clang/test/CodeGenOpenCL/builtins-amdgcn-s-buffer-load.cl
+9-15clang/test/CodeGenOpenCL/builtins-amdgcn-gfx1250-load-monitor.cl
+9-8clang/test/CodeGenOpenCL/amdgpu-features-default-delta.cl
+5-5clang/test/CodeGenOpenCL/builtins-amdgcn-global-load-store.cl
+5-5clang/test/CodeGenOpenCL/amdgpu-xnack-any-only.cl
+4-4clang/test/CodeGenOpenCL/builtins-amdgcn-wave64.cl
+129-13444 files not shown
+205-21050 files

LLVM/project 6b0a469libunwind/src UnwindRegistersSave.S

[libunwind][PPC64] Fix unw_getcontext corrupting callee-saved VSX registers on LE (#198371)

This is the first of two independent fixes for libunwind on ppc64le
(ELFv2 ABI, little-endian), where two separate bugs together cause
SIGSEGV during backtracing. This commit addresses the VSX register
corruption; the TOC-restore fault is handled in a follow-up. Both
were discovered while debugging lang/rust build failures with
RUST_BACKTRACE=1 on FreeBSD/powerpc64le (IBM POWER9).

On ppc64le, `unw_getcontext` saves each VS register with an in-place
`xxswapd n, n` followed by `stxvd2x`. The swap is needed because
`stxvd2x` stores doublewords in the wrong order on LE. However, the
macro never applies a second `xxswapd` to restore the register after
the store, so all 64 VS registers are permanently corrupted on return
from `unw_getcontext`.

This affects every callee-saved VSX register: f14-f31 (VSR14-VSR31)
and VR20-VR31 (VSR52-VSR63). After `_Unwind_Backtrace` returns, any
code that uses these registers sees wrong values. In practice this

    [6 lines not shown]
DeltaFile
+4-0libunwind/src/UnwindRegistersSave.S
+4-01 files

LLVM/project 890d133clang/lib CMakeLists.txt

[Clang] Don't build static analyzer if disabled (#212024)

Even if the static analyzer is disabled, it still gets built into the
dylib. Unit tests and tools already get disables, so also stop building
the library. This reduces the time needed to build a dylib clang by
8-9%.
DeltaFile
+3-1clang/lib/CMakeLists.txt
+3-11 files

LLVM/project 23c1083clang/test/OffloadTools/clang-linker-wrapper linker-wrapper.c linker-wrapper-hip-no-rdc.c, clang/test/OffloadTools/clang-offload-bundler basic.c zlib.c

clang/AMDGPU: Migrate clang-linker-wrapper tests to amdgpu triples (15)

Co-authored-by: Claude (Opus 4.8) <noreply at anthropic.com>
DeltaFile
+59-59clang/test/OffloadTools/clang-offload-bundler/basic.c
+33-33clang/test/OffloadTools/clang-linker-wrapper/linker-wrapper.c
+21-21clang/test/OffloadTools/clang-offload-bundler/zlib.c
+16-16clang/test/OffloadTools/clang-linker-wrapper/linker-wrapper-hip-no-rdc.c
+13-13clang/test/OffloadTools/clang-offload-bundler/zstd.c
+8-8clang/test/OffloadTools/clang-offload-bundler/asserts-on.c
+150-1504 files not shown
+158-15810 files

LLVM/project efcc94cclang/test/CodeGen link-builtin-bitcode.c, clang/test/CodeGenCUDA link-builtin-bitcode-denormal-fp-mode.cu

clang/AMDGPU: Rename amdgcn triples to amdgpu in cc1 tests (14)

Replace the legacy amdgcn architecture name with amdgpu in various
test triples. This set of updates covers cases that did not have
a set -target-cpu.

Co-authored-by: Claude (Opus 4.8) <noreply at anthropic.com>
DeltaFile
+12-21clang/test/CodeGenCUDA/link-builtin-bitcode-denormal-fp-mode.cu
+11-11clang/test/Misc/amdgcn.languageOptsOpenCL.cl
+10-10clang/test/CodeGenOpenCL/amdgpu-sizeof-alignof.cl
+10-10clang/test/CodeGen/link-builtin-bitcode.c
+9-9clang/test/CodeGenOpenCL/address-spaces.cl
+8-8clang/test/CodeGenOpenCL/sqrt-fpmath.cl
+60-69261 files not shown
+487-497267 files

LLVM/project def032eclang/test/CodeGenCUDA struct-mangling-number.cu unnamed-types.cu, clang/test/CodeGenHIP hip_weak_alias.cpp

clang/AMDGPU: Migrate -aux-triple amdgcn in cc1 tests to amdgpu (13)

Update to the new architecture name.

Co-authored-by: Claude (Opus 4.8) <noreply at anthropic.com>
DeltaFile
+4-4clang/test/CodeGenCUDA/struct-mangling-number.cu
+3-3clang/test/SemaHIP/amdgpu-feature-builtins-cant-jump.hip
+2-2clang/test/CodeGenCUDA/unnamed-types.cu
+2-2clang/test/CodeGenHIP/hip_weak_alias.cpp
+2-2clang/test/CodeGenCUDA/kernel-stub-name.cu
+2-2clang/test/CodeGenCUDA/device-stub.cu
+15-1527 files not shown
+43-4333 files

LLVM/project 4cbc68cclang/test/OpenMP declare_variant_construct_codegen_1.c amdgpu_exceptions.cpp

clang/AMDGPU: Migrate OpenMP cc1 tests to amdgpu triples (12)

Migrate the OpenMP offload cc1 tests to the new amdgpu triple scheme:

  * -fopenmp-targets=amdgcn-amd-amdhsa -> -fopenmp-targets=amdgpu-amd-amdhsa
    (the offload toolchain triple, the generic amdgpu arch).
  * The device -triple amdgcn-amd-amdhsa -> amdgpu-amd-amdhsa, or to the
    specific subarch triple (dropping -target-cpu) where a -target-cpu was
    present.

Autogenerated CHECK lines are regenerated, and the few -Wopenmp-target-
exception diagnostics that embed the triple string are updated. Tests that
intentionally assert the "target-cpu" function attribute are left unchanged.

Co-authored-by: Claude (Opus 4.8) <noreply at anthropic.com>
DeltaFile
+24-24clang/test/OpenMP/declare_variant_construct_codegen_1.c
+11-11clang/test/OpenMP/amdgpu_exceptions.cpp
+10-10clang/test/OpenMP/amdgpu_throw.cpp
+10-10clang/test/OpenMP/amdgpu_try_catch.cpp
+8-8clang/test/OpenMP/amdgpu-unsafe-fp-atomics.cpp
+6-6clang/test/OpenMP/target_parallel_num_threads_strict_messages.cpp
+69-6948 files not shown
+173-17554 files

LLVM/project 9077c43clang/test/CodeGenOpenCL builtins-amdgcn-s-buffer-load.cl builtins-amdgcn-gfx1250-load-monitor.cl

clang/AMDGPU: Migrate cc1 tests to subarch triples (11)

Rewrite the second half of CodeGenOpenCL cc1 test RUN lines to the new
subarch triple form, dropping the redundant -target-cpu.

Co-authored-by: Claude (Opus 4.8) <noreply at anthropic.com>
DeltaFile
+97-97clang/test/CodeGenOpenCL/builtins-amdgcn-s-buffer-load.cl
+9-15clang/test/CodeGenOpenCL/builtins-amdgcn-gfx1250-load-monitor.cl
+9-8clang/test/CodeGenOpenCL/amdgpu-features-default-delta.cl
+5-5clang/test/CodeGenOpenCL/amdgpu-xnack-any-only.cl
+5-5clang/test/CodeGenOpenCL/builtins-amdgcn-global-load-store.cl
+4-4clang/test/CodeGenOpenCL/builtins-amdgcn-fp8.cl
+129-13444 files not shown
+205-21050 files

LLVM/project d1af60fllvm/lib/CodeGen/SelectionDAG LegalizeDAG.cpp, llvm/lib/Target/RISCV RISCVISelLowering.cpp

DAG: Stop legalizing poison to undef (#211890)

Previously all targets would expand poison to undef, which was a
shortcut taken when poison was introduced.

Introduces a new dedicated poison matcher in tablegen; this avoids
multiple opcode changes, and avoids some problematic contexts that
couldn't deal with PatFrags.

This probably should be legal by default for all legal types.

Co-authored-by: Claude (Claude-Opus-4.8)
DeltaFile
+11-7llvm/lib/Target/RISCV/RISCVISelLowering.cpp
+16-0llvm/utils/TableGen/DAGISelMatcher.h
+8-8llvm/test/CodeGen/X86/vselect-avx.ll
+14-0llvm/utils/TableGen/DAGISelMatcher.cpp
+0-13llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
+4-4llvm/test/CodeGen/AArch64/sve-fixed-length-frame-offests.ll
+53-3215 files not shown
+89-4721 files

LLVM/project 197cf54clang/test/CodeGenOpenCL amdgpu-enqueue-kernel.cl builtins-amdgcn-gfx11.cl

clang/AMDGPU: Migrate cc1 tests to subarch triples (10) (#211955)

Rewrite the first half of CodeGenOpenCL cc1 test RUN lines to the new
subarch triple form, dropping the redundant -target-cpu.

Co-authored-by: Claude (Opus 4.8) <noreply at anthropic.com>
DeltaFile
+20-12clang/test/CodeGenOpenCL/amdgpu-enqueue-kernel.cl
+12-12clang/test/CodeGenOpenCL/builtins-amdgcn-gfx11.cl
+8-8clang/test/CodeGenOpenCL/builtins-amdgcn-gws-insts.cl
+6-6clang/test/CodeGenOpenCL/amdgpu-features-illegal.cl
+4-4clang/test/CodeGenOpenCL/builtins-amdgcn-workgroup-size.cl
+4-4clang/test/CodeGenOpenCL/builtins-amdgcn-vi.cl
+54-4644 files not shown
+122-11450 files