diff options
author | Reid Kleckner <reid@kleckner.net> | 2014-08-22 21:59:26 +0000 |
---|---|---|
committer | Reid Kleckner <reid@kleckner.net> | 2014-08-22 21:59:26 +0000 |
commit | d89c0abc0724945e3181f3aaef023b292e53baad (patch) | |
tree | 94a98cad9095854e12917f75215122f82f1b47a8 /test/CodeGen/ARM/thumb1_return_sequence.ll | |
parent | e5e847a500ef0726f343a3f69492026de54fb4c2 (diff) |
ARM / x86_64 varargs: Don't save regparms in prologue without va_start
There's no need to do this if the user doesn't call va_start. In the
future, we're going to have thunks that forward these register
parameters with musttail calls, and they won't need these spills for
handling va_start.
Most of the test suite changes are adding va_start calls to existing
tests to keep things working.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@216294 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/ARM/thumb1_return_sequence.ll')
-rw-r--r-- | test/CodeGen/ARM/thumb1_return_sequence.ll | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/test/CodeGen/ARM/thumb1_return_sequence.ll b/test/CodeGen/ARM/thumb1_return_sequence.ll index ab08379a248..318e6e40237 100644 --- a/test/CodeGen/ARM/thumb1_return_sequence.ll +++ b/test/CodeGen/ARM/thumb1_return_sequence.ll @@ -46,6 +46,7 @@ entry: store <4 x i32> <i32 42, i32 42, i32 42, i32 42>, <4 x i32>* %b, align 16 store <4 x i32> <i32 0, i32 1, i32 2, i32 3>, <4 x i32>* %a, align 16 %0 = load <4 x i32>* %a, align 16 + call void @llvm.va_start(i8* null) ret <4 x i32> %0 ; Epilogue @@ -154,6 +155,7 @@ entry: %7 = load i32* %d, align 4 %add5 = add nsw i32 %add4, %7 %add6 = add nsw i32 %add5, %i + call void @llvm.va_start(i8* null) ret i32 %add6 ; Epilogue @@ -198,7 +200,8 @@ entry: ; CHECK-V5T: sub sp, ; CHECK-V5T: push {[[SAVED:(r[4567](, )?)+]], lr} - ret i32 %i; + call void @llvm.va_start(i8* null) + ret i32 %i; ; Epilogue ; -------- ; CHECK-V4T: pop {[[SAVED]]} @@ -210,3 +213,5 @@ entry: ; CHECK-V5T-NEXT: add sp, ; CHECK-V5T-NEXT: bx r3 } + +declare void @llvm.va_start(i8*) nounwind |