summaryrefslogtreecommitdiffstats
path: root/llvm/include/llvm-c
diff options
context:
space:
mode:
authorCraig Topper <craig.topper@intel.com>2018-05-24 21:22:51 +0000
committerCraig Topper <craig.topper@intel.com>2018-05-24 21:22:51 +0000
commit49f23fe349fb6ea36a61cbf01df87a76b06c02bb (patch)
treef23d36ddfad16846b63a519d86606eb0672d0374 /llvm/include/llvm-c
parent6da6f433a04ae244adcd6184275bb6e1944b6ca2 (diff)
downloadbcm5719-llvm-49f23fe349fb6ea36a61cbf01df87a76b06c02bb.tar.gz
bcm5719-llvm-49f23fe349fb6ea36a61cbf01df87a76b06c02bb.zip
[ValueTracking] Teach computeKnownBits that the result of an absolute value pattern that uses nsw flag is always positive.
If the nsw flag is used in the absolute value then it is undefined for INT_MIN. For all other value it will produce a positive number. So we can assume the result is positive. This breaks some InstCombine abs/nabs combining tests because we simplify the second compare from known bits rather than as the whole pattern. Looks like we can probably fix it by adding a neg+abs/nabs combine to just swap the select operands. Need to check alive to make sure there are no corner cases. Differential Revision: https://reviews.llvm.org/D47041 llvm-svn: 333226
Diffstat (limited to 'llvm/include/llvm-c')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud