diff options
author | Chris Lattner <sabre@nondot.org> | 2008-03-11 06:21:08 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2008-03-11 06:21:08 +0000 |
commit | 5c7bda440f4d99e93f290338cdf0207ad5d10eec (patch) | |
tree | 099e316a394ae1a8e923534ad2c0ab69fef06918 /llvm/lib | |
parent | a3860a2422e568e4b64abbe2ffe348c2d27fa657 (diff) | |
download | bcm5719-llvm-5c7bda440f4d99e93f290338cdf0207ad5d10eec.tar.gz bcm5719-llvm-5c7bda440f4d99e93f290338cdf0207ad5d10eec.zip |
compile: double test() {}
into:
_test:
fldz
ret
instead of:
_test:
subl $12, %esp
#IMPLICIT_DEF %xmm0
movsd %xmm0, (%esp)
fldl (%esp)
addl $12, %esp
ret
llvm-svn: 48213
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 |