[PATCH] D117140: [LV] Always create VPWidenCanonicalIVRecipe, optimize away later.

Florian Hahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 19 08:09:26 PST 2022


fhahn marked an inline comment as done.
fhahn added inline comments.


================
Comment at: llvm/lib/Transforms/Vectorize/VPlan.h:1081
+  /// Returns the type of the original IV.
+  const Type *getScalarType() const { return IV->getType(); }
 };
----------------
Ayal wrote:
> Ahh, if this VPWidenIntOrFpInductionRecipe also folds a Trunc, should getScalarType() return Trunc's type instead of IV's type?
Good spot! I updated the code. I don't think it is an issue at the moment, as widened canonical IV should always use the widest type, so there's no way to add a test IIUC.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D117140/new/

https://reviews.llvm.org/D117140



More information about the llvm-commits mailing list