1 ; RUN: llc < %s -mtriple=x86_64-unknown-unknown -mattr=+sse2 -fast-isel -fast-isel-abort=1 -asm-verbose=0 | FileCheck %s
2 ; RUN: llc < %s -mtriple=x86_64-unknown-unknown -mattr=+avx -fast-isel -fast-isel-abort=1 -asm-verbose=0 | FileCheck %s
4 ; Bitcasts between 128-bit vector types are no-ops since no instruction is
5 ; needed for the conversion.
7 define <2 x i64> @v4i32_to_v2i64(<4 x i32> %a) {
8 ;CHECK-LABEL: v4i32_to_v2i64:
9 ;CHECK-NEXT: .cfi_startproc
11 %1 = bitcast <4 x i32> %a to <2 x i64>
15 define <2 x i64> @v8i16_to_v2i64(<8 x i16> %a) {
16 ;CHECK-LABEL: v8i16_to_v2i64:
17 ;CHECK-NEXT: .cfi_startproc
19 %1 = bitcast <8 x i16> %a to <2 x i64>
23 define <2 x i64> @v16i8_to_v2i64(<16 x i8> %a) {
24 ;CHECK-LABEL: v16i8_to_v2i64:
25 ;CHECK-NEXT: .cfi_startproc
27 %1 = bitcast <16 x i8> %a to <2 x i64>
31 define <2 x i64> @v2f64_to_v2i64(<2 x double> %a) {
32 ;CHECK-LABEL: v2f64_to_v2i64:
33 ;CHECK-NEXT: .cfi_startproc
35 %1 = bitcast <2 x double> %a to <2 x i64>
39 define <2 x i64> @v4f32_to_v2i64(<4 x float> %a) {
40 ;CHECK-LABEL: v4f32_to_v2i64:
41 ;CHECK-NEXT: .cfi_startproc
43 %1 = bitcast <4 x float> %a to <2 x i64>
47 define <4 x i32> @v2i64_to_v4i32(<2 x i64> %a) {
48 ;CHECK-LABEL: v2i64_to_v4i32:
49 ;CHECK-NEXT: .cfi_startproc
51 %1 = bitcast <2 x i64> %a to <4 x i32>
55 define <4 x i32> @v8i16_to_v4i32(<8 x i16> %a) {
56 ;CHECK-LABEL: v8i16_to_v4i32:
57 ;CHECK-NEXT: .cfi_startproc
59 %1 = bitcast <8 x i16> %a to <4 x i32>
63 define <4 x i32> @v16i8_to_v4i32(<16 x i8> %a) {
64 ;CHECK-LABEL: v16i8_to_v4i32:
65 ;CHECK-NEXT: .cfi_startproc
67 %1 = bitcast <16 x i8> %a to <4 x i32>
71 define <4 x i32> @v2f64_to_v4i32(<2 x double> %a) {
72 ;CHECK-LABEL: v2f64_to_v4i32:
73 ;CHECK-NEXT: .cfi_startproc
75 %1 = bitcast <2 x double> %a to <4 x i32>
79 define <4 x i32> @v4f32_to_v4i32(<4 x float> %a) {
80 ;CHECK-LABEL: v4f32_to_v4i32:
81 ;CHECK-NEXT: .cfi_startproc
83 %1 = bitcast <4 x float> %a to <4 x i32>
87 define <8 x i16> @v2i64_to_v8i16(<2 x i64> %a) {
88 ;CHECK-LABEL: v2i64_to_v8i16:
89 ;CHECK-NEXT: .cfi_startproc
91 %1 = bitcast <2 x i64> %a to <8 x i16>
95 define <8 x i16> @v4i32_to_v8i16(<4 x i32> %a) {
96 ;CHECK-LABEL: v4i32_to_v8i16:
97 ;CHECK-NEXT: .cfi_startproc
99 %1 = bitcast <4 x i32> %a to <8 x i16>
103 define <8 x i16> @v16i8_to_v8i16(<16 x i8> %a) {
104 ;CHECK-LABEL: v16i8_to_v8i16:
105 ;CHECK-NEXT: .cfi_startproc
107 %1 = bitcast <16 x i8> %a to <8 x i16>
111 define <8 x i16> @v2f64_to_v8i16(<2 x double> %a) {
112 ;CHECK-LABEL: v2f64_to_v8i16:
113 ;CHECK-NEXT: .cfi_startproc
115 %1 = bitcast <2 x double> %a to <8 x i16>
119 define <8 x i16> @v4f32_to_v8i16(<4 x float> %a) {
120 ;CHECK-LABEL: v4f32_to_v8i16:
121 ;CHECK-NEXT: .cfi_startproc
123 %1 = bitcast <4 x float> %a to <8 x i16>
127 define <16 x i8> @v8i16_to_v16i8(<8 x i16> %a) {
128 ;CHECK-LABEL: v8i16_to_v16i8:
129 ;CHECK-NEXT: .cfi_startproc
131 %1 = bitcast <8 x i16> %a to <16 x i8>
135 define <16 x i8> @v2i64_to_v16i8(<2 x i64> %a) {
136 ;CHECK-LABEL: v2i64_to_v16i8:
137 ;CHECK-NEXT: .cfi_startproc
139 %1 = bitcast <2 x i64> %a to <16 x i8>
143 define <16 x i8> @v4i32_to_v16i8(<4 x i32> %a) {
144 ;CHECK-LABEL: v4i32_to_v16i8:
145 ;CHECK-NEXT: .cfi_startproc
147 %1 = bitcast <4 x i32> %a to <16 x i8>
151 define <16 x i8> @v2f64_to_v16i8(<2 x double> %a) {
152 ;CHECK-LABEL: v2f64_to_v16i8:
153 ;CHECK-NEXT: .cfi_startproc
155 %1 = bitcast <2 x double> %a to <16 x i8>
159 define <16 x i8> @v4f32_to_v16i8(<4 x float> %a) {
160 ;CHECK-LABEL: v4f32_to_v16i8:
161 ;CHECK-NEXT: .cfi_startproc
163 %1 = bitcast <4 x float> %a to <16 x i8>
167 define <4 x float> @v16i8_to_v4f32(<16 x i8> %a) {
168 ;CHECK-LABEL: v16i8_to_v4f32:
169 ;CHECK-NEXT: .cfi_startproc
171 %1 = bitcast <16 x i8> %a to <4 x float>
175 define <4 x float> @v8i16_to_v4f32(<8 x i16> %a) {
176 ;CHECK-LABEL: v8i16_to_v4f32:
177 ;CHECK-NEXT: .cfi_startproc
179 %1 = bitcast <8 x i16> %a to <4 x float>
183 define <4 x float> @v2i64_to_v4f32(<2 x i64> %a) {
184 ;CHECK-LABEL: v2i64_to_v4f32:
185 ;CHECK-NEXT: .cfi_startproc
187 %1 = bitcast <2 x i64> %a to <4 x float>
191 define <4 x float> @v4i32_to_v4f32(<4 x i32> %a) {
192 ;CHECK-LABEL: v4i32_to_v4f32:
193 ;CHECK-NEXT: .cfi_startproc
195 %1 = bitcast <4 x i32> %a to <4 x float>
199 define <4 x float> @v2f64_to_v4f32(<2 x double> %a) {
200 ;CHECK-LABEL: v2f64_to_v4f32:
201 ;CHECK-NEXT: .cfi_startproc
203 %1 = bitcast <2 x double> %a to <4 x float>
207 define <2 x double> @v4f32_to_v2f64(<4 x float> %a) {
208 ;CHECK-LABEL: v4f32_to_v2f64:
209 ;CHECK-NEXT: .cfi_startproc
211 %1 = bitcast <4 x float> %a to <2 x double>
215 define <2 x double> @v16i8_to_v2f64(<16 x i8> %a) {
216 ;CHECK-LABEL: v16i8_to_v2f64:
217 ;CHECK-NEXT: .cfi_startproc
219 %1 = bitcast <16 x i8> %a to <2 x double>
223 define <2 x double> @v8i16_to_v2f64(<8 x i16> %a) {
224 ;CHECK-LABEL: v8i16_to_v2f64:
225 ;CHECK-NEXT: .cfi_startproc
227 %1 = bitcast <8 x i16> %a to <2 x double>
231 define <2 x double> @v2i64_to_v2f64(<2 x i64> %a) {
232 ;CHECK-LABEL: v2i64_to_v2f64:
233 ;CHECK-NEXT: .cfi_startproc
235 %1 = bitcast <2 x i64> %a to <2 x double>
239 define <2 x double> @v4i32_to_v2f64(<4 x i32> %a) {
240 ;CHECK-LABEL: v4i32_to_v2f64:
241 ;CHECK-NEXT: .cfi_startproc
243 %1 = bitcast <4 x i32> %a to <2 x double>