summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNate Begeman <natebegeman@mac.com>2006-05-09 18:20:51 +0000
committerNate Begeman <natebegeman@mac.com>2006-05-09 18:20:51 +0000
commit1a225d23ae74b8d098d00b10a04b54ec36d61bd6 (patch)
tree429c09d9a2df8295475e8f1b5a8a66bfde22d271
parent5d779af58703ab766a7592236f5b5b3a9e19b6de (diff)
downloadbcm5719-llvm-1a225d23ae74b8d098d00b10a04b54ec36d61bd6.tar.gz
bcm5719-llvm-1a225d23ae74b8d098d00b10a04b54ec36d61bd6.zip
Fix PR773
llvm-svn: 28207
-rw-r--r--llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp22
1 files changed, 20 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp b/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
index 45c686b4cdc..cf11c97f980 100644
--- a/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
@@ -3071,8 +3071,26 @@ SDOperand SelectionDAGLegalize::PromoteOp(SDOperand Op) {
case ISD::FREM:
case ISD::FCOPYSIGN:
// These operators require that their input be fp extended.
- Tmp1 = PromoteOp(Node->getOperand(0));
- Tmp2 = PromoteOp(Node->getOperand(1));
+ switch (getTypeAction(Node->getOperand(0).getValueType())) {
+ case Legal:
+ Tmp1 = LegalizeOp(Node->getOperand(0));
+ break;
+ case Promote:
+ Tmp1 = PromoteOp(Node->getOperand(0));
+ break;
+ case Expand:
+ assert(0 && "not implemented");
+ }
+ switch (getTypeAction(Node->getOperand(1).getValueType())) {
+ case Legal:
+ Tmp2 = LegalizeOp(Node->getOperand(1));
+ break;
+ case Promote:
+ Tmp2 = PromoteOp(Node->getOperand(1));
+ break;
+ case Expand:
+ assert(0 && "not implemented");
+ }
Result = DAG.getNode(Node->getOpcode(), NVT, Tmp1, Tmp2);
// Perform FP_ROUND: this is probably overly pessimistic.
OpenPOWER on IntegriCloud