summaryrefslogtreecommitdiffstats
path: root/clang/test/CodeGen/builtin-abs.c
Commit message (Collapse)AuthorAgeFilesLines
* [CodeGen] use nsw negation for builtin absSanjay Patel2018-05-221-3/+3
| | | | | | | | | | | | | The clang builtins have the same semantics as the stdlib functions. 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. Differential Revision: https://reviews.llvm.org/D47202 llvm-svn: 333038
* [CodeGen] produce the LLVM canonical form of absSanjay Patel2018-05-221-6/+6
| | | | | | | | We chose the 'slt' form as canonical in IR with: rL332819 ...so we should generate that form directly for efficiency. llvm-svn: 332989
* [CodeGen] add tests for abs builtins; NFCSanjay Patel2018-05-221-0/+29
llvm-svn: 332988
OpenPOWER on IntegriCloud