Lower llvm.expect intrinsic correctly for i1
authorDuncan P. N. Exon Smith <dexonsmith@apple.com>
Sun, 2 Feb 2014 22:43:55 +0000 (22:43 +0000)
committerDuncan P. N. Exon Smith <dexonsmith@apple.com>
Sun, 2 Feb 2014 22:43:55 +0000 (22:43 +0000)
commite6562c508858ac6c2003d912ccf289b45bc52b3a
treeec73267cf23f3d93324784413d6f0ac01e898d0a
parent25b48d54c643b74e6eb8415e4e22cbe91e095cf8
Lower llvm.expect intrinsic correctly for i1

LowerExpectIntrinsic previously only understood the idiom of an expect
intrinsic followed by a comparison with zero. For llvm.expect.i1, the
comparison would be stripped by the early-cse pass.

Patch by Daniel Micay.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200664 91177308-0d34-0410-b5e6-96231b3b80d8
docs/LangRef.rst
lib/Transforms/Utils/LowerExpectIntrinsic.cpp
test/Transforms/LowerExpectIntrinsic/basic.ll