diff options
author | Craig Topper <craig.topper@intel.com> | 2018-05-25 19:18:09 +0000 |
---|---|---|
committer | Craig Topper <craig.topper@intel.com> | 2018-05-25 19:18:09 +0000 |
commit | 8f77dcadffe06502027bdb2701cd3653ecca919b (patch) | |
tree | 2160de8e624aec9ef6544f162d85e085fdb397a1 /clang/lib/Frontend/CompilerInvocation.cpp | |
parent | 39bf7d551b548f3f2c831fc20ee847826152ce86 (diff) | |
download | bcm5719-llvm-8f77dcadffe06502027bdb2701cd3653ecca919b.tar.gz bcm5719-llvm-8f77dcadffe06502027bdb2701cd3653ecca919b.zip |
Recommit r333226 "[ValueTracking] Teach computeKnownBits that the result of an absolute value pattern that uses nsw flag is always positive."
Libfuzzer tests have been fixed to prevent being optimized.
Original commit message:
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. N
Differential Revision: https://reviews.llvm.org/D47041
llvm-svn: 333300
Diffstat (limited to 'clang/lib/Frontend/CompilerInvocation.cpp')
0 files changed, 0 insertions, 0 deletions