mirror of
https://github.com/RPCS3/llvm.git
synced 2025-02-25 13:20:57 +00:00

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 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@304453 91177308-0d34-0410-b5e6-96231b3b80d8