[llvm] [ExpandVectorPredication] Expand vp.load.ff. (PR #154440)
Craig Topper via llvm-commits
llvm-commits at lists.llvm.org
Thu Aug 21 07:42:55 PDT 2025
================
@@ -465,6 +465,21 @@ CachingVPExpander::expandPredicationInMemoryIntrinsic(IRBuilder<> &Builder,
VPI.getName());
break;
}
+ case Intrinsic::vp_load_ff: {
+ // Mask out all but the first lane.
+ Value *NewMask = ConstantInt::getFalse(MaskParam->getType());
+ NewMask = Builder.CreateInsertElement(
+ NewMask, ConstantInt::getTrue(MaskParam->getType()->getScalarType()),
+ (uint64_t)0);
----------------
topperc wrote:
There are 2 CreateInsertElement functions. The other takes a Value*. Because 0 is implicitly convertible to nullptr it becomes ambiguous. Using uint64_t makes the type match exactly so implicit conversions don't get checked.
https://github.com/llvm/llvm-project/pull/154440
More information about the llvm-commits
mailing list