[PATCH] D29847: [LV] Extend trunc optimization to all IVs with constant integer steps

Michael Kuperstein via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 13 17:00:10 PST 2017


mkuper added a comment.

Heh, interesting.
Anyway, LGTM.



================
Comment at: lib/Transforms/Vectorize/LoopVectorize.cpp:2037
+    Value *Op = Trunc->getOperand(0);
+    if (Op != Legal->getInduction() && TTI.isTruncateFree(SrcTy, DestTy))
+      return false;
----------------
Unrelated, but after this lands, I think I'll change the name to getPrimaryInduction() or getPrimaryIV(). This is a really bad name at this point.



https://reviews.llvm.org/D29847





More information about the llvm-commits mailing list