| 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 ; RUN: %p2i -i %s --filetype=obj --disassemble --args -O2 \ | 4 ; RUN: %p2i -i %s --filetype=obj --disassemble --args -O2 \ |
| 5 ; RUN: | FileCheck %s | 5 ; RUN: | FileCheck %s |
| 6 ; RUN: %p2i -i %s --filetype=obj --disassemble --args -Om1 \ | 6 ; RUN: %p2i -i %s --filetype=obj --disassemble --args -Om1 \ |
| 7 ; RUN: | FileCheck --check-prefix=OPTM1 %s | 7 ; RUN: | FileCheck --check-prefix=OPTM1 %s |
| 8 | 8 |
| 9 define <16 x i8> @test_bitcast_v16i8_to_v16i8(<16 x i8> %arg) { | 9 define <16 x i8> @test_bitcast_v16i8_to_v16i8(<16 x i8> %arg) { |
| 10 entry: | 10 entry: |
| (...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 149 ; CHECK-LABEL: test_bitcast_v4f32_to_v4f32 | 149 ; CHECK-LABEL: test_bitcast_v4f32_to_v4f32 |
| 150 ; CHECK-NEXT: ret | 150 ; CHECK-NEXT: ret |
| 151 } | 151 } |
| 152 | 152 |
| 153 define i8 @test_bitcast_v8i1_to_i8(<8 x i1> %arg) { | 153 define i8 @test_bitcast_v8i1_to_i8(<8 x i1> %arg) { |
| 154 entry: | 154 entry: |
| 155 %res = bitcast <8 x i1> %arg to i8 | 155 %res = bitcast <8 x i1> %arg to i8 |
| 156 ret i8 %res | 156 ret i8 %res |
| 157 | 157 |
| 158 ; CHECK-LABEL: test_bitcast_v8i1_to_i8 | 158 ; CHECK-LABEL: test_bitcast_v8i1_to_i8 |
| 159 ; CHECK: call {{.*}} R_{{.*}} Sz_bitcast_v8i1_to_i8 | 159 ; CHECK: call {{.*}} R_{{.*}} __Sz_bitcast_8xi1_i8 |
| 160 | 160 |
| 161 ; OPTM1-LABEL: test_bitcast_v8i1_to_i8 | 161 ; OPTM1-LABEL: test_bitcast_v8i1_to_i8 |
| 162 ; OPMT1: call -4 | 162 ; OPMT1: call -4 |
| 163 } | 163 } |
| 164 | 164 |
| 165 define i16 @test_bitcast_v16i1_to_i16(<16 x i1> %arg) { | 165 define i16 @test_bitcast_v16i1_to_i16(<16 x i1> %arg) { |
| 166 entry: | 166 entry: |
| 167 %res = bitcast <16 x i1> %arg to i16 | 167 %res = bitcast <16 x i1> %arg to i16 |
| 168 ret i16 %res | 168 ret i16 %res |
| 169 | 169 |
| 170 ; CHECK-LABEL: test_bitcast_v16i1_to_i16 | 170 ; CHECK-LABEL: test_bitcast_v16i1_to_i16 |
| 171 ; CHECK: call {{.*}} R_{{.*}} Sz_bitcast_v16i1_to_i16 | 171 ; CHECK: call {{.*}} R_{{.*}} __Sz_bitcast_16xi1_i16 |
| 172 | 172 |
| 173 ; OPTM1-LABEL: test_bitcast_v16i1_to_i16 | 173 ; OPTM1-LABEL: test_bitcast_v16i1_to_i16 |
| 174 ; OPMT1: call -4 | 174 ; OPMT1: call -4 |
| 175 } | 175 } |
| 176 | 176 |
| 177 define <8 x i1> @test_bitcast_i8_to_v8i1(i32 %arg) { | 177 define <8 x i1> @test_bitcast_i8_to_v8i1(i32 %arg) { |
| 178 entry: | 178 entry: |
| 179 %arg.trunc = trunc i32 %arg to i8 | 179 %arg.trunc = trunc i32 %arg to i8 |
| 180 %res = bitcast i8 %arg.trunc to <8 x i1> | 180 %res = bitcast i8 %arg.trunc to <8 x i1> |
| 181 ret <8 x i1> %res | 181 ret <8 x i1> %res |
| 182 | 182 |
| 183 ; CHECK-LABEL: test_bitcast_i8_to_v8i1 | 183 ; CHECK-LABEL: test_bitcast_i8_to_v8i1 |
| 184 ; CHECK: call {{.*}} R_{{.*}} Sz_bitcast_i8_to_v8i1 | 184 ; CHECK: call {{.*}} R_{{.*}} __Sz_bitcast_i8_8xi1 |
| 185 | 185 |
| 186 ; OPTM1-LABEL: test_bitcast_i8_to_v8i1 | 186 ; OPTM1-LABEL: test_bitcast_i8_to_v8i1 |
| 187 ; OPTM1: call {{.*}} R_{{.*}} Sz_bitcast_i8_to_v8i1 | 187 ; OPTM1: call {{.*}} R_{{.*}} __Sz_bitcast_i8_8xi1 |
| 188 } | 188 } |
| 189 | 189 |
| 190 define <16 x i1> @test_bitcast_i16_to_v16i1(i32 %arg) { | 190 define <16 x i1> @test_bitcast_i16_to_v16i1(i32 %arg) { |
| 191 entry: | 191 entry: |
| 192 %arg.trunc = trunc i32 %arg to i16 | 192 %arg.trunc = trunc i32 %arg to i16 |
| 193 %res = bitcast i16 %arg.trunc to <16 x i1> | 193 %res = bitcast i16 %arg.trunc to <16 x i1> |
| 194 ret <16 x i1> %res | 194 ret <16 x i1> %res |
| 195 | 195 |
| 196 ; CHECK-LABEL: test_bitcast_i16_to_v16i1 | 196 ; CHECK-LABEL: test_bitcast_i16_to_v16i1 |
| 197 ; CHECK: call {{.*}} R_{{.*}} Sz_bitcast_i16_to_v16i1 | 197 ; CHECK: call {{.*}} R_{{.*}} __Sz_bitcast_i16_16xi1 |
| 198 | 198 |
| 199 ; OPTM1-LABEL: test_bitcast_i16_to_v16i1 | 199 ; OPTM1-LABEL: test_bitcast_i16_to_v16i1 |
| 200 ; OPTM1: call {{.*}} R_{{.*}} Sz_bitcast_i16_to_v16i1 | 200 ; OPTM1: call {{.*}} R_{{.*}} __Sz_bitcast_i16_16xi1 |
| 201 } | 201 } |
| OLD | NEW |