[VPlan] Use recipe type to avoid getDefiningRecipe call (NFC).
authorFlorian Hahn <flo@fhahn.com>
Wed, 16 Nov 2022 23:03:34 +0000 (23:03 +0000)
committerFlorian Hahn <flo@fhahn.com>
Wed, 16 Nov 2022 23:03:34 +0000 (23:03 +0000)
Suggested by @Ayal during review of D136068, thanks!

llvm/lib/Transforms/Vectorize/VPlan.cpp

index 356b92a..d4e8d86 100644 (file)
@@ -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;
 }