aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2009-10-12 16:36:12 +0000
committerDan Gohman <gohman@apple.com>2009-10-12 16:36:12 +0000
commit1c738f5ee6c48df39332389e307de1305903c8e7 (patch)
tree5ad46ad03bc422e0f1120d753d5d1cf5205f1c7a /lib
parente6acc86c5d19e865476fc4926de6dbb6797ee880 (diff)
downloadexternal_llvm-1c738f5ee6c48df39332389e307de1305903c8e7.zip
external_llvm-1c738f5ee6c48df39332389e307de1305903c8e7.tar.gz
external_llvm-1c738f5ee6c48df39332389e307de1305903c8e7.tar.bz2
Don't forget to mark RAX as live-out of the function when arranging for
it to hold the address of an sret return value, for x86-64 ABI purposes. Also, fix the test that was originally intended to test this to actually test it, using FileCheck. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83853 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r--lib/Target/X86/X86ISelLowering.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/Target/X86/X86ISelLowering.cpp b/lib/Target/X86/X86ISelLowering.cpp
index fb5399e..fadc818 100644
--- a/lib/Target/X86/X86ISelLowering.cpp
+++ b/lib/Target/X86/X86ISelLowering.cpp
@@ -1162,6 +1162,9 @@ X86TargetLowering::LowerReturn(SDValue Chain,
Chain = DAG.getCopyToReg(Chain, dl, X86::RAX, Val, Flag);
Flag = Chain.getValue(1);
+
+ // RAX now acts like a return value.
+ MF.getRegInfo().addLiveOut(X86::RAX);
}
RetOps[0] = Chain; // Update chain.