[llvm] b6d994d - [VPlan] Address post-commit suggestions for af635a554 (NFC).

Florian Hahn via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 8 05:01:16 PDT 2023


Author: Florian Hahn
Date: 2023-08-08T12:59:34+01:00
New Revision: b6d994de0f1fadff7e135dcd96c3eb06e4c1e88a

URL: https://github.com/llvm/llvm-project/commit/b6d994de0f1fadff7e135dcd96c3eb06e4c1e88a
DIFF: https://github.com/llvm/llvm-project/commit/b6d994de0f1fadff7e135dcd96c3eb06e4c1e88a.diff

LOG: [VPlan] Address post-commit suggestions for af635a554 (NFC).

Added: 
    

Modified: 
    llvm/lib/Transforms/Vectorize/VPlan.h
    llvm/lib/Transforms/Vectorize/VPlanRecipes.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Transforms/Vectorize/VPlan.h b/llvm/lib/Transforms/Vectorize/VPlan.h
index 107eab97fb6cad..2e481e6be906bc 100644
--- a/llvm/lib/Transforms/Vectorize/VPlan.h
+++ b/llvm/lib/Transforms/Vectorize/VPlan.h
@@ -969,7 +969,7 @@ class VPRecipeWithIRFlags : public VPRecipeBase {
 
   bool hasNoSignedWrap() const {
     assert(OpType == OperationType::OverflowingBinOp &&
-           "recipe doesn't have a NUW flag");
+           "recipe doesn't have a NSW flag");
     return WrapFlags.HasNSW;
   }
 

diff  --git a/llvm/lib/Transforms/Vectorize/VPlanRecipes.cpp b/llvm/lib/Transforms/Vectorize/VPlanRecipes.cpp
index ac19e6ab76d440..4469264255705a 100644
--- a/llvm/lib/Transforms/Vectorize/VPlanRecipes.cpp
+++ b/llvm/lib/Transforms/Vectorize/VPlanRecipes.cpp
@@ -320,7 +320,8 @@ Value *VPInstruction::generateInstruction(VPTransformState &State,
     // The canonical IV is incremented by the vectorization factor (num of SIMD
     // elements) times the unroll part.
     Value *Step = createStepForVF(Builder, IV->getType(), State.VF, Part);
-    return Builder.CreateAdd(IV, Step, Name, hasNoUnsignedWrap(), false);
+    return Builder.CreateAdd(IV, Step, Name, hasNoUnsignedWrap(),
+                             hasNoSignedWrap());
   }
   case VPInstruction::BranchOnCond: {
     if (Part != 0)


        


More information about the llvm-commits mailing list