[VectorUtils] Don't try and truncate PHIs to a smaller bitwidth
authorJames Molloy <james.molloy@arm.com>
Wed, 30 Mar 2016 10:11:43 +0000 (10:11 +0000)
committerJames Molloy <james.molloy@arm.com>
Wed, 30 Mar 2016 10:11:43 +0000 (10:11 +0000)
commit8e46cd05a17c0499f744a85f8ef905cafb47eb3e
tree14d712aa667803901874fd82784d9504e4bd2fdc
parentb780c44eeca9a1724c53adb82501587a1fcd9750
[VectorUtils] Don't try and truncate PHIs to a smaller bitwidth

We already try not to truncate PHIs in computeMinimalBitwidths. LoopVectorize can't handle it and we really don't need to, because both induction and reduction PHIs are truncated by other means.

However, we weren't bailing out in all the places we should have, and we ended up by returning a PHI to be truncated, which has caused PR27018.

This fixes PR17018.

llvm-svn: 264852
llvm/lib/Analysis/VectorUtils.cpp
llvm/test/Transforms/LoopVectorize/AArch64/loop-vectorization-factors.ll