[PATCH] D38948: [LV] Support efficient vectorization of an induction with redundant casts

silviu.baranga@arm.com via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Nov 18 07:13:37 PST 2017


sbaranga added a comment.

Sorry for not having a look earlier.

Maybe I'm missing something, but why not rewrite the induction variable using the the SCEV that we get from PSE (something like what IndVarsSimpify does)?
If we would take this approach then the casts would end up being dead code and removed.



================
Comment at: lib/Analysis/ScalarEvolution.cpp:4470
+/// (1) The value of the phi at iteration i is:
+///      (Ext ix (Trunc iy ( Start + i*Step ) to ix) to iy)
+/// (2) Under the runtime predicate, the above expression is equal to:
----------------
(1) might not hold in the future, so this might end up being a problem?


https://reviews.llvm.org/D38948





More information about the llvm-commits mailing list