[llvm] [InstCombine] Remove redundant align 1 assumptions. (PR #160695)
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Thu Sep 25 06:00:42 PDT 2025
================
@@ -3412,6 +3412,10 @@ Instruction *InstCombinerImpl::visitCallInst(CallInst &CI) {
!isPowerOf2_64(RK.ArgValue) || !isa<ConstantInt>(RK.IRArgValue))
continue;
+ // Remove align 1 bundles; they don't add any useful information.
+ if (RK.ArgValue == 1)
+ return CallBase::removeOperandBundle(II, OBU.getTagID());
----------------
nikic wrote:
Side note (as this is not the only place with this problem), but this API doesn't do the right thing if there are multiple assume operand bundles with the same name. No idea whether that's supposed to be allowed or only permitted by accident.
https://github.com/llvm/llvm-project/pull/160695
More information about the llvm-commits
mailing list