[llvm-commits] CVS: llvm/lib/Target/SparcV8/SparcV8ISelDAGToDAG.cpp
Chris Lattner
lattner at cs.uiuc.edu
Sat Dec 17 23:09:18 PST 2005
Changes in directory llvm/lib/Target/SparcV8:
SparcV8ISelDAGToDAG.cpp updated: 1.15 -> 1.16
---
Log message:
simplifications, fix typo
---
Diffs of the changes: (+5 -6)
SparcV8ISelDAGToDAG.cpp | 11 +++++------
1 files changed, 5 insertions(+), 6 deletions(-)
Index: llvm/lib/Target/SparcV8/SparcV8ISelDAGToDAG.cpp
diff -u llvm/lib/Target/SparcV8/SparcV8ISelDAGToDAG.cpp:1.15 llvm/lib/Target/SparcV8/SparcV8ISelDAGToDAG.cpp:1.16
--- llvm/lib/Target/SparcV8/SparcV8ISelDAGToDAG.cpp:1.15 Sun Dec 18 00:59:57 2005
+++ llvm/lib/Target/SparcV8/SparcV8ISelDAGToDAG.cpp Sun Dec 18 01:09:06 2005
@@ -350,9 +350,8 @@
bool SparcV8DAGToDAGISel::SelectADDRri(SDOperand Addr, SDOperand &Base,
SDOperand &Offset) {
- if (Addr.getOpcode() == ISD::FrameIndex) {
- int FI = cast<FrameIndexSDNode>(Addr)->getIndex();
- Base = CurDAG->getTargetFrameIndex(FI, MVT::i32);
+ if (FrameIndexSDNode *FIN = dyn_cast<FrameIndexSDNode>(Addr)) {
+ Base = CurDAG->getTargetFrameIndex(FIN->getIndex(), MVT::i32);
Offset = CurDAG->getTargetConstant(0, MVT::i32);
return true;
}
@@ -360,10 +359,10 @@
if (Addr.getOpcode() == ISD::ADD) {
if (ConstantSDNode *CN = dyn_cast<ConstantSDNode>(Addr.getOperand(1))) {
if (Predicate_simm13(CN)) {
- if (Addr.getOperand(0).getOpcode() == ISD::FrameIndex) {
+ if (FrameIndexSDNode *FIN =
+ dyn_cast<FrameIndexSDNode>(Addr.getOperand(0))) {
// Constant offset from frame ref.
- int FI = cast<FrameIndexSDNode>(Addr)->getIndex();
- Base = CurDAG->getTargetFrameIndex(FI, MVT::i32);
+ Base = CurDAG->getTargetFrameIndex(FIN->getIndex(), MVT::i32);
} else {
Base = Select(Addr.getOperand(0));
}
More information about the llvm-commits
mailing list