diff options
Diffstat (limited to 'llvm/lib')
-rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp index f81d80ebe79..59fd79650a0 100644 --- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp @@ -1825,8 +1825,10 @@ SDOperand SelectionDAG::getNode(unsigned Opcode, MVT::ValueType VT, assert(MVT::isFloatingPoint(VT) && MVT::isFloatingPoint(Operand.getValueType()) && "Invalid FP cast!"); if (Operand.getValueType() == VT) return Operand; // noop conversion. + if (Operand.getOpcode() == ISD::UNDEF) + return getNode(ISD::UNDEF, VT); break; - case ISD::SIGN_EXTEND: + case ISD::SIGN_EXTEND: assert(MVT::isInteger(VT) && MVT::isInteger(Operand.getValueType()) && "Invalid SIGN_EXTEND!"); if (Operand.getValueType() == VT) return Operand; // noop extension |