]> granicus.if.org Git - llvm/commit
[LV] Transform truncations of non-primary induction variables
authorMatthew Simpson <mssimpso@codeaurora.org>
Mon, 27 Mar 2017 20:07:38 +0000 (20:07 +0000)
committerMatthew Simpson <mssimpso@codeaurora.org>
Mon, 27 Mar 2017 20:07:38 +0000 (20:07 +0000)
commitfcdf36fabb6d38f3b22b3515f9ad271a8b085842
tree2e3da974d32d84f6c01af57ee894eaf86fb38d39
parent28ec1cc8922def174d48a19134644780c5960584
[LV] Transform truncations of non-primary induction variables

The vectorizer tries to replace truncations of induction variables with new
induction variables having the smaller type. After r295063, this optimization
was applied to all integer induction variables, including non-primary ones.
When optimizing the truncation of a non-primary induction variable, we still
need to transform the new induction so that it has the correct start value.
This should fix PR32419.

Reference: https://bugs.llvm.org/show_bug.cgi?id=32419

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@298882 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/Vectorize/LoopVectorize.cpp
test/Transforms/LoopVectorize/induction.ll