llvm-project
25 строк · 1.2 Кб
1; RUN: llvm-as < %s | llvm-dis | FileCheck %s
2
3target datalayout = "A5"
4; CHECK: target datalayout = "A5"
5
6
7; CHECK: %alloca_array_no_align = alloca i32, i32 9, align 4, addrspace(5)
8; CHECK-NEXT: %alloca_array_align4 = alloca i32, i32 9, align 4, addrspace(5)
9; CHECK-NEXT: %alloca_array_no_align_metadata = alloca i32, i32 9, align 4, addrspace(5), !foo !0
10; CHECK-NEXT: %alloca_array_align4_metadata = alloca i32, i32 9, align 4, addrspace(5), !foo !0
11; CHECK-NEXT: %alloca_inalloca_array_no_align = alloca inalloca i32, i32 9, align 4, addrspace(5)
12; CHECK-NEXT: %alloca_inalloca_array_align4_metadata = alloca inalloca i32, i32 9, align 4, addrspace(5), !foo !0
13
14define void @use_alloca() {
15%alloca_array_no_align = alloca i32, i32 9, addrspace(5)
16%alloca_array_align4 = alloca i32, i32 9, align 4, addrspace(5)
17%alloca_array_no_align_metadata = alloca i32, i32 9, addrspace(5), !foo !0
18%alloca_array_align4_metadata = alloca i32, i32 9, align 4, addrspace(5), !foo !0
19%alloca_inalloca_array_no_align = alloca inalloca i32, i32 9, addrspace(5)
20%alloca_inalloca_array_align4_metadata = alloca inalloca i32, i32 9, align 4, addrspace(5), !foo !0
21
22ret void
23}
24
25!0 = !{}
26