diff options
author | Stephen Hines <srhines@google.com> | 2015-03-23 12:10:34 -0700 |
---|---|---|
committer | Stephen Hines <srhines@google.com> | 2015-03-23 12:10:34 -0700 |
commit | ebe69fe11e48d322045d5949c83283927a0d790b (patch) | |
tree | c92f1907a6b8006628a4b01615f38264d29834ea /test/CodeGen/Thumb/vargs.ll | |
parent | b7d2e72b02a4cb8034f32f8247a2558d2434e121 (diff) | |
download | external_llvm-ebe69fe11e48d322045d5949c83283927a0d790b.zip external_llvm-ebe69fe11e48d322045d5949c83283927a0d790b.tar.gz external_llvm-ebe69fe11e48d322045d5949c83283927a0d790b.tar.bz2 |
Update aosp/master LLVM for rebase to r230699.
Change-Id: I2b5be30509658cb8266be782de0ab24f9099f9b9
Diffstat (limited to 'test/CodeGen/Thumb/vargs.ll')
-rw-r--r-- | test/CodeGen/Thumb/vargs.ll | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/test/CodeGen/Thumb/vargs.ll b/test/CodeGen/Thumb/vargs.ll index 4078b01..71e8afa 100644 --- a/test/CodeGen/Thumb/vargs.ll +++ b/test/CodeGen/Thumb/vargs.ll @@ -6,6 +6,10 @@ define void @f(i32 %a, ...) { entry: +; Check that space is reserved above the pushed lr for variadic argument +; registers to be stored in. +; CHECK: sub sp, #[[IMM:[0-9]+]] +; CHECK: push %va = alloca i8*, align 4 ; <i8**> [#uses=4] %va.upgrd.1 = bitcast i8** %va to i8* ; <i8*> [#uses=1] call void @llvm.va_start( i8* %va.upgrd.1 ) @@ -27,6 +31,13 @@ bb7: ; preds = %bb %va.upgrd.4 = bitcast i8** %va to i8* ; <i8*> [#uses=1] call void @llvm.va_end( i8* %va.upgrd.4 ) ret void + +; The return sequence should pop the lr to r3, recover the stack space used to +; store variadic argument registers, then return via r3. Possibly there is a pop +; before this, but only if the function happened to use callee-saved registers. +; CHECK: pop {r3} +; CHECK: add sp, #[[IMM]] +; CHECK: bx r3 } declare void @llvm.va_start(i8*) @@ -34,8 +45,3 @@ declare void @llvm.va_start(i8*) declare i32 @printf(i8*, ...) declare void @llvm.va_end(i8*) - -; CHECK: pop -; CHECK: pop -; CHECK-NOT: pop - |