[llvm-commits] CVS: llvm/lib/Target/X86/X86ISelDAGToDAG.cpp
Chris Lattner
lattner at cs.uiuc.edu
Wed Nov 30 14:59:30 PST 2005
Changes in directory llvm/lib/Target/X86:
X86ISelDAGToDAG.cpp updated: 1.4 -> 1.5
---
Log message:
SelectNodeTo now returns its result, we must pay attention to it.
---
Diffs of the changes: (+18 -20)
X86ISelDAGToDAG.cpp | 38 ++++++++++++++++++--------------------
1 files changed, 18 insertions(+), 20 deletions(-)
Index: llvm/lib/Target/X86/X86ISelDAGToDAG.cpp
diff -u llvm/lib/Target/X86/X86ISelDAGToDAG.cpp:1.4 llvm/lib/Target/X86/X86ISelDAGToDAG.cpp:1.5
--- llvm/lib/Target/X86/X86ISelDAGToDAG.cpp:1.4 Tue Nov 29 20:51:20 2005
+++ llvm/lib/Target/X86/X86ISelDAGToDAG.cpp Wed Nov 30 16:59:19 2005
@@ -289,8 +289,7 @@
case MVT::i32: Opc = X86::ADD32rr; break;
}
SDOperand Tmp0 = Select(N->getOperand(0));
- CurDAG->SelectNodeTo(N, Opc, MVT::i32, Tmp0, Tmp0);
- return SDOperand(N, 0);
+ return CurDAG->SelectNodeTo(N, Opc, MVT::i32, Tmp0, Tmp0);
}
} else {
static const unsigned SHLTab[] = {
@@ -319,8 +318,7 @@
}
SDOperand Tmp0 = Select(N->getOperand(0));
- CurDAG->SelectNodeTo(N, Opc, MVT::i32, Tmp0);
- return SDOperand(N, 0);
+ return CurDAG->SelectNodeTo(N, Opc, MVT::i32, Tmp0);
}
break;
@@ -350,13 +348,11 @@
break;
}
if (X86Lowering.getBytesToPopOnReturn() == 0)
- CurDAG->SelectNodeTo(N, X86::RET, MVT::Other, Chain);
+ return CurDAG->SelectNodeTo(N, X86::RET, MVT::Other, Chain);
else
- CurDAG->SelectNodeTo(N, X86::RET, MVT::Other,
- getI16Imm(X86Lowering.getBytesToPopOnReturn()),
- Chain);
-
- return SDOperand(N, 0);
+ return CurDAG->SelectNodeTo(N, X86::RET, MVT::Other,
+ getI16Imm(X86Lowering.getBytesToPopOnReturn()),
+ Chain);
}
case ISD::LOAD: {
@@ -385,15 +381,17 @@
? CurDAG->getTargetGlobalAddress(AM.GV, MVT::i32, AM.Disp)
: getI32Imm(AM.Disp);
if (AM.BaseType == X86ISelAddressMode::RegBase) {
- CurDAG->SelectNodeTo(N, Opc, OpVT, MVT::Other,
- AM.Base.Reg, Scale, AM.IndexReg, Disp, Chain);
+ return CurDAG->SelectNodeTo(N, Opc, OpVT, MVT::Other,
+ AM.Base.Reg, Scale, AM.IndexReg, Disp,
+ Chain)
+ .getValue(Op.ResNo);
} else {
SDOperand Base = CurDAG->getFrameIndex(AM.Base.FrameIndex, MVT::i32);
- CurDAG->SelectNodeTo(N, Opc, OpVT, MVT::Other,
- Base, Scale, AM.IndexReg, Disp, Chain);
+ return CurDAG->SelectNodeTo(N, Opc, OpVT, MVT::Other,
+ Base, Scale, AM.IndexReg, Disp, Chain)
+ .getValue(Op.ResNo);
}
}
- return SDOperand(N, Op.ResNo);
}
case ISD::STORE: {
@@ -430,13 +428,13 @@
? CurDAG->getTargetGlobalAddress(AM.GV, MVT::i32, AM.Disp)
: getI32Imm(AM.Disp);
if (AM.BaseType == X86ISelAddressMode::RegBase) {
- CurDAG->SelectNodeTo(N, Opc, MVT::Other,
- AM.Base.Reg, Scale, AM.IndexReg, Disp, Tmp1,
- Chain);
+ return CurDAG->SelectNodeTo(N, Opc, MVT::Other,
+ AM.Base.Reg, Scale, AM.IndexReg, Disp, Tmp1,
+ Chain);
} else {
SDOperand Base = CurDAG->getFrameIndex(AM.Base.FrameIndex, MVT::i32);
- CurDAG->SelectNodeTo(N, Opc, MVT::Other,
- Base, Scale, AM.IndexReg, Disp, Tmp1, Chain);
+ return CurDAG->SelectNodeTo(N, Opc, MVT::Other,
+ Base, Scale, AM.IndexReg, Disp, Tmp1, Chain);
}
}
}
More information about the llvm-commits
mailing list