Fix a corner case in the new indvars promotion logic: if there
authorDan Gohman <gohman@apple.com>
Wed, 18 Feb 2009 00:52:00 +0000 (00:52 +0000)
committerDan Gohman <gohman@apple.com>
Wed, 18 Feb 2009 00:52:00 +0000 (00:52 +0000)
commitd2067fd730b2b266f5c244d5871a244b534e10ea
tree27086a37fe0e90eb8335c44c345ae59c28dd9405
parentf284ce203b656f1d6f933b67ad096a93d3cd7290
Fix a corner case in the new indvars promotion logic: if there
are multiple IV's in a loop, some of them may under go signed
or unsigned wrapping even if the IV that's used in the loop
exit condition doesn't. Restrict sign-extension-elimination
and zero-extension-elimination to only those that operate on
the original loop-controlling IV.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64866 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/Scalar/IndVarSimplify.cpp
test/Transforms/IndVarSimplify/preserve-signed-wrap.ll [new file with mode: 0644]