diff options
author | Chris Lattner <sabre@nondot.org> | 2006-04-04 01:02:22 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2006-04-04 01:02:22 +0000 |
commit | 08da55eeff8fdacd232e69c76bc5142eb4b1474e (patch) | |
tree | 964a95b0a827913a7a9bd24c84421fcd65cb27f1 /lib/CodeGen/SelectionDAG/SelectionDAG.cpp | |
parent | e6bfffbae26a3593531d0f6b78ae2b8125244c38 (diff) |
Constant fold bitconvert(undef)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27391 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/SelectionDAG/SelectionDAG.cpp')
-rw-r--r-- | lib/CodeGen/SelectionDAG/SelectionDAG.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/CodeGen/SelectionDAG/SelectionDAG.cpp b/lib/CodeGen/SelectionDAG/SelectionDAG.cpp index 6eb6570467..a2b575ff31 100644 --- a/lib/CodeGen/SelectionDAG/SelectionDAG.cpp +++ b/lib/CodeGen/SelectionDAG/SelectionDAG.cpp @@ -1167,6 +1167,8 @@ SDOperand SelectionDAG::getNode(unsigned Opcode, MVT::ValueType VT, if (VT == Operand.getValueType()) return Operand; // noop conversion. if (OpOpcode == ISD::BIT_CONVERT) // bitconv(bitconv(x)) -> bitconv(x) return getNode(ISD::BIT_CONVERT, VT, Operand.getOperand(0)); + if (OpOpcode == ISD::UNDEF) + return getNode(ISD::UNDEF, VT); break; case ISD::SCALAR_TO_VECTOR: assert(MVT::isVector(VT) && !MVT::isVector(Operand.getValueType()) && |