commit | 33cdfe9f1943418604be5c800800394ae809fc4c | [log] [tgz] |
---|---|---|
author | Nick Lewycky <nicholas@mxc.ca> | Mon Mar 11 21:44:37 2013 +0000 |
committer | Nick Lewycky <nicholas@mxc.ca> | Mon Mar 11 21:44:37 2013 +0000 |
tree | d9ece7ae1740bbdd3ed0f9bc424bf083192b1646 | |
parent | 12dccaed9c0368f4f5ef4312c32b375c725c9daf [diff] [blame] |
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
diff --git a/lib/CodeGen/SelectionDAG/FastISel.cpp b/lib/CodeGen/SelectionDAG/FastISel.cpp index aa45ac5..10e2dc6 100644 --- a/lib/CodeGen/SelectionDAG/FastISel.cpp +++ b/lib/CodeGen/SelectionDAG/FastISel.cpp
@@ -698,6 +698,8 @@ } case Intrinsic::expect: { unsigned ResultReg = getRegForValue(Call->getArgOperand(0)); + if (ResultReg == 0) + return false; UpdateValueMap(Call, ResultReg); return true; }