[PATCH] D21330: Loop vectorization with FP induction variables
Sanjoy Das via llvm-commits
llvm-commits at lists.llvm.org
Mon Jun 20 10:02:19 PDT 2016
sanjoy added a comment.
Some comments inline.
I cannot review the `LoopVectorize.cpp` changes.
================
Comment at: lib/Analysis/ScalarEvolutionExpander.cpp:1610
@@ -1609,3 +1609,3 @@
Value *V = expand(SH);
- if (Ty) {
+ if (Ty && SE.isSCEVable(Ty)) {
assert(SE.getTypeSizeInBits(Ty) == SE.getTypeSizeInBits(SH->getType()) &&
----------------
Why do we need this?
================
Comment at: lib/Transforms/Utils/LoopUtils.cpp:758
@@ +757,3 @@
+
+ const Loop *L = SE->getLoopFor(Phi->getParent());
+ if (!L || L->getHeader() != Phi->getParent())
----------------
Looking at the users of `isInductionPHI`, looks like it should be easy to pass in the `Loop *` directly? If so, can we just have this check be: `if (L->getHeader() != Phi->getParent()) return false;` ? That way we won't have to add the `getLoopFor` interface to SCEV (which does not look like it belongs there).
Repository:
rL LLVM
http://reviews.llvm.org/D21330
More information about the llvm-commits
mailing list