1 ; RUN: llc -mtriple=x86_64-pc-linux -force-align-stack -stack-alignment=32 < %s | FileCheck %s
2 ; RUN: llc -mtriple=x86_64-pc-linux-gnux32 -force-align-stack -stack-alignment=32 < %s | FileCheck -check-prefix=X32ABI %s
3 ; This should run with NaCl as well ( -mtriple=x86_64-pc-nacl ) but currently doesn't due to PR22655
5 ; Make sure the correct register gets set up as the base pointer
6 ; This should be rbx for x64 and 64-bit NaCl and ebx for x32
8 ; CHECK: subq $32, %rsp
9 ; CHECK: movq %rsp, %rbx
11 ; X32ABI: subl $32, %esp
12 ; X32ABI: movl %esp, %ebx
14 ; NACL: subq $32, %rsp
15 ; NACL: movq %rsp, %rbx
17 declare i32 @helper() nounwind
18 define void @base() #0 {
20 %k = call i32 @helper()
21 %a = alloca i32, i32 %k, align 4
22 store i32 0, i32* %a, align 4
26 attributes #0 = { nounwind uwtable "no-frame-pointer-elim"="true" "no-frame-pointer-elim-non-leaf"}