Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(70)

Side by Side Diff: tests_lit/llvm2ice_tests/globalrelocs.ll

Issue 916653004: Subzero: Emit functions and global initializers in a separate thread. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Const change Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « tests_lit/llvm2ice_tests/branch-simple.ll ('k') | tests_lit/llvm2ice_tests/load.ll » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 ; Tests if we handle global variables with relocation initializers. 1 ; Tests if we handle global variables with relocation initializers.
2 2
3 ; REQUIRES: allow_dump 3 ; REQUIRES: allow_dump
4 4
5 ; Test that we handle it in the ICE converter. 5 ; Test that we handle it in the ICE converter.
6 ; RUN: %lc2i -i %s --args -verbose inst | %iflc FileCheck %s 6 ; RUN: %lc2i -i %s --args -verbose inst -threads=0 \
7 ; RUN: | %iflc FileCheck %s
8 ; RUN: %lc2i -i %s --args -verbose inst -threads=0 \
9 ; RUN: | %iflc FileCheck --check-prefix=DUMP %s
7 10
8 ; Test that we handle it using Subzero's bitcode reader. 11 ; Test that we handle it using Subzero's bitcode reader.
9 ; RUN: %p2i -i %s --args -verbose inst | FileCheck %s 12 ; RUN: %p2i -i %s --args -verbose inst -threads=0 \
13 ; RUN: | FileCheck %s
14 ; RUN: %p2i -i %s --args -verbose inst -threads=0 \
15 ; RUN: | FileCheck --check-prefix=DUMP %s
10 16
11 @bytes = internal global [7 x i8] c"abcdefg" 17 @bytes = internal global [7 x i8] c"abcdefg"
12 ; CHECK: @bytes = internal global [7 x i8] c"abcdefg" 18 ; DUMP: @bytes = internal global [7 x i8] c"abcdefg"
13 ; CHECK: .type bytes,@object 19 ; CHECK: .type bytes,@object
14 ; CHECK: .section .data,"aw",@progbits 20 ; CHECK: .section .data,"aw",@progbits
15 ; CHECK:bytes: 21 ; CHECK:bytes:
16 ; CHECK: .byte 97 22 ; CHECK: .byte 97
17 ; CHECK: .byte 98 23 ; CHECK: .byte 98
18 ; CHECK: .byte 99 24 ; CHECK: .byte 99
19 ; CHECK: .byte 100 25 ; CHECK: .byte 100
20 ; CHECK: .byte 101 26 ; CHECK: .byte 101
21 ; CHECK: .byte 102 27 ; CHECK: .byte 102
22 ; CHECK: .byte 103 28 ; CHECK: .byte 103
23 ; CHECK: .size bytes, 7 29 ; CHECK: .size bytes, 7
24 30
25 @const_bytes = internal constant [7 x i8] c"abcdefg" 31 @const_bytes = internal constant [7 x i8] c"abcdefg"
26 ; CHECK: @const_bytes = internal constant [7 x i8] c"abcdefg" 32 ; DUMP: @const_bytes = internal constant [7 x i8] c"abcdefg"
27 ; CHECK: .type const_bytes,@object 33 ; CHECK: .type const_bytes,@object
28 ; CHECK: .section .rodata,"a",@progbits 34 ; CHECK: .section .rodata,"a",@progbits
29 ; CHECK:const_bytes: 35 ; CHECK:const_bytes:
30 ; CHECK: .byte 97 36 ; CHECK: .byte 97
31 ; CHECK: .byte 98 37 ; CHECK: .byte 98
32 ; CHECK: .byte 99 38 ; CHECK: .byte 99
33 ; CHECK: .byte 100 39 ; CHECK: .byte 100
34 ; CHECK: .byte 101 40 ; CHECK: .byte 101
35 ; CHECK: .byte 102 41 ; CHECK: .byte 102
36 ; CHECK: .byte 103 42 ; CHECK: .byte 103
37 ; CHECK: .size const_bytes, 7 43 ; CHECK: .size const_bytes, 7
38 44
39 @ptr_to_ptr = internal global i32 ptrtoint (i32* @ptr to i32) 45 @ptr_to_ptr = internal global i32 ptrtoint (i32* @ptr to i32)
40 ; CHECK: @ptr_to_ptr = internal global i32 ptrtoint (i32* @ptr to i32) 46 ; DUMP: @ptr_to_ptr = internal global i32 ptrtoint (i32* @ptr to i32)
41 ; CHECK: .type ptr_to_ptr,@object 47 ; CHECK: .type ptr_to_ptr,@object
42 ; CHECK: .section .data,"aw",@progbits 48 ; CHECK: .section .data,"aw",@progbits
43 ; CHECK:ptr_to_ptr: 49 ; CHECK:ptr_to_ptr:
44 ; CHECK: .long ptr 50 ; CHECK: .long ptr
45 ; CHECK: .size ptr_to_ptr, 4 51 ; CHECK: .size ptr_to_ptr, 4
46 52
47 @const_ptr_to_ptr = internal constant i32 ptrtoint (i32* @ptr to i32) 53 @const_ptr_to_ptr = internal constant i32 ptrtoint (i32* @ptr to i32)
48 ; CHECK: @const_ptr_to_ptr = internal constant i32 ptrtoint (i32* @ptr to i32) 54 ; DUMP: @const_ptr_to_ptr = internal constant i32 ptrtoint (i32* @ptr to i32)
49 ; CHECK: .type const_ptr_to_ptr,@object 55 ; CHECK: .type const_ptr_to_ptr,@object
50 ; CHECK: .section .rodata,"a",@progbits 56 ; CHECK: .section .rodata,"a",@progbits
51 ; CHECK:const_ptr_to_ptr: 57 ; CHECK:const_ptr_to_ptr:
52 ; CHECK: .long ptr 58 ; CHECK: .long ptr
53 ; CHECK: .size const_ptr_to_ptr, 4 59 ; CHECK: .size const_ptr_to_ptr, 4
54 60
55 @ptr_to_func = internal global i32 ptrtoint (void ()* @func to i32) 61 @ptr_to_func = internal global i32 ptrtoint (void ()* @func to i32)
56 ; CHECK: @ptr_to_func = internal global i32 ptrtoint (void ()* @func to i32) 62 ; DUMP: @ptr_to_func = internal global i32 ptrtoint (void ()* @func to i32)
57 ; CHECK: .type ptr_to_func,@object 63 ; CHECK: .type ptr_to_func,@object
58 ; CHECK: .section .data,"aw",@progbits 64 ; CHECK: .section .data,"aw",@progbits
59 ; CHECK:ptr_to_func: 65 ; CHECK:ptr_to_func:
60 ; CHECK: .long func 66 ; CHECK: .long func
61 ; CHECK: .size ptr_to_func, 4 67 ; CHECK: .size ptr_to_func, 4
62 68
63 @const_ptr_to_func = internal constant i32 ptrtoint (void ()* @func to i32) 69 @const_ptr_to_func = internal constant i32 ptrtoint (void ()* @func to i32)
64 ; CHECK: @const_ptr_to_func = internal constant i32 ptrtoint (void ()* @func to i32) 70 ; DUMP: @const_ptr_to_func = internal constant i32 ptrtoint (void ()* @func to i 32)
65 ; CHECK: .type const_ptr_to_func,@object 71 ; CHECK: .type const_ptr_to_func,@object
66 ; CHECK: .section .rodata,"a",@progbits 72 ; CHECK: .section .rodata,"a",@progbits
67 ; CHECK:const_ptr_to_func: 73 ; CHECK:const_ptr_to_func:
68 ; CHECK: .long func 74 ; CHECK: .long func
69 ; CHECK: .size const_ptr_to_func, 4 75 ; CHECK: .size const_ptr_to_func, 4
70 76
71 @compound = internal global <{ [3 x i8], i32 }> <{ [3 x i8] c"foo", i32 ptrtoint (void ()* @func to i32) }> 77 @compound = internal global <{ [3 x i8], i32 }> <{ [3 x i8] c"foo", i32 ptrtoint (void ()* @func to i32) }>
72 ; CHECK: @compound = internal global <{ [3 x i8], i32 }> <{ [3 x i8] c"foo", i32 ptrtoint (void ()* @func to i32) }> 78 ; DUMP: @compound = internal global <{ [3 x i8], i32 }> <{ [3 x i8] c"foo", i32 ptrtoint (void ()* @func to i32) }>
73 ; CHECK: .type compound,@object 79 ; CHECK: .type compound,@object
74 ; CHECK: .section .data,"aw",@progbits 80 ; CHECK: .section .data,"aw",@progbits
75 ; CHECK:compound: 81 ; CHECK:compound:
76 ; CHECK: .byte 102 82 ; CHECK: .byte 102
77 ; CHECK: .byte 111 83 ; CHECK: .byte 111
78 ; CHECK: .byte 111 84 ; CHECK: .byte 111
79 ; CHECK: .long func 85 ; CHECK: .long func
80 ; CHECK: .size compound, 7 86 ; CHECK: .size compound, 7
81 87
82 @const_compound = internal constant <{ [3 x i8], i32 }> <{ [3 x i8] c"foo", i32 ptrtoint (void ()* @func to i32) }> 88 @const_compound = internal constant <{ [3 x i8], i32 }> <{ [3 x i8] c"foo", i32 ptrtoint (void ()* @func to i32) }>
83 ; CHECK: @const_compound = internal constant <{ [3 x i8], i32 }> <{ [3 x i8] c"f oo", i32 ptrtoint (void ()* @func to i32) }> 89 ; DUMP: @const_compound = internal constant <{ [3 x i8], i32 }> <{ [3 x i8] c"fo o", i32 ptrtoint (void ()* @func to i32) }>
84 ; CHECK: .type const_compound,@object 90 ; CHECK: .type const_compound,@object
85 ; CHECK: .section .rodata,"a",@progbits 91 ; CHECK: .section .rodata,"a",@progbits
86 ; CHECK:const_compound: 92 ; CHECK:const_compound:
87 ; CHECK: .byte 102 93 ; CHECK: .byte 102
88 ; CHECK: .byte 111 94 ; CHECK: .byte 111
89 ; CHECK: .byte 111 95 ; CHECK: .byte 111
90 ; CHECK: .long func 96 ; CHECK: .long func
91 ; CHECK: .size const_compound, 7 97 ; CHECK: .size const_compound, 7
92 98
93 @ptr = internal global i32 ptrtoint ([7 x i8]* @bytes to i32) 99 @ptr = internal global i32 ptrtoint ([7 x i8]* @bytes to i32)
94 ; CHECK: @ptr = internal global i32 ptrtoint ([7 x i8]* @bytes to i32) 100 ; DUMP: @ptr = internal global i32 ptrtoint ([7 x i8]* @bytes to i32)
95 ; CHECK: .type ptr,@object 101 ; CHECK: .type ptr,@object
96 ; CHECK: .section .data,"aw",@progbits 102 ; CHECK: .section .data,"aw",@progbits
97 ; CHECK:ptr: 103 ; CHECK:ptr:
98 ; CHECK: .long bytes 104 ; CHECK: .long bytes
99 ; CHECK: .size ptr, 4 105 ; CHECK: .size ptr, 4
100 106
101 @const_ptr = internal constant i32 ptrtoint ([7 x i8]* @bytes to i32) 107 @const_ptr = internal constant i32 ptrtoint ([7 x i8]* @bytes to i32)
102 ; CHECK: @const_ptr = internal constant i32 ptrtoint ([7 x i8]* @bytes to i32) 108 ; DUMP: @const_ptr = internal constant i32 ptrtoint ([7 x i8]* @bytes to i32)
103 ; CHECK: .type const_ptr,@object 109 ; CHECK: .type const_ptr,@object
104 ; CHECK: .section .rodata,"a",@progbits 110 ; CHECK: .section .rodata,"a",@progbits
105 ; CHECK:const_ptr: 111 ; CHECK:const_ptr:
106 ; CHECK: .long bytes 112 ; CHECK: .long bytes
107 ; CHECK: .size const_ptr, 4 113 ; CHECK: .size const_ptr, 4
108 114
109 @addend_ptr = internal global i32 add (i32 ptrtoint (i32* @ptr to i32), i32 1) 115 @addend_ptr = internal global i32 add (i32 ptrtoint (i32* @ptr to i32), i32 1)
110 ; CHECK: @addend_ptr = internal global i32 add (i32 ptrtoint (i32* @ptr to i32), i32 1) 116 ; DUMP: @addend_ptr = internal global i32 add (i32 ptrtoint (i32* @ptr to i32), i32 1)
111 ; CHECK: .type addend_ptr,@object 117 ; CHECK: .type addend_ptr,@object
112 ; CHECK: .section .data,"aw",@progbits 118 ; CHECK: .section .data,"aw",@progbits
113 ; CHECK:addend_ptr: 119 ; CHECK:addend_ptr:
114 ; CHECK: .long ptr + 1 120 ; CHECK: .long ptr + 1
115 ; CHECK: .size addend_ptr, 4 121 ; CHECK: .size addend_ptr, 4
116 122
117 @const_addend_ptr = internal constant i32 add (i32 ptrtoint (i32* @ptr to i32), i32 1) 123 @const_addend_ptr = internal constant i32 add (i32 ptrtoint (i32* @ptr to i32), i32 1)
118 ; CHECK: @const_addend_ptr = internal constant i32 add (i32 ptrtoint (i32* @ptr to i32), i32 1) 124 ; DUMP: @const_addend_ptr = internal constant i32 add (i32 ptrtoint (i32* @ptr t o i32), i32 1)
119 ; CHECK: .type const_addend_ptr,@object 125 ; CHECK: .type const_addend_ptr,@object
120 ; CHECK: .section .rodata,"a",@progbits 126 ; CHECK: .section .rodata,"a",@progbits
121 ; CHECK:const_addend_ptr: 127 ; CHECK:const_addend_ptr:
122 ; CHECK: .long ptr + 1 128 ; CHECK: .long ptr + 1
123 ; CHECK: .size const_addend_ptr, 4 129 ; CHECK: .size const_addend_ptr, 4
124 130
125 @addend_negative = internal global i32 add (i32 ptrtoint (i32* @ptr to i32), i32 -1) 131 @addend_negative = internal global i32 add (i32 ptrtoint (i32* @ptr to i32), i32 -1)
126 ; CHECK: @addend_negative = internal global i32 add (i32 ptrtoint (i32* @ptr to i32), i32 -1) 132 ; DUMP: @addend_negative = internal global i32 add (i32 ptrtoint (i32* @ptr to i 32), i32 -1)
127 ; CHECK: .type addend_negative,@object 133 ; CHECK: .type addend_negative,@object
128 ; CHECK: .section .data,"aw",@progbits 134 ; CHECK: .section .data,"aw",@progbits
129 ; CHECK:addend_negative: 135 ; CHECK:addend_negative:
130 ; CHECK: .long ptr - 1 136 ; CHECK: .long ptr - 1
131 ; CHECK: .size addend_negative, 4 137 ; CHECK: .size addend_negative, 4
132 138
133 @const_addend_negative = internal constant i32 add (i32 ptrtoint (i32* @ptr to i 32), i32 -1) 139 @const_addend_negative = internal constant i32 add (i32 ptrtoint (i32* @ptr to i 32), i32 -1)
134 ; CHECK: @const_addend_negative = internal constant i32 add (i32 ptrtoint (i32* @ptr to i32), i32 -1) 140 ; DUMP: @const_addend_negative = internal constant i32 add (i32 ptrtoint (i32* @ ptr to i32), i32 -1)
135 ; CHECK: .type const_addend_negative,@object 141 ; CHECK: .type const_addend_negative,@object
136 ; CHECK: .section .rodata,"a",@progbits 142 ; CHECK: .section .rodata,"a",@progbits
137 ; CHECK:const_addend_negative: 143 ; CHECK:const_addend_negative:
138 ; CHECK: .long ptr - 1 144 ; CHECK: .long ptr - 1
139 ; CHECK: .size const_addend_negative, 4 145 ; CHECK: .size const_addend_negative, 4
140 146
141 @addend_array1 = internal global i32 add (i32 ptrtoint ([7 x i8]* @bytes to i32) , i32 1) 147 @addend_array1 = internal global i32 add (i32 ptrtoint ([7 x i8]* @bytes to i32) , i32 1)
142 ; CHECK: @addend_array1 = internal global i32 add (i32 ptrtoint ([7 x i8]* @byte s to i32), i32 1) 148 ; DUMP: @addend_array1 = internal global i32 add (i32 ptrtoint ([7 x i8]* @bytes to i32), i32 1)
143 ; CHECK: .type addend_array1,@object 149 ; CHECK: .type addend_array1,@object
144 ; CHECK: .section .data,"aw",@progbits 150 ; CHECK: .section .data,"aw",@progbits
145 ; CHECK:addend_array1: 151 ; CHECK:addend_array1:
146 ; CHECK: .long bytes + 1 152 ; CHECK: .long bytes + 1
147 ; CHECK: .size addend_array1, 4 153 ; CHECK: .size addend_array1, 4
148 154
149 @const_addend_array1 = internal constant i32 add (i32 ptrtoint ([7 x i8]* @bytes to i32), i32 1) 155 @const_addend_array1 = internal constant i32 add (i32 ptrtoint ([7 x i8]* @bytes to i32), i32 1)
150 ; CHECK: @const_addend_array1 = internal constant i32 add (i32 ptrtoint ([7 x i8 ]* @bytes to i32), i32 1) 156 ; DUMP: @const_addend_array1 = internal constant i32 add (i32 ptrtoint ([7 x i8] * @bytes to i32), i32 1)
151 ; CHECK: .type const_addend_array1,@object 157 ; CHECK: .type const_addend_array1,@object
152 ; CHECK: .section .rodata,"a",@progbits 158 ; CHECK: .section .rodata,"a",@progbits
153 ; CHECK:const_addend_array1: 159 ; CHECK:const_addend_array1:
154 ; CHECK: .long bytes + 1 160 ; CHECK: .long bytes + 1
155 ; CHECK: .size const_addend_array1, 4 161 ; CHECK: .size const_addend_array1, 4
156 162
157 @addend_array2 = internal global i32 add (i32 ptrtoint ([7 x i8]* @bytes to i32) , i32 7) 163 @addend_array2 = internal global i32 add (i32 ptrtoint ([7 x i8]* @bytes to i32) , i32 7)
158 ; CHECK: @addend_array2 = internal global i32 add (i32 ptrtoint ([7 x i8]* @byte s to i32), i32 7) 164 ; DUMP: @addend_array2 = internal global i32 add (i32 ptrtoint ([7 x i8]* @bytes to i32), i32 7)
159 ; CHECK: .type addend_array2,@object 165 ; CHECK: .type addend_array2,@object
160 ; CHECK: .section .data,"aw",@progbits 166 ; CHECK: .section .data,"aw",@progbits
161 ; CHECK:addend_array2: 167 ; CHECK:addend_array2:
162 ; CHECK: .long bytes + 7 168 ; CHECK: .long bytes + 7
163 ; CHECK: .size addend_array2, 4 169 ; CHECK: .size addend_array2, 4
164 170
165 @const_addend_array2 = internal constant i32 add (i32 ptrtoint ([7 x i8]* @bytes to i32), i32 7) 171 @const_addend_array2 = internal constant i32 add (i32 ptrtoint ([7 x i8]* @bytes to i32), i32 7)
166 ; CHECK: @const_addend_array2 = internal constant i32 add (i32 ptrtoint ([7 x i8 ]* @bytes to i32), i32 7) 172 ; DUMP: @const_addend_array2 = internal constant i32 add (i32 ptrtoint ([7 x i8] * @bytes to i32), i32 7)
167 ; CHECK: .type const_addend_array2,@object 173 ; CHECK: .type const_addend_array2,@object
168 ; CHECK: .section .rodata,"a",@progbits 174 ; CHECK: .section .rodata,"a",@progbits
169 ; CHECK:const_addend_array2: 175 ; CHECK:const_addend_array2:
170 ; CHECK: .long bytes + 7 176 ; CHECK: .long bytes + 7
171 ; CHECK: .size const_addend_array2, 4 177 ; CHECK: .size const_addend_array2, 4
172 178
173 @addend_array3 = internal global i32 add (i32 ptrtoint ([7 x i8]* @bytes to i32) , i32 9) 179 @addend_array3 = internal global i32 add (i32 ptrtoint ([7 x i8]* @bytes to i32) , i32 9)
174 ; CHECK: @addend_array3 = internal global i32 add (i32 ptrtoint ([7 x i8]* @byte s to i32), i32 9) 180 ; DUMP: @addend_array3 = internal global i32 add (i32 ptrtoint ([7 x i8]* @bytes to i32), i32 9)
175 ; CHECK: .type addend_array3,@object 181 ; CHECK: .type addend_array3,@object
176 ; CHECK: .section .data,"aw",@progbits 182 ; CHECK: .section .data,"aw",@progbits
177 ; CHECK:addend_array3: 183 ; CHECK:addend_array3:
178 ; CHECK: .long bytes + 9 184 ; CHECK: .long bytes + 9
179 ; CHECK: .size addend_array3, 4 185 ; CHECK: .size addend_array3, 4
180 186
181 @const_addend_array3 = internal constant i32 add (i32 ptrtoint ([7 x i8]* @bytes to i32), i32 9) 187 @const_addend_array3 = internal constant i32 add (i32 ptrtoint ([7 x i8]* @bytes to i32), i32 9)
182 ; CHECK: @const_addend_array3 = internal constant i32 add (i32 ptrtoint ([7 x i8 ]* @bytes to i32), i32 9) 188 ; DUMP: @const_addend_array3 = internal constant i32 add (i32 ptrtoint ([7 x i8] * @bytes to i32), i32 9)
183 ; CHECK: .type const_addend_array3,@object 189 ; CHECK: .type const_addend_array3,@object
184 ; CHECK: .section .rodata,"a",@progbits 190 ; CHECK: .section .rodata,"a",@progbits
185 ; CHECK:const_addend_array3: 191 ; CHECK:const_addend_array3:
186 ; CHECK: .long bytes + 9 192 ; CHECK: .long bytes + 9
187 ; CHECK: .size const_addend_array3, 4 193 ; CHECK: .size const_addend_array3, 4
188 194
189 @addend_struct1 = internal global i32 add (i32 ptrtoint (<{ [3 x i8], i32 }>* @c ompound to i32), i32 1) 195 @addend_struct1 = internal global i32 add (i32 ptrtoint (<{ [3 x i8], i32 }>* @c ompound to i32), i32 1)
190 ; CHECK: @addend_struct1 = internal global i32 add (i32 ptrtoint (<{ [3 x i8], i 32 }>* @compound to i32), i32 1) 196 ; DUMP: @addend_struct1 = internal global i32 add (i32 ptrtoint (<{ [3 x i8], i3 2 }>* @compound to i32), i32 1)
191 ; CHECK: .type addend_struct1,@object 197 ; CHECK: .type addend_struct1,@object
192 ; CHECK: .section .data,"aw",@progbits 198 ; CHECK: .section .data,"aw",@progbits
193 ; CHECK:addend_struct1: 199 ; CHECK:addend_struct1:
194 ; CHECK: .long compound + 1 200 ; CHECK: .long compound + 1
195 ; CHECK: .size addend_struct1, 4 201 ; CHECK: .size addend_struct1, 4
196 202
197 @const_addend_struct1 = internal constant i32 add (i32 ptrtoint (<{ [3 x i8], i3 2 }>* @compound to i32), i32 1) 203 @const_addend_struct1 = internal constant i32 add (i32 ptrtoint (<{ [3 x i8], i3 2 }>* @compound to i32), i32 1)
198 ; CHECK: @const_addend_struct1 = internal constant i32 add (i32 ptrtoint (<{ [3 x i8], i32 }>* @compound to i32), i32 1) 204 ; DUMP: @const_addend_struct1 = internal constant i32 add (i32 ptrtoint (<{ [3 x i8], i32 }>* @compound to i32), i32 1)
199 ; CHECK: .type const_addend_struct1,@object 205 ; CHECK: .type const_addend_struct1,@object
200 ; CHECK: .section .rodata,"a",@progbits 206 ; CHECK: .section .rodata,"a",@progbits
201 ; CHECK:const_addend_struct1: 207 ; CHECK:const_addend_struct1:
202 ; CHECK: .long compound + 1 208 ; CHECK: .long compound + 1
203 ; CHECK: .size const_addend_struct1, 4 209 ; CHECK: .size const_addend_struct1, 4
204 210
205 @addend_struct2 = internal global i32 add (i32 ptrtoint (<{ [3 x i8], i32 }>* @c ompound to i32), i32 4) 211 @addend_struct2 = internal global i32 add (i32 ptrtoint (<{ [3 x i8], i32 }>* @c ompound to i32), i32 4)
206 ; CHECK: @addend_struct2 = internal global i32 add (i32 ptrtoint (<{ [3 x i8], i 32 }>* @compound to i32), i32 4) 212 ; DUMP: @addend_struct2 = internal global i32 add (i32 ptrtoint (<{ [3 x i8], i3 2 }>* @compound to i32), i32 4)
207 ; CHECK: .type addend_struct2,@object 213 ; CHECK: .type addend_struct2,@object
208 ; CHECK: .section .data,"aw",@progbits 214 ; CHECK: .section .data,"aw",@progbits
209 ; CHECK:addend_struct2: 215 ; CHECK:addend_struct2:
210 ; CHECK: .long compound + 4 216 ; CHECK: .long compound + 4
211 ; CHECK: .size addend_struct2, 4 217 ; CHECK: .size addend_struct2, 4
212 218
213 @const_addend_struct2 = internal constant i32 add (i32 ptrtoint (<{ [3 x i8], i3 2 }>* @compound to i32), i32 4) 219 @const_addend_struct2 = internal constant i32 add (i32 ptrtoint (<{ [3 x i8], i3 2 }>* @compound to i32), i32 4)
214 ; CHECK: @const_addend_struct2 = internal constant i32 add (i32 ptrtoint (<{ [3 x i8], i32 }>* @compound to i32), i32 4) 220 ; DUMP: @const_addend_struct2 = internal constant i32 add (i32 ptrtoint (<{ [3 x i8], i32 }>* @compound to i32), i32 4)
215 ; CHECK: .type const_addend_struct2,@object 221 ; CHECK: .type const_addend_struct2,@object
216 ; CHECK: .section .rodata,"a",@progbits 222 ; CHECK: .section .rodata,"a",@progbits
217 ; CHECK:const_addend_struct2: 223 ; CHECK:const_addend_struct2:
218 ; CHECK: .long compound + 4 224 ; CHECK: .long compound + 4
219 ; CHECK: .size const_addend_struct2, 4 225 ; CHECK: .size const_addend_struct2, 4
220 226
221 @ptr_to_func_align = internal global i32 ptrtoint (void ()* @func to i32), align 8 227 @ptr_to_func_align = internal global i32 ptrtoint (void ()* @func to i32), align 8
222 ; CHECK: @ptr_to_func_align = internal global i32 ptrtoint (void ()* @func to i3 2), align 8 228 ; DUMP: @ptr_to_func_align = internal global i32 ptrtoint (void ()* @func to i32 ), align 8
223 ; CHECK: .type ptr_to_func_align,@object 229 ; CHECK: .type ptr_to_func_align,@object
224 ; CHECK: .section .data,"aw",@progbits 230 ; CHECK: .section .data,"aw",@progbits
225 ; CHECK: .align 8 231 ; CHECK: .align 8
226 ; CHECK:ptr_to_func_align: 232 ; CHECK:ptr_to_func_align:
227 ; CHECK: .long func 233 ; CHECK: .long func
228 ; CHECK: .size ptr_to_func_align, 4 234 ; CHECK: .size ptr_to_func_align, 4
229 235
230 @const_ptr_to_func_align = internal constant i32 ptrtoint (void ()* @func to i32 ), align 8 236 @const_ptr_to_func_align = internal constant i32 ptrtoint (void ()* @func to i32 ), align 8
231 ; CHECK: @const_ptr_to_func_align = internal constant i32 ptrtoint (void ()* @fu nc to i32), align 8 237 ; DUMP: @const_ptr_to_func_align = internal constant i32 ptrtoint (void ()* @fun c to i32), align 8
232 ; CHECK: .type const_ptr_to_func_align,@object 238 ; CHECK: .type const_ptr_to_func_align,@object
233 ; CHECK: .section .rodata,"a",@progbits 239 ; CHECK: .section .rodata,"a",@progbits
234 ; CHECK: .align 8 240 ; CHECK: .align 8
235 ; CHECK:const_ptr_to_func_align: 241 ; CHECK:const_ptr_to_func_align:
236 ; CHECK: .long func 242 ; CHECK: .long func
237 ; CHECK: .size const_ptr_to_func_align, 4 243 ; CHECK: .size const_ptr_to_func_align, 4
238 244
239 @char = internal constant [1 x i8] c"0" 245 @char = internal constant [1 x i8] c"0"
240 ; CHECK: @char = internal constant [1 x i8] c"0" 246 ; DUMP: @char = internal constant [1 x i8] c"0"
241 ; CHECK: .type char,@object 247 ; CHECK: .type char,@object
242 ; CHECK: .section .rodata,"a",@progbits 248 ; CHECK: .section .rodata,"a",@progbits
243 ; CHECK:char: 249 ; CHECK:char:
244 ; CHECK: .byte 48 250 ; CHECK: .byte 48
245 ; CHECK: .size char, 1 251 ; CHECK: .size char, 1
246 252
247 @short = internal constant [2 x i8] zeroinitializer 253 @short = internal constant [2 x i8] zeroinitializer
248 ; CHECK: @short = internal constant [2 x i8] zeroinitializer 254 ; DUMP: @short = internal constant [2 x i8] zeroinitializer
249 ; CHECK: .type short,@object 255 ; CHECK: .type short,@object
250 ; CHECK: .section .rodata,"a",@progbits 256 ; CHECK: .section .rodata,"a",@progbits
251 ; CHECK:short: 257 ; CHECK:short:
252 ; CHECK: .zero 2 258 ; CHECK: .zero 2
253 ; CHECK: .size short, 2 259 ; CHECK: .size short, 2
254 260
255 define void @func() { 261 define void @func() {
256 ret void 262 ret void
257 } 263 }
258 264
259 ; CHECK: define void @func() { 265 ; CHECK: define void @func() {
260 266
OLDNEW
« no previous file with comments | « tests_lit/llvm2ice_tests/branch-simple.ll ('k') | tests_lit/llvm2ice_tests/load.ll » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698