[llvm] [NFC][LoopVectorize] Avoid passing ScalarEvolution to VPlanTransforms::optimize (PR #108380)

via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 13 09:15:57 PDT 2024


================
@@ -535,8 +534,8 @@ createScalarIVSteps(VPlan &Plan, InductionDescriptor::InductionKind Kind,
   }
 
   // Truncate base induction if needed.
-  VPTypeAnalysis TypeInfo(Plan.getCanonicalIV()->getScalarType(),
-                          SE.getContext());
+  Type *CanonicalIVType = CanonicalIV->getScalarType();
+  VPTypeAnalysis TypeInfo(CanonicalIVType, CanonicalIVType->getContext());
----------------
ayalz wrote:

Post-commit nit, while we're here: is a context other than that of CanonicalIVType relevant, or can TypeInfo's constructor derive its second parameter from its first.

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


More information about the llvm-commits mailing list