diff options
author | James Molloy <james.molloy@arm.com> | 2015-10-22 13:18:42 +0000 |
---|---|---|
committer | James Molloy <james.molloy@arm.com> | 2015-10-22 13:18:42 +0000 |
commit | 1d88d6f28998c6fe387b4208c2bbd77f29108914 (patch) | |
tree | 06103e5b3be0ab49d2793123b39e2317778cb20f /clang-tools-extra/test/clang-tidy/modernize-loop-convert-basic.cpp | |
parent | efec16307ccc3c1ed8a5e223cf075e51198e6376 (diff) | |
download | bcm5719-llvm-1d88d6f28998c6fe387b4208c2bbd77f29108914.tar.gz bcm5719-llvm-1d88d6f28998c6fe387b4208c2bbd77f29108914.zip |
[ValueTracking] Add a new predicate: isKnownNonEqual()
isKnownNonEqual(A, B) returns true if it can be determined that A != B.
At the moment it only knows two facts, that a non-wrapping add of nonzero to a value cannot be that value:
A + B != A [where B != 0, addition is nsw or nuw]
and that contradictory known bits imply two values are not equal.
This patch also hooks this up to InstSimplify; InstSimplify had a peephole for the first fact but not the second so this teaches InstSimplify a new trick too (alas no measured performance impact!)
llvm-svn: 251012
Diffstat (limited to 'clang-tools-extra/test/clang-tidy/modernize-loop-convert-basic.cpp')
0 files changed, 0 insertions, 0 deletions