[llvm-commits] CVS: llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
Evan Cheng
evan.cheng at apple.com
Fri Dec 15 14:43:10 PST 2006
Changes in directory llvm/lib/CodeGen/SelectionDAG:
LegalizeDAG.cpp updated: 1.443 -> 1.444
---
Log message:
Fix select_cc, select expansion to soft-fp bugs.
---
Diffs of the changes: (+11 -3)
LegalizeDAG.cpp | 14 +++++++++++---
1 files changed, 11 insertions(+), 3 deletions(-)
Index: llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
diff -u llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp:1.443 llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp:1.444
--- llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp:1.443 Fri Dec 15 01:36:19 2006
+++ llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp Fri Dec 15 16:42:55 2006
@@ -4705,18 +4705,24 @@
SDOperand LL, LH, RL, RH;
ExpandOp(Node->getOperand(1), LL, LH);
ExpandOp(Node->getOperand(2), RL, RH);
+ if (getTypeAction(NVT) == Expand)
+ NVT = TLI.getTypeToExpandTo(NVT);
Lo = DAG.getNode(ISD::SELECT, NVT, Node->getOperand(0), LL, RL);
- Hi = DAG.getNode(ISD::SELECT, NVT, Node->getOperand(0), LH, RH);
+ if (VT != MVT::f32)
+ Hi = DAG.getNode(ISD::SELECT, NVT, Node->getOperand(0), LH, RH);
break;
}
case ISD::SELECT_CC: {
SDOperand TL, TH, FL, FH;
ExpandOp(Node->getOperand(2), TL, TH);
ExpandOp(Node->getOperand(3), FL, FH);
+ if (getTypeAction(NVT) == Expand)
+ NVT = TLI.getTypeToExpandTo(NVT);
Lo = DAG.getNode(ISD::SELECT_CC, NVT, Node->getOperand(0),
Node->getOperand(1), TL, FL, Node->getOperand(4));
- Hi = DAG.getNode(ISD::SELECT_CC, NVT, Node->getOperand(0),
- Node->getOperand(1), TH, FH, Node->getOperand(4));
+ if (VT != MVT::f32)
+ Hi = DAG.getNode(ISD::SELECT_CC, NVT, Node->getOperand(0),
+ Node->getOperand(1), TH, FH, Node->getOperand(4));
break;
}
case ISD::ANY_EXTEND:
@@ -4761,6 +4767,8 @@
// f32 / f64 must be expanded to i32 / i64.
if (VT == MVT::f32 || VT == MVT::f64) {
Lo = DAG.getNode(ISD::BIT_CONVERT, NVT, Node->getOperand(0));
+ if (getTypeAction(NVT) == Expand)
+ ExpandOp(Lo, Lo, Hi);
break;
}
More information about the llvm-commits
mailing list