| 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 | |
| 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. | |
| 7 | |
| 8 ; RUN: %p2i -i %s --args -O2 --verbose none \ | |
| 9 ; RUN: | FileCheck --check-prefix=CALLTARGETS %s | |
| 10 ; RUN: %p2i -i %s --args -O2 --verbose none \ | 4 ; RUN: %p2i -i %s --args -O2 --verbose none \ |
| 11 ; RUN: | llvm-mc -triple=i686-none-nacl -filetype=obj \ | 5 ; RUN: | llvm-mc -triple=i686-none-nacl -filetype=obj \ |
| 12 ; RUN: | llvm-objdump -d -symbolize -x86-asm-syntax=intel - | FileCheck %s | 6 ; RUN: | llvm-objdump -d -symbolize -x86-asm-syntax=intel - | FileCheck %s |
| 13 ; RUN: %p2i -i %s --args -Om1 --verbose none \ | 7 ; RUN: %p2i -i %s --args -Om1 --verbose none \ |
| 14 ; RUN: | llvm-mc -triple=i686-none-nacl -filetype=obj \ | 8 ; RUN: | llvm-mc -triple=i686-none-nacl -filetype=obj \ |
| 15 ; RUN: | llvm-objdump -d -symbolize -x86-asm-syntax=intel - \ | 9 ; RUN: | llvm-objdump -d -symbolize -x86-asm-syntax=intel - \ |
| 16 ; RUN: | FileCheck --check-prefix=OPTM1 %s | 10 ; RUN: | FileCheck --check-prefix=OPTM1 %s |
| 17 | 11 |
| 18 define <16 x i8> @test_bitcast_v16i8_to_v16i8(<16 x i8> %arg) { | 12 define <16 x i8> @test_bitcast_v16i8_to_v16i8(<16 x i8> %arg) { |
| 19 entry: | 13 entry: |
| (...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 158 ; CHECK-LABEL: test_bitcast_v4f32_to_v4f32: | 152 ; CHECK-LABEL: test_bitcast_v4f32_to_v4f32: |
| 159 ; CHECK-NEXT: ret | 153 ; CHECK-NEXT: ret |
| 160 } | 154 } |
| 161 | 155 |
| 162 define i8 @test_bitcast_v8i1_to_i8(<8 x i1> %arg) { | 156 define i8 @test_bitcast_v8i1_to_i8(<8 x i1> %arg) { |
| 163 entry: | 157 entry: |
| 164 %res = bitcast <8 x i1> %arg to i8 | 158 %res = bitcast <8 x i1> %arg to i8 |
| 165 ret i8 %res | 159 ret i8 %res |
| 166 | 160 |
| 167 ; CHECK-LABEL: test_bitcast_v8i1_to_i8: | 161 ; CHECK-LABEL: test_bitcast_v8i1_to_i8: |
| 168 ; CALLTARGETS-LABEL: test_bitcast_v8i1_to_i8: | 162 ; CHECK: call Sz_bitcast_v8i1_to_i8 |
| 169 ; CHECK: call -4 | |
| 170 ; CALLTARGETS: .long Sz_bitcast_v8i1_to_i8 | |
| 171 | 163 |
| 172 ; OPTM1-LABEL: test_bitcast_v8i1_to_i8: | 164 ; OPTM1-LABEL: test_bitcast_v8i1_to_i8: |
| 173 ; OPMT1: call -4 | 165 ; OPMT1: call -4 |
| 174 } | 166 } |
| 175 | 167 |
| 176 define i16 @test_bitcast_v16i1_to_i16(<16 x i1> %arg) { | 168 define i16 @test_bitcast_v16i1_to_i16(<16 x i1> %arg) { |
| 177 entry: | 169 entry: |
| 178 %res = bitcast <16 x i1> %arg to i16 | 170 %res = bitcast <16 x i1> %arg to i16 |
| 179 ret i16 %res | 171 ret i16 %res |
| 180 | 172 |
| 181 ; CHECK-LABEL: test_bitcast_v16i1_to_i16: | 173 ; CHECK-LABEL: test_bitcast_v16i1_to_i16: |
| 182 ; CALLTARGETS-LABEL: test_bitcast_v16i1_to_i16: | 174 ; CHECK: call Sz_bitcast_v16i1_to_i16 |
| 183 ; CHECK: call -4 | |
| 184 ; CALLTARGETS: .long Sz_bitcast_v16i1_to_i16 | |
| 185 | 175 |
| 186 ; OPTM1-LABEL: test_bitcast_v16i1_to_i16: | 176 ; OPTM1-LABEL: test_bitcast_v16i1_to_i16: |
| 187 ; OPMT1: call -4 | 177 ; OPMT1: call -4 |
| 188 } | 178 } |
| 189 | 179 |
| 190 define <8 x i1> @test_bitcast_i8_to_v8i1(i32 %arg) { | 180 define <8 x i1> @test_bitcast_i8_to_v8i1(i32 %arg) { |
| 191 entry: | 181 entry: |
| 192 %arg.trunc = trunc i32 %arg to i8 | 182 %arg.trunc = trunc i32 %arg to i8 |
| 193 %res = bitcast i8 %arg.trunc to <8 x i1> | 183 %res = bitcast i8 %arg.trunc to <8 x i1> |
| 194 ret <8 x i1> %res | 184 ret <8 x i1> %res |
| 195 | 185 |
| 196 ; CHECK-LABEL: test_bitcast_i8_to_v8i1: | 186 ; CHECK-LABEL: test_bitcast_i8_to_v8i1: |
| 197 ; CALLTARGETS-LABEL: test_bitcast_i8_to_v8i1 | 187 ; CHECK: call Sz_bitcast_i8_to_v8i1 |
| 198 ; CHECK: call -4 | |
| 199 ; CALLTARGETS: .long Sz_bitcast_i8_to_v8i1 | |
| 200 | 188 |
| 201 ; OPTM1-LABEL: test_bitcast_i8_to_v8i1: | 189 ; OPTM1-LABEL: test_bitcast_i8_to_v8i1: |
| 202 ; OPTM1: call -4 | 190 ; OPTM1: call Sz_bitcast_i8_to_v8i1 |
| 203 } | 191 } |
| 204 | 192 |
| 205 define <16 x i1> @test_bitcast_i16_to_v16i1(i32 %arg) { | 193 define <16 x i1> @test_bitcast_i16_to_v16i1(i32 %arg) { |
| 206 entry: | 194 entry: |
| 207 %arg.trunc = trunc i32 %arg to i16 | 195 %arg.trunc = trunc i32 %arg to i16 |
| 208 %res = bitcast i16 %arg.trunc to <16 x i1> | 196 %res = bitcast i16 %arg.trunc to <16 x i1> |
| 209 ret <16 x i1> %res | 197 ret <16 x i1> %res |
| 210 | 198 |
| 211 ; CHECK-LABEL: test_bitcast_i16_to_v16i1: | 199 ; CHECK-LABEL: test_bitcast_i16_to_v16i1: |
| 212 ; CALLTARGETS-LABEL: test_bitcast_i16_to_v16i1 | 200 ; CHECK: call Sz_bitcast_i16_to_v16i1 |
| 213 ; CHECK: call -4 | |
| 214 ; CALLTARGETS: .long Sz_bitcast_i16_to_v16i1 | |
| 215 | 201 |
| 216 ; OPTM1-LABEL: test_bitcast_i16_to_v16i1: | 202 ; OPTM1-LABEL: test_bitcast_i16_to_v16i1: |
| 217 ; OPTM1: call -4 | 203 ; OPTM1: call Sz_bitcast_i16_to_v16i1 |
| 218 } | 204 } |
| OLD | NEW |