[llvm] [InstCombine] Simplify demanded bits of blendv mask operands (PR #173723)
Simon Pilgrim via llvm-commits
llvm-commits at lists.llvm.org
Sun Dec 28 05:14:53 PST 2025
================
@@ -2890,21 +2889,25 @@ X86TTIImpl::instCombineIntrinsic(InstCombiner &IC, IntrinsicInst &II) const {
getNegativeIsTrueBoolVec(ConstantMask, IC.getDataLayout());
return SelectInst::Create(NewSelector, Op1, Op0, "blendv");
}
+ unsigned BitWidth = Mask->getType()->getScalarSizeInBits();
+ KnownBits Known(BitWidth);
----------------
RKSimon wrote:
Move the KnownBits inside the `if (Mask->getType()->isIntOrIntVectorTy())` block to reduce scope (it might not be valid later on).
https://github.com/llvm/llvm-project/pull/173723
More information about the llvm-commits
mailing list