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

Matthew Simpson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 13 10:52:00 PST 2017


mssimpso added a comment.

I'm reopening this review since I reverted the original patch. It caused execution time slowdowns in a few test-suite programs that were caught by the clang-cmake-aarch64-quick bot. It looks like the cause is related to the fact that we're not cost-modeling this optimization very well. Some truncations are free - if we replace those truncations with an induction variable, we'll end up with an extra instruction (the IV update) on every iteration of the loop. I'll post an updated patch shortly.


Repository:
  rL LLVM

https://reviews.llvm.org/D29847





More information about the llvm-commits mailing list