diff options
| author | Chris Lattner <sabre@nondot.org> | 2005-01-14 22:08:15 +0000 |
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2005-01-14 22:08:15 +0000 |
| commit | 39c6744c9ff28c11d1918b5c0de021dc9551ba91 (patch) | |
| tree | 007a8180ad1ad88422b99de0a3a717f5603325fb /llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp | |
| parent | 4bdb582200d4abeffb67817f2813f3849aa7946b (diff) | |
| download | bcm5719-llvm-39c6744c9ff28c11d1918b5c0de021dc9551ba91.tar.gz bcm5719-llvm-39c6744c9ff28c11d1918b5c0de021dc9551ba91.zip | |
Start implementing truncating stores and extending loads.
llvm-svn: 19559
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp')
| -rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp b/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp index c735faa3ace..e47bb59772c 100644 --- a/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp @@ -247,7 +247,7 @@ SDOperand SelectionDAGLegalize::LegalizeOp(SDOperand Op) { case ISD::ImplicitDef: Tmp1 = LegalizeOp(Node->getOperand(0)); if (Tmp1 != Node->getOperand(0)) - Result = DAG.getImplicitDef(cast<RegSDNode>(Node)->getReg()); + Result = DAG.getImplicitDef(Tmp1, cast<RegSDNode>(Node)->getReg()); break; case ISD::Constant: // We know we don't need to expand constants here, constants only have one @@ -525,18 +525,16 @@ SDOperand SelectionDAGLegalize::LegalizeOp(SDOperand Op) { Result = DAG.getNode(ISD::STORE, MVT::Other, Result, Hi, Tmp2); } break; - case ISD::SELECT: { + case ISD::SELECT: // FIXME: BOOLS MAY REQUIRE PROMOTION! Tmp1 = LegalizeOp(Node->getOperand(0)); // Cond Tmp2 = LegalizeOp(Node->getOperand(1)); // TrueVal - SDOperand Tmp3 = LegalizeOp(Node->getOperand(2)); // FalseVal - - if (Tmp1 != Node->getOperand(0) || - Tmp2 != Node->getOperand(1) || + Tmp3 = LegalizeOp(Node->getOperand(2)); // FalseVal + + if (Tmp1 != Node->getOperand(0) || Tmp2 != Node->getOperand(1) || Tmp3 != Node->getOperand(2)) Result = DAG.getNode(ISD::SELECT, Node->getValueType(0), Tmp1, Tmp2,Tmp3); break; - } case ISD::SETCC: switch (getTypeAction(Node->getOperand(0).getValueType())) { case Legal: |

