mirror of
https://github.com/RPCS3/llvm.git
synced 2025-01-01 09:18:30 +00:00
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 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48213 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
3c78697a3c
commit
5d03f21744
@ -1825,8 +1825,10 @@ SDOperand SelectionDAG::getNode(unsigned Opcode, MVT::ValueType VT,
|
|||||||
assert(MVT::isFloatingPoint(VT) &&
|
assert(MVT::isFloatingPoint(VT) &&
|
||||||
MVT::isFloatingPoint(Operand.getValueType()) && "Invalid FP cast!");
|
MVT::isFloatingPoint(Operand.getValueType()) && "Invalid FP cast!");
|
||||||
if (Operand.getValueType() == VT) return Operand; // noop conversion.
|
if (Operand.getValueType() == VT) return Operand; // noop conversion.
|
||||||
|
if (Operand.getOpcode() == ISD::UNDEF)
|
||||||
|
return getNode(ISD::UNDEF, VT);
|
||||||
break;
|
break;
|
||||||
case ISD::SIGN_EXTEND:
|
case ISD::SIGN_EXTEND:
|
||||||
assert(MVT::isInteger(VT) && MVT::isInteger(Operand.getValueType()) &&
|
assert(MVT::isInteger(VT) && MVT::isInteger(Operand.getValueType()) &&
|
||||||
"Invalid SIGN_EXTEND!");
|
"Invalid SIGN_EXTEND!");
|
||||||
if (Operand.getValueType() == VT) return Operand; // noop extension
|
if (Operand.getValueType() == VT) return Operand; // noop extension
|
||||||
|
Loading…
Reference in New Issue
Block a user