[llvm] aa16689 - [VPlan] Use recipe type to avoid getDefiningRecipe call (NFC).

Florian Hahn via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 16 15:03:52 PST 2022


Author: Florian Hahn
Date: 2022-11-16T23:03:34Z
New Revision: aa16689f82a0735b123759c2ffc92a6085222108

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

LOG: [VPlan] Use recipe type to avoid getDefiningRecipe call (NFC).

Suggested by @Ayal during review of D136068, thanks!

Added: 
    

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

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Transforms/Vectorize/VPlan.cpp b/llvm/lib/Transforms/Vectorize/VPlan.cpp
index 356b92a83dfc..d4e8d863ac82 100644
--- a/llvm/lib/Transforms/Vectorize/VPlan.cpp
+++ b/llvm/lib/Transforms/Vectorize/VPlan.cpp
@@ -1111,7 +1111,7 @@ VPValue *vputils::getOrCreateVPValueForSCEVExpr(VPlan &Plan, const SCEV *Expr,
     return Plan.getOrAddExternalDef(E->getValue());
 
   VPBasicBlock *Preheader = Plan.getEntry()->getEntryBasicBlock();
-  VPValue *Step = new VPExpandSCEVRecipe(Expr, SE);
-  Preheader->appendRecipe(Step->getDefiningRecipe());
+  VPExpandSCEVRecipe *Step = new VPExpandSCEVRecipe(Expr, SE);
+  Preheader->appendRecipe(Step);
   return Step;
 }


        


More information about the llvm-commits mailing list