1 ; RUN: llc < %s -mtriple=x86_64-apple-darwin -mcpu=corei7-avx -enable-patchpoint-liveness=false | FileCheck %s
3 ; CHECK-LABEL: .section __LLVM_STACKMAPS,__llvm_stackmaps
4 ; CHECK-NEXT: __LLVM_StackMaps:
18 ; StackSizeRecord[NumFunctions]
20 ; CHECK-NEXT: .quad _main
21 ; CHECK-NEXT: .quad 24
24 ; Constants[NumConstants] (empty)
26 ; StkMapRecord[NumRecords]
29 ; CHECK-NEXT: .long {{.*}}
30 ; CHECK-NEXT: .short {{.*}}
32 ; CHECK-NEXT: .short 11
33 ; Location[NumLocations]
37 ; CHECK-NEXT: .short 1
38 ; CHECK-NEXT: .short {{.*}}
39 ; CHECK-NEXT: .short 0
44 ; CHECK-NEXT: .short 8
45 ; CHECK-NEXT: .short 0
46 ; CHECK-NEXT: .short 0
47 ; CHECK-NEXT: .long 22
51 ; CHECK-NEXT: .short 1
52 ; CHECK-NEXT: .short {{.*}}
53 ; CHECK-NEXT: .short 0
58 ; CHECK-NEXT: .short 16
59 ; CHECK-NEXT: .short {{.*}}
60 ; CHECK-NEXT: .short 0
65 ; CHECK-NEXT: .short 16
66 ; CHECK-NEXT: .short {{.*}}
67 ; CHECK-NEXT: .short 0
72 ; CHECK-NEXT: .short 8
73 ; CHECK-NEXT: .short {{.*}}
74 ; CHECK-NEXT: .short 0
75 ; CHECK-NEXT: .long 66
79 ; CHECK-NEXT: .short 4
80 ; CHECK-NEXT: .short {{.*}}
81 ; CHECK-NEXT: .short 0
86 ; CHECK-NEXT: .short 8
87 ; CHECK-NEXT: .short 0
88 ; CHECK-NEXT: .short 0
93 ; CHECK-NEXT: .short 4
94 ; CHECK-NEXT: .short {{.*}}
95 ; CHECK-NEXT: .short 0
100 ; CHECK-NEXT: .short 8
101 ; CHECK-NEXT: .short 0
102 ; CHECK-NEXT: .short 0
103 ; CHECK-NEXT: .long 0
105 ; CHECK-NEXT: .byte 1
106 ; CHECK-NEXT: .byte 0
107 ; CHECK-NEXT: .short 1
108 ; CHECK-NEXT: .short {{.*}}
109 ; CHECK-NEXT: .short 0
110 ; CHECK-NEXT: .long 0
112 @p32 = external global ptr addrspace(270)
114 %struct1 = type {i32, i64}
115 %struct2 = type {i1, i1, i1}
117 declare void @llvm.experimental.stackmap(i64, i32, ...)
119 define dso_local i32 @main(i32 %argc, ptr %argv) {
121 %i1reg = icmp eq i32 %argc, 5
122 %i7reg = zext i1 %i1reg to i7
123 %halfreg = sitofp i32 %argc to half
124 %ptr32 = load ptr addrspace(270), ptr @p32
125 %structreg1 = insertvalue %struct1 zeroinitializer, i32 %argc, 0
126 %structreg2 = insertvalue %struct2 zeroinitializer, i1 %i1reg, 0
127 call void (i64, i32, ...) @llvm.experimental.stackmap(
136 ; FIXME: fix and test vectors. At the moment even legally sized vectors
138 ; https://github.com/llvm/llvm-project/issues/55613
140 ; FIXME: test non-constant i128 once these are fixed:
141 ; - https://github.com/llvm/llvm-project/issues/26431
142 ; - https://github.com/llvm/llvm-project/issues/55957
143 ptr addrspace(270) %ptr32,
144 ; FIXME: The stackmap record generated for structs is incorrect:
145 ; - https://github.com/llvm/llvm-project/issues/55649
146 ; - https://github.com/llvm/llvm-project/issues/55957
147 %struct1 zeroinitializer,
148 %struct1 %structreg1,
149 %struct2 zeroinitializer,
150 %struct2 %structreg2)