So, it turns out I forgot that one valid way of restoring GP after a call
authorAndrew Lenharth <andrewl@lenharth.org>
Mon, 27 Jun 2005 23:24:11 +0000 (23:24 +0000)
committerAndrew Lenharth <andrewl@lenharth.org>
Mon, 27 Jun 2005 23:24:11 +0000 (23:24 +0000)
is to use RA, which assumes the called function uses RA for the register
holding the return address when it issues a ret.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22301 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/Alpha/AlphaISelPattern.cpp

index deb367887d97a729cae96ec663331f315e05f40e..43bc1b8396ddda0ef43145ec1183dea44c87ba85 100644 (file)
@@ -92,8 +92,7 @@ namespace {
       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 @@ void AlphaISel::Select(SDOperand N) {
       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: