1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-20 19:42:54 +02:00

Constant fold bitconvert(undef)

llvm-svn: 27391
This commit is contained in:
Chris Lattner 2006-04-04 01:02:22 +00:00
parent 9925c6018f
commit 85dc06c29e

View File

@ -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()) &&