diff options
author | Nick Lewycky <nicholas@mxc.ca> | 2013-03-11 21:44:37 +0000 |
---|---|---|
committer | Nick Lewycky <nicholas@mxc.ca> | 2013-03-11 21:44:37 +0000 |
commit | 33cdfe9f1943418604be5c800800394ae809fc4c (patch) | |
tree | d9ece7ae1740bbdd3ed0f9bc424bf083192b1646 /lib/CodeGen/SelectionDAG/FastISel.cpp | |
parent | 12dccaed9c0368f4f5ef4312c32b375c725c9daf (diff) |
Fix a crasher newly introduced in r176659/r176649, where fast-isel tries to
lower an expect intrinsic that is a constant expression.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176830 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/SelectionDAG/FastISel.cpp')
-rw-r--r-- | lib/CodeGen/SelectionDAG/FastISel.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/CodeGen/SelectionDAG/FastISel.cpp b/lib/CodeGen/SelectionDAG/FastISel.cpp index aa45ac5958..10e2dc6149 100644 --- a/lib/CodeGen/SelectionDAG/FastISel.cpp +++ b/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; } |