OLD | NEW |
1 ; This file tests bitcasts of vector type. For most operations, these | 1 ; This file tests bitcasts of vector type. For most operations, these |
2 ; should be lowered to a no-op on -O2. | 2 ; should be lowered to a no-op on -O2. |
3 | 3 |
4 ; TODO(jvoung): fix extra "CALLTARGETS" run. The llvm-objdump symbolizer | 4 ; TODO(jvoung): fix extra "CALLTARGETS" run. The llvm-objdump symbolizer |
5 ; doesn't know how to symbolize non-section-local functions. | 5 ; doesn't know how to symbolize non-section-local functions. |
6 ; The newer LLVM 3.6 one does work, but watch out for other bugs. | 6 ; The newer LLVM 3.6 one does work, but watch out for other bugs. |
7 | 7 |
8 ; RUN: %p2i -i %s --args -O2 --verbose none \ | 8 ; RUN: %p2i -i %s --args -O2 --verbose none \ |
9 ; RUN: | FileCheck --check-prefix=CALLTARGETS %s | 9 ; RUN: | FileCheck --check-prefix=CALLTARGETS %s |
10 ; RUN: %p2i -i %s --args -O2 --verbose none \ | 10 ; RUN: %p2i -i %s --args -O2 --verbose none \ |
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
160 } | 160 } |
161 | 161 |
162 define i8 @test_bitcast_v8i1_to_i8(<8 x i1> %arg) { | 162 define i8 @test_bitcast_v8i1_to_i8(<8 x i1> %arg) { |
163 entry: | 163 entry: |
164 %res = bitcast <8 x i1> %arg to i8 | 164 %res = bitcast <8 x i1> %arg to i8 |
165 ret i8 %res | 165 ret i8 %res |
166 | 166 |
167 ; CHECK-LABEL: test_bitcast_v8i1_to_i8: | 167 ; CHECK-LABEL: test_bitcast_v8i1_to_i8: |
168 ; CALLTARGETS-LABEL: test_bitcast_v8i1_to_i8: | 168 ; CALLTARGETS-LABEL: test_bitcast_v8i1_to_i8: |
169 ; CHECK: call -4 | 169 ; CHECK: call -4 |
170 ; CALLTARGETS: call Sz_bitcast_v8i1_to_i8 | 170 ; CALLTARGETS: .long Sz_bitcast_v8i1_to_i8 |
171 | 171 |
172 ; OPTM1-LABEL: test_bitcast_v8i1_to_i8: | 172 ; OPTM1-LABEL: test_bitcast_v8i1_to_i8: |
173 ; OPMT1: call -4 | 173 ; OPMT1: call -4 |
174 } | 174 } |
175 | 175 |
176 define i16 @test_bitcast_v16i1_to_i16(<16 x i1> %arg) { | 176 define i16 @test_bitcast_v16i1_to_i16(<16 x i1> %arg) { |
177 entry: | 177 entry: |
178 %res = bitcast <16 x i1> %arg to i16 | 178 %res = bitcast <16 x i1> %arg to i16 |
179 ret i16 %res | 179 ret i16 %res |
180 | 180 |
181 ; CHECK-LABEL: test_bitcast_v16i1_to_i16: | 181 ; CHECK-LABEL: test_bitcast_v16i1_to_i16: |
182 ; CALLTARGETS-LABEL: test_bitcast_v16i1_to_i16: | 182 ; CALLTARGETS-LABEL: test_bitcast_v16i1_to_i16: |
183 ; CHECK: call -4 | 183 ; CHECK: call -4 |
184 ; CALLTARGETS: call Sz_bitcast_v16i1_to_i16 | 184 ; CALLTARGETS: .long Sz_bitcast_v16i1_to_i16 |
185 | 185 |
186 ; OPTM1-LABEL: test_bitcast_v16i1_to_i16: | 186 ; OPTM1-LABEL: test_bitcast_v16i1_to_i16: |
187 ; OPMT1: call -4 | 187 ; OPMT1: call -4 |
188 } | 188 } |
189 | 189 |
190 define <8 x i1> @test_bitcast_i8_to_v8i1(i32 %arg) { | 190 define <8 x i1> @test_bitcast_i8_to_v8i1(i32 %arg) { |
191 entry: | 191 entry: |
192 %arg.trunc = trunc i32 %arg to i8 | 192 %arg.trunc = trunc i32 %arg to i8 |
193 %res = bitcast i8 %arg.trunc to <8 x i1> | 193 %res = bitcast i8 %arg.trunc to <8 x i1> |
194 ret <8 x i1> %res | 194 ret <8 x i1> %res |
195 | 195 |
196 ; CHECK-LABEL: test_bitcast_i8_to_v8i1: | 196 ; CHECK-LABEL: test_bitcast_i8_to_v8i1: |
197 ; CALLTARGETS-LABEL: test_bitcast_i8_to_v8i1 | 197 ; CALLTARGETS-LABEL: test_bitcast_i8_to_v8i1 |
198 ; CHECK: call -4 | 198 ; CHECK: call -4 |
199 ; CALLTARGETS: call Sz_bitcast_i8_to_v8i1 | 199 ; CALLTARGETS: .long Sz_bitcast_i8_to_v8i1 |
200 | 200 |
201 ; OPTM1-LABEL: test_bitcast_i8_to_v8i1: | 201 ; OPTM1-LABEL: test_bitcast_i8_to_v8i1: |
202 ; OPTM1: call -4 | 202 ; OPTM1: call -4 |
203 } | 203 } |
204 | 204 |
205 define <16 x i1> @test_bitcast_i16_to_v16i1(i32 %arg) { | 205 define <16 x i1> @test_bitcast_i16_to_v16i1(i32 %arg) { |
206 entry: | 206 entry: |
207 %arg.trunc = trunc i32 %arg to i16 | 207 %arg.trunc = trunc i32 %arg to i16 |
208 %res = bitcast i16 %arg.trunc to <16 x i1> | 208 %res = bitcast i16 %arg.trunc to <16 x i1> |
209 ret <16 x i1> %res | 209 ret <16 x i1> %res |
210 | 210 |
211 ; CHECK-LABEL: test_bitcast_i16_to_v16i1: | 211 ; CHECK-LABEL: test_bitcast_i16_to_v16i1: |
212 ; CALLTARGETS-LABEL: test_bitcast_i16_to_v16i1 | 212 ; CALLTARGETS-LABEL: test_bitcast_i16_to_v16i1 |
213 ; CHECK: call -4 | 213 ; CHECK: call -4 |
214 ; CALLTARGETS: call Sz_bitcast_i16_to_v16i1 | 214 ; CALLTARGETS: .long Sz_bitcast_i16_to_v16i1 |
215 | 215 |
216 ; OPTM1-LABEL: test_bitcast_i16_to_v16i1: | 216 ; OPTM1-LABEL: test_bitcast_i16_to_v16i1: |
217 ; OPTM1: call -4 | 217 ; OPTM1: call -4 |
218 } | 218 } |
OLD | NEW |