summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorDuncan P. N. Exon Smith <dexonsmith@apple.com>2014-02-02 22:43:55 +0000
committerDuncan P. N. Exon Smith <dexonsmith@apple.com>2014-02-02 22:43:55 +0000
commite6562c508858ac6c2003d912ccf289b45bc52b3a (patch)
treeec73267cf23f3d93324784413d6f0ac01e898d0a /docs
parent25b48d54c643b74e6eb8415e4e22cbe91e095cf8 (diff)
downloadllvm-e6562c508858ac6c2003d912ccf289b45bc52b3a.tar.gz
llvm-e6562c508858ac6c2003d912ccf289b45bc52b3a.tar.bz2
llvm-e6562c508858ac6c2003d912ccf289b45bc52b3a.tar.xz
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
Diffstat (limited to 'docs')
-rw-r--r--docs/LangRef.rst4
1 files changed, 4 insertions, 0 deletions
diff --git a/docs/LangRef.rst b/docs/LangRef.rst
index e1880f2bc1..52f916e237 100644
--- a/docs/LangRef.rst
+++ b/docs/LangRef.rst
@@ -8975,8 +8975,12 @@ on the ``min`` argument).
Syntax:
"""""""
+This is an overloaded intrinsic. You can use ``llvm.expect`` on any
+integer bit width.
+
::
+ declare i1 @llvm.expect.i1(i1 <val>, i1 <expected_val>)
declare i32 @llvm.expect.i32(i32 <val>, i32 <expected_val>)
declare i64 @llvm.expect.i64(i64 <val>, i64 <expected_val>)