Add some simple copysign folds
llvm-svn: 26543
diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
index 534015c..57f1066 100644
--- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
@@ -1250,6 +1250,8 @@
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