summaryrefslogtreecommitdiffstats
path: root/clang/test/Sema/builtin-assume.c
Commit message (Collapse)AuthorAgeFilesLines
* HasSideEffects() should return false for calls to pure and const functions.Michael Kuperstein2015-04-061-1/+13
| | | | | | Differential Revision: http://reviews.llvm.org/D8548 llvm-svn: 234152
* Add __builtin_assume and __builtin_assume_aligned using @llvm.assume.Hal Finkel2014-09-071-1/+8
| | | | | | | | | | | This makes use of the recently-added @llvm.assume intrinsic to implement a __builtin_assume(bool) intrinsic (to provide additional information to the optimizer). This hooks up __assume in MS-compatibility mode to mirror __builtin_assume (the semantics have been intentionally kept compatible), and implements GCC's __builtin_assume_aligned as assume((p - o) & mask == 0). LLVM now contains special logic to deal with assumptions of this form. llvm-svn: 217349
* Handle __assume in the VoidExprEvaluatorHal Finkel2014-07-171-0/+3
| | | | | | | | This is a follow-up to an IRC conversation with Richard last night; __assume does not evaluate its argument, and so the argument should not contribute to whether (__assume(e), constant) can be used where a constant is required. llvm-svn: 213267
* Add an __assume side-effects warningHal Finkel2014-07-171-0/+8
In MS-compatibility mode, we support the __assume builtin. The __assume builtin does not evaluate its arguments, and we should issue a warning if __assume is provided with an argument with side effects (because these effects will be discarded). This is similar in spirit to the warnings issued by other compilers (Intel Diagnostic 2261, MS Compiler Warning C4557). llvm-svn: 213266
OpenPOWER on IntegriCloud