2017-05-06 00:04:05 +02:00
|
|
|
; RUN: llc -o - %s | FileCheck %s
|
|
|
|
target triple="arm--"
|
|
|
|
|
|
|
|
@glob = external global i32*
|
|
|
|
|
2020-11-20 16:52:27 +01:00
|
|
|
declare void @bar(i32*, [20000 x i8]* byval([20000 x i8]))
|
2017-05-06 00:04:05 +02:00
|
|
|
|
|
|
|
; CHECK-LABEL: foo:
|
|
|
|
; We should see the stack getting additional alignment
|
|
|
|
; CHECK: sub sp, sp, #16
|
|
|
|
; CHECK: bic sp, sp, #31
|
|
|
|
; And a base pointer getting used.
|
|
|
|
; CHECK: mov r6, sp
|
|
|
|
; Which is passed to the call
|
2018-12-07 14:43:55 +01:00
|
|
|
; CHECK: mov r0, r6
|
2017-05-06 00:04:05 +02:00
|
|
|
; CHECK: bl bar
|
|
|
|
define void @foo([20000 x i8]* %addr) {
|
|
|
|
%tmp = alloca [4 x i32], align 32
|
|
|
|
%tmp0 = getelementptr [4 x i32], [4 x i32]* %tmp, i32 0, i32 0
|
2020-11-20 16:52:27 +01:00
|
|
|
call void @bar(i32* %tmp0, [20000 x i8]* byval([20000 x i8]) %addr)
|
2017-05-06 00:04:05 +02:00
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|