summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/SelectionDAG
diff options
context:
space:
mode:
authorNick Lewycky <nicholas@mxc.ca>2013-03-11 21:44:37 +0000
committerNick Lewycky <nicholas@mxc.ca>2013-03-11 21:44:37 +0000
commit48beb2118570f17865ec98b6ce502cbe28f2ec22 (patch)
tree7c94b2f9c2d468334db0477b99d9aceb56c8776f /llvm/lib/CodeGen/SelectionDAG
parent2eb7195ee6443c78cdff8dbac82b2d2b6306255b (diff)
downloadbcm5719-llvm-48beb2118570f17865ec98b6ce502cbe28f2ec22.tar.gz
bcm5719-llvm-48beb2118570f17865ec98b6ce502cbe28f2ec22.zip
Fix a crasher newly introduced in r176659/r176649, where fast-isel tries to
lower an expect intrinsic that is a constant expression. llvm-svn: 176830
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG')
-rw-r--r--llvm/lib/CodeGen/SelectionDAG/FastISel.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/FastISel.cpp b/llvm/lib/CodeGen/SelectionDAG/FastISel.cpp
index aa45ac59581..10e2dc61499 100644
--- a/llvm/lib/CodeGen/SelectionDAG/FastISel.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/FastISel.cpp
@@ -698,6 +698,8 @@ bool FastISel::SelectCall(const User *I) {
}
case Intrinsic::expect: {
unsigned ResultReg = getRegForValue(Call->getArgOperand(0));
+ if (ResultReg == 0)
+ return false;
UpdateValueMap(Call, ResultReg);
return true;
}
OpenPOWER on IntegriCloud