[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
Fri Feb 10 13:55:06 PST 2017


mssimpso created this revision.
Herald added a subscriber: mzolotukhin.

This patch extends the optimization of truncations whose operand is an induction variable with a constant integer step. Previously we were only applying this optimization to the primary induction variable. However, the cost model assumes the optimization is applied to the truncation of all integer induction variables (even regardless of step type). The transform is now applied to the other induction variables, and I've updated the cost model to ensure it is better in sync with the transformation we actually perform.


https://reviews.llvm.org/D29847

Files:
  lib/Transforms/Vectorize/LoopVectorize.cpp
  test/Transforms/LoopVectorize/induction.ll
  test/Transforms/LoopVectorize/reverse_iter.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D29847.88050.patch
Type: text/x-patch
Size: 4756 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170210/62662671/attachment.bin>


More information about the llvm-commits mailing list