[LIR] Partially revert r252926(NFC), which introduced a very subtle change.
authorChad Rosier <mcrosier@codeaurora.org>
Fri, 12 Feb 2016 19:05:27 +0000 (19:05 +0000)
committerChad Rosier <mcrosier@codeaurora.org>
Fri, 12 Feb 2016 19:05:27 +0000 (19:05 +0000)
commit4acff966462d17aa2d22100e8ed8742baefca4b8
tree7fcd85b2ed5f9b49b25e0ffa5051ccc1217be552
parent2b9100dfbd4219727c6904e76403efda0d2d5e63
[LIR] Partially revert r252926(NFC), which introduced a very subtle change.

In short, before r252926 we were comparing an unsigned (StoreSize) against an a
APInt (Stride), which is fine and well.  After we were zero extending the Stride
and then converting to an unsigned, which is not the same thing.  Obviously,
Stides can also be negative.  This commit just restores the original behavior.

AFAICT, it's not possible to write a test case to expose the issue because
the code already has checks to make sure the StoreSize can't overflow an
unsigned (which prevents the Stride from overflowing an unsigned as well).

llvm-svn: 260706
llvm/lib/Transforms/Scalar/LoopIdiomRecognize.cpp