diff options
author | Sanjay Patel <spatel@rotateright.com> | 2018-05-22 23:29:40 +0000 |
---|---|---|
committer | Sanjay Patel <spatel@rotateright.com> | 2018-05-22 23:29:40 +0000 |
commit | 4b96935bd7c7031d7c6b310675d8175061ae63e5 (patch) | |
tree | dc42d6ac3aeb55848272e9b647b49d37ee454893 /libcxx/test/std/re/re.regex/re.regex.construct/ptr.pass.cpp | |
parent | 9426358ea1fa84bac7b85f550f9efce12349c9da (diff) | |
download | bcm5719-llvm-4b96935bd7c7031d7c6b310675d8175061ae63e5.tar.gz bcm5719-llvm-4b96935bd7c7031d7c6b310675d8175061ae63e5.zip |
[InstCombine] use nsw negation for abs libcalls
Also, produce the canonical IR abs (s<0) to be more efficient.
This is the libcall equivalent of the clang builtin change from:
rL333038
Pasting from that commit message:
The stdlib functions are defined in section 7.20.6.1 of the C standard with:
"If the result cannot be represented, the behavior is undefined."
That lets us mark the negation with 'nsw' because "sub i32 0, INT_MIN" would
be UB/poison.
llvm-svn: 333042
Diffstat (limited to 'libcxx/test/std/re/re.regex/re.regex.construct/ptr.pass.cpp')
0 files changed, 0 insertions, 0 deletions