diff options
author | Jakub Staszak <jstaszak@apple.com> | 2011-07-06 18:22:43 +0000 |
---|---|---|
committer | Jakub Staszak <jstaszak@apple.com> | 2011-07-06 18:22:43 +0000 |
commit | 3f158fdf6e05efe47a90dd808906ad0f0c2601bf (patch) | |
tree | fb200be46863ea4d50df0b4fa76c406d9b9148e5 /llvm/lib/CodeGen/IntrinsicLowering.cpp | |
parent | 750734c6778d9e9e8200bf0676addb77da713ac2 (diff) | |
download | bcm5719-llvm-3f158fdf6e05efe47a90dd808906ad0f0c2601bf.tar.gz bcm5719-llvm-3f158fdf6e05efe47a90dd808906ad0f0c2601bf.zip |
Introduce "expect" intrinsic instructions.
llvm-svn: 134516
Diffstat (limited to 'llvm/lib/CodeGen/IntrinsicLowering.cpp')
-rw-r--r-- | llvm/lib/CodeGen/IntrinsicLowering.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/IntrinsicLowering.cpp b/llvm/lib/CodeGen/IntrinsicLowering.cpp index 3861ddadf65..b0a823042d4 100644 --- a/llvm/lib/CodeGen/IntrinsicLowering.cpp +++ b/llvm/lib/CodeGen/IntrinsicLowering.cpp @@ -353,6 +353,13 @@ void IntrinsicLowering::LowerIntrinsicCall(CallInst *CI) { report_fatal_error("Code generator does not support intrinsic function '"+ Callee->getName()+"'!"); + case Intrinsic::expect: { + // Just replace __builtin_expect(exp, c) with EXP. + Value *V = CI->getArgOperand(0); + CI->replaceAllUsesWith(V); + break; + } + // The setjmp/longjmp intrinsics should only exist in the code if it was // never optimized (ie, right out of the CFE), or if it has been hacked on // by the lowerinvoke pass. In both cases, the right thing to do is to |