WOW, function calls still seem to work after this.
llvm-svn: 21286
diff --git a/llvm/lib/Target/Alpha/AlphaISelPattern.cpp b/llvm/lib/Target/Alpha/AlphaISelPattern.cpp
index 8f3752f..e594c86 100644
--- a/llvm/lib/Target/Alpha/AlphaISelPattern.cpp
+++ b/llvm/lib/Target/Alpha/AlphaISelPattern.cpp
@@ -1411,15 +1411,15 @@
if (GlobalAddressSDNode *GASD =
dyn_cast<GlobalAddressSDNode>(N.getOperand(1)))
{
- //if (GASD->getGlobal()->isExternal()) {
+ if (GASD->getGlobal()->isExternal()) {
//use safe calling convention
AlphaLowering.restoreGP(BB);
has_sym = true;
- BuildMI(BB, Alpha::CALL, 1).addGlobalAddress(GASD->getGlobal(),true);
- //} else {
+ BuildMI(BB, Alpha::CALL, 1).addGlobalAddress(GASD->getGlobal());
+ } else {
//use PC relative branch call
- //BuildMI(BB, Alpha::BSR, 1, Alpha::R26).addGlobalAddress(GASD->getGlobal(),true);
- //}
+ BuildMI(BB, Alpha::BSR, 1, Alpha::R26).addGlobalAddress(GASD->getGlobal(),true);
+ }
}
else if (ExternalSymbolSDNode *ESSDN =
dyn_cast<ExternalSymbolSDNode>(N.getOperand(1)))