summaryrefslogtreecommitdiffstats
path: root/llvm/test/Transforms/LowerExpectIntrinsic/expect_nonboolean.ll
Commit message (Collapse)AuthorAgeFilesLines
* [Profile] Fix builtin_expect lowering bugXinliang David Li2017-06-011-0/+104
The lowerer wrongly assumes the ICMP instruction 1) always has a constant operand; 2) the operand has value 0. It also assumes the expected value can only be one, thus other values other than one will be considered 'zero'. This leads to wrong profile annotation when other integer values are used other than 0, 1 in the comparison or in the expect intrinsic. Also missing is handling of equal predicate. This patch fixes all the above problems. Differential Revision: http://reviews.llvm.org/D33757 llvm-svn: 304453
OpenPOWER on IntegriCloud