[all-commits] [llvm/llvm-project] e56c2c: [IR] Remove llvm.strip.invariant.group intrinsic (...
Nikita Popov via All-commits
all-commits at lists.llvm.org
Wed Sep 23 01:46:39 PDT 2026
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: e56c2cefc3e7978de4a2d799fa3abec77d75af21
https://github.com/llvm/llvm-project/commit/e56c2cefc3e7978de4a2d799fa3abec77d75af21
Author: Nikita Popov <npopov at redhat.com>
Date: 2026-09-23 (Wed, 23 Sep 2026)
Changed paths:
M llvm/docs/LangRef.md
M llvm/docs/ReleaseNotes.md
M llvm/include/llvm/Analysis/TargetTransformInfoImpl.h
M llvm/include/llvm/Analysis/ValueTracking.h
M llvm/include/llvm/IR/IRBuilder.h
M llvm/include/llvm/IR/Instruction.h
M llvm/include/llvm/IR/Intrinsics.td
M llvm/include/llvm/IR/Value.h
M llvm/lib/Analysis/ConstantFolding.cpp
M llvm/lib/Analysis/InlineCost.cpp
M llvm/lib/Analysis/ValueTracking.cpp
M llvm/lib/CodeGen/CodeGenPrepare.cpp
M llvm/lib/CodeGen/GlobalISel/IRTranslator.cpp
M llvm/lib/CodeGen/SelectionDAG/FastISel.cpp
M llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
M llvm/lib/IR/AutoUpgrade.cpp
M llvm/lib/IR/IRBuilder.cpp
M llvm/lib/IR/Instruction.cpp
M llvm/lib/IR/Value.cpp
M llvm/lib/Target/AMDGPU/AMDGPULowerBufferFatPointers.cpp
M llvm/lib/Target/AMDGPU/AMDGPUPromoteAlloca.cpp
M llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp
M llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp
M llvm/lib/Transforms/InstCombine/InstructionCombining.cpp
M llvm/lib/Transforms/Instrumentation/MemorySanitizer.cpp
M llvm/test/Analysis/BasicAA/call-escape-source.ll
M llvm/test/Analysis/CostModel/X86/free-intrinsics.ll
M llvm/test/Analysis/CostModel/free-intrinsics-datalayout.ll
M llvm/test/Analysis/CostModel/free-intrinsics-no_info.ll
M llvm/test/Analysis/ValueTracking/invariant.group.ll
A llvm/test/Bitcode/upgrade-strip-invariant-group.ll
M llvm/test/CodeGen/AArch64/GlobalISel/irtranslator-no-op-intrinsics.ll
M llvm/test/CodeGen/AMDGPU/lower-buffer-fat-pointers-pointer-ops.ll
M llvm/test/CodeGen/AMDGPU/promote-alloca-invariant-markers.ll
M llvm/test/CodeGen/Generic/intrinsics.ll
R llvm/test/Instrumentation/MemorySanitizer/msan_llvm_strip_invariant.ll
M llvm/test/Other/invariant.group.ll
M llvm/test/Transforms/Attributor/nocapture-1.ll
M llvm/test/Transforms/CodeGenPrepare/AArch64/large-offset-gep.ll
M llvm/test/Transforms/CodeGenPrepare/X86/invariant.group.ll
M llvm/test/Transforms/DeadStoreElimination/launder.invariant.group.ll
M llvm/test/Transforms/FunctionAttrs/nocapture.ll
M llvm/test/Transforms/GVN/assume-equal.ll
M llvm/test/Transforms/GVN/invariant.group.ll
M llvm/test/Transforms/GlobalOpt/invariant.group.ll
R llvm/test/Transforms/Inline/inline_inv_group.ll
M llvm/test/Transforms/Inline/invariant-group-sroa.ll
M llvm/test/Transforms/Inline/launder.invariant.group.ll
M llvm/test/Transforms/InstCombine/invariant.group.ll
M llvm/test/Transforms/InstCombine/load.ll
M llvm/test/Transforms/InstCombine/new-delete-itanium.ll
M llvm/test/Transforms/InstSimplify/invariant.group-load.ll
M llvm/test/Transforms/NewGVN/invariant.group.ll
M llvm/test/Transforms/SROA/invariant-group.ll
M llvm/test/Transforms/SimplifyCFG/fold-branch-to-common-dest-free-cost.ll
M mlir/include/mlir/Dialect/LLVMIR/LLVMIntrinsicOps.td
M mlir/lib/Dialect/LLVMIR/IR/LLVMMemorySlot.cpp
M mlir/test/Dialect/LLVMIR/mem2reg.mlir
M mlir/test/Dialect/LLVMIR/roundtrip.mlir
M mlir/test/Target/LLVMIR/Import/intrinsic.ll
M mlir/test/Target/LLVMIR/llvmir-intrinsics.mlir
Log Message:
-----------
[IR] Remove llvm.strip.invariant.group intrinsic (#225399)
This intrinsic was originally introduced to make sure that if we have a
dominating condition like `a == launder.invariant.group(a)`, we don't
end up replacing the latter with the former, as that would allow the
optimizer to assume that the memory stays invariant, despite going
through a launder operation. Wrapping both comparison operands in
strip.invariant.group avoids the issue, because replacing one stripped
pointer with another is safe.
The underlying issue was fixed in
https://github.com/llvm/llvm-project/pull/224281 (and prior work), which
ensures that the problematic replacement cannot happen in the first
place.
https://github.com/llvm/llvm-project/pull/225072 stopped emitting
llvm.strip.invariant.group on the clang side.
This PR now removes the intrinsic entirely. To be on the safe side, it
is upgraded to llvm.launder.invariant.group. For Clang's specific usage,
just dropping it would be fine.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list