[llvm-commits] CVS: llvm/lib/Target/PowerPC/PPC32ISelPattern.cpp
Nate Begeman
natebegeman at mac.com
Tue Mar 29 18:23:19 PST 2005
Changes in directory llvm/lib/Target/PowerPC:
PPC32ISelPattern.cpp updated: 1.18 -> 1.19
---
Log message:
Fix frame index code to generate legal PowerPC instructions. About half of
Shootout now works.
---
Diffs of the changes: (+7 -9)
PPC32ISelPattern.cpp | 16 +++++++---------
1 files changed, 7 insertions(+), 9 deletions(-)
Index: llvm/lib/Target/PowerPC/PPC32ISelPattern.cpp
diff -u llvm/lib/Target/PowerPC/PPC32ISelPattern.cpp:1.18 llvm/lib/Target/PowerPC/PPC32ISelPattern.cpp:1.19
--- llvm/lib/Target/PowerPC/PPC32ISelPattern.cpp:1.18 Tue Mar 29 19:45:43 2005
+++ llvm/lib/Target/PowerPC/PPC32ISelPattern.cpp Tue Mar 29 20:23:08 2005
@@ -612,9 +612,8 @@
}
if(Address.getOpcode() == ISD::FrameIndex) {
- BuildMI(BB, Opc, 2, Result)
- .addFrameIndex(cast<FrameIndexSDNode>(Address)->getIndex())
- .addReg(PPC::R1);
+ Tmp1 = cast<FrameIndexSDNode>(Address)->getIndex();
+ addFrameReference(BuildMI(BB, Opc, 2, Result), (int)Tmp1);
} else {
int offset;
SelectAddr(Address, Tmp1, offset);
@@ -730,7 +729,7 @@
case ISD::FrameIndex:
Tmp1 = cast<FrameIndexSDNode>(N)->getIndex();
- addFrameReference(BuildMI(BB, PPC::ADDI, 2, Result), (int)Tmp1);
+ addFrameReference(BuildMI(BB, PPC::ADDI, 2, Result), (int)Tmp1, 0, false);
return Result;
case ISD::GlobalAddress: {
@@ -782,9 +781,8 @@
Tmp3 = 0; // Silence GCC warning.
}
if(Address.getOpcode() == ISD::FrameIndex) {
- BuildMI(BB, Opc, 2, Result)
- .addFrameIndex(cast<FrameIndexSDNode>(Address)->getIndex())
- .addReg(PPC::R1);
+ Tmp1 = cast<FrameIndexSDNode>(Address)->getIndex();
+ addFrameReference(BuildMI(BB, Opc, 2, Result), (int)Tmp1);
} else {
int offset;
SelectAddr(Address, Tmp1, offset);
@@ -1343,8 +1341,8 @@
}
else if(Address.getOpcode() == ISD::FrameIndex)
{
- BuildMI(BB, Opc, 2).addReg(Tmp1)
- .addFrameIndex(cast<FrameIndexSDNode>(Address)->getIndex());
+ Tmp2 = cast<FrameIndexSDNode>(Address)->getIndex();
+ addFrameReference(BuildMI(BB, Opc, 3).addReg(Tmp1), (int)Tmp2);
}
else
{
More information about the llvm-commits
mailing list