[llvm] [VPlan] Expand VPWidenPointerInductionRecipe into separate recipes (PR #148274)

Luke Lau via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 22 04:06:13 PDT 2025


================
@@ -1083,6 +1090,8 @@ bool VPInstruction::onlyFirstLaneUsed(const VPValue *Op) const {
     return true;
   case VPInstruction::PtrAdd:
     return Op == getOperand(0) || vputils::onlyFirstLaneUsed(this);
+  case VPInstruction::WidePtrAdd:
+    return Op == getOperand(0);
----------------
lukel97 wrote:

Unlike PtrAdd, WidePtrAdd always needs a scalar base address and vector offset, and always produces a vector value. 

PtrAdd can generate a scalar which is why it needs the onlyFirstLaneUsed check

https://github.com/llvm/llvm-project/pull/148274


More information about the llvm-commits mailing list