LoopVectorize: getConsecutiveVector must respect signed arithmetic
authorArnold Schwaighofer <aschwaighofer@apple.com>
Tue, 7 May 2013 04:37:05 +0000 (04:37 +0000)
committerArnold Schwaighofer <aschwaighofer@apple.com>
Tue, 7 May 2013 04:37:05 +0000 (04:37 +0000)
commiteb95cec176ad4154ac4ed509baf1c9c51ca29be0
tree84432a9c1717431f367d7898e2202340cfd54664
parentd2e0f7ee15e3df5317f804d9355c2b714e30b5c9
LoopVectorize: getConsecutiveVector must respect signed arithmetic

We were passing an i32 to ConstantInt::get where an i64 was needed and we must
also pass the sign if we pass negatives numbers. The start index passed to
getConsecutiveVector must also be signed.

Should fix PR15882.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@181286 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/Vectorize/LoopVectorize.cpp
test/Transforms/LoopVectorize/reverse_induction.ll [new file with mode: 0644]