LLVM/project 6f1e6e4mlir/lib/Analysis/DataFlow ConstantPropagationAnalysis.cpp, mlir/test/Transforms sccp.mlir

[mlir][dataflow] Register dependency when const-prop fold returns non-operand (#194372)

Fixes #137509.

When `op->fold` returns a Value that is not one of `op`'s operands (e.g.
`unrealized_conversion_cast`'s fold returns the inner cast's operand),
`SparseConstantPropagation` read that value's lattice without
subscribing to it -- so the op was not revisited when the lattice
widened and its stale fold result was not updated.

Fix by using `getLatticeElementFor(getProgramPointAfter(op), v)` to
register the dependency. This matches a few places in
`SparseAnalysis.cpp` where the same strategy is used.

I'd love to use something even simpler than `unrealized_conversion_cast`
operation in the test, but this is what i got when minimizing the
reproduction from the original issue (#137509) and i wasn't able to find
any operation that would work for this reproduction.

Assisted-By: Claude Code
DeltaFile
+28-0mlir/test/Transforms/sccp.mlir
+6-2mlir/lib/Analysis/DataFlow/ConstantPropagationAnalysis.cpp
+34-22 files

LLVM/project 3232d38bolt/lib/Passes RegReAssign.cpp, bolt/test/AArch64 unsupported-passes.test

[BOLT][AArch64] Refuse to run RegReAssign pass (#194866)

RegReAssign hits an unreachable on AArch64 as it is a pass
(conceptually) specific to X86.

- Add a guard to RegReAssign for non-X86
- Update unsupported-passes.test
DeltaFile
+5-0bolt/lib/Passes/RegReAssign.cpp
+2-0bolt/test/AArch64/unsupported-passes.test
+7-02 files

LLVM/project 6d92257clang/docs HIPSupport.rst, clang/lib/CodeGen CGCUDANV.cpp

[ASan] Do not instrument HIP/CUDA fatbin wrapper sections (#194928)

[ASan] Do not instrument HIP/CUDA fatbin wrapper sections

HIP and CUDA runtimes consume these sections as packed wrapper arrays,
so ASan redzones would break the section ABI.

Fixes: ROCM-23813
DeltaFile
+32-8clang/test/Driver/linker-wrapper-image.c
+18-0clang/docs/HIPSupport.rst
+3-3llvm/test/tools/llvm-offload-wrapper/offload-wrapper.ll
+4-0clang/test/CodeGenCUDA/device-stub.cu
+1-0llvm/lib/Frontend/Offloading/OffloadWrapper.cpp
+1-0clang/lib/CodeGen/CGCUDANV.cpp
+59-116 files

LLVM/project 33a12dbllvm/utils/gn/secondary/llvm/lib/Transforms/Vectorize BUILD.gn, llvm/utils/gn/secondary/llvm/unittests/Transforms/Vectorize BUILD.gn

[gn build] Port 680a9908194e (#195083)
DeltaFile
+0-1llvm/utils/gn/secondary/llvm/lib/Transforms/Vectorize/BUILD.gn
+0-1llvm/utils/gn/secondary/llvm/unittests/Transforms/Vectorize/BUILD.gn
+0-22 files

LLVM/project 5e7e704llvm/utils/gn/secondary/llvm/unittests/ExecutionEngine/JITLink BUILD.gn

[gn build] Port 312d8823c616 (#195082)
DeltaFile
+1-0llvm/utils/gn/secondary/llvm/unittests/ExecutionEngine/JITLink/BUILD.gn
+1-01 files

LLVM/project 2d8f233llvm/lib/Target/AMDGPU AMDGPURegBankLegalizeRules.cpp, llvm/test/CodeGen/AMDGPU llvm.amdgcn.sqrt.ll

[AMDGPU][GlobalISel] Add RegBankLegalize rules for amdgcn_sqrt (#194231)

The new rule matches the existing uniform/divergent behavior used for
pseudo-scalar transcendental intrinsics

issue #192497
DeltaFile
+73-0llvm/test/CodeGen/AMDGPU/GlobalISel/regbankselect-pseudo-scalar-transcendental.mir
+10-0llvm/test/CodeGen/AMDGPU/llvm.amdgcn.sqrt.ll
+10-0llvm/lib/Target/AMDGPU/AMDGPURegBankLegalizeRules.cpp
+93-03 files

LLVM/project e672169llvm/utils/gn/secondary/libcxx/include BUILD.gn

[gn build] Port 124ab73043b2 (#195081)
DeltaFile
+0-1llvm/utils/gn/secondary/libcxx/include/BUILD.gn
+0-11 files

LLVM/project e803f21clang/include/clang/Basic DiagnosticGroups.td

[LifetimeSafety] Make `strict` a superset of `permissive` (#195068)
DeltaFile
+3-4clang/include/clang/Basic/DiagnosticGroups.td
+3-41 files

LLVM/project 54388f4mlir/include/mlir/Dialect/SPIRV/IR SPIRVBase.td

[mlir][SPIR-V] Rename SPV_INTEL_long_constant_composite to SPV_INTEL_long_composites (#195062)
DeltaFile
+5-5mlir/include/mlir/Dialect/SPIRV/IR/SPIRVBase.td
+5-51 files

LLVM/project 8dfe85bflang/lib/Optimizer/CodeGen CodeGen.cpp, flang/test/Fir convert-memref-codegen.mlir

[flang][fir] Support memref to memref fir.convert (#194954)

fir.convert of memref to memref can potentially arise due to a chain of
fir.convert between fir pointer types which get collapsed into a memref
to memref cast. Handle this as if we first convert to a pointer and then
convert the pointer to a memref.
DeltaFile
+89-28flang/test/Fir/convert-memref-codegen.mlir
+34-22flang/lib/Optimizer/CodeGen/CodeGen.cpp
+123-502 files

LLVM/project aae871bllvm/lib/CodeGen/SelectionDAG DAGCombiner.cpp, llvm/test/CodeGen/AArch64 cgp-usubo.ll

[DAGCombiner] Reconstruct borrow chain from icmp pattern for USUBO_CARRY (#193707)

DAG-level alternative to #189018 (CGP): match the canonical icmp form
  carry_out = or(icmp ult A, B, and(icmp eq A, B, carry_in))
in visitOR and rewrite to USUBO_CARRY so the backend can chain the
borrow through sbb/sbcs.

Gated on USUBO_CARRY being legal/custom at the type the integer
legalizes to, so targets without hardware carry-flag support are
unaffected. For oversize integers (e.g. i128 on x86_64/aarch64) type
legalization then expands one USUBO_CARRY into a chain of
register-width USUBO_CARRYs, which gives strictly better code than the
CGP-level reconstruction.

Fixes #106118.
DeltaFile
+165-27llvm/test/CodeGen/X86/subcarry.ll
+131-5llvm/test/CodeGen/AArch64/cgp-usubo.ll
+30-0llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
+326-323 files

LLVM/project cf96c9aclang/include/clang/AST OpenMPClause.h, clang/lib/CodeGen CGOpenMPRuntime.cpp

[𝘀𝗽𝗿] initial version

Created using spr 1.3.5
DeltaFile
+2,900-220openmp/runtime/src/kmp_taskdeps.cpp
+1,066-432openmp/runtime/src/kmp_tasking.cpp
+577-220clang/lib/CodeGen/CGOpenMPRuntime.cpp
+201-74openmp/runtime/src/kmp.h
+233-0clang/test/OpenMP/replayable_ast_print.cpp
+164-0clang/include/clang/AST/OpenMPClause.h
+5,141-94686 files not shown
+8,167-1,40692 files

LLVM/project a823dc8clang/include/clang/AST OpenMPClause.h, clang/lib/CodeGen CGOpenMPRuntime.cpp

[𝘀𝗽𝗿] changes to main this commit is based on

Created using spr 1.3.5

[skip ci]
DeltaFile
+2,900-220openmp/runtime/src/kmp_taskdeps.cpp
+1,066-432openmp/runtime/src/kmp_tasking.cpp
+577-220clang/lib/CodeGen/CGOpenMPRuntime.cpp
+201-74openmp/runtime/src/kmp.h
+233-0clang/test/OpenMP/replayable_ast_print.cpp
+164-0clang/include/clang/AST/OpenMPClause.h
+5,141-94685 files not shown
+8,116-1,40691 files

LLVM/project 8b14e42clang/include/clang/AST OpenMPClause.h, clang/lib/CodeGen CGOpenMPRuntime.cpp

[𝘀𝗽𝗿] changes to main this commit is based on

Created using spr 1.3.5

[skip ci]
DeltaFile
+2,900-220openmp/runtime/src/kmp_taskdeps.cpp
+1,057-432openmp/runtime/src/kmp_tasking.cpp
+577-220clang/lib/CodeGen/CGOpenMPRuntime.cpp
+201-74openmp/runtime/src/kmp.h
+233-0clang/test/OpenMP/replayable_ast_print.cpp
+164-0clang/include/clang/AST/OpenMPClause.h
+5,132-94685 files not shown
+8,107-1,40691 files

LLVM/project 2587dd2clang/include/clang/AST OpenMPClause.h, clang/lib/CodeGen CGOpenMPRuntime.cpp

[𝘀𝗽𝗿] initial version

Created using spr 1.3.5
DeltaFile
+2,900-220openmp/runtime/src/kmp_taskdeps.cpp
+1,066-432openmp/runtime/src/kmp_tasking.cpp
+577-220clang/lib/CodeGen/CGOpenMPRuntime.cpp
+201-74openmp/runtime/src/kmp.h
+233-0clang/test/OpenMP/replayable_ast_print.cpp
+164-0clang/include/clang/AST/OpenMPClause.h
+5,141-94685 files not shown
+8,116-1,40691 files

LLVM/project c5a881eclang/include/clang/AST OpenMPClause.h, clang/lib/CodeGen CGOpenMPRuntime.cpp

[𝘀𝗽𝗿] changes to main this commit is based on

Created using spr 1.3.5

[skip ci]
DeltaFile
+2,900-220openmp/runtime/src/kmp_taskdeps.cpp
+1,057-432openmp/runtime/src/kmp_tasking.cpp
+577-220clang/lib/CodeGen/CGOpenMPRuntime.cpp
+201-74openmp/runtime/src/kmp.h
+233-0clang/test/OpenMP/replayable_ast_print.cpp
+164-0clang/include/clang/AST/OpenMPClause.h
+5,132-94681 files not shown
+7,894-1,40687 files

LLVM/project 19a9232clang/include/clang/AST OpenMPClause.h, clang/lib/CodeGen CGOpenMPRuntime.cpp

[𝘀𝗽𝗿] initial version

Created using spr 1.3.5
DeltaFile
+2,900-220openmp/runtime/src/kmp_taskdeps.cpp
+1,057-432openmp/runtime/src/kmp_tasking.cpp
+577-220clang/lib/CodeGen/CGOpenMPRuntime.cpp
+201-74openmp/runtime/src/kmp.h
+233-0clang/test/OpenMP/replayable_ast_print.cpp
+164-0clang/include/clang/AST/OpenMPClause.h
+5,132-94685 files not shown
+8,107-1,40691 files

LLVM/project 0e998bbclang/include/clang/AST OpenMPClause.h, clang/lib/CodeGen CGOpenMPRuntime.cpp

[𝘀𝗽𝗿] changes to main this commit is based on

Created using spr 1.3.5

[skip ci]
DeltaFile
+2,900-220openmp/runtime/src/kmp_taskdeps.cpp
+953-444openmp/runtime/src/kmp_tasking.cpp
+577-220clang/lib/CodeGen/CGOpenMPRuntime.cpp
+195-74openmp/runtime/src/kmp.h
+233-0clang/test/OpenMP/replayable_ast_print.cpp
+164-0clang/include/clang/AST/OpenMPClause.h
+5,022-95881 files not shown
+7,784-1,41887 files

LLVM/project 63e1d6fclang/include/clang/AST OpenMPClause.h, clang/lib/CodeGen CGOpenMPRuntime.cpp

[𝘀𝗽𝗿] initial version

Created using spr 1.3.5
DeltaFile
+2,900-220openmp/runtime/src/kmp_taskdeps.cpp
+1,057-432openmp/runtime/src/kmp_tasking.cpp
+577-220clang/lib/CodeGen/CGOpenMPRuntime.cpp
+201-74openmp/runtime/src/kmp.h
+233-0clang/test/OpenMP/replayable_ast_print.cpp
+164-0clang/include/clang/AST/OpenMPClause.h
+5,132-94681 files not shown
+7,894-1,40687 files

LLVM/project 75e8549llvm/test/CodeGen/AMDGPU regalloc-hoist-spill-live-range-upd.ll, llvm/test/CodeGen/RISCV rvp-simd-64.ll rvp-ext-rv64.ll

rebase

Created using spr 1.3.5
DeltaFile
+5,061-4,162llvm/test/CodeGen/Thumb2/mve-clmul.ll
+4,652-0llvm/test/CodeGen/RISCV/rvp-simd-64.ll
+1,519-1,501llvm/test/Transforms/LoopVectorize/X86/x86-interleaved-accesses-masked-group.ll
+2,870-0llvm/test/CodeGen/AMDGPU/regalloc-hoist-spill-live-range-upd.ll
+1,433-1,387llvm/test/Transforms/LoopVectorize/first-order-recurrence.ll
+0-2,727llvm/test/CodeGen/RISCV/rvp-ext-rv64.ll
+15,535-9,7772,471 files not shown
+100,562-46,6112,477 files

LLVM/project b46caf1llvm/test/CodeGen/AMDGPU regalloc-hoist-spill-live-range-upd.ll, llvm/test/CodeGen/RISCV rvp-simd-64.ll rvp-ext-rv64.ll

[𝘀𝗽𝗿] changes introduced through rebase

Created using spr 1.3.5

[skip ci]
DeltaFile
+5,061-4,162llvm/test/CodeGen/Thumb2/mve-clmul.ll
+4,652-0llvm/test/CodeGen/RISCV/rvp-simd-64.ll
+1,519-1,501llvm/test/Transforms/LoopVectorize/X86/x86-interleaved-accesses-masked-group.ll
+2,870-0llvm/test/CodeGen/AMDGPU/regalloc-hoist-spill-live-range-upd.ll
+1,433-1,387llvm/test/Transforms/LoopVectorize/first-order-recurrence.ll
+0-2,727llvm/test/CodeGen/RISCV/rvp-ext-rv64.ll
+15,535-9,7772,471 files not shown
+100,562-46,6112,477 files

LLVM/project 93be9c0llvm/test/CodeGen/AMDGPU regalloc-hoist-spill-live-range-upd.ll, llvm/test/CodeGen/RISCV rvp-simd-64.ll rvp-ext-rv64.ll

rebase

Created using spr 1.3.5
DeltaFile
+5,061-4,162llvm/test/CodeGen/Thumb2/mve-clmul.ll
+4,652-0llvm/test/CodeGen/RISCV/rvp-simd-64.ll
+1,519-1,501llvm/test/Transforms/LoopVectorize/X86/x86-interleaved-accesses-masked-group.ll
+2,870-0llvm/test/CodeGen/AMDGPU/regalloc-hoist-spill-live-range-upd.ll
+1,433-1,387llvm/test/Transforms/LoopVectorize/first-order-recurrence.ll
+0-2,727llvm/test/CodeGen/RISCV/rvp-ext-rv64.ll
+15,535-9,7772,471 files not shown
+100,562-46,6112,477 files

LLVM/project 8242839llvm/test/CodeGen/AMDGPU regalloc-hoist-spill-live-range-upd.ll, llvm/test/CodeGen/RISCV rvp-simd-64.ll rvp-ext-rv64.ll

[𝘀𝗽𝗿] changes introduced through rebase

Created using spr 1.3.5

[skip ci]
DeltaFile
+5,061-4,162llvm/test/CodeGen/Thumb2/mve-clmul.ll
+4,652-0llvm/test/CodeGen/RISCV/rvp-simd-64.ll
+1,519-1,501llvm/test/Transforms/LoopVectorize/X86/x86-interleaved-accesses-masked-group.ll
+2,870-0llvm/test/CodeGen/AMDGPU/regalloc-hoist-spill-live-range-upd.ll
+1,433-1,387llvm/test/Transforms/LoopVectorize/first-order-recurrence.ll
+0-2,727llvm/test/CodeGen/RISCV/rvp-ext-rv64.ll
+15,535-9,7772,471 files not shown
+100,562-46,6112,477 files

LLVM/project b7b7969llvm/test/CodeGen/AMDGPU regalloc-hoist-spill-live-range-upd.ll, llvm/test/CodeGen/RISCV rvp-simd-64.ll rvp-ext-rv64.ll

rebase

Created using spr 1.3.5
DeltaFile
+5,061-4,162llvm/test/CodeGen/Thumb2/mve-clmul.ll
+4,652-0llvm/test/CodeGen/RISCV/rvp-simd-64.ll
+1,519-1,501llvm/test/Transforms/LoopVectorize/X86/x86-interleaved-accesses-masked-group.ll
+2,870-0llvm/test/CodeGen/AMDGPU/regalloc-hoist-spill-live-range-upd.ll
+1,433-1,387llvm/test/Transforms/LoopVectorize/first-order-recurrence.ll
+0-2,727llvm/test/CodeGen/RISCV/rvp-ext-rv64.ll
+15,535-9,7772,471 files not shown
+100,562-46,6112,477 files

LLVM/project fe780b3llvm/test/CodeGen/AMDGPU regalloc-hoist-spill-live-range-upd.ll, llvm/test/CodeGen/RISCV rvp-simd-64.ll rvp-ext-rv64.ll

[𝘀𝗽𝗿] changes introduced through rebase

Created using spr 1.3.5

[skip ci]
DeltaFile
+5,061-4,162llvm/test/CodeGen/Thumb2/mve-clmul.ll
+4,652-0llvm/test/CodeGen/RISCV/rvp-simd-64.ll
+1,519-1,501llvm/test/Transforms/LoopVectorize/X86/x86-interleaved-accesses-masked-group.ll
+2,870-0llvm/test/CodeGen/AMDGPU/regalloc-hoist-spill-live-range-upd.ll
+1,433-1,387llvm/test/Transforms/LoopVectorize/first-order-recurrence.ll
+0-2,727llvm/test/CodeGen/RISCV/rvp-ext-rv64.ll
+15,535-9,7772,471 files not shown
+100,562-46,6112,477 files

LLVM/project bbdc7b8llvm/test/CodeGen/AMDGPU regalloc-hoist-spill-live-range-upd.ll, llvm/test/CodeGen/RISCV rvp-simd-64.ll rvp-ext-rv64.ll

rebase

Created using spr 1.3.5
DeltaFile
+5,061-4,162llvm/test/CodeGen/Thumb2/mve-clmul.ll
+4,652-0llvm/test/CodeGen/RISCV/rvp-simd-64.ll
+1,519-1,501llvm/test/Transforms/LoopVectorize/X86/x86-interleaved-accesses-masked-group.ll
+2,870-0llvm/test/CodeGen/AMDGPU/regalloc-hoist-spill-live-range-upd.ll
+1,433-1,387llvm/test/Transforms/LoopVectorize/first-order-recurrence.ll
+0-2,727llvm/test/CodeGen/RISCV/rvp-ext-rv64.ll
+15,535-9,7772,471 files not shown
+100,562-46,6112,477 files

LLVM/project 8aa307dllvm/test/CodeGen/AMDGPU regalloc-hoist-spill-live-range-upd.ll, llvm/test/CodeGen/RISCV rvp-simd-64.ll rvp-ext-rv64.ll

[𝘀𝗽𝗿] changes introduced through rebase

Created using spr 1.3.5

[skip ci]
DeltaFile
+5,061-4,162llvm/test/CodeGen/Thumb2/mve-clmul.ll
+4,652-0llvm/test/CodeGen/RISCV/rvp-simd-64.ll
+1,519-1,501llvm/test/Transforms/LoopVectorize/X86/x86-interleaved-accesses-masked-group.ll
+2,870-0llvm/test/CodeGen/AMDGPU/regalloc-hoist-spill-live-range-upd.ll
+1,433-1,387llvm/test/Transforms/LoopVectorize/first-order-recurrence.ll
+0-2,727llvm/test/CodeGen/RISCV/rvp-ext-rv64.ll
+15,535-9,7772,471 files not shown
+100,562-46,6112,477 files

LLVM/project 33882f6llvm/test/CodeGen/AMDGPU regalloc-hoist-spill-live-range-upd.ll, llvm/test/CodeGen/RISCV rvp-simd-64.ll rvp-ext-rv64.ll

rebase

Created using spr 1.3.5
DeltaFile
+5,061-4,162llvm/test/CodeGen/Thumb2/mve-clmul.ll
+4,652-0llvm/test/CodeGen/RISCV/rvp-simd-64.ll
+1,519-1,501llvm/test/Transforms/LoopVectorize/X86/x86-interleaved-accesses-masked-group.ll
+2,870-0llvm/test/CodeGen/AMDGPU/regalloc-hoist-spill-live-range-upd.ll
+1,433-1,387llvm/test/Transforms/LoopVectorize/first-order-recurrence.ll
+0-2,727llvm/test/CodeGen/RISCV/rvp-ext-rv64.ll
+15,535-9,7772,471 files not shown
+100,562-46,6112,477 files

LLVM/project 1f3057fllvm/test/CodeGen/AMDGPU regalloc-hoist-spill-live-range-upd.ll, llvm/test/CodeGen/RISCV rvp-simd-64.ll rvp-ext-rv64.ll

[𝘀𝗽𝗿] changes introduced through rebase

Created using spr 1.3.5

[skip ci]
DeltaFile
+5,061-4,162llvm/test/CodeGen/Thumb2/mve-clmul.ll
+4,652-0llvm/test/CodeGen/RISCV/rvp-simd-64.ll
+1,519-1,501llvm/test/Transforms/LoopVectorize/X86/x86-interleaved-accesses-masked-group.ll
+2,870-0llvm/test/CodeGen/AMDGPU/regalloc-hoist-spill-live-range-upd.ll
+1,433-1,387llvm/test/Transforms/LoopVectorize/first-order-recurrence.ll
+0-2,727llvm/test/CodeGen/RISCV/rvp-ext-rv64.ll
+15,535-9,7772,471 files not shown
+100,560-46,6082,477 files

LLVM/project 352f983llvm/test/CodeGen/AMDGPU regalloc-hoist-spill-live-range-upd.ll, llvm/test/CodeGen/RISCV rvp-simd-64.ll rvp-ext-rv64.ll

rebase

Created using spr 1.3.5
DeltaFile
+5,061-4,162llvm/test/CodeGen/Thumb2/mve-clmul.ll
+4,652-0llvm/test/CodeGen/RISCV/rvp-simd-64.ll
+1,519-1,501llvm/test/Transforms/LoopVectorize/X86/x86-interleaved-accesses-masked-group.ll
+2,870-0llvm/test/CodeGen/AMDGPU/regalloc-hoist-spill-live-range-upd.ll
+1,433-1,387llvm/test/Transforms/LoopVectorize/first-order-recurrence.ll
+0-2,727llvm/test/CodeGen/RISCV/rvp-ext-rv64.ll
+15,535-9,7772,471 files not shown
+100,560-46,6082,477 files