xref: /llvm-project/llvm/test/Analysis/CostModel/RISCV/shuffle-transpose.ll (revision 400b725c2740ee29560bac9ad870b4ddb56bf3f2)
1b0ba8fe6SPhilip Reames; NOTE: Assertions have been autogenerated by utils/update_analyze_test_checks.py
2*400b725cSLuke Lau; RUN: opt < %s -passes="print<cost-model>" 2>&1 -disable-output -mtriple=riscv32 -mattr=+v,+f,+d,+zfh,+zvfh | FileCheck %s
3*400b725cSLuke Lau; RUN: opt < %s -passes="print<cost-model>" 2>&1 -disable-output -mtriple=riscv32 -mattr=+v,+f,+d,+zfh,+zvfhmin | FileCheck %s
4*400b725cSLuke Lau; RUN: opt < %s -passes="print<cost-model>" -cost-kind=code-size 2>&1 -disable-output -mtriple=riscv32 -mattr=+v,+f,+d,+zfh,+zvfh | FileCheck %s --check-prefix=SIZE
5*400b725cSLuke Lau; RUN: opt < %s -passes="print<cost-model>" -cost-kind=code-size 2>&1 -disable-output -mtriple=riscv32 -mattr=+v,+f,+d,+zfh,+zvfhmin | FileCheck %s --check-prefix=SIZE
6b0ba8fe6SPhilip Reames; Check that we don't crash querying costs when vectors are not enabled.
7b0ba8fe6SPhilip Reames; RUN: opt -passes="print<cost-model>" 2>&1 -disable-output -mtriple=riscv32
8b0ba8fe6SPhilip Reames
9b0ba8fe6SPhilip Reamestarget datalayout = "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128"
10b0ba8fe6SPhilip Reames
11b0ba8fe6SPhilip Reamesdefine <8 x i8> @trn1.v8i8(<8 x i8> %v0, <8 x i8> %v1) {
12b0ba8fe6SPhilip Reames; CHECK-LABEL: 'trn1.v8i8'
138865ed4dSPhilip Reames; CHECK-NEXT:  Cost Model: Found an estimated cost of 11 for instruction: %tmp0 = shufflevector <8 x i8> %v0, <8 x i8> %v1, <8 x i32> <i32 0, i32 8, i32 2, i32 10, i32 4, i32 12, i32 6, i32 14>
140a5d52a7SSergey Kachkov; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret <8 x i8> %tmp0
15b0ba8fe6SPhilip Reames;
16475890cdSShih-Po Hung; SIZE-LABEL: 'trn1.v8i8'
17475890cdSShih-Po Hung; SIZE-NEXT:  Cost Model: Found an estimated cost of 11 for instruction: %tmp0 = shufflevector <8 x i8> %v0, <8 x i8> %v1, <8 x i32> <i32 0, i32 8, i32 2, i32 10, i32 4, i32 12, i32 6, i32 14>
18475890cdSShih-Po Hung; SIZE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i8> %tmp0
19475890cdSShih-Po Hung;
20b0ba8fe6SPhilip Reames  %tmp0 = shufflevector <8 x i8> %v0, <8 x i8> %v1, <8 x i32> <i32 0, i32 8, i32 2, i32 10, i32 4, i32 12, i32 6, i32 14>
21b0ba8fe6SPhilip Reames  ret <8 x i8> %tmp0
22b0ba8fe6SPhilip Reames}
23b0ba8fe6SPhilip Reames
24b0ba8fe6SPhilip Reamesdefine <8 x i8> @trn2.v8i8(<8 x i8> %v0, <8 x i8> %v1) {
25b0ba8fe6SPhilip Reames; CHECK-LABEL: 'trn2.v8i8'
268865ed4dSPhilip Reames; CHECK-NEXT:  Cost Model: Found an estimated cost of 11 for instruction: %tmp0 = shufflevector <8 x i8> %v0, <8 x i8> %v1, <8 x i32> <i32 1, i32 9, i32 3, i32 11, i32 5, i32 13, i32 7, i32 15>
270a5d52a7SSergey Kachkov; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret <8 x i8> %tmp0
28b0ba8fe6SPhilip Reames;
29475890cdSShih-Po Hung; SIZE-LABEL: 'trn2.v8i8'
30475890cdSShih-Po Hung; SIZE-NEXT:  Cost Model: Found an estimated cost of 11 for instruction: %tmp0 = shufflevector <8 x i8> %v0, <8 x i8> %v1, <8 x i32> <i32 1, i32 9, i32 3, i32 11, i32 5, i32 13, i32 7, i32 15>
31475890cdSShih-Po Hung; SIZE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i8> %tmp0
32475890cdSShih-Po Hung;
33b0ba8fe6SPhilip Reames  %tmp0 = shufflevector <8 x i8> %v0, <8 x i8> %v1, <8 x i32> <i32 1, i32 9, i32 3, i32 11, i32 5, i32 13, i32 7, i32 15>
34b0ba8fe6SPhilip Reames  ret <8 x i8> %tmp0
35b0ba8fe6SPhilip Reames}
36b0ba8fe6SPhilip Reames
37b0ba8fe6SPhilip Reamesdefine <16 x i8> @trn1.v16i8(<16 x i8> %v0, <16 x i8> %v1) {
38b0ba8fe6SPhilip Reames; CHECK-LABEL: 'trn1.v16i8'
398865ed4dSPhilip Reames; CHECK-NEXT:  Cost Model: Found an estimated cost of 11 for instruction: %tmp0 = shufflevector <16 x i8> %v0, <16 x i8> %v1, <16 x i32> <i32 0, i32 16, i32 2, i32 18, i32 4, i32 20, i32 6, i32 22, i32 8, i32 24, i32 10, i32 26, i32 12, i32 28, i32 14, i32 30>
400a5d52a7SSergey Kachkov; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret <16 x i8> %tmp0
41b0ba8fe6SPhilip Reames;
42475890cdSShih-Po Hung; SIZE-LABEL: 'trn1.v16i8'
43475890cdSShih-Po Hung; SIZE-NEXT:  Cost Model: Found an estimated cost of 11 for instruction: %tmp0 = shufflevector <16 x i8> %v0, <16 x i8> %v1, <16 x i32> <i32 0, i32 16, i32 2, i32 18, i32 4, i32 20, i32 6, i32 22, i32 8, i32 24, i32 10, i32 26, i32 12, i32 28, i32 14, i32 30>
44475890cdSShih-Po Hung; SIZE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i8> %tmp0
45475890cdSShih-Po Hung;
46b0ba8fe6SPhilip Reames  %tmp0 = shufflevector <16 x i8> %v0, <16 x i8> %v1, <16 x i32> <i32 0, i32 16, i32 2, i32 18, i32 4, i32 20, i32 6, i32 22, i32 8, i32 24, i32 10, i32 26, i32 12, i32 28, i32 14, i32 30>
47b0ba8fe6SPhilip Reames  ret <16 x i8> %tmp0
48b0ba8fe6SPhilip Reames}
49b0ba8fe6SPhilip Reames
50b0ba8fe6SPhilip Reamesdefine <16 x i8> @trn2.v16i8(<16 x i8> %v0, <16 x i8> %v1) {
51b0ba8fe6SPhilip Reames; CHECK-LABEL: 'trn2.v16i8'
528865ed4dSPhilip Reames; CHECK-NEXT:  Cost Model: Found an estimated cost of 11 for instruction: %tmp0 = shufflevector <16 x i8> %v0, <16 x i8> %v1, <16 x i32> <i32 1, i32 17, i32 3, i32 19, i32 5, i32 21, i32 7, i32 23, i32 9, i32 25, i32 11, i32 27, i32 13, i32 29, i32 15, i32 31>
530a5d52a7SSergey Kachkov; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret <16 x i8> %tmp0
54b0ba8fe6SPhilip Reames;
55475890cdSShih-Po Hung; SIZE-LABEL: 'trn2.v16i8'
56475890cdSShih-Po Hung; SIZE-NEXT:  Cost Model: Found an estimated cost of 11 for instruction: %tmp0 = shufflevector <16 x i8> %v0, <16 x i8> %v1, <16 x i32> <i32 1, i32 17, i32 3, i32 19, i32 5, i32 21, i32 7, i32 23, i32 9, i32 25, i32 11, i32 27, i32 13, i32 29, i32 15, i32 31>
57475890cdSShih-Po Hung; SIZE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i8> %tmp0
58475890cdSShih-Po Hung;
59b0ba8fe6SPhilip Reames  %tmp0 = shufflevector <16 x i8> %v0, <16 x i8> %v1, <16 x i32> <i32 1, i32 17, i32 3, i32 19, i32 5, i32 21, i32 7, i32 23, i32 9, i32 25, i32 11, i32 27, i32 13, i32 29, i32 15, i32 31>
60b0ba8fe6SPhilip Reames  ret <16 x i8> %tmp0
61b0ba8fe6SPhilip Reames}
62b0ba8fe6SPhilip Reames
63b0ba8fe6SPhilip Reamesdefine <4 x i16> @trn1.v4i16(<4 x i16> %v0, <4 x i16> %v1) {
64b0ba8fe6SPhilip Reames; CHECK-LABEL: 'trn1.v4i16'
658865ed4dSPhilip Reames; CHECK-NEXT:  Cost Model: Found an estimated cost of 11 for instruction: %tmp0 = shufflevector <4 x i16> %v0, <4 x i16> %v1, <4 x i32> <i32 0, i32 4, i32 2, i32 6>
660a5d52a7SSergey Kachkov; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret <4 x i16> %tmp0
67b0ba8fe6SPhilip Reames;
68475890cdSShih-Po Hung; SIZE-LABEL: 'trn1.v4i16'
69475890cdSShih-Po Hung; SIZE-NEXT:  Cost Model: Found an estimated cost of 11 for instruction: %tmp0 = shufflevector <4 x i16> %v0, <4 x i16> %v1, <4 x i32> <i32 0, i32 4, i32 2, i32 6>
70475890cdSShih-Po Hung; SIZE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret <4 x i16> %tmp0
71475890cdSShih-Po Hung;
72b0ba8fe6SPhilip Reames  %tmp0 = shufflevector <4 x i16> %v0, <4 x i16> %v1, <4 x i32> <i32 0, i32 4, i32 2, i32 6>
73b0ba8fe6SPhilip Reames  ret <4 x i16> %tmp0
74b0ba8fe6SPhilip Reames}
75b0ba8fe6SPhilip Reames
76b0ba8fe6SPhilip Reamesdefine <4 x i16> @trn2.v4i16(<4 x i16> %v0, <4 x i16> %v1) {
77b0ba8fe6SPhilip Reames; CHECK-LABEL: 'trn2.v4i16'
788865ed4dSPhilip Reames; CHECK-NEXT:  Cost Model: Found an estimated cost of 11 for instruction: %tmp0 = shufflevector <4 x i16> %v0, <4 x i16> %v1, <4 x i32> <i32 1, i32 5, i32 3, i32 7>
790a5d52a7SSergey Kachkov; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret <4 x i16> %tmp0
80b0ba8fe6SPhilip Reames;
81475890cdSShih-Po Hung; SIZE-LABEL: 'trn2.v4i16'
82475890cdSShih-Po Hung; SIZE-NEXT:  Cost Model: Found an estimated cost of 11 for instruction: %tmp0 = shufflevector <4 x i16> %v0, <4 x i16> %v1, <4 x i32> <i32 1, i32 5, i32 3, i32 7>
83475890cdSShih-Po Hung; SIZE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret <4 x i16> %tmp0
84475890cdSShih-Po Hung;
85b0ba8fe6SPhilip Reames  %tmp0 = shufflevector <4 x i16> %v0, <4 x i16> %v1, <4 x i32> <i32 1, i32 5, i32 3, i32 7>
86b0ba8fe6SPhilip Reames  ret <4 x i16> %tmp0
87b0ba8fe6SPhilip Reames}
88b0ba8fe6SPhilip Reames
89b0ba8fe6SPhilip Reamesdefine <8 x i16> @trn1.v8i16(<8 x i16> %v0, <8 x i16> %v1) {
90b0ba8fe6SPhilip Reames; CHECK-LABEL: 'trn1.v8i16'
918865ed4dSPhilip Reames; CHECK-NEXT:  Cost Model: Found an estimated cost of 11 for instruction: %tmp0 = shufflevector <8 x i16> %v0, <8 x i16> %v1, <8 x i32> <i32 0, i32 8, i32 2, i32 10, i32 4, i32 12, i32 6, i32 14>
920a5d52a7SSergey Kachkov; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret <8 x i16> %tmp0
93b0ba8fe6SPhilip Reames;
94475890cdSShih-Po Hung; SIZE-LABEL: 'trn1.v8i16'
95475890cdSShih-Po Hung; SIZE-NEXT:  Cost Model: Found an estimated cost of 11 for instruction: %tmp0 = shufflevector <8 x i16> %v0, <8 x i16> %v1, <8 x i32> <i32 0, i32 8, i32 2, i32 10, i32 4, i32 12, i32 6, i32 14>
96475890cdSShih-Po Hung; SIZE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i16> %tmp0
97475890cdSShih-Po Hung;
98b0ba8fe6SPhilip Reames  %tmp0 = shufflevector <8 x i16> %v0, <8 x i16> %v1, <8 x i32> <i32 0, i32 8, i32 2, i32 10, i32 4, i32 12, i32 6, i32 14>
99b0ba8fe6SPhilip Reames  ret <8 x i16> %tmp0
100b0ba8fe6SPhilip Reames}
101b0ba8fe6SPhilip Reames
102b0ba8fe6SPhilip Reamesdefine <8 x i16> @trn2.v8i16(<8 x i16> %v0, <8 x i16> %v1) {
103b0ba8fe6SPhilip Reames; CHECK-LABEL: 'trn2.v8i16'
1048865ed4dSPhilip Reames; CHECK-NEXT:  Cost Model: Found an estimated cost of 11 for instruction: %tmp0 = shufflevector <8 x i16> %v0, <8 x i16> %v1, <8 x i32> <i32 1, i32 9, i32 3, i32 11, i32 5, i32 13, i32 7, i32 15>
1050a5d52a7SSergey Kachkov; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret <8 x i16> %tmp0
106b0ba8fe6SPhilip Reames;
107475890cdSShih-Po Hung; SIZE-LABEL: 'trn2.v8i16'
108475890cdSShih-Po Hung; SIZE-NEXT:  Cost Model: Found an estimated cost of 11 for instruction: %tmp0 = shufflevector <8 x i16> %v0, <8 x i16> %v1, <8 x i32> <i32 1, i32 9, i32 3, i32 11, i32 5, i32 13, i32 7, i32 15>
109475890cdSShih-Po Hung; SIZE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i16> %tmp0
110475890cdSShih-Po Hung;
111b0ba8fe6SPhilip Reames  %tmp0 = shufflevector <8 x i16> %v0, <8 x i16> %v1, <8 x i32> <i32 1, i32 9, i32 3, i32 11, i32 5, i32 13, i32 7, i32 15>
112b0ba8fe6SPhilip Reames  ret <8 x i16> %tmp0
113b0ba8fe6SPhilip Reames}
114b0ba8fe6SPhilip Reames
115b0ba8fe6SPhilip Reamesdefine <2 x i32> @trn1.v2i32(<2 x i32> %v0, <2 x i32> %v1) {
116b0ba8fe6SPhilip Reames; CHECK-LABEL: 'trn1.v2i32'
1178865ed4dSPhilip Reames; CHECK-NEXT:  Cost Model: Found an estimated cost of 11 for instruction: %tmp0 = shufflevector <2 x i32> %v0, <2 x i32> %v1, <2 x i32> <i32 0, i32 2>
1180a5d52a7SSergey Kachkov; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret <2 x i32> %tmp0
119b0ba8fe6SPhilip Reames;
120475890cdSShih-Po Hung; SIZE-LABEL: 'trn1.v2i32'
121475890cdSShih-Po Hung; SIZE-NEXT:  Cost Model: Found an estimated cost of 11 for instruction: %tmp0 = shufflevector <2 x i32> %v0, <2 x i32> %v1, <2 x i32> <i32 0, i32 2>
122475890cdSShih-Po Hung; SIZE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret <2 x i32> %tmp0
123475890cdSShih-Po Hung;
124b0ba8fe6SPhilip Reames  %tmp0 = shufflevector <2 x i32> %v0, <2 x i32> %v1, <2 x i32> <i32 0, i32 2>
125b0ba8fe6SPhilip Reames  ret <2 x i32> %tmp0
126b0ba8fe6SPhilip Reames}
127b0ba8fe6SPhilip Reames
128b0ba8fe6SPhilip Reamesdefine <2 x i32> @trn2.v2i32(<2 x i32> %v0, <2 x i32> %v1) {
129b0ba8fe6SPhilip Reames; CHECK-LABEL: 'trn2.v2i32'
1308865ed4dSPhilip Reames; CHECK-NEXT:  Cost Model: Found an estimated cost of 11 for instruction: %tmp0 = shufflevector <2 x i32> %v0, <2 x i32> %v1, <2 x i32> <i32 1, i32 3>
1310a5d52a7SSergey Kachkov; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret <2 x i32> %tmp0
132b0ba8fe6SPhilip Reames;
133475890cdSShih-Po Hung; SIZE-LABEL: 'trn2.v2i32'
134475890cdSShih-Po Hung; SIZE-NEXT:  Cost Model: Found an estimated cost of 11 for instruction: %tmp0 = shufflevector <2 x i32> %v0, <2 x i32> %v1, <2 x i32> <i32 1, i32 3>
135475890cdSShih-Po Hung; SIZE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret <2 x i32> %tmp0
136475890cdSShih-Po Hung;
137b0ba8fe6SPhilip Reames  %tmp0 = shufflevector <2 x i32> %v0, <2 x i32> %v1, <2 x i32> <i32 1, i32 3>
138b0ba8fe6SPhilip Reames  ret <2 x i32> %tmp0
139b0ba8fe6SPhilip Reames}
140b0ba8fe6SPhilip Reames
141b0ba8fe6SPhilip Reamesdefine <4 x i32> @trn1.v4i32(<4 x i32> %v0, <4 x i32> %v1) {
142b0ba8fe6SPhilip Reames; CHECK-LABEL: 'trn1.v4i32'
1438865ed4dSPhilip Reames; CHECK-NEXT:  Cost Model: Found an estimated cost of 11 for instruction: %tmp0 = shufflevector <4 x i32> %v0, <4 x i32> %v1, <4 x i32> <i32 0, i32 4, i32 2, i32 6>
1440a5d52a7SSergey Kachkov; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret <4 x i32> %tmp0
145b0ba8fe6SPhilip Reames;
146475890cdSShih-Po Hung; SIZE-LABEL: 'trn1.v4i32'
147475890cdSShih-Po Hung; SIZE-NEXT:  Cost Model: Found an estimated cost of 11 for instruction: %tmp0 = shufflevector <4 x i32> %v0, <4 x i32> %v1, <4 x i32> <i32 0, i32 4, i32 2, i32 6>
148475890cdSShih-Po Hung; SIZE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret <4 x i32> %tmp0
149475890cdSShih-Po Hung;
150b0ba8fe6SPhilip Reames  %tmp0 = shufflevector <4 x i32> %v0, <4 x i32> %v1, <4 x i32> <i32 0, i32 4, i32 2, i32 6>
151b0ba8fe6SPhilip Reames  ret <4 x i32> %tmp0
152b0ba8fe6SPhilip Reames}
153b0ba8fe6SPhilip Reames
154b0ba8fe6SPhilip Reamesdefine <4 x i32> @trn2.v4i32(<4 x i32> %v0, <4 x i32> %v1) {
155b0ba8fe6SPhilip Reames; CHECK-LABEL: 'trn2.v4i32'
1568865ed4dSPhilip Reames; CHECK-NEXT:  Cost Model: Found an estimated cost of 11 for instruction: %tmp0 = shufflevector <4 x i32> %v0, <4 x i32> %v1, <4 x i32> <i32 1, i32 5, i32 3, i32 7>
1570a5d52a7SSergey Kachkov; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret <4 x i32> %tmp0
158b0ba8fe6SPhilip Reames;
159475890cdSShih-Po Hung; SIZE-LABEL: 'trn2.v4i32'
160475890cdSShih-Po Hung; SIZE-NEXT:  Cost Model: Found an estimated cost of 11 for instruction: %tmp0 = shufflevector <4 x i32> %v0, <4 x i32> %v1, <4 x i32> <i32 1, i32 5, i32 3, i32 7>
161475890cdSShih-Po Hung; SIZE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret <4 x i32> %tmp0
162475890cdSShih-Po Hung;
163b0ba8fe6SPhilip Reames  %tmp0 = shufflevector <4 x i32> %v0, <4 x i32> %v1, <4 x i32> <i32 1, i32 5, i32 3, i32 7>
164b0ba8fe6SPhilip Reames  ret <4 x i32> %tmp0
165b0ba8fe6SPhilip Reames}
166b0ba8fe6SPhilip Reames
167b0ba8fe6SPhilip Reamesdefine <2 x i64> @trn1.v2i64(<2 x i64> %v0, <2 x i64> %v1) {
168b0ba8fe6SPhilip Reames; CHECK-LABEL: 'trn1.v2i64'
1698865ed4dSPhilip Reames; CHECK-NEXT:  Cost Model: Found an estimated cost of 11 for instruction: %tmp0 = shufflevector <2 x i64> %v0, <2 x i64> %v1, <2 x i32> <i32 0, i32 2>
1700a5d52a7SSergey Kachkov; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret <2 x i64> %tmp0
171b0ba8fe6SPhilip Reames;
172475890cdSShih-Po Hung; SIZE-LABEL: 'trn1.v2i64'
173475890cdSShih-Po Hung; SIZE-NEXT:  Cost Model: Found an estimated cost of 11 for instruction: %tmp0 = shufflevector <2 x i64> %v0, <2 x i64> %v1, <2 x i32> <i32 0, i32 2>
174475890cdSShih-Po Hung; SIZE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret <2 x i64> %tmp0
175475890cdSShih-Po Hung;
176b0ba8fe6SPhilip Reames  %tmp0 = shufflevector <2 x i64> %v0, <2 x i64> %v1, <2 x i32> <i32 0, i32 2>
177b0ba8fe6SPhilip Reames  ret <2 x i64> %tmp0
178b0ba8fe6SPhilip Reames}
179b0ba8fe6SPhilip Reames
180b0ba8fe6SPhilip Reamesdefine <2 x i64> @trn2.v2i64(<2 x i64> %v0, <2 x i64> %v1) {
181b0ba8fe6SPhilip Reames; CHECK-LABEL: 'trn2.v2i64'
1828865ed4dSPhilip Reames; CHECK-NEXT:  Cost Model: Found an estimated cost of 11 for instruction: %tmp0 = shufflevector <2 x i64> %v0, <2 x i64> %v1, <2 x i32> <i32 1, i32 3>
1830a5d52a7SSergey Kachkov; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret <2 x i64> %tmp0
184b0ba8fe6SPhilip Reames;
185475890cdSShih-Po Hung; SIZE-LABEL: 'trn2.v2i64'
186475890cdSShih-Po Hung; SIZE-NEXT:  Cost Model: Found an estimated cost of 11 for instruction: %tmp0 = shufflevector <2 x i64> %v0, <2 x i64> %v1, <2 x i32> <i32 1, i32 3>
187475890cdSShih-Po Hung; SIZE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret <2 x i64> %tmp0
188475890cdSShih-Po Hung;
189b0ba8fe6SPhilip Reames  %tmp0 = shufflevector <2 x i64> %v0, <2 x i64> %v1, <2 x i32> <i32 1, i32 3>
190b0ba8fe6SPhilip Reames  ret <2 x i64> %tmp0
191b0ba8fe6SPhilip Reames}
192b0ba8fe6SPhilip Reames
193b0ba8fe6SPhilip Reamesdefine <2 x float> @trn1.v2f32(<2 x float> %v0, <2 x float> %v1) {
194b0ba8fe6SPhilip Reames; CHECK-LABEL: 'trn1.v2f32'
1958865ed4dSPhilip Reames; CHECK-NEXT:  Cost Model: Found an estimated cost of 11 for instruction: %tmp0 = shufflevector <2 x float> %v0, <2 x float> %v1, <2 x i32> <i32 0, i32 2>
1960a5d52a7SSergey Kachkov; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret <2 x float> %tmp0
197b0ba8fe6SPhilip Reames;
198475890cdSShih-Po Hung; SIZE-LABEL: 'trn1.v2f32'
199475890cdSShih-Po Hung; SIZE-NEXT:  Cost Model: Found an estimated cost of 11 for instruction: %tmp0 = shufflevector <2 x float> %v0, <2 x float> %v1, <2 x i32> <i32 0, i32 2>
200475890cdSShih-Po Hung; SIZE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret <2 x float> %tmp0
201475890cdSShih-Po Hung;
202b0ba8fe6SPhilip Reames  %tmp0 = shufflevector <2 x float> %v0, <2 x float> %v1, <2 x i32> <i32 0, i32 2>
203b0ba8fe6SPhilip Reames  ret <2 x float> %tmp0
204b0ba8fe6SPhilip Reames}
205b0ba8fe6SPhilip Reames
206b0ba8fe6SPhilip Reamesdefine <2 x float> @trn2.v2f32(<2 x float> %v0, <2 x float> %v1) {
207b0ba8fe6SPhilip Reames; CHECK-LABEL: 'trn2.v2f32'
2088865ed4dSPhilip Reames; CHECK-NEXT:  Cost Model: Found an estimated cost of 11 for instruction: %tmp0 = shufflevector <2 x float> %v0, <2 x float> %v1, <2 x i32> <i32 1, i32 3>
2090a5d52a7SSergey Kachkov; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret <2 x float> %tmp0
210b0ba8fe6SPhilip Reames;
211475890cdSShih-Po Hung; SIZE-LABEL: 'trn2.v2f32'
212475890cdSShih-Po Hung; SIZE-NEXT:  Cost Model: Found an estimated cost of 11 for instruction: %tmp0 = shufflevector <2 x float> %v0, <2 x float> %v1, <2 x i32> <i32 1, i32 3>
213475890cdSShih-Po Hung; SIZE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret <2 x float> %tmp0
214475890cdSShih-Po Hung;
215b0ba8fe6SPhilip Reames  %tmp0 = shufflevector <2 x float> %v0, <2 x float> %v1, <2 x i32> <i32 1, i32 3>
216b0ba8fe6SPhilip Reames  ret <2 x float> %tmp0
217b0ba8fe6SPhilip Reames}
218b0ba8fe6SPhilip Reames
219b0ba8fe6SPhilip Reamesdefine <4 x float> @trn1.v4f32(<4 x float> %v0, <4 x float> %v1) {
220b0ba8fe6SPhilip Reames; CHECK-LABEL: 'trn1.v4f32'
2218865ed4dSPhilip Reames; CHECK-NEXT:  Cost Model: Found an estimated cost of 11 for instruction: %tmp0 = shufflevector <4 x float> %v0, <4 x float> %v1, <4 x i32> <i32 0, i32 4, i32 2, i32 6>
2220a5d52a7SSergey Kachkov; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret <4 x float> %tmp0
223b0ba8fe6SPhilip Reames;
224475890cdSShih-Po Hung; SIZE-LABEL: 'trn1.v4f32'
225475890cdSShih-Po Hung; SIZE-NEXT:  Cost Model: Found an estimated cost of 11 for instruction: %tmp0 = shufflevector <4 x float> %v0, <4 x float> %v1, <4 x i32> <i32 0, i32 4, i32 2, i32 6>
226475890cdSShih-Po Hung; SIZE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret <4 x float> %tmp0
227475890cdSShih-Po Hung;
228b0ba8fe6SPhilip Reames  %tmp0 = shufflevector <4 x float> %v0, <4 x float> %v1, <4 x i32> <i32 0, i32 4, i32 2, i32 6>
229b0ba8fe6SPhilip Reames  ret <4 x float> %tmp0
230b0ba8fe6SPhilip Reames}
231b0ba8fe6SPhilip Reames
232b0ba8fe6SPhilip Reamesdefine <4 x float> @trn2.v4f32(<4 x float> %v0, <4 x float> %v1) {
233b0ba8fe6SPhilip Reames; CHECK-LABEL: 'trn2.v4f32'
2348865ed4dSPhilip Reames; CHECK-NEXT:  Cost Model: Found an estimated cost of 11 for instruction: %tmp0 = shufflevector <4 x float> %v0, <4 x float> %v1, <4 x i32> <i32 1, i32 5, i32 3, i32 7>
2350a5d52a7SSergey Kachkov; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret <4 x float> %tmp0
236b0ba8fe6SPhilip Reames;
237475890cdSShih-Po Hung; SIZE-LABEL: 'trn2.v4f32'
238475890cdSShih-Po Hung; SIZE-NEXT:  Cost Model: Found an estimated cost of 11 for instruction: %tmp0 = shufflevector <4 x float> %v0, <4 x float> %v1, <4 x i32> <i32 1, i32 5, i32 3, i32 7>
239475890cdSShih-Po Hung; SIZE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret <4 x float> %tmp0
240475890cdSShih-Po Hung;
241b0ba8fe6SPhilip Reames  %tmp0 = shufflevector <4 x float> %v0, <4 x float> %v1, <4 x i32> <i32 1, i32 5, i32 3, i32 7>
242b0ba8fe6SPhilip Reames  ret <4 x float> %tmp0
243b0ba8fe6SPhilip Reames}
244b0ba8fe6SPhilip Reames
245b0ba8fe6SPhilip Reamesdefine <2 x double> @trn1.v2f64(<2 x double> %v0, <2 x double> %v1) {
246b0ba8fe6SPhilip Reames; CHECK-LABEL: 'trn1.v2f64'
2478865ed4dSPhilip Reames; CHECK-NEXT:  Cost Model: Found an estimated cost of 11 for instruction: %tmp0 = shufflevector <2 x double> %v0, <2 x double> %v1, <2 x i32> <i32 0, i32 2>
2480a5d52a7SSergey Kachkov; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret <2 x double> %tmp0
249b0ba8fe6SPhilip Reames;
250475890cdSShih-Po Hung; SIZE-LABEL: 'trn1.v2f64'
251475890cdSShih-Po Hung; SIZE-NEXT:  Cost Model: Found an estimated cost of 11 for instruction: %tmp0 = shufflevector <2 x double> %v0, <2 x double> %v1, <2 x i32> <i32 0, i32 2>
252475890cdSShih-Po Hung; SIZE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret <2 x double> %tmp0
253475890cdSShih-Po Hung;
254b0ba8fe6SPhilip Reames  %tmp0 = shufflevector <2 x double> %v0, <2 x double> %v1, <2 x i32> <i32 0, i32 2>
255b0ba8fe6SPhilip Reames  ret <2 x double> %tmp0
256b0ba8fe6SPhilip Reames}
257b0ba8fe6SPhilip Reames
258b0ba8fe6SPhilip Reamesdefine <2 x double> @trn2.v2f64(<2 x double> %v0, <2 x double> %v1) {
259b0ba8fe6SPhilip Reames; CHECK-LABEL: 'trn2.v2f64'
2608865ed4dSPhilip Reames; CHECK-NEXT:  Cost Model: Found an estimated cost of 11 for instruction: %tmp0 = shufflevector <2 x double> %v0, <2 x double> %v1, <2 x i32> <i32 1, i32 3>
2610a5d52a7SSergey Kachkov; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret <2 x double> %tmp0
262b0ba8fe6SPhilip Reames;
263475890cdSShih-Po Hung; SIZE-LABEL: 'trn2.v2f64'
264475890cdSShih-Po Hung; SIZE-NEXT:  Cost Model: Found an estimated cost of 11 for instruction: %tmp0 = shufflevector <2 x double> %v0, <2 x double> %v1, <2 x i32> <i32 1, i32 3>
265475890cdSShih-Po Hung; SIZE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret <2 x double> %tmp0
266475890cdSShih-Po Hung;
267b0ba8fe6SPhilip Reames  %tmp0 = shufflevector <2 x double> %v0, <2 x double> %v1, <2 x i32> <i32 1, i32 3>
268b0ba8fe6SPhilip Reames  ret <2 x double> %tmp0
269b0ba8fe6SPhilip Reames}
270b0ba8fe6SPhilip Reames
271b0ba8fe6SPhilip Reamesdefine <4 x half> @trn1.v4f16(<4 x half> %v0, <4 x half> %v1) {
272b0ba8fe6SPhilip Reames; CHECK-LABEL: 'trn1.v4f16'
2738865ed4dSPhilip Reames; CHECK-NEXT:  Cost Model: Found an estimated cost of 11 for instruction: %tmp0 = shufflevector <4 x half> %v0, <4 x half> %v1, <4 x i32> <i32 0, i32 4, i32 2, i32 6>
2740a5d52a7SSergey Kachkov; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret <4 x half> %tmp0
275b0ba8fe6SPhilip Reames;
276475890cdSShih-Po Hung; SIZE-LABEL: 'trn1.v4f16'
277475890cdSShih-Po Hung; SIZE-NEXT:  Cost Model: Found an estimated cost of 11 for instruction: %tmp0 = shufflevector <4 x half> %v0, <4 x half> %v1, <4 x i32> <i32 0, i32 4, i32 2, i32 6>
278475890cdSShih-Po Hung; SIZE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret <4 x half> %tmp0
279475890cdSShih-Po Hung;
280b0ba8fe6SPhilip Reames  %tmp0 = shufflevector <4 x half> %v0, <4 x half> %v1, <4 x i32> <i32 0, i32 4, i32 2, i32 6>
281b0ba8fe6SPhilip Reames  ret <4 x half> %tmp0
282b0ba8fe6SPhilip Reames}
283b0ba8fe6SPhilip Reames
284b0ba8fe6SPhilip Reamesdefine <4 x half> @trn2.v4f16(<4 x half> %v0, <4 x half> %v1) {
285b0ba8fe6SPhilip Reames; CHECK-LABEL: 'trn2.v4f16'
2868865ed4dSPhilip Reames; CHECK-NEXT:  Cost Model: Found an estimated cost of 11 for instruction: %tmp0 = shufflevector <4 x half> %v0, <4 x half> %v1, <4 x i32> <i32 1, i32 5, i32 3, i32 7>
2870a5d52a7SSergey Kachkov; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret <4 x half> %tmp0
288b0ba8fe6SPhilip Reames;
289475890cdSShih-Po Hung; SIZE-LABEL: 'trn2.v4f16'
290475890cdSShih-Po Hung; SIZE-NEXT:  Cost Model: Found an estimated cost of 11 for instruction: %tmp0 = shufflevector <4 x half> %v0, <4 x half> %v1, <4 x i32> <i32 1, i32 5, i32 3, i32 7>
291475890cdSShih-Po Hung; SIZE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret <4 x half> %tmp0
292475890cdSShih-Po Hung;
293b0ba8fe6SPhilip Reames  %tmp0 = shufflevector <4 x half> %v0, <4 x half> %v1, <4 x i32> <i32 1, i32 5, i32 3, i32 7>
294b0ba8fe6SPhilip Reames  ret <4 x half> %tmp0
295b0ba8fe6SPhilip Reames}
296b0ba8fe6SPhilip Reames
297b0ba8fe6SPhilip Reamesdefine <8 x half> @trn1.v8f16(<8 x half> %v0, <8 x half> %v1) {
298b0ba8fe6SPhilip Reames; CHECK-LABEL: 'trn1.v8f16'
2998865ed4dSPhilip Reames; CHECK-NEXT:  Cost Model: Found an estimated cost of 11 for instruction: %tmp0 = shufflevector <8 x half> %v0, <8 x half> %v1, <8 x i32> <i32 0, i32 8, i32 2, i32 10, i32 4, i32 12, i32 6, i32 14>
3000a5d52a7SSergey Kachkov; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret <8 x half> %tmp0
301b0ba8fe6SPhilip Reames;
302475890cdSShih-Po Hung; SIZE-LABEL: 'trn1.v8f16'
303475890cdSShih-Po Hung; SIZE-NEXT:  Cost Model: Found an estimated cost of 11 for instruction: %tmp0 = shufflevector <8 x half> %v0, <8 x half> %v1, <8 x i32> <i32 0, i32 8, i32 2, i32 10, i32 4, i32 12, i32 6, i32 14>
304475890cdSShih-Po Hung; SIZE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret <8 x half> %tmp0
305475890cdSShih-Po Hung;
306b0ba8fe6SPhilip Reames  %tmp0 = shufflevector <8 x half> %v0, <8 x half> %v1, <8 x i32> <i32 0, i32 8, i32 2, i32 10, i32 4, i32 12, i32 6, i32 14>
307b0ba8fe6SPhilip Reames  ret <8 x half> %tmp0
308b0ba8fe6SPhilip Reames}
309b0ba8fe6SPhilip Reames
310b0ba8fe6SPhilip Reamesdefine <8 x half> @trn2.v8f16(<8 x half> %v0, <8 x half> %v1) {
311b0ba8fe6SPhilip Reames; CHECK-LABEL: 'trn2.v8f16'
3128865ed4dSPhilip Reames; CHECK-NEXT:  Cost Model: Found an estimated cost of 11 for instruction: %tmp0 = shufflevector <8 x half> %v0, <8 x half> %v1, <8 x i32> <i32 1, i32 9, i32 3, i32 11, i32 5, i32 13, i32 7, i32 15>
3130a5d52a7SSergey Kachkov; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret <8 x half> %tmp0
314b0ba8fe6SPhilip Reames;
315475890cdSShih-Po Hung; SIZE-LABEL: 'trn2.v8f16'
316475890cdSShih-Po Hung; SIZE-NEXT:  Cost Model: Found an estimated cost of 11 for instruction: %tmp0 = shufflevector <8 x half> %v0, <8 x half> %v1, <8 x i32> <i32 1, i32 9, i32 3, i32 11, i32 5, i32 13, i32 7, i32 15>
317475890cdSShih-Po Hung; SIZE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret <8 x half> %tmp0
318475890cdSShih-Po Hung;
319b0ba8fe6SPhilip Reames  %tmp0 = shufflevector <8 x half> %v0, <8 x half> %v1, <8 x i32> <i32 1, i32 9, i32 3, i32 11, i32 5, i32 13, i32 7, i32 15>
320b0ba8fe6SPhilip Reames  ret <8 x half> %tmp0
321b0ba8fe6SPhilip Reames}
322