OSDN Git Service

Revert "Revert "[IndVars] Canonicalize comparisons between non-negative values and...
authorMax Kazantsev <max.kazantsev@azul.com>
Thu, 6 Jul 2017 09:57:41 +0000 (09:57 +0000)
committerMax Kazantsev <max.kazantsev@azul.com>
Thu, 6 Jul 2017 09:57:41 +0000 (09:57 +0000)
commit731b43312cf17c2137e409775aaec5c150c1f8ea
tree4ed56b61fd8e100d0ac81b335e41f6921abef901
parente9e0d4fb8379df72c421a462d35afec96e094d8b
Revert "Revert "[IndVars] Canonicalize comparisons between non-negative values and indvars""

It seems that the patch was reverted by mistake. Clang testing showed failure of the
MathExtras.SaturatingMultiply test, however I was unable to reproduce the issue on the
fresh code base and was able to confirm that the transformation introduced by the change
does not happen in the said test. This gives a strong confidence that the actual reason of
the failure of the initial patch was somewhere else, and that problem now seems to be
fixed. Re-submitting the change to confirm that.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307244 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/Utils/SimplifyIndVar.cpp
test/Analysis/ScalarEvolution/guards.ll
test/Transforms/IndVarSimplify/canonicalize-cmp.ll [new file with mode: 0644]
test/Transforms/IndVarSimplify/eliminate-comparison.ll
test/Transforms/IndVarSimplify/widen-loop-comp.ll