1 ;; Sparc backend can't currently handle variable allocas with
2 ;; alignment greater than the stack alignment. This code ought to
3 ;; compile, but doesn't currently.
5 ;; RUN: not llc -march=sparc < %s 2>&1 | FileCheck %s
6 ;; RUN: not llc -march=sparcv9 < %s 2>&1 | FileCheck %s
7 ;; CHECK: ERROR: Function {{.*}} required stack re-alignment
9 define void @variable_alloca_with_overalignment(i32 %num) {
10 %aligned = alloca i32, align 64
11 %var_size = alloca i8, i32 %num, align 4
12 call void @foo(i32* %aligned, i8* %var_size)
16 ;; Same but with the alloca itself overaligned
17 define void @variable_alloca_with_overalignment_2(i32 %num) {
18 %var_size = alloca i8, i32 %num, align 64
19 call void @foo(i32* null, i8* %var_size)
23 declare void @foo(i32*, i8*);