Add some simple copysign folds

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26543 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner
2006-03-05 05:30:57 +00:00
parent a09f848c11
commit 12d830346b
2 changed files with 61 additions and 7 deletions

View File

@ -1250,6 +1250,8 @@ SDOperand SelectionDAG::getNode(unsigned Opcode, MVT::ValueType VT,
case ISD::FREM :
if (C2) return getConstantFP(fmod(C1, C2), VT);
break;
case ISD::FCOPYSIGN:
return getConstantFP(copysign(C1, C2), VT);
default: break;
}
} else { // Cannonicalize constant to RHS if commutative