summaryrefslogtreecommitdiffstats
path: root/clang/test/CodeGen/builtin-unpredictable.c
Commit message (Collapse)AuthorAgeFilesLines
* convert builtin_unpredictable on a switch into metadata for LLVMSanjay Patel2015-09-091-3/+11
| | | | llvm-svn: 247203
* add __builtin_unpredictable and convert to metadataSanjay Patel2015-09-021-0/+38
This patch depends on r246688 (D12341). The goal is to make LLVM generate different code for these functions for a target that has cheap branches (see PR23827 for more details): int foo(); int normal(int x, int y, int z) { if (x != 0 && y != 0) return foo(); return 1; } int crazy(int x, int y) { if (__builtin_unpredictable(x != 0 && y != 0)) return foo(); return 1; } Differential Revision: http://reviews.llvm.org/D12458 llvm-svn: 246699
OpenPOWER on IntegriCloud