[llvm] [VPlan] Create AVL as a phi from TC -> 0 with EVL tail folding (PR #151481)

Ramkumar Ramachandra via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 31 02:54:21 PDT 2025


================
@@ -2379,6 +2381,11 @@ bool VPlanTransforms::tryAddExplicitVectorLength(
       CanonicalIVIncrement->getDebugLoc(), "index.evl.next");
   EVLPhi->addOperand(NextEVLIV);
 
+  VPValue *NextAVL = Builder.createOverflowingOp(
+      Instruction::Sub, {AVLPhi, OpVPEVL}, {/*hasNUW=*/true, /*hasNSW=*/false},
----------------
artagnon wrote:

Can you explain why it has nuw but not nsw?

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


More information about the llvm-commits mailing list