[llvm-commits] CVS: llvm/lib/Target/Alpha/AlphaISelPattern.cpp
Andrew Lenharth
alenhar2 at cs.uiuc.edu
Mon Jun 27 16:24:22 PDT 2005
Changes in directory llvm/lib/Target/Alpha:
AlphaISelPattern.cpp updated: 1.135 -> 1.136
---
Log message:
So, it turns out I forgot that one valid way of restoring GP after a call
is to use RA, which assumes the called function uses RA for the register
holding the return address when it issues a ret.
---
Diffs of the changes: (+3 -3)
AlphaISelPattern.cpp | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
Index: llvm/lib/Target/Alpha/AlphaISelPattern.cpp
diff -u llvm/lib/Target/Alpha/AlphaISelPattern.cpp:1.135 llvm/lib/Target/Alpha/AlphaISelPattern.cpp:1.136
--- llvm/lib/Target/Alpha/AlphaISelPattern.cpp:1.135 Mon Jun 27 16:11:40 2005
+++ llvm/lib/Target/Alpha/AlphaISelPattern.cpp Mon Jun 27 18:24:11 2005
@@ -92,8 +92,7 @@
setOperationAction(ISD::BRCONDTWOWAY, MVT::Other, Expand);
setOperationAction(ISD::EXTLOAD, MVT::i1, Promote);
- setOperationAction(ISD::EXTLOAD, MVT::f32, Promote);
-
+
setOperationAction(ISD::ZEXTLOAD, MVT::i1 , Expand);
setOperationAction(ISD::ZEXTLOAD, MVT::i32 , Expand);
@@ -2392,7 +2391,8 @@
break;
}
// Just emit a 'ret' instruction
- BuildMI(BB, Alpha::RET, 1, Alpha::R31).addReg(AlphaLowering.getRA());
+ AlphaLowering.restoreRA(BB);
+ BuildMI(BB, Alpha::RET, 1, Alpha::R31).addReg(Alpha::R26);
return;
case ISD::TRUNCSTORE:
More information about the llvm-commits
mailing list