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/SelectionDAG/SelectionDAGBuilder.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/SelectionDAG/SelectionDAGBuilder.cpp')
-rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp index ea59ca14d8e..fc8f0d29964 100644 --- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp @@ -4771,6 +4771,13 @@ SelectionDAGBuilder::visitIntrinsicCall(const CallInst &I, unsigned Intrinsic) { case Intrinsic::flt_rounds: setValue(&I, DAG.getNode(ISD::FLT_ROUNDS_, dl, MVT::i32)); return 0; + + case Intrinsic::expect: { + // Just replace __builtin_expect(exp, c) with EXP. + setValue(&I, getValue(I.getArgOperand(0))); + return 0; + } + case Intrinsic::trap: { StringRef TrapFuncName = getTrapFunctionName(); if (TrapFuncName.empty()) { |