[llvm] [VPlan] Model first memory runtime checks as VPlan recipes. (PR #221483)
Florian Hahn via llvm-commits
llvm-commits at lists.llvm.org
Wed Sep 23 06:50:28 PDT 2026
================
@@ -808,8 +808,11 @@ Value *VPInstruction::generate(VPTransformState &State) {
OnlyFirstLaneUsed || vputils::isSingleScalar(getOperand(0)));
Value *Op1 = State.get(getOperand(1), OnlyFirstLaneUsed);
Value *Op2 = State.get(getOperand(2), OnlyFirstLaneUsed);
- return Builder.CreateSelectFMF(Cond, Op1, Op2, getFastMathFlagsOrNone(),
- Name);
+ Value *Sel =
+ Builder.CreateSelectFMF(Cond, Op1, Op2, getFastMathFlagsOrNone(), Name);
+ if (auto *I = dyn_cast<Instruction>(Sel))
+ applyMetadata(*I);
+ return Sel;
----------------
fhahn wrote:
This is only needed/testable via this patch. But I split off the whole pointer max handling that emits selects as we now also need the metadata changes to match IR SCEV expander and it has become quite a bit of extra code
https://github.com/llvm/llvm-project/pull/221483
More information about the llvm-commits
mailing list