xref: /llvm-project/llvm/test/Analysis/CostModel/X86/mul64.ll (revision 595a74391daaff8daffa2f6e19274792d0074565)
1; NOTE: Assertions have been autogenerated by utils/update_analyze_test_checks.py
2; RUN: opt < %s -passes="print<cost-model>" 2>&1 -disable-output -mtriple=x86_64-apple-macosx10.8.0 -mattr=+sse2 | FileCheck %s --check-prefixes=SSE2
3; RUN: opt < %s -passes="print<cost-model>" 2>&1 -disable-output -mtriple=x86_64-apple-macosx10.8.0 -mattr=+ssse3 | FileCheck %s --check-prefixes=SSSE3
4; RUN: opt < %s -passes="print<cost-model>" 2>&1 -disable-output -mtriple=x86_64-apple-macosx10.8.0 -mattr=+sse4.2 | FileCheck %s --check-prefixes=SSE42
5; RUN: opt < %s -passes="print<cost-model>" 2>&1 -disable-output -mtriple=x86_64-apple-macosx10.8.0 -mattr=+avx | FileCheck %s --check-prefixes=AVX1
6; RUN: opt < %s -passes="print<cost-model>" 2>&1 -disable-output -mtriple=x86_64-apple-macosx10.8.0 -mattr=+avx2 | FileCheck %s --check-prefixes=AVX2
7; RUN: opt < %s -passes="print<cost-model>" 2>&1 -disable-output -mtriple=x86_64-apple-macosx10.8.0 -mattr=+avx512f | FileCheck %s --check-prefixes=AVX512,AVX512F
8; RUN: opt < %s -passes="print<cost-model>" 2>&1 -disable-output -mtriple=x86_64-apple-macosx10.8.0 -mattr=+avx512f,+avx512bw | FileCheck %s --check-prefixes=AVX512,AVX512BW
9; RUN: opt < %s -passes="print<cost-model>" 2>&1 -disable-output -mtriple=x86_64-apple-macosx10.8.0 -mattr=+avx512f,+avx512dq | FileCheck %s --check-prefixes=AVX512,AVX512DQ
10;
11; RUN: opt < %s -passes="print<cost-model>" 2>&1 -disable-output -mtriple=x86_64-apple-macosx10.8.0 -mcpu=slm | FileCheck %s --check-prefixes=SLM
12; RUN: opt < %s -passes="print<cost-model>" 2>&1 -disable-output -mtriple=x86_64-apple-macosx10.8.0 -mcpu=goldmont | FileCheck %s --check-prefixes=GLM
13; RUN: opt < %s -passes="print<cost-model>" 2>&1 -disable-output -mtriple=x86_64-apple-macosx10.8.0 -mcpu=btver2 | FileCheck %s --check-prefixes=AVX1
14; RUN: opt < %s -passes="print<cost-model>" 2>&1 -disable-output -mtriple=x86_64-apple-macosx10.8.0 -mcpu=knl | FileCheck %s --check-prefixes=AVX512,AVX512F
15
16;
17; mul vXi8 -> mXi64
18;
19
20define void @mul_sext_vXi8(<2 x i8> %a2, <2 x i8> %b2, <4 x i8> %a4, <4 x i8> %b4, <8 x i8> %a8, <8 x i8> %b8, <16 x i8> %a16, <16 x i8> %b16, <32 x i8> %a32, <32 x i8> %b32, <64 x i8> %a64, <64 x i8> %b64)  {
21; SSE2-LABEL: 'mul_sext_vXi8'
22; SSE2-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %xa2 = sext <2 x i8> %a2 to <2 x i64>
23; SSE2-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %xb2 = sext <2 x i8> %b2 to <2 x i64>
24; SSE2-NEXT:  Cost Model: Found an estimated cost of 8 for instruction: %xa4 = sext <4 x i8> %a4 to <4 x i64>
25; SSE2-NEXT:  Cost Model: Found an estimated cost of 8 for instruction: %xb4 = sext <4 x i8> %b4 to <4 x i64>
26; SSE2-NEXT:  Cost Model: Found an estimated cost of 16 for instruction: %xa8 = sext <8 x i8> %a8 to <8 x i64>
27; SSE2-NEXT:  Cost Model: Found an estimated cost of 16 for instruction: %xb8 = sext <8 x i8> %b8 to <8 x i64>
28; SSE2-NEXT:  Cost Model: Found an estimated cost of 32 for instruction: %xa16 = sext <16 x i8> %a16 to <16 x i64>
29; SSE2-NEXT:  Cost Model: Found an estimated cost of 32 for instruction: %xb16 = sext <16 x i8> %b16 to <16 x i64>
30; SSE2-NEXT:  Cost Model: Found an estimated cost of 64 for instruction: %xa32 = sext <32 x i8> %a32 to <32 x i64>
31; SSE2-NEXT:  Cost Model: Found an estimated cost of 64 for instruction: %xb32 = sext <32 x i8> %b32 to <32 x i64>
32; SSE2-NEXT:  Cost Model: Found an estimated cost of 128 for instruction: %xa64 = sext <64 x i8> %a64 to <64 x i64>
33; SSE2-NEXT:  Cost Model: Found an estimated cost of 128 for instruction: %xb64 = sext <64 x i8> %b64 to <64 x i64>
34; SSE2-NEXT:  Cost Model: Found an estimated cost of 7 for instruction: %res2 = mul <2 x i64> %xa2, %xb2
35; SSE2-NEXT:  Cost Model: Found an estimated cost of 14 for instruction: %res4 = mul <4 x i64> %xa4, %xb4
36; SSE2-NEXT:  Cost Model: Found an estimated cost of 28 for instruction: %res8 = mul <8 x i64> %xa8, %xb8
37; SSE2-NEXT:  Cost Model: Found an estimated cost of 56 for instruction: %res16 = mul <16 x i64> %xa16, %xb16
38; SSE2-NEXT:  Cost Model: Found an estimated cost of 112 for instruction: %res32 = mul <32 x i64> %xa32, %xb32
39; SSE2-NEXT:  Cost Model: Found an estimated cost of 224 for instruction: %res64 = mul <64 x i64> %xa64, %xb64
40; SSE2-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret void
41;
42; SSSE3-LABEL: 'mul_sext_vXi8'
43; SSSE3-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %xa2 = sext <2 x i8> %a2 to <2 x i64>
44; SSSE3-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %xb2 = sext <2 x i8> %b2 to <2 x i64>
45; SSSE3-NEXT:  Cost Model: Found an estimated cost of 8 for instruction: %xa4 = sext <4 x i8> %a4 to <4 x i64>
46; SSSE3-NEXT:  Cost Model: Found an estimated cost of 8 for instruction: %xb4 = sext <4 x i8> %b4 to <4 x i64>
47; SSSE3-NEXT:  Cost Model: Found an estimated cost of 16 for instruction: %xa8 = sext <8 x i8> %a8 to <8 x i64>
48; SSSE3-NEXT:  Cost Model: Found an estimated cost of 16 for instruction: %xb8 = sext <8 x i8> %b8 to <8 x i64>
49; SSSE3-NEXT:  Cost Model: Found an estimated cost of 32 for instruction: %xa16 = sext <16 x i8> %a16 to <16 x i64>
50; SSSE3-NEXT:  Cost Model: Found an estimated cost of 32 for instruction: %xb16 = sext <16 x i8> %b16 to <16 x i64>
51; SSSE3-NEXT:  Cost Model: Found an estimated cost of 64 for instruction: %xa32 = sext <32 x i8> %a32 to <32 x i64>
52; SSSE3-NEXT:  Cost Model: Found an estimated cost of 64 for instruction: %xb32 = sext <32 x i8> %b32 to <32 x i64>
53; SSSE3-NEXT:  Cost Model: Found an estimated cost of 128 for instruction: %xa64 = sext <64 x i8> %a64 to <64 x i64>
54; SSSE3-NEXT:  Cost Model: Found an estimated cost of 128 for instruction: %xb64 = sext <64 x i8> %b64 to <64 x i64>
55; SSSE3-NEXT:  Cost Model: Found an estimated cost of 7 for instruction: %res2 = mul <2 x i64> %xa2, %xb2
56; SSSE3-NEXT:  Cost Model: Found an estimated cost of 14 for instruction: %res4 = mul <4 x i64> %xa4, %xb4
57; SSSE3-NEXT:  Cost Model: Found an estimated cost of 28 for instruction: %res8 = mul <8 x i64> %xa8, %xb8
58; SSSE3-NEXT:  Cost Model: Found an estimated cost of 56 for instruction: %res16 = mul <16 x i64> %xa16, %xb16
59; SSSE3-NEXT:  Cost Model: Found an estimated cost of 112 for instruction: %res32 = mul <32 x i64> %xa32, %xb32
60; SSSE3-NEXT:  Cost Model: Found an estimated cost of 224 for instruction: %res64 = mul <64 x i64> %xa64, %xb64
61; SSSE3-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret void
62;
63; SSE42-LABEL: 'mul_sext_vXi8'
64; SSE42-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xa2 = sext <2 x i8> %a2 to <2 x i64>
65; SSE42-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xb2 = sext <2 x i8> %b2 to <2 x i64>
66; SSE42-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %xa4 = sext <4 x i8> %a4 to <4 x i64>
67; SSE42-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %xb4 = sext <4 x i8> %b4 to <4 x i64>
68; SSE42-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %xa8 = sext <8 x i8> %a8 to <8 x i64>
69; SSE42-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %xb8 = sext <8 x i8> %b8 to <8 x i64>
70; SSE42-NEXT:  Cost Model: Found an estimated cost of 8 for instruction: %xa16 = sext <16 x i8> %a16 to <16 x i64>
71; SSE42-NEXT:  Cost Model: Found an estimated cost of 8 for instruction: %xb16 = sext <16 x i8> %b16 to <16 x i64>
72; SSE42-NEXT:  Cost Model: Found an estimated cost of 16 for instruction: %xa32 = sext <32 x i8> %a32 to <32 x i64>
73; SSE42-NEXT:  Cost Model: Found an estimated cost of 16 for instruction: %xb32 = sext <32 x i8> %b32 to <32 x i64>
74; SSE42-NEXT:  Cost Model: Found an estimated cost of 32 for instruction: %xa64 = sext <64 x i8> %a64 to <64 x i64>
75; SSE42-NEXT:  Cost Model: Found an estimated cost of 32 for instruction: %xb64 = sext <64 x i8> %b64 to <64 x i64>
76; SSE42-NEXT:  Cost Model: Found an estimated cost of 6 for instruction: %res2 = mul <2 x i64> %xa2, %xb2
77; SSE42-NEXT:  Cost Model: Found an estimated cost of 12 for instruction: %res4 = mul <4 x i64> %xa4, %xb4
78; SSE42-NEXT:  Cost Model: Found an estimated cost of 24 for instruction: %res8 = mul <8 x i64> %xa8, %xb8
79; SSE42-NEXT:  Cost Model: Found an estimated cost of 48 for instruction: %res16 = mul <16 x i64> %xa16, %xb16
80; SSE42-NEXT:  Cost Model: Found an estimated cost of 96 for instruction: %res32 = mul <32 x i64> %xa32, %xb32
81; SSE42-NEXT:  Cost Model: Found an estimated cost of 192 for instruction: %res64 = mul <64 x i64> %xa64, %xb64
82; SSE42-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret void
83;
84; AVX1-LABEL: 'mul_sext_vXi8'
85; AVX1-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xa2 = sext <2 x i8> %a2 to <2 x i64>
86; AVX1-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xb2 = sext <2 x i8> %b2 to <2 x i64>
87; AVX1-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %xa4 = sext <4 x i8> %a4 to <4 x i64>
88; AVX1-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %xb4 = sext <4 x i8> %b4 to <4 x i64>
89; AVX1-NEXT:  Cost Model: Found an estimated cost of 6 for instruction: %xa8 = sext <8 x i8> %a8 to <8 x i64>
90; AVX1-NEXT:  Cost Model: Found an estimated cost of 6 for instruction: %xb8 = sext <8 x i8> %b8 to <8 x i64>
91; AVX1-NEXT:  Cost Model: Found an estimated cost of 12 for instruction: %xa16 = sext <16 x i8> %a16 to <16 x i64>
92; AVX1-NEXT:  Cost Model: Found an estimated cost of 12 for instruction: %xb16 = sext <16 x i8> %b16 to <16 x i64>
93; AVX1-NEXT:  Cost Model: Found an estimated cost of 25 for instruction: %xa32 = sext <32 x i8> %a32 to <32 x i64>
94; AVX1-NEXT:  Cost Model: Found an estimated cost of 25 for instruction: %xb32 = sext <32 x i8> %b32 to <32 x i64>
95; AVX1-NEXT:  Cost Model: Found an estimated cost of 50 for instruction: %xa64 = sext <64 x i8> %a64 to <64 x i64>
96; AVX1-NEXT:  Cost Model: Found an estimated cost of 50 for instruction: %xb64 = sext <64 x i8> %b64 to <64 x i64>
97; AVX1-NEXT:  Cost Model: Found an estimated cost of 6 for instruction: %res2 = mul <2 x i64> %xa2, %xb2
98; AVX1-NEXT:  Cost Model: Found an estimated cost of 12 for instruction: %res4 = mul <4 x i64> %xa4, %xb4
99; AVX1-NEXT:  Cost Model: Found an estimated cost of 24 for instruction: %res8 = mul <8 x i64> %xa8, %xb8
100; AVX1-NEXT:  Cost Model: Found an estimated cost of 48 for instruction: %res16 = mul <16 x i64> %xa16, %xb16
101; AVX1-NEXT:  Cost Model: Found an estimated cost of 96 for instruction: %res32 = mul <32 x i64> %xa32, %xb32
102; AVX1-NEXT:  Cost Model: Found an estimated cost of 192 for instruction: %res64 = mul <64 x i64> %xa64, %xb64
103; AVX1-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret void
104;
105; AVX2-LABEL: 'mul_sext_vXi8'
106; AVX2-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xa2 = sext <2 x i8> %a2 to <2 x i64>
107; AVX2-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xb2 = sext <2 x i8> %b2 to <2 x i64>
108; AVX2-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %xa4 = sext <4 x i8> %a4 to <4 x i64>
109; AVX2-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %xb4 = sext <4 x i8> %b4 to <4 x i64>
110; AVX2-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %xa8 = sext <8 x i8> %a8 to <8 x i64>
111; AVX2-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %xb8 = sext <8 x i8> %b8 to <8 x i64>
112; AVX2-NEXT:  Cost Model: Found an estimated cost of 8 for instruction: %xa16 = sext <16 x i8> %a16 to <16 x i64>
113; AVX2-NEXT:  Cost Model: Found an estimated cost of 8 for instruction: %xb16 = sext <16 x i8> %b16 to <16 x i64>
114; AVX2-NEXT:  Cost Model: Found an estimated cost of 17 for instruction: %xa32 = sext <32 x i8> %a32 to <32 x i64>
115; AVX2-NEXT:  Cost Model: Found an estimated cost of 17 for instruction: %xb32 = sext <32 x i8> %b32 to <32 x i64>
116; AVX2-NEXT:  Cost Model: Found an estimated cost of 34 for instruction: %xa64 = sext <64 x i8> %a64 to <64 x i64>
117; AVX2-NEXT:  Cost Model: Found an estimated cost of 34 for instruction: %xb64 = sext <64 x i8> %b64 to <64 x i64>
118; AVX2-NEXT:  Cost Model: Found an estimated cost of 6 for instruction: %res2 = mul <2 x i64> %xa2, %xb2
119; AVX2-NEXT:  Cost Model: Found an estimated cost of 6 for instruction: %res4 = mul <4 x i64> %xa4, %xb4
120; AVX2-NEXT:  Cost Model: Found an estimated cost of 12 for instruction: %res8 = mul <8 x i64> %xa8, %xb8
121; AVX2-NEXT:  Cost Model: Found an estimated cost of 24 for instruction: %res16 = mul <16 x i64> %xa16, %xb16
122; AVX2-NEXT:  Cost Model: Found an estimated cost of 48 for instruction: %res32 = mul <32 x i64> %xa32, %xb32
123; AVX2-NEXT:  Cost Model: Found an estimated cost of 96 for instruction: %res64 = mul <64 x i64> %xa64, %xb64
124; AVX2-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret void
125;
126; AVX512F-LABEL: 'mul_sext_vXi8'
127; AVX512F-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xa2 = sext <2 x i8> %a2 to <2 x i64>
128; AVX512F-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xb2 = sext <2 x i8> %b2 to <2 x i64>
129; AVX512F-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xa4 = sext <4 x i8> %a4 to <4 x i64>
130; AVX512F-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xb4 = sext <4 x i8> %b4 to <4 x i64>
131; AVX512F-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xa8 = sext <8 x i8> %a8 to <8 x i64>
132; AVX512F-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xb8 = sext <8 x i8> %b8 to <8 x i64>
133; AVX512F-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %xa16 = sext <16 x i8> %a16 to <16 x i64>
134; AVX512F-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %xb16 = sext <16 x i8> %b16 to <16 x i64>
135; AVX512F-NEXT:  Cost Model: Found an estimated cost of 7 for instruction: %xa32 = sext <32 x i8> %a32 to <32 x i64>
136; AVX512F-NEXT:  Cost Model: Found an estimated cost of 7 for instruction: %xb32 = sext <32 x i8> %b32 to <32 x i64>
137; AVX512F-NEXT:  Cost Model: Found an estimated cost of 15 for instruction: %xa64 = sext <64 x i8> %a64 to <64 x i64>
138; AVX512F-NEXT:  Cost Model: Found an estimated cost of 15 for instruction: %xb64 = sext <64 x i8> %b64 to <64 x i64>
139; AVX512F-NEXT:  Cost Model: Found an estimated cost of 6 for instruction: %res2 = mul <2 x i64> %xa2, %xb2
140; AVX512F-NEXT:  Cost Model: Found an estimated cost of 6 for instruction: %res4 = mul <4 x i64> %xa4, %xb4
141; AVX512F-NEXT:  Cost Model: Found an estimated cost of 6 for instruction: %res8 = mul <8 x i64> %xa8, %xb8
142; AVX512F-NEXT:  Cost Model: Found an estimated cost of 12 for instruction: %res16 = mul <16 x i64> %xa16, %xb16
143; AVX512F-NEXT:  Cost Model: Found an estimated cost of 24 for instruction: %res32 = mul <32 x i64> %xa32, %xb32
144; AVX512F-NEXT:  Cost Model: Found an estimated cost of 48 for instruction: %res64 = mul <64 x i64> %xa64, %xb64
145; AVX512F-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret void
146;
147; AVX512BW-LABEL: 'mul_sext_vXi8'
148; AVX512BW-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xa2 = sext <2 x i8> %a2 to <2 x i64>
149; AVX512BW-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xb2 = sext <2 x i8> %b2 to <2 x i64>
150; AVX512BW-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xa4 = sext <4 x i8> %a4 to <4 x i64>
151; AVX512BW-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xb4 = sext <4 x i8> %b4 to <4 x i64>
152; AVX512BW-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xa8 = sext <8 x i8> %a8 to <8 x i64>
153; AVX512BW-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xb8 = sext <8 x i8> %b8 to <8 x i64>
154; AVX512BW-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %xa16 = sext <16 x i8> %a16 to <16 x i64>
155; AVX512BW-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %xb16 = sext <16 x i8> %b16 to <16 x i64>
156; AVX512BW-NEXT:  Cost Model: Found an estimated cost of 7 for instruction: %xa32 = sext <32 x i8> %a32 to <32 x i64>
157; AVX512BW-NEXT:  Cost Model: Found an estimated cost of 7 for instruction: %xb32 = sext <32 x i8> %b32 to <32 x i64>
158; AVX512BW-NEXT:  Cost Model: Found an estimated cost of 15 for instruction: %xa64 = sext <64 x i8> %a64 to <64 x i64>
159; AVX512BW-NEXT:  Cost Model: Found an estimated cost of 15 for instruction: %xb64 = sext <64 x i8> %b64 to <64 x i64>
160; AVX512BW-NEXT:  Cost Model: Found an estimated cost of 6 for instruction: %res2 = mul <2 x i64> %xa2, %xb2
161; AVX512BW-NEXT:  Cost Model: Found an estimated cost of 6 for instruction: %res4 = mul <4 x i64> %xa4, %xb4
162; AVX512BW-NEXT:  Cost Model: Found an estimated cost of 6 for instruction: %res8 = mul <8 x i64> %xa8, %xb8
163; AVX512BW-NEXT:  Cost Model: Found an estimated cost of 12 for instruction: %res16 = mul <16 x i64> %xa16, %xb16
164; AVX512BW-NEXT:  Cost Model: Found an estimated cost of 24 for instruction: %res32 = mul <32 x i64> %xa32, %xb32
165; AVX512BW-NEXT:  Cost Model: Found an estimated cost of 48 for instruction: %res64 = mul <64 x i64> %xa64, %xb64
166; AVX512BW-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret void
167;
168; AVX512DQ-LABEL: 'mul_sext_vXi8'
169; AVX512DQ-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xa2 = sext <2 x i8> %a2 to <2 x i64>
170; AVX512DQ-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xb2 = sext <2 x i8> %b2 to <2 x i64>
171; AVX512DQ-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xa4 = sext <4 x i8> %a4 to <4 x i64>
172; AVX512DQ-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xb4 = sext <4 x i8> %b4 to <4 x i64>
173; AVX512DQ-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xa8 = sext <8 x i8> %a8 to <8 x i64>
174; AVX512DQ-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xb8 = sext <8 x i8> %b8 to <8 x i64>
175; AVX512DQ-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %xa16 = sext <16 x i8> %a16 to <16 x i64>
176; AVX512DQ-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %xb16 = sext <16 x i8> %b16 to <16 x i64>
177; AVX512DQ-NEXT:  Cost Model: Found an estimated cost of 7 for instruction: %xa32 = sext <32 x i8> %a32 to <32 x i64>
178; AVX512DQ-NEXT:  Cost Model: Found an estimated cost of 7 for instruction: %xb32 = sext <32 x i8> %b32 to <32 x i64>
179; AVX512DQ-NEXT:  Cost Model: Found an estimated cost of 15 for instruction: %xa64 = sext <64 x i8> %a64 to <64 x i64>
180; AVX512DQ-NEXT:  Cost Model: Found an estimated cost of 15 for instruction: %xb64 = sext <64 x i8> %b64 to <64 x i64>
181; AVX512DQ-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %res2 = mul <2 x i64> %xa2, %xb2
182; AVX512DQ-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %res4 = mul <4 x i64> %xa4, %xb4
183; AVX512DQ-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %res8 = mul <8 x i64> %xa8, %xb8
184; AVX512DQ-NEXT:  Cost Model: Found an estimated cost of 6 for instruction: %res16 = mul <16 x i64> %xa16, %xb16
185; AVX512DQ-NEXT:  Cost Model: Found an estimated cost of 12 for instruction: %res32 = mul <32 x i64> %xa32, %xb32
186; AVX512DQ-NEXT:  Cost Model: Found an estimated cost of 24 for instruction: %res64 = mul <64 x i64> %xa64, %xb64
187; AVX512DQ-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret void
188;
189; SLM-LABEL: 'mul_sext_vXi8'
190; SLM-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xa2 = sext <2 x i8> %a2 to <2 x i64>
191; SLM-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xb2 = sext <2 x i8> %b2 to <2 x i64>
192; SLM-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %xa4 = sext <4 x i8> %a4 to <4 x i64>
193; SLM-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %xb4 = sext <4 x i8> %b4 to <4 x i64>
194; SLM-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %xa8 = sext <8 x i8> %a8 to <8 x i64>
195; SLM-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %xb8 = sext <8 x i8> %b8 to <8 x i64>
196; SLM-NEXT:  Cost Model: Found an estimated cost of 8 for instruction: %xa16 = sext <16 x i8> %a16 to <16 x i64>
197; SLM-NEXT:  Cost Model: Found an estimated cost of 8 for instruction: %xb16 = sext <16 x i8> %b16 to <16 x i64>
198; SLM-NEXT:  Cost Model: Found an estimated cost of 16 for instruction: %xa32 = sext <32 x i8> %a32 to <32 x i64>
199; SLM-NEXT:  Cost Model: Found an estimated cost of 16 for instruction: %xb32 = sext <32 x i8> %b32 to <32 x i64>
200; SLM-NEXT:  Cost Model: Found an estimated cost of 32 for instruction: %xa64 = sext <64 x i8> %a64 to <64 x i64>
201; SLM-NEXT:  Cost Model: Found an estimated cost of 32 for instruction: %xb64 = sext <64 x i8> %b64 to <64 x i64>
202; SLM-NEXT:  Cost Model: Found an estimated cost of 17 for instruction: %res2 = mul <2 x i64> %xa2, %xb2
203; SLM-NEXT:  Cost Model: Found an estimated cost of 34 for instruction: %res4 = mul <4 x i64> %xa4, %xb4
204; SLM-NEXT:  Cost Model: Found an estimated cost of 68 for instruction: %res8 = mul <8 x i64> %xa8, %xb8
205; SLM-NEXT:  Cost Model: Found an estimated cost of 136 for instruction: %res16 = mul <16 x i64> %xa16, %xb16
206; SLM-NEXT:  Cost Model: Found an estimated cost of 272 for instruction: %res32 = mul <32 x i64> %xa32, %xb32
207; SLM-NEXT:  Cost Model: Found an estimated cost of 544 for instruction: %res64 = mul <64 x i64> %xa64, %xb64
208; SLM-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret void
209;
210; GLM-LABEL: 'mul_sext_vXi8'
211; GLM-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xa2 = sext <2 x i8> %a2 to <2 x i64>
212; GLM-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xb2 = sext <2 x i8> %b2 to <2 x i64>
213; GLM-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %xa4 = sext <4 x i8> %a4 to <4 x i64>
214; GLM-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %xb4 = sext <4 x i8> %b4 to <4 x i64>
215; GLM-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %xa8 = sext <8 x i8> %a8 to <8 x i64>
216; GLM-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %xb8 = sext <8 x i8> %b8 to <8 x i64>
217; GLM-NEXT:  Cost Model: Found an estimated cost of 8 for instruction: %xa16 = sext <16 x i8> %a16 to <16 x i64>
218; GLM-NEXT:  Cost Model: Found an estimated cost of 8 for instruction: %xb16 = sext <16 x i8> %b16 to <16 x i64>
219; GLM-NEXT:  Cost Model: Found an estimated cost of 16 for instruction: %xa32 = sext <32 x i8> %a32 to <32 x i64>
220; GLM-NEXT:  Cost Model: Found an estimated cost of 16 for instruction: %xb32 = sext <32 x i8> %b32 to <32 x i64>
221; GLM-NEXT:  Cost Model: Found an estimated cost of 32 for instruction: %xa64 = sext <64 x i8> %a64 to <64 x i64>
222; GLM-NEXT:  Cost Model: Found an estimated cost of 32 for instruction: %xb64 = sext <64 x i8> %b64 to <64 x i64>
223; GLM-NEXT:  Cost Model: Found an estimated cost of 6 for instruction: %res2 = mul <2 x i64> %xa2, %xb2
224; GLM-NEXT:  Cost Model: Found an estimated cost of 12 for instruction: %res4 = mul <4 x i64> %xa4, %xb4
225; GLM-NEXT:  Cost Model: Found an estimated cost of 24 for instruction: %res8 = mul <8 x i64> %xa8, %xb8
226; GLM-NEXT:  Cost Model: Found an estimated cost of 48 for instruction: %res16 = mul <16 x i64> %xa16, %xb16
227; GLM-NEXT:  Cost Model: Found an estimated cost of 96 for instruction: %res32 = mul <32 x i64> %xa32, %xb32
228; GLM-NEXT:  Cost Model: Found an estimated cost of 192 for instruction: %res64 = mul <64 x i64> %xa64, %xb64
229; GLM-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret void
230;
231  %xa2 = sext <2 x i8> %a2 to <2 x i64>
232  %xb2 = sext <2 x i8> %b2 to <2 x i64>
233  %xa4 = sext <4 x i8> %a4 to <4 x i64>
234  %xb4 = sext <4 x i8> %b4 to <4 x i64>
235  %xa8 = sext <8 x i8> %a8 to <8 x i64>
236  %xb8 = sext <8 x i8> %b8 to <8 x i64>
237  %xa16 = sext <16 x i8> %a16 to <16 x i64>
238  %xb16 = sext <16 x i8> %b16 to <16 x i64>
239  %xa32 = sext <32 x i8> %a32 to <32 x i64>
240  %xb32 = sext <32 x i8> %b32 to <32 x i64>
241  %xa64 = sext <64 x i8> %a64 to <64 x i64>
242  %xb64 = sext <64 x i8> %b64 to <64 x i64>
243  %res2 = mul <2 x i64> %xa2, %xb2
244  %res4 = mul <4 x i64> %xa4, %xb4
245  %res8 = mul <8 x i64> %xa8, %xb8
246  %res16 = mul <16 x i64> %xa16, %xb16
247  %res32 = mul <32 x i64> %xa32, %xb32
248  %res64 = mul <64 x i64> %xa64, %xb64
249  ret void
250}
251
252define void @mul_zext_vXi8(<2 x i8> %a2, <2 x i8> %b2, <4 x i8> %a4, <4 x i8> %b4, <8 x i8> %a8, <8 x i8> %b8, <16 x i8> %a16, <16 x i8> %b16, <32 x i8> %a32, <32 x i8> %b32, <64 x i8> %a64, <64 x i8> %b64)  {
253; SSE2-LABEL: 'mul_zext_vXi8'
254; SSE2-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %xa2 = zext <2 x i8> %a2 to <2 x i64>
255; SSE2-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %xb2 = zext <2 x i8> %b2 to <2 x i64>
256; SSE2-NEXT:  Cost Model: Found an estimated cost of 8 for instruction: %xa4 = zext <4 x i8> %a4 to <4 x i64>
257; SSE2-NEXT:  Cost Model: Found an estimated cost of 8 for instruction: %xb4 = zext <4 x i8> %b4 to <4 x i64>
258; SSE2-NEXT:  Cost Model: Found an estimated cost of 16 for instruction: %xa8 = zext <8 x i8> %a8 to <8 x i64>
259; SSE2-NEXT:  Cost Model: Found an estimated cost of 16 for instruction: %xb8 = zext <8 x i8> %b8 to <8 x i64>
260; SSE2-NEXT:  Cost Model: Found an estimated cost of 32 for instruction: %xa16 = zext <16 x i8> %a16 to <16 x i64>
261; SSE2-NEXT:  Cost Model: Found an estimated cost of 32 for instruction: %xb16 = zext <16 x i8> %b16 to <16 x i64>
262; SSE2-NEXT:  Cost Model: Found an estimated cost of 64 for instruction: %xa32 = zext <32 x i8> %a32 to <32 x i64>
263; SSE2-NEXT:  Cost Model: Found an estimated cost of 64 for instruction: %xb32 = zext <32 x i8> %b32 to <32 x i64>
264; SSE2-NEXT:  Cost Model: Found an estimated cost of 128 for instruction: %xa64 = zext <64 x i8> %a64 to <64 x i64>
265; SSE2-NEXT:  Cost Model: Found an estimated cost of 128 for instruction: %xb64 = zext <64 x i8> %b64 to <64 x i64>
266; SSE2-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %res2 = mul <2 x i64> %xa2, %xb2
267; SSE2-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %res4 = mul <4 x i64> %xa4, %xb4
268; SSE2-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %res8 = mul <8 x i64> %xa8, %xb8
269; SSE2-NEXT:  Cost Model: Found an estimated cost of 8 for instruction: %res16 = mul <16 x i64> %xa16, %xb16
270; SSE2-NEXT:  Cost Model: Found an estimated cost of 16 for instruction: %res32 = mul <32 x i64> %xa32, %xb32
271; SSE2-NEXT:  Cost Model: Found an estimated cost of 32 for instruction: %res64 = mul <64 x i64> %xa64, %xb64
272; SSE2-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret void
273;
274; SSSE3-LABEL: 'mul_zext_vXi8'
275; SSSE3-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %xa2 = zext <2 x i8> %a2 to <2 x i64>
276; SSSE3-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %xb2 = zext <2 x i8> %b2 to <2 x i64>
277; SSSE3-NEXT:  Cost Model: Found an estimated cost of 8 for instruction: %xa4 = zext <4 x i8> %a4 to <4 x i64>
278; SSSE3-NEXT:  Cost Model: Found an estimated cost of 8 for instruction: %xb4 = zext <4 x i8> %b4 to <4 x i64>
279; SSSE3-NEXT:  Cost Model: Found an estimated cost of 16 for instruction: %xa8 = zext <8 x i8> %a8 to <8 x i64>
280; SSSE3-NEXT:  Cost Model: Found an estimated cost of 16 for instruction: %xb8 = zext <8 x i8> %b8 to <8 x i64>
281; SSSE3-NEXT:  Cost Model: Found an estimated cost of 32 for instruction: %xa16 = zext <16 x i8> %a16 to <16 x i64>
282; SSSE3-NEXT:  Cost Model: Found an estimated cost of 32 for instruction: %xb16 = zext <16 x i8> %b16 to <16 x i64>
283; SSSE3-NEXT:  Cost Model: Found an estimated cost of 64 for instruction: %xa32 = zext <32 x i8> %a32 to <32 x i64>
284; SSSE3-NEXT:  Cost Model: Found an estimated cost of 64 for instruction: %xb32 = zext <32 x i8> %b32 to <32 x i64>
285; SSSE3-NEXT:  Cost Model: Found an estimated cost of 128 for instruction: %xa64 = zext <64 x i8> %a64 to <64 x i64>
286; SSSE3-NEXT:  Cost Model: Found an estimated cost of 128 for instruction: %xb64 = zext <64 x i8> %b64 to <64 x i64>
287; SSSE3-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %res2 = mul <2 x i64> %xa2, %xb2
288; SSSE3-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %res4 = mul <4 x i64> %xa4, %xb4
289; SSSE3-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %res8 = mul <8 x i64> %xa8, %xb8
290; SSSE3-NEXT:  Cost Model: Found an estimated cost of 8 for instruction: %res16 = mul <16 x i64> %xa16, %xb16
291; SSSE3-NEXT:  Cost Model: Found an estimated cost of 16 for instruction: %res32 = mul <32 x i64> %xa32, %xb32
292; SSSE3-NEXT:  Cost Model: Found an estimated cost of 32 for instruction: %res64 = mul <64 x i64> %xa64, %xb64
293; SSSE3-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret void
294;
295; SSE42-LABEL: 'mul_zext_vXi8'
296; SSE42-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xa2 = zext <2 x i8> %a2 to <2 x i64>
297; SSE42-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xb2 = zext <2 x i8> %b2 to <2 x i64>
298; SSE42-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %xa4 = zext <4 x i8> %a4 to <4 x i64>
299; SSE42-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %xb4 = zext <4 x i8> %b4 to <4 x i64>
300; SSE42-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %xa8 = zext <8 x i8> %a8 to <8 x i64>
301; SSE42-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %xb8 = zext <8 x i8> %b8 to <8 x i64>
302; SSE42-NEXT:  Cost Model: Found an estimated cost of 8 for instruction: %xa16 = zext <16 x i8> %a16 to <16 x i64>
303; SSE42-NEXT:  Cost Model: Found an estimated cost of 8 for instruction: %xb16 = zext <16 x i8> %b16 to <16 x i64>
304; SSE42-NEXT:  Cost Model: Found an estimated cost of 16 for instruction: %xa32 = zext <32 x i8> %a32 to <32 x i64>
305; SSE42-NEXT:  Cost Model: Found an estimated cost of 16 for instruction: %xb32 = zext <32 x i8> %b32 to <32 x i64>
306; SSE42-NEXT:  Cost Model: Found an estimated cost of 32 for instruction: %xa64 = zext <64 x i8> %a64 to <64 x i64>
307; SSE42-NEXT:  Cost Model: Found an estimated cost of 32 for instruction: %xb64 = zext <64 x i8> %b64 to <64 x i64>
308; SSE42-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %res2 = mul <2 x i64> %xa2, %xb2
309; SSE42-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %res4 = mul <4 x i64> %xa4, %xb4
310; SSE42-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %res8 = mul <8 x i64> %xa8, %xb8
311; SSE42-NEXT:  Cost Model: Found an estimated cost of 8 for instruction: %res16 = mul <16 x i64> %xa16, %xb16
312; SSE42-NEXT:  Cost Model: Found an estimated cost of 16 for instruction: %res32 = mul <32 x i64> %xa32, %xb32
313; SSE42-NEXT:  Cost Model: Found an estimated cost of 32 for instruction: %res64 = mul <64 x i64> %xa64, %xb64
314; SSE42-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret void
315;
316; AVX1-LABEL: 'mul_zext_vXi8'
317; AVX1-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xa2 = zext <2 x i8> %a2 to <2 x i64>
318; AVX1-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xb2 = zext <2 x i8> %b2 to <2 x i64>
319; AVX1-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %xa4 = zext <4 x i8> %a4 to <4 x i64>
320; AVX1-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %xb4 = zext <4 x i8> %b4 to <4 x i64>
321; AVX1-NEXT:  Cost Model: Found an estimated cost of 6 for instruction: %xa8 = zext <8 x i8> %a8 to <8 x i64>
322; AVX1-NEXT:  Cost Model: Found an estimated cost of 6 for instruction: %xb8 = zext <8 x i8> %b8 to <8 x i64>
323; AVX1-NEXT:  Cost Model: Found an estimated cost of 12 for instruction: %xa16 = zext <16 x i8> %a16 to <16 x i64>
324; AVX1-NEXT:  Cost Model: Found an estimated cost of 12 for instruction: %xb16 = zext <16 x i8> %b16 to <16 x i64>
325; AVX1-NEXT:  Cost Model: Found an estimated cost of 25 for instruction: %xa32 = zext <32 x i8> %a32 to <32 x i64>
326; AVX1-NEXT:  Cost Model: Found an estimated cost of 25 for instruction: %xb32 = zext <32 x i8> %b32 to <32 x i64>
327; AVX1-NEXT:  Cost Model: Found an estimated cost of 50 for instruction: %xa64 = zext <64 x i8> %a64 to <64 x i64>
328; AVX1-NEXT:  Cost Model: Found an estimated cost of 50 for instruction: %xb64 = zext <64 x i8> %b64 to <64 x i64>
329; AVX1-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %res2 = mul <2 x i64> %xa2, %xb2
330; AVX1-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %res4 = mul <4 x i64> %xa4, %xb4
331; AVX1-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %res8 = mul <8 x i64> %xa8, %xb8
332; AVX1-NEXT:  Cost Model: Found an estimated cost of 8 for instruction: %res16 = mul <16 x i64> %xa16, %xb16
333; AVX1-NEXT:  Cost Model: Found an estimated cost of 16 for instruction: %res32 = mul <32 x i64> %xa32, %xb32
334; AVX1-NEXT:  Cost Model: Found an estimated cost of 32 for instruction: %res64 = mul <64 x i64> %xa64, %xb64
335; AVX1-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret void
336;
337; AVX2-LABEL: 'mul_zext_vXi8'
338; AVX2-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xa2 = zext <2 x i8> %a2 to <2 x i64>
339; AVX2-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xb2 = zext <2 x i8> %b2 to <2 x i64>
340; AVX2-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %xa4 = zext <4 x i8> %a4 to <4 x i64>
341; AVX2-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %xb4 = zext <4 x i8> %b4 to <4 x i64>
342; AVX2-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %xa8 = zext <8 x i8> %a8 to <8 x i64>
343; AVX2-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %xb8 = zext <8 x i8> %b8 to <8 x i64>
344; AVX2-NEXT:  Cost Model: Found an estimated cost of 8 for instruction: %xa16 = zext <16 x i8> %a16 to <16 x i64>
345; AVX2-NEXT:  Cost Model: Found an estimated cost of 8 for instruction: %xb16 = zext <16 x i8> %b16 to <16 x i64>
346; AVX2-NEXT:  Cost Model: Found an estimated cost of 17 for instruction: %xa32 = zext <32 x i8> %a32 to <32 x i64>
347; AVX2-NEXT:  Cost Model: Found an estimated cost of 17 for instruction: %xb32 = zext <32 x i8> %b32 to <32 x i64>
348; AVX2-NEXT:  Cost Model: Found an estimated cost of 34 for instruction: %xa64 = zext <64 x i8> %a64 to <64 x i64>
349; AVX2-NEXT:  Cost Model: Found an estimated cost of 34 for instruction: %xb64 = zext <64 x i8> %b64 to <64 x i64>
350; AVX2-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %res2 = mul <2 x i64> %xa2, %xb2
351; AVX2-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %res4 = mul <4 x i64> %xa4, %xb4
352; AVX2-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %res8 = mul <8 x i64> %xa8, %xb8
353; AVX2-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %res16 = mul <16 x i64> %xa16, %xb16
354; AVX2-NEXT:  Cost Model: Found an estimated cost of 8 for instruction: %res32 = mul <32 x i64> %xa32, %xb32
355; AVX2-NEXT:  Cost Model: Found an estimated cost of 16 for instruction: %res64 = mul <64 x i64> %xa64, %xb64
356; AVX2-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret void
357;
358; AVX512-LABEL: 'mul_zext_vXi8'
359; AVX512-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xa2 = zext <2 x i8> %a2 to <2 x i64>
360; AVX512-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xb2 = zext <2 x i8> %b2 to <2 x i64>
361; AVX512-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xa4 = zext <4 x i8> %a4 to <4 x i64>
362; AVX512-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xb4 = zext <4 x i8> %b4 to <4 x i64>
363; AVX512-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xa8 = zext <8 x i8> %a8 to <8 x i64>
364; AVX512-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xb8 = zext <8 x i8> %b8 to <8 x i64>
365; AVX512-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %xa16 = zext <16 x i8> %a16 to <16 x i64>
366; AVX512-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %xb16 = zext <16 x i8> %b16 to <16 x i64>
367; AVX512-NEXT:  Cost Model: Found an estimated cost of 7 for instruction: %xa32 = zext <32 x i8> %a32 to <32 x i64>
368; AVX512-NEXT:  Cost Model: Found an estimated cost of 7 for instruction: %xb32 = zext <32 x i8> %b32 to <32 x i64>
369; AVX512-NEXT:  Cost Model: Found an estimated cost of 15 for instruction: %xa64 = zext <64 x i8> %a64 to <64 x i64>
370; AVX512-NEXT:  Cost Model: Found an estimated cost of 15 for instruction: %xb64 = zext <64 x i8> %b64 to <64 x i64>
371; AVX512-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %res2 = mul <2 x i64> %xa2, %xb2
372; AVX512-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %res4 = mul <4 x i64> %xa4, %xb4
373; AVX512-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %res8 = mul <8 x i64> %xa8, %xb8
374; AVX512-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %res16 = mul <16 x i64> %xa16, %xb16
375; AVX512-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %res32 = mul <32 x i64> %xa32, %xb32
376; AVX512-NEXT:  Cost Model: Found an estimated cost of 8 for instruction: %res64 = mul <64 x i64> %xa64, %xb64
377; AVX512-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret void
378;
379; SLM-LABEL: 'mul_zext_vXi8'
380; SLM-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xa2 = zext <2 x i8> %a2 to <2 x i64>
381; SLM-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xb2 = zext <2 x i8> %b2 to <2 x i64>
382; SLM-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %xa4 = zext <4 x i8> %a4 to <4 x i64>
383; SLM-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %xb4 = zext <4 x i8> %b4 to <4 x i64>
384; SLM-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %xa8 = zext <8 x i8> %a8 to <8 x i64>
385; SLM-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %xb8 = zext <8 x i8> %b8 to <8 x i64>
386; SLM-NEXT:  Cost Model: Found an estimated cost of 8 for instruction: %xa16 = zext <16 x i8> %a16 to <16 x i64>
387; SLM-NEXT:  Cost Model: Found an estimated cost of 8 for instruction: %xb16 = zext <16 x i8> %b16 to <16 x i64>
388; SLM-NEXT:  Cost Model: Found an estimated cost of 16 for instruction: %xa32 = zext <32 x i8> %a32 to <32 x i64>
389; SLM-NEXT:  Cost Model: Found an estimated cost of 16 for instruction: %xb32 = zext <32 x i8> %b32 to <32 x i64>
390; SLM-NEXT:  Cost Model: Found an estimated cost of 32 for instruction: %xa64 = zext <64 x i8> %a64 to <64 x i64>
391; SLM-NEXT:  Cost Model: Found an estimated cost of 32 for instruction: %xb64 = zext <64 x i8> %b64 to <64 x i64>
392; SLM-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %res2 = mul <2 x i64> %xa2, %xb2
393; SLM-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %res4 = mul <4 x i64> %xa4, %xb4
394; SLM-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %res8 = mul <8 x i64> %xa8, %xb8
395; SLM-NEXT:  Cost Model: Found an estimated cost of 8 for instruction: %res16 = mul <16 x i64> %xa16, %xb16
396; SLM-NEXT:  Cost Model: Found an estimated cost of 16 for instruction: %res32 = mul <32 x i64> %xa32, %xb32
397; SLM-NEXT:  Cost Model: Found an estimated cost of 32 for instruction: %res64 = mul <64 x i64> %xa64, %xb64
398; SLM-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret void
399;
400; GLM-LABEL: 'mul_zext_vXi8'
401; GLM-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xa2 = zext <2 x i8> %a2 to <2 x i64>
402; GLM-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xb2 = zext <2 x i8> %b2 to <2 x i64>
403; GLM-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %xa4 = zext <4 x i8> %a4 to <4 x i64>
404; GLM-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %xb4 = zext <4 x i8> %b4 to <4 x i64>
405; GLM-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %xa8 = zext <8 x i8> %a8 to <8 x i64>
406; GLM-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %xb8 = zext <8 x i8> %b8 to <8 x i64>
407; GLM-NEXT:  Cost Model: Found an estimated cost of 8 for instruction: %xa16 = zext <16 x i8> %a16 to <16 x i64>
408; GLM-NEXT:  Cost Model: Found an estimated cost of 8 for instruction: %xb16 = zext <16 x i8> %b16 to <16 x i64>
409; GLM-NEXT:  Cost Model: Found an estimated cost of 16 for instruction: %xa32 = zext <32 x i8> %a32 to <32 x i64>
410; GLM-NEXT:  Cost Model: Found an estimated cost of 16 for instruction: %xb32 = zext <32 x i8> %b32 to <32 x i64>
411; GLM-NEXT:  Cost Model: Found an estimated cost of 32 for instruction: %xa64 = zext <64 x i8> %a64 to <64 x i64>
412; GLM-NEXT:  Cost Model: Found an estimated cost of 32 for instruction: %xb64 = zext <64 x i8> %b64 to <64 x i64>
413; GLM-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %res2 = mul <2 x i64> %xa2, %xb2
414; GLM-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %res4 = mul <4 x i64> %xa4, %xb4
415; GLM-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %res8 = mul <8 x i64> %xa8, %xb8
416; GLM-NEXT:  Cost Model: Found an estimated cost of 8 for instruction: %res16 = mul <16 x i64> %xa16, %xb16
417; GLM-NEXT:  Cost Model: Found an estimated cost of 16 for instruction: %res32 = mul <32 x i64> %xa32, %xb32
418; GLM-NEXT:  Cost Model: Found an estimated cost of 32 for instruction: %res64 = mul <64 x i64> %xa64, %xb64
419; GLM-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret void
420;
421  %xa2 = zext <2 x i8> %a2 to <2 x i64>
422  %xb2 = zext <2 x i8> %b2 to <2 x i64>
423  %xa4 = zext <4 x i8> %a4 to <4 x i64>
424  %xb4 = zext <4 x i8> %b4 to <4 x i64>
425  %xa8 = zext <8 x i8> %a8 to <8 x i64>
426  %xb8 = zext <8 x i8> %b8 to <8 x i64>
427  %xa16 = zext <16 x i8> %a16 to <16 x i64>
428  %xb16 = zext <16 x i8> %b16 to <16 x i64>
429  %xa32 = zext <32 x i8> %a32 to <32 x i64>
430  %xb32 = zext <32 x i8> %b32 to <32 x i64>
431  %xa64 = zext <64 x i8> %a64 to <64 x i64>
432  %xb64 = zext <64 x i8> %b64 to <64 x i64>
433  %res2 = mul <2 x i64> %xa2, %xb2
434  %res4 = mul <4 x i64> %xa4, %xb4
435  %res8 = mul <8 x i64> %xa8, %xb8
436  %res16 = mul <16 x i64> %xa16, %xb16
437  %res32 = mul <32 x i64> %xa32, %xb32
438  %res64 = mul <64 x i64> %xa64, %xb64
439  ret void
440}
441
442define void @mul_sext_zext_vXi8(<2 x i8> %a2, <2 x i8> %b2, <4 x i8> %a4, <4 x i8> %b4, <8 x i8> %a8, <8 x i8> %b8, <16 x i8> %a16, <16 x i8> %b16, <32 x i8> %a32, <32 x i8> %b32, <64 x i8> %a64, <64 x i8> %b64)  {
443; SSE2-LABEL: 'mul_sext_zext_vXi8'
444; SSE2-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %xa2 = sext <2 x i8> %a2 to <2 x i64>
445; SSE2-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %xb2 = zext <2 x i8> %b2 to <2 x i64>
446; SSE2-NEXT:  Cost Model: Found an estimated cost of 8 for instruction: %xa4 = sext <4 x i8> %a4 to <4 x i64>
447; SSE2-NEXT:  Cost Model: Found an estimated cost of 8 for instruction: %xb4 = zext <4 x i8> %b4 to <4 x i64>
448; SSE2-NEXT:  Cost Model: Found an estimated cost of 16 for instruction: %xa8 = sext <8 x i8> %a8 to <8 x i64>
449; SSE2-NEXT:  Cost Model: Found an estimated cost of 16 for instruction: %xb8 = zext <8 x i8> %b8 to <8 x i64>
450; SSE2-NEXT:  Cost Model: Found an estimated cost of 32 for instruction: %xa16 = sext <16 x i8> %a16 to <16 x i64>
451; SSE2-NEXT:  Cost Model: Found an estimated cost of 32 for instruction: %xb16 = zext <16 x i8> %b16 to <16 x i64>
452; SSE2-NEXT:  Cost Model: Found an estimated cost of 64 for instruction: %xa32 = sext <32 x i8> %a32 to <32 x i64>
453; SSE2-NEXT:  Cost Model: Found an estimated cost of 64 for instruction: %xb32 = zext <32 x i8> %b32 to <32 x i64>
454; SSE2-NEXT:  Cost Model: Found an estimated cost of 128 for instruction: %xa64 = sext <64 x i8> %a64 to <64 x i64>
455; SSE2-NEXT:  Cost Model: Found an estimated cost of 128 for instruction: %xb64 = zext <64 x i8> %b64 to <64 x i64>
456; SSE2-NEXT:  Cost Model: Found an estimated cost of 7 for instruction: %res2 = mul <2 x i64> %xa2, %xb2
457; SSE2-NEXT:  Cost Model: Found an estimated cost of 14 for instruction: %res4 = mul <4 x i64> %xa4, %xb4
458; SSE2-NEXT:  Cost Model: Found an estimated cost of 28 for instruction: %res8 = mul <8 x i64> %xa8, %xb8
459; SSE2-NEXT:  Cost Model: Found an estimated cost of 56 for instruction: %res16 = mul <16 x i64> %xa16, %xb16
460; SSE2-NEXT:  Cost Model: Found an estimated cost of 112 for instruction: %res32 = mul <32 x i64> %xa32, %xb32
461; SSE2-NEXT:  Cost Model: Found an estimated cost of 224 for instruction: %res64 = mul <64 x i64> %xa64, %xb64
462; SSE2-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret void
463;
464; SSSE3-LABEL: 'mul_sext_zext_vXi8'
465; SSSE3-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %xa2 = sext <2 x i8> %a2 to <2 x i64>
466; SSSE3-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %xb2 = zext <2 x i8> %b2 to <2 x i64>
467; SSSE3-NEXT:  Cost Model: Found an estimated cost of 8 for instruction: %xa4 = sext <4 x i8> %a4 to <4 x i64>
468; SSSE3-NEXT:  Cost Model: Found an estimated cost of 8 for instruction: %xb4 = zext <4 x i8> %b4 to <4 x i64>
469; SSSE3-NEXT:  Cost Model: Found an estimated cost of 16 for instruction: %xa8 = sext <8 x i8> %a8 to <8 x i64>
470; SSSE3-NEXT:  Cost Model: Found an estimated cost of 16 for instruction: %xb8 = zext <8 x i8> %b8 to <8 x i64>
471; SSSE3-NEXT:  Cost Model: Found an estimated cost of 32 for instruction: %xa16 = sext <16 x i8> %a16 to <16 x i64>
472; SSSE3-NEXT:  Cost Model: Found an estimated cost of 32 for instruction: %xb16 = zext <16 x i8> %b16 to <16 x i64>
473; SSSE3-NEXT:  Cost Model: Found an estimated cost of 64 for instruction: %xa32 = sext <32 x i8> %a32 to <32 x i64>
474; SSSE3-NEXT:  Cost Model: Found an estimated cost of 64 for instruction: %xb32 = zext <32 x i8> %b32 to <32 x i64>
475; SSSE3-NEXT:  Cost Model: Found an estimated cost of 128 for instruction: %xa64 = sext <64 x i8> %a64 to <64 x i64>
476; SSSE3-NEXT:  Cost Model: Found an estimated cost of 128 for instruction: %xb64 = zext <64 x i8> %b64 to <64 x i64>
477; SSSE3-NEXT:  Cost Model: Found an estimated cost of 7 for instruction: %res2 = mul <2 x i64> %xa2, %xb2
478; SSSE3-NEXT:  Cost Model: Found an estimated cost of 14 for instruction: %res4 = mul <4 x i64> %xa4, %xb4
479; SSSE3-NEXT:  Cost Model: Found an estimated cost of 28 for instruction: %res8 = mul <8 x i64> %xa8, %xb8
480; SSSE3-NEXT:  Cost Model: Found an estimated cost of 56 for instruction: %res16 = mul <16 x i64> %xa16, %xb16
481; SSSE3-NEXT:  Cost Model: Found an estimated cost of 112 for instruction: %res32 = mul <32 x i64> %xa32, %xb32
482; SSSE3-NEXT:  Cost Model: Found an estimated cost of 224 for instruction: %res64 = mul <64 x i64> %xa64, %xb64
483; SSSE3-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret void
484;
485; SSE42-LABEL: 'mul_sext_zext_vXi8'
486; SSE42-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xa2 = sext <2 x i8> %a2 to <2 x i64>
487; SSE42-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xb2 = zext <2 x i8> %b2 to <2 x i64>
488; SSE42-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %xa4 = sext <4 x i8> %a4 to <4 x i64>
489; SSE42-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %xb4 = zext <4 x i8> %b4 to <4 x i64>
490; SSE42-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %xa8 = sext <8 x i8> %a8 to <8 x i64>
491; SSE42-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %xb8 = zext <8 x i8> %b8 to <8 x i64>
492; SSE42-NEXT:  Cost Model: Found an estimated cost of 8 for instruction: %xa16 = sext <16 x i8> %a16 to <16 x i64>
493; SSE42-NEXT:  Cost Model: Found an estimated cost of 8 for instruction: %xb16 = zext <16 x i8> %b16 to <16 x i64>
494; SSE42-NEXT:  Cost Model: Found an estimated cost of 16 for instruction: %xa32 = sext <32 x i8> %a32 to <32 x i64>
495; SSE42-NEXT:  Cost Model: Found an estimated cost of 16 for instruction: %xb32 = zext <32 x i8> %b32 to <32 x i64>
496; SSE42-NEXT:  Cost Model: Found an estimated cost of 32 for instruction: %xa64 = sext <64 x i8> %a64 to <64 x i64>
497; SSE42-NEXT:  Cost Model: Found an estimated cost of 32 for instruction: %xb64 = zext <64 x i8> %b64 to <64 x i64>
498; SSE42-NEXT:  Cost Model: Found an estimated cost of 6 for instruction: %res2 = mul <2 x i64> %xa2, %xb2
499; SSE42-NEXT:  Cost Model: Found an estimated cost of 12 for instruction: %res4 = mul <4 x i64> %xa4, %xb4
500; SSE42-NEXT:  Cost Model: Found an estimated cost of 24 for instruction: %res8 = mul <8 x i64> %xa8, %xb8
501; SSE42-NEXT:  Cost Model: Found an estimated cost of 48 for instruction: %res16 = mul <16 x i64> %xa16, %xb16
502; SSE42-NEXT:  Cost Model: Found an estimated cost of 96 for instruction: %res32 = mul <32 x i64> %xa32, %xb32
503; SSE42-NEXT:  Cost Model: Found an estimated cost of 192 for instruction: %res64 = mul <64 x i64> %xa64, %xb64
504; SSE42-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret void
505;
506; AVX1-LABEL: 'mul_sext_zext_vXi8'
507; AVX1-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xa2 = sext <2 x i8> %a2 to <2 x i64>
508; AVX1-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xb2 = zext <2 x i8> %b2 to <2 x i64>
509; AVX1-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %xa4 = sext <4 x i8> %a4 to <4 x i64>
510; AVX1-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %xb4 = zext <4 x i8> %b4 to <4 x i64>
511; AVX1-NEXT:  Cost Model: Found an estimated cost of 6 for instruction: %xa8 = sext <8 x i8> %a8 to <8 x i64>
512; AVX1-NEXT:  Cost Model: Found an estimated cost of 6 for instruction: %xb8 = zext <8 x i8> %b8 to <8 x i64>
513; AVX1-NEXT:  Cost Model: Found an estimated cost of 12 for instruction: %xa16 = sext <16 x i8> %a16 to <16 x i64>
514; AVX1-NEXT:  Cost Model: Found an estimated cost of 12 for instruction: %xb16 = zext <16 x i8> %b16 to <16 x i64>
515; AVX1-NEXT:  Cost Model: Found an estimated cost of 25 for instruction: %xa32 = sext <32 x i8> %a32 to <32 x i64>
516; AVX1-NEXT:  Cost Model: Found an estimated cost of 25 for instruction: %xb32 = zext <32 x i8> %b32 to <32 x i64>
517; AVX1-NEXT:  Cost Model: Found an estimated cost of 50 for instruction: %xa64 = sext <64 x i8> %a64 to <64 x i64>
518; AVX1-NEXT:  Cost Model: Found an estimated cost of 50 for instruction: %xb64 = zext <64 x i8> %b64 to <64 x i64>
519; AVX1-NEXT:  Cost Model: Found an estimated cost of 6 for instruction: %res2 = mul <2 x i64> %xa2, %xb2
520; AVX1-NEXT:  Cost Model: Found an estimated cost of 12 for instruction: %res4 = mul <4 x i64> %xa4, %xb4
521; AVX1-NEXT:  Cost Model: Found an estimated cost of 24 for instruction: %res8 = mul <8 x i64> %xa8, %xb8
522; AVX1-NEXT:  Cost Model: Found an estimated cost of 48 for instruction: %res16 = mul <16 x i64> %xa16, %xb16
523; AVX1-NEXT:  Cost Model: Found an estimated cost of 96 for instruction: %res32 = mul <32 x i64> %xa32, %xb32
524; AVX1-NEXT:  Cost Model: Found an estimated cost of 192 for instruction: %res64 = mul <64 x i64> %xa64, %xb64
525; AVX1-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret void
526;
527; AVX2-LABEL: 'mul_sext_zext_vXi8'
528; AVX2-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xa2 = sext <2 x i8> %a2 to <2 x i64>
529; AVX2-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xb2 = zext <2 x i8> %b2 to <2 x i64>
530; AVX2-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %xa4 = sext <4 x i8> %a4 to <4 x i64>
531; AVX2-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %xb4 = zext <4 x i8> %b4 to <4 x i64>
532; AVX2-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %xa8 = sext <8 x i8> %a8 to <8 x i64>
533; AVX2-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %xb8 = zext <8 x i8> %b8 to <8 x i64>
534; AVX2-NEXT:  Cost Model: Found an estimated cost of 8 for instruction: %xa16 = sext <16 x i8> %a16 to <16 x i64>
535; AVX2-NEXT:  Cost Model: Found an estimated cost of 8 for instruction: %xb16 = zext <16 x i8> %b16 to <16 x i64>
536; AVX2-NEXT:  Cost Model: Found an estimated cost of 17 for instruction: %xa32 = sext <32 x i8> %a32 to <32 x i64>
537; AVX2-NEXT:  Cost Model: Found an estimated cost of 17 for instruction: %xb32 = zext <32 x i8> %b32 to <32 x i64>
538; AVX2-NEXT:  Cost Model: Found an estimated cost of 34 for instruction: %xa64 = sext <64 x i8> %a64 to <64 x i64>
539; AVX2-NEXT:  Cost Model: Found an estimated cost of 34 for instruction: %xb64 = zext <64 x i8> %b64 to <64 x i64>
540; AVX2-NEXT:  Cost Model: Found an estimated cost of 6 for instruction: %res2 = mul <2 x i64> %xa2, %xb2
541; AVX2-NEXT:  Cost Model: Found an estimated cost of 6 for instruction: %res4 = mul <4 x i64> %xa4, %xb4
542; AVX2-NEXT:  Cost Model: Found an estimated cost of 12 for instruction: %res8 = mul <8 x i64> %xa8, %xb8
543; AVX2-NEXT:  Cost Model: Found an estimated cost of 24 for instruction: %res16 = mul <16 x i64> %xa16, %xb16
544; AVX2-NEXT:  Cost Model: Found an estimated cost of 48 for instruction: %res32 = mul <32 x i64> %xa32, %xb32
545; AVX2-NEXT:  Cost Model: Found an estimated cost of 96 for instruction: %res64 = mul <64 x i64> %xa64, %xb64
546; AVX2-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret void
547;
548; AVX512F-LABEL: 'mul_sext_zext_vXi8'
549; AVX512F-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xa2 = sext <2 x i8> %a2 to <2 x i64>
550; AVX512F-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xb2 = zext <2 x i8> %b2 to <2 x i64>
551; AVX512F-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xa4 = sext <4 x i8> %a4 to <4 x i64>
552; AVX512F-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xb4 = zext <4 x i8> %b4 to <4 x i64>
553; AVX512F-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xa8 = sext <8 x i8> %a8 to <8 x i64>
554; AVX512F-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xb8 = zext <8 x i8> %b8 to <8 x i64>
555; AVX512F-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %xa16 = sext <16 x i8> %a16 to <16 x i64>
556; AVX512F-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %xb16 = zext <16 x i8> %b16 to <16 x i64>
557; AVX512F-NEXT:  Cost Model: Found an estimated cost of 7 for instruction: %xa32 = sext <32 x i8> %a32 to <32 x i64>
558; AVX512F-NEXT:  Cost Model: Found an estimated cost of 7 for instruction: %xb32 = zext <32 x i8> %b32 to <32 x i64>
559; AVX512F-NEXT:  Cost Model: Found an estimated cost of 15 for instruction: %xa64 = sext <64 x i8> %a64 to <64 x i64>
560; AVX512F-NEXT:  Cost Model: Found an estimated cost of 15 for instruction: %xb64 = zext <64 x i8> %b64 to <64 x i64>
561; AVX512F-NEXT:  Cost Model: Found an estimated cost of 6 for instruction: %res2 = mul <2 x i64> %xa2, %xb2
562; AVX512F-NEXT:  Cost Model: Found an estimated cost of 6 for instruction: %res4 = mul <4 x i64> %xa4, %xb4
563; AVX512F-NEXT:  Cost Model: Found an estimated cost of 6 for instruction: %res8 = mul <8 x i64> %xa8, %xb8
564; AVX512F-NEXT:  Cost Model: Found an estimated cost of 12 for instruction: %res16 = mul <16 x i64> %xa16, %xb16
565; AVX512F-NEXT:  Cost Model: Found an estimated cost of 24 for instruction: %res32 = mul <32 x i64> %xa32, %xb32
566; AVX512F-NEXT:  Cost Model: Found an estimated cost of 48 for instruction: %res64 = mul <64 x i64> %xa64, %xb64
567; AVX512F-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret void
568;
569; AVX512BW-LABEL: 'mul_sext_zext_vXi8'
570; AVX512BW-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xa2 = sext <2 x i8> %a2 to <2 x i64>
571; AVX512BW-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xb2 = zext <2 x i8> %b2 to <2 x i64>
572; AVX512BW-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xa4 = sext <4 x i8> %a4 to <4 x i64>
573; AVX512BW-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xb4 = zext <4 x i8> %b4 to <4 x i64>
574; AVX512BW-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xa8 = sext <8 x i8> %a8 to <8 x i64>
575; AVX512BW-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xb8 = zext <8 x i8> %b8 to <8 x i64>
576; AVX512BW-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %xa16 = sext <16 x i8> %a16 to <16 x i64>
577; AVX512BW-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %xb16 = zext <16 x i8> %b16 to <16 x i64>
578; AVX512BW-NEXT:  Cost Model: Found an estimated cost of 7 for instruction: %xa32 = sext <32 x i8> %a32 to <32 x i64>
579; AVX512BW-NEXT:  Cost Model: Found an estimated cost of 7 for instruction: %xb32 = zext <32 x i8> %b32 to <32 x i64>
580; AVX512BW-NEXT:  Cost Model: Found an estimated cost of 15 for instruction: %xa64 = sext <64 x i8> %a64 to <64 x i64>
581; AVX512BW-NEXT:  Cost Model: Found an estimated cost of 15 for instruction: %xb64 = zext <64 x i8> %b64 to <64 x i64>
582; AVX512BW-NEXT:  Cost Model: Found an estimated cost of 6 for instruction: %res2 = mul <2 x i64> %xa2, %xb2
583; AVX512BW-NEXT:  Cost Model: Found an estimated cost of 6 for instruction: %res4 = mul <4 x i64> %xa4, %xb4
584; AVX512BW-NEXT:  Cost Model: Found an estimated cost of 6 for instruction: %res8 = mul <8 x i64> %xa8, %xb8
585; AVX512BW-NEXT:  Cost Model: Found an estimated cost of 12 for instruction: %res16 = mul <16 x i64> %xa16, %xb16
586; AVX512BW-NEXT:  Cost Model: Found an estimated cost of 24 for instruction: %res32 = mul <32 x i64> %xa32, %xb32
587; AVX512BW-NEXT:  Cost Model: Found an estimated cost of 48 for instruction: %res64 = mul <64 x i64> %xa64, %xb64
588; AVX512BW-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret void
589;
590; AVX512DQ-LABEL: 'mul_sext_zext_vXi8'
591; AVX512DQ-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xa2 = sext <2 x i8> %a2 to <2 x i64>
592; AVX512DQ-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xb2 = zext <2 x i8> %b2 to <2 x i64>
593; AVX512DQ-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xa4 = sext <4 x i8> %a4 to <4 x i64>
594; AVX512DQ-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xb4 = zext <4 x i8> %b4 to <4 x i64>
595; AVX512DQ-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xa8 = sext <8 x i8> %a8 to <8 x i64>
596; AVX512DQ-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xb8 = zext <8 x i8> %b8 to <8 x i64>
597; AVX512DQ-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %xa16 = sext <16 x i8> %a16 to <16 x i64>
598; AVX512DQ-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %xb16 = zext <16 x i8> %b16 to <16 x i64>
599; AVX512DQ-NEXT:  Cost Model: Found an estimated cost of 7 for instruction: %xa32 = sext <32 x i8> %a32 to <32 x i64>
600; AVX512DQ-NEXT:  Cost Model: Found an estimated cost of 7 for instruction: %xb32 = zext <32 x i8> %b32 to <32 x i64>
601; AVX512DQ-NEXT:  Cost Model: Found an estimated cost of 15 for instruction: %xa64 = sext <64 x i8> %a64 to <64 x i64>
602; AVX512DQ-NEXT:  Cost Model: Found an estimated cost of 15 for instruction: %xb64 = zext <64 x i8> %b64 to <64 x i64>
603; AVX512DQ-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %res2 = mul <2 x i64> %xa2, %xb2
604; AVX512DQ-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %res4 = mul <4 x i64> %xa4, %xb4
605; AVX512DQ-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %res8 = mul <8 x i64> %xa8, %xb8
606; AVX512DQ-NEXT:  Cost Model: Found an estimated cost of 6 for instruction: %res16 = mul <16 x i64> %xa16, %xb16
607; AVX512DQ-NEXT:  Cost Model: Found an estimated cost of 12 for instruction: %res32 = mul <32 x i64> %xa32, %xb32
608; AVX512DQ-NEXT:  Cost Model: Found an estimated cost of 24 for instruction: %res64 = mul <64 x i64> %xa64, %xb64
609; AVX512DQ-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret void
610;
611; SLM-LABEL: 'mul_sext_zext_vXi8'
612; SLM-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xa2 = sext <2 x i8> %a2 to <2 x i64>
613; SLM-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xb2 = zext <2 x i8> %b2 to <2 x i64>
614; SLM-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %xa4 = sext <4 x i8> %a4 to <4 x i64>
615; SLM-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %xb4 = zext <4 x i8> %b4 to <4 x i64>
616; SLM-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %xa8 = sext <8 x i8> %a8 to <8 x i64>
617; SLM-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %xb8 = zext <8 x i8> %b8 to <8 x i64>
618; SLM-NEXT:  Cost Model: Found an estimated cost of 8 for instruction: %xa16 = sext <16 x i8> %a16 to <16 x i64>
619; SLM-NEXT:  Cost Model: Found an estimated cost of 8 for instruction: %xb16 = zext <16 x i8> %b16 to <16 x i64>
620; SLM-NEXT:  Cost Model: Found an estimated cost of 16 for instruction: %xa32 = sext <32 x i8> %a32 to <32 x i64>
621; SLM-NEXT:  Cost Model: Found an estimated cost of 16 for instruction: %xb32 = zext <32 x i8> %b32 to <32 x i64>
622; SLM-NEXT:  Cost Model: Found an estimated cost of 32 for instruction: %xa64 = sext <64 x i8> %a64 to <64 x i64>
623; SLM-NEXT:  Cost Model: Found an estimated cost of 32 for instruction: %xb64 = zext <64 x i8> %b64 to <64 x i64>
624; SLM-NEXT:  Cost Model: Found an estimated cost of 17 for instruction: %res2 = mul <2 x i64> %xa2, %xb2
625; SLM-NEXT:  Cost Model: Found an estimated cost of 34 for instruction: %res4 = mul <4 x i64> %xa4, %xb4
626; SLM-NEXT:  Cost Model: Found an estimated cost of 68 for instruction: %res8 = mul <8 x i64> %xa8, %xb8
627; SLM-NEXT:  Cost Model: Found an estimated cost of 136 for instruction: %res16 = mul <16 x i64> %xa16, %xb16
628; SLM-NEXT:  Cost Model: Found an estimated cost of 272 for instruction: %res32 = mul <32 x i64> %xa32, %xb32
629; SLM-NEXT:  Cost Model: Found an estimated cost of 544 for instruction: %res64 = mul <64 x i64> %xa64, %xb64
630; SLM-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret void
631;
632; GLM-LABEL: 'mul_sext_zext_vXi8'
633; GLM-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xa2 = sext <2 x i8> %a2 to <2 x i64>
634; GLM-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xb2 = zext <2 x i8> %b2 to <2 x i64>
635; GLM-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %xa4 = sext <4 x i8> %a4 to <4 x i64>
636; GLM-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %xb4 = zext <4 x i8> %b4 to <4 x i64>
637; GLM-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %xa8 = sext <8 x i8> %a8 to <8 x i64>
638; GLM-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %xb8 = zext <8 x i8> %b8 to <8 x i64>
639; GLM-NEXT:  Cost Model: Found an estimated cost of 8 for instruction: %xa16 = sext <16 x i8> %a16 to <16 x i64>
640; GLM-NEXT:  Cost Model: Found an estimated cost of 8 for instruction: %xb16 = zext <16 x i8> %b16 to <16 x i64>
641; GLM-NEXT:  Cost Model: Found an estimated cost of 16 for instruction: %xa32 = sext <32 x i8> %a32 to <32 x i64>
642; GLM-NEXT:  Cost Model: Found an estimated cost of 16 for instruction: %xb32 = zext <32 x i8> %b32 to <32 x i64>
643; GLM-NEXT:  Cost Model: Found an estimated cost of 32 for instruction: %xa64 = sext <64 x i8> %a64 to <64 x i64>
644; GLM-NEXT:  Cost Model: Found an estimated cost of 32 for instruction: %xb64 = zext <64 x i8> %b64 to <64 x i64>
645; GLM-NEXT:  Cost Model: Found an estimated cost of 6 for instruction: %res2 = mul <2 x i64> %xa2, %xb2
646; GLM-NEXT:  Cost Model: Found an estimated cost of 12 for instruction: %res4 = mul <4 x i64> %xa4, %xb4
647; GLM-NEXT:  Cost Model: Found an estimated cost of 24 for instruction: %res8 = mul <8 x i64> %xa8, %xb8
648; GLM-NEXT:  Cost Model: Found an estimated cost of 48 for instruction: %res16 = mul <16 x i64> %xa16, %xb16
649; GLM-NEXT:  Cost Model: Found an estimated cost of 96 for instruction: %res32 = mul <32 x i64> %xa32, %xb32
650; GLM-NEXT:  Cost Model: Found an estimated cost of 192 for instruction: %res64 = mul <64 x i64> %xa64, %xb64
651; GLM-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret void
652;
653  %xa2 = sext <2 x i8> %a2 to <2 x i64>
654  %xb2 = zext <2 x i8> %b2 to <2 x i64>
655  %xa4 = sext <4 x i8> %a4 to <4 x i64>
656  %xb4 = zext <4 x i8> %b4 to <4 x i64>
657  %xa8 = sext <8 x i8> %a8 to <8 x i64>
658  %xb8 = zext <8 x i8> %b8 to <8 x i64>
659  %xa16 = sext <16 x i8> %a16 to <16 x i64>
660  %xb16 = zext <16 x i8> %b16 to <16 x i64>
661  %xa32 = sext <32 x i8> %a32 to <32 x i64>
662  %xb32 = zext <32 x i8> %b32 to <32 x i64>
663  %xa64 = sext <64 x i8> %a64 to <64 x i64>
664  %xb64 = zext <64 x i8> %b64 to <64 x i64>
665  %res2 = mul <2 x i64> %xa2, %xb2
666  %res4 = mul <4 x i64> %xa4, %xb4
667  %res8 = mul <8 x i64> %xa8, %xb8
668  %res16 = mul <16 x i64> %xa16, %xb16
669  %res32 = mul <32 x i64> %xa32, %xb32
670  %res64 = mul <64 x i64> %xa64, %xb64
671  ret void
672}
673
674;
675; mul vXi16 -> mXi64
676;
677
678define void @mul_sext_vXi16(<2 x i16> %a2, <2 x i16> %b2, <4 x i16> %a4, <4 x i16> %b4, <8 x i16> %a8, <8 x i16> %b8, <16 x i16> %a16, <16 x i16> %b16, <32 x i16> %a32, <32 x i16> %b32, <64 x i16> %a64, <64 x i16> %b64)  {
679; SSE2-LABEL: 'mul_sext_vXi16'
680; SSE2-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %xa2 = sext <2 x i16> %a2 to <2 x i64>
681; SSE2-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %xb2 = sext <2 x i16> %b2 to <2 x i64>
682; SSE2-NEXT:  Cost Model: Found an estimated cost of 6 for instruction: %xa4 = sext <4 x i16> %a4 to <4 x i64>
683; SSE2-NEXT:  Cost Model: Found an estimated cost of 6 for instruction: %xb4 = sext <4 x i16> %b4 to <4 x i64>
684; SSE2-NEXT:  Cost Model: Found an estimated cost of 12 for instruction: %xa8 = sext <8 x i16> %a8 to <8 x i64>
685; SSE2-NEXT:  Cost Model: Found an estimated cost of 12 for instruction: %xb8 = sext <8 x i16> %b8 to <8 x i64>
686; SSE2-NEXT:  Cost Model: Found an estimated cost of 24 for instruction: %xa16 = sext <16 x i16> %a16 to <16 x i64>
687; SSE2-NEXT:  Cost Model: Found an estimated cost of 24 for instruction: %xb16 = sext <16 x i16> %b16 to <16 x i64>
688; SSE2-NEXT:  Cost Model: Found an estimated cost of 48 for instruction: %xa32 = sext <32 x i16> %a32 to <32 x i64>
689; SSE2-NEXT:  Cost Model: Found an estimated cost of 48 for instruction: %xb32 = sext <32 x i16> %b32 to <32 x i64>
690; SSE2-NEXT:  Cost Model: Found an estimated cost of 96 for instruction: %xa64 = sext <64 x i16> %a64 to <64 x i64>
691; SSE2-NEXT:  Cost Model: Found an estimated cost of 96 for instruction: %xb64 = sext <64 x i16> %b64 to <64 x i64>
692; SSE2-NEXT:  Cost Model: Found an estimated cost of 7 for instruction: %res2 = mul <2 x i64> %xa2, %xb2
693; SSE2-NEXT:  Cost Model: Found an estimated cost of 14 for instruction: %res4 = mul <4 x i64> %xa4, %xb4
694; SSE2-NEXT:  Cost Model: Found an estimated cost of 28 for instruction: %res8 = mul <8 x i64> %xa8, %xb8
695; SSE2-NEXT:  Cost Model: Found an estimated cost of 56 for instruction: %res16 = mul <16 x i64> %xa16, %xb16
696; SSE2-NEXT:  Cost Model: Found an estimated cost of 112 for instruction: %res32 = mul <32 x i64> %xa32, %xb32
697; SSE2-NEXT:  Cost Model: Found an estimated cost of 224 for instruction: %res64 = mul <64 x i64> %xa64, %xb64
698; SSE2-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret void
699;
700; SSSE3-LABEL: 'mul_sext_vXi16'
701; SSSE3-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %xa2 = sext <2 x i16> %a2 to <2 x i64>
702; SSSE3-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %xb2 = sext <2 x i16> %b2 to <2 x i64>
703; SSSE3-NEXT:  Cost Model: Found an estimated cost of 6 for instruction: %xa4 = sext <4 x i16> %a4 to <4 x i64>
704; SSSE3-NEXT:  Cost Model: Found an estimated cost of 6 for instruction: %xb4 = sext <4 x i16> %b4 to <4 x i64>
705; SSSE3-NEXT:  Cost Model: Found an estimated cost of 12 for instruction: %xa8 = sext <8 x i16> %a8 to <8 x i64>
706; SSSE3-NEXT:  Cost Model: Found an estimated cost of 12 for instruction: %xb8 = sext <8 x i16> %b8 to <8 x i64>
707; SSSE3-NEXT:  Cost Model: Found an estimated cost of 24 for instruction: %xa16 = sext <16 x i16> %a16 to <16 x i64>
708; SSSE3-NEXT:  Cost Model: Found an estimated cost of 24 for instruction: %xb16 = sext <16 x i16> %b16 to <16 x i64>
709; SSSE3-NEXT:  Cost Model: Found an estimated cost of 48 for instruction: %xa32 = sext <32 x i16> %a32 to <32 x i64>
710; SSSE3-NEXT:  Cost Model: Found an estimated cost of 48 for instruction: %xb32 = sext <32 x i16> %b32 to <32 x i64>
711; SSSE3-NEXT:  Cost Model: Found an estimated cost of 96 for instruction: %xa64 = sext <64 x i16> %a64 to <64 x i64>
712; SSSE3-NEXT:  Cost Model: Found an estimated cost of 96 for instruction: %xb64 = sext <64 x i16> %b64 to <64 x i64>
713; SSSE3-NEXT:  Cost Model: Found an estimated cost of 7 for instruction: %res2 = mul <2 x i64> %xa2, %xb2
714; SSSE3-NEXT:  Cost Model: Found an estimated cost of 14 for instruction: %res4 = mul <4 x i64> %xa4, %xb4
715; SSSE3-NEXT:  Cost Model: Found an estimated cost of 28 for instruction: %res8 = mul <8 x i64> %xa8, %xb8
716; SSSE3-NEXT:  Cost Model: Found an estimated cost of 56 for instruction: %res16 = mul <16 x i64> %xa16, %xb16
717; SSSE3-NEXT:  Cost Model: Found an estimated cost of 112 for instruction: %res32 = mul <32 x i64> %xa32, %xb32
718; SSSE3-NEXT:  Cost Model: Found an estimated cost of 224 for instruction: %res64 = mul <64 x i64> %xa64, %xb64
719; SSSE3-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret void
720;
721; SSE42-LABEL: 'mul_sext_vXi16'
722; SSE42-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xa2 = sext <2 x i16> %a2 to <2 x i64>
723; SSE42-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xb2 = sext <2 x i16> %b2 to <2 x i64>
724; SSE42-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %xa4 = sext <4 x i16> %a4 to <4 x i64>
725; SSE42-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %xb4 = sext <4 x i16> %b4 to <4 x i64>
726; SSE42-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %xa8 = sext <8 x i16> %a8 to <8 x i64>
727; SSE42-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %xb8 = sext <8 x i16> %b8 to <8 x i64>
728; SSE42-NEXT:  Cost Model: Found an estimated cost of 8 for instruction: %xa16 = sext <16 x i16> %a16 to <16 x i64>
729; SSE42-NEXT:  Cost Model: Found an estimated cost of 8 for instruction: %xb16 = sext <16 x i16> %b16 to <16 x i64>
730; SSE42-NEXT:  Cost Model: Found an estimated cost of 16 for instruction: %xa32 = sext <32 x i16> %a32 to <32 x i64>
731; SSE42-NEXT:  Cost Model: Found an estimated cost of 16 for instruction: %xb32 = sext <32 x i16> %b32 to <32 x i64>
732; SSE42-NEXT:  Cost Model: Found an estimated cost of 32 for instruction: %xa64 = sext <64 x i16> %a64 to <64 x i64>
733; SSE42-NEXT:  Cost Model: Found an estimated cost of 32 for instruction: %xb64 = sext <64 x i16> %b64 to <64 x i64>
734; SSE42-NEXT:  Cost Model: Found an estimated cost of 6 for instruction: %res2 = mul <2 x i64> %xa2, %xb2
735; SSE42-NEXT:  Cost Model: Found an estimated cost of 12 for instruction: %res4 = mul <4 x i64> %xa4, %xb4
736; SSE42-NEXT:  Cost Model: Found an estimated cost of 24 for instruction: %res8 = mul <8 x i64> %xa8, %xb8
737; SSE42-NEXT:  Cost Model: Found an estimated cost of 48 for instruction: %res16 = mul <16 x i64> %xa16, %xb16
738; SSE42-NEXT:  Cost Model: Found an estimated cost of 96 for instruction: %res32 = mul <32 x i64> %xa32, %xb32
739; SSE42-NEXT:  Cost Model: Found an estimated cost of 192 for instruction: %res64 = mul <64 x i64> %xa64, %xb64
740; SSE42-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret void
741;
742; AVX1-LABEL: 'mul_sext_vXi16'
743; AVX1-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xa2 = sext <2 x i16> %a2 to <2 x i64>
744; AVX1-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xb2 = sext <2 x i16> %b2 to <2 x i64>
745; AVX1-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %xa4 = sext <4 x i16> %a4 to <4 x i64>
746; AVX1-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %xb4 = sext <4 x i16> %b4 to <4 x i64>
747; AVX1-NEXT:  Cost Model: Found an estimated cost of 6 for instruction: %xa8 = sext <8 x i16> %a8 to <8 x i64>
748; AVX1-NEXT:  Cost Model: Found an estimated cost of 6 for instruction: %xb8 = sext <8 x i16> %b8 to <8 x i64>
749; AVX1-NEXT:  Cost Model: Found an estimated cost of 13 for instruction: %xa16 = sext <16 x i16> %a16 to <16 x i64>
750; AVX1-NEXT:  Cost Model: Found an estimated cost of 13 for instruction: %xb16 = sext <16 x i16> %b16 to <16 x i64>
751; AVX1-NEXT:  Cost Model: Found an estimated cost of 26 for instruction: %xa32 = sext <32 x i16> %a32 to <32 x i64>
752; AVX1-NEXT:  Cost Model: Found an estimated cost of 26 for instruction: %xb32 = sext <32 x i16> %b32 to <32 x i64>
753; AVX1-NEXT:  Cost Model: Found an estimated cost of 52 for instruction: %xa64 = sext <64 x i16> %a64 to <64 x i64>
754; AVX1-NEXT:  Cost Model: Found an estimated cost of 52 for instruction: %xb64 = sext <64 x i16> %b64 to <64 x i64>
755; AVX1-NEXT:  Cost Model: Found an estimated cost of 6 for instruction: %res2 = mul <2 x i64> %xa2, %xb2
756; AVX1-NEXT:  Cost Model: Found an estimated cost of 12 for instruction: %res4 = mul <4 x i64> %xa4, %xb4
757; AVX1-NEXT:  Cost Model: Found an estimated cost of 24 for instruction: %res8 = mul <8 x i64> %xa8, %xb8
758; AVX1-NEXT:  Cost Model: Found an estimated cost of 48 for instruction: %res16 = mul <16 x i64> %xa16, %xb16
759; AVX1-NEXT:  Cost Model: Found an estimated cost of 96 for instruction: %res32 = mul <32 x i64> %xa32, %xb32
760; AVX1-NEXT:  Cost Model: Found an estimated cost of 192 for instruction: %res64 = mul <64 x i64> %xa64, %xb64
761; AVX1-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret void
762;
763; AVX2-LABEL: 'mul_sext_vXi16'
764; AVX2-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xa2 = sext <2 x i16> %a2 to <2 x i64>
765; AVX2-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xb2 = sext <2 x i16> %b2 to <2 x i64>
766; AVX2-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %xa4 = sext <4 x i16> %a4 to <4 x i64>
767; AVX2-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %xb4 = sext <4 x i16> %b4 to <4 x i64>
768; AVX2-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %xa8 = sext <8 x i16> %a8 to <8 x i64>
769; AVX2-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %xb8 = sext <8 x i16> %b8 to <8 x i64>
770; AVX2-NEXT:  Cost Model: Found an estimated cost of 9 for instruction: %xa16 = sext <16 x i16> %a16 to <16 x i64>
771; AVX2-NEXT:  Cost Model: Found an estimated cost of 9 for instruction: %xb16 = sext <16 x i16> %b16 to <16 x i64>
772; AVX2-NEXT:  Cost Model: Found an estimated cost of 18 for instruction: %xa32 = sext <32 x i16> %a32 to <32 x i64>
773; AVX2-NEXT:  Cost Model: Found an estimated cost of 18 for instruction: %xb32 = sext <32 x i16> %b32 to <32 x i64>
774; AVX2-NEXT:  Cost Model: Found an estimated cost of 36 for instruction: %xa64 = sext <64 x i16> %a64 to <64 x i64>
775; AVX2-NEXT:  Cost Model: Found an estimated cost of 36 for instruction: %xb64 = sext <64 x i16> %b64 to <64 x i64>
776; AVX2-NEXT:  Cost Model: Found an estimated cost of 6 for instruction: %res2 = mul <2 x i64> %xa2, %xb2
777; AVX2-NEXT:  Cost Model: Found an estimated cost of 6 for instruction: %res4 = mul <4 x i64> %xa4, %xb4
778; AVX2-NEXT:  Cost Model: Found an estimated cost of 12 for instruction: %res8 = mul <8 x i64> %xa8, %xb8
779; AVX2-NEXT:  Cost Model: Found an estimated cost of 24 for instruction: %res16 = mul <16 x i64> %xa16, %xb16
780; AVX2-NEXT:  Cost Model: Found an estimated cost of 48 for instruction: %res32 = mul <32 x i64> %xa32, %xb32
781; AVX2-NEXT:  Cost Model: Found an estimated cost of 96 for instruction: %res64 = mul <64 x i64> %xa64, %xb64
782; AVX2-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret void
783;
784; AVX512F-LABEL: 'mul_sext_vXi16'
785; AVX512F-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xa2 = sext <2 x i16> %a2 to <2 x i64>
786; AVX512F-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xb2 = sext <2 x i16> %b2 to <2 x i64>
787; AVX512F-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xa4 = sext <4 x i16> %a4 to <4 x i64>
788; AVX512F-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xb4 = sext <4 x i16> %b4 to <4 x i64>
789; AVX512F-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xa8 = sext <8 x i16> %a8 to <8 x i64>
790; AVX512F-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xb8 = sext <8 x i16> %b8 to <8 x i64>
791; AVX512F-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %xa16 = sext <16 x i16> %a16 to <16 x i64>
792; AVX512F-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %xb16 = sext <16 x i16> %b16 to <16 x i64>
793; AVX512F-NEXT:  Cost Model: Found an estimated cost of 7 for instruction: %xa32 = sext <32 x i16> %a32 to <32 x i64>
794; AVX512F-NEXT:  Cost Model: Found an estimated cost of 7 for instruction: %xb32 = sext <32 x i16> %b32 to <32 x i64>
795; AVX512F-NEXT:  Cost Model: Found an estimated cost of 14 for instruction: %xa64 = sext <64 x i16> %a64 to <64 x i64>
796; AVX512F-NEXT:  Cost Model: Found an estimated cost of 14 for instruction: %xb64 = sext <64 x i16> %b64 to <64 x i64>
797; AVX512F-NEXT:  Cost Model: Found an estimated cost of 6 for instruction: %res2 = mul <2 x i64> %xa2, %xb2
798; AVX512F-NEXT:  Cost Model: Found an estimated cost of 6 for instruction: %res4 = mul <4 x i64> %xa4, %xb4
799; AVX512F-NEXT:  Cost Model: Found an estimated cost of 6 for instruction: %res8 = mul <8 x i64> %xa8, %xb8
800; AVX512F-NEXT:  Cost Model: Found an estimated cost of 12 for instruction: %res16 = mul <16 x i64> %xa16, %xb16
801; AVX512F-NEXT:  Cost Model: Found an estimated cost of 24 for instruction: %res32 = mul <32 x i64> %xa32, %xb32
802; AVX512F-NEXT:  Cost Model: Found an estimated cost of 48 for instruction: %res64 = mul <64 x i64> %xa64, %xb64
803; AVX512F-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret void
804;
805; AVX512BW-LABEL: 'mul_sext_vXi16'
806; AVX512BW-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xa2 = sext <2 x i16> %a2 to <2 x i64>
807; AVX512BW-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xb2 = sext <2 x i16> %b2 to <2 x i64>
808; AVX512BW-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xa4 = sext <4 x i16> %a4 to <4 x i64>
809; AVX512BW-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xb4 = sext <4 x i16> %b4 to <4 x i64>
810; AVX512BW-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xa8 = sext <8 x i16> %a8 to <8 x i64>
811; AVX512BW-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xb8 = sext <8 x i16> %b8 to <8 x i64>
812; AVX512BW-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %xa16 = sext <16 x i16> %a16 to <16 x i64>
813; AVX512BW-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %xb16 = sext <16 x i16> %b16 to <16 x i64>
814; AVX512BW-NEXT:  Cost Model: Found an estimated cost of 7 for instruction: %xa32 = sext <32 x i16> %a32 to <32 x i64>
815; AVX512BW-NEXT:  Cost Model: Found an estimated cost of 7 for instruction: %xb32 = sext <32 x i16> %b32 to <32 x i64>
816; AVX512BW-NEXT:  Cost Model: Found an estimated cost of 14 for instruction: %xa64 = sext <64 x i16> %a64 to <64 x i64>
817; AVX512BW-NEXT:  Cost Model: Found an estimated cost of 14 for instruction: %xb64 = sext <64 x i16> %b64 to <64 x i64>
818; AVX512BW-NEXT:  Cost Model: Found an estimated cost of 6 for instruction: %res2 = mul <2 x i64> %xa2, %xb2
819; AVX512BW-NEXT:  Cost Model: Found an estimated cost of 6 for instruction: %res4 = mul <4 x i64> %xa4, %xb4
820; AVX512BW-NEXT:  Cost Model: Found an estimated cost of 6 for instruction: %res8 = mul <8 x i64> %xa8, %xb8
821; AVX512BW-NEXT:  Cost Model: Found an estimated cost of 12 for instruction: %res16 = mul <16 x i64> %xa16, %xb16
822; AVX512BW-NEXT:  Cost Model: Found an estimated cost of 24 for instruction: %res32 = mul <32 x i64> %xa32, %xb32
823; AVX512BW-NEXT:  Cost Model: Found an estimated cost of 48 for instruction: %res64 = mul <64 x i64> %xa64, %xb64
824; AVX512BW-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret void
825;
826; AVX512DQ-LABEL: 'mul_sext_vXi16'
827; AVX512DQ-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xa2 = sext <2 x i16> %a2 to <2 x i64>
828; AVX512DQ-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xb2 = sext <2 x i16> %b2 to <2 x i64>
829; AVX512DQ-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xa4 = sext <4 x i16> %a4 to <4 x i64>
830; AVX512DQ-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xb4 = sext <4 x i16> %b4 to <4 x i64>
831; AVX512DQ-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xa8 = sext <8 x i16> %a8 to <8 x i64>
832; AVX512DQ-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xb8 = sext <8 x i16> %b8 to <8 x i64>
833; AVX512DQ-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %xa16 = sext <16 x i16> %a16 to <16 x i64>
834; AVX512DQ-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %xb16 = sext <16 x i16> %b16 to <16 x i64>
835; AVX512DQ-NEXT:  Cost Model: Found an estimated cost of 7 for instruction: %xa32 = sext <32 x i16> %a32 to <32 x i64>
836; AVX512DQ-NEXT:  Cost Model: Found an estimated cost of 7 for instruction: %xb32 = sext <32 x i16> %b32 to <32 x i64>
837; AVX512DQ-NEXT:  Cost Model: Found an estimated cost of 14 for instruction: %xa64 = sext <64 x i16> %a64 to <64 x i64>
838; AVX512DQ-NEXT:  Cost Model: Found an estimated cost of 14 for instruction: %xb64 = sext <64 x i16> %b64 to <64 x i64>
839; AVX512DQ-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %res2 = mul <2 x i64> %xa2, %xb2
840; AVX512DQ-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %res4 = mul <4 x i64> %xa4, %xb4
841; AVX512DQ-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %res8 = mul <8 x i64> %xa8, %xb8
842; AVX512DQ-NEXT:  Cost Model: Found an estimated cost of 6 for instruction: %res16 = mul <16 x i64> %xa16, %xb16
843; AVX512DQ-NEXT:  Cost Model: Found an estimated cost of 12 for instruction: %res32 = mul <32 x i64> %xa32, %xb32
844; AVX512DQ-NEXT:  Cost Model: Found an estimated cost of 24 for instruction: %res64 = mul <64 x i64> %xa64, %xb64
845; AVX512DQ-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret void
846;
847; SLM-LABEL: 'mul_sext_vXi16'
848; SLM-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xa2 = sext <2 x i16> %a2 to <2 x i64>
849; SLM-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xb2 = sext <2 x i16> %b2 to <2 x i64>
850; SLM-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %xa4 = sext <4 x i16> %a4 to <4 x i64>
851; SLM-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %xb4 = sext <4 x i16> %b4 to <4 x i64>
852; SLM-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %xa8 = sext <8 x i16> %a8 to <8 x i64>
853; SLM-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %xb8 = sext <8 x i16> %b8 to <8 x i64>
854; SLM-NEXT:  Cost Model: Found an estimated cost of 8 for instruction: %xa16 = sext <16 x i16> %a16 to <16 x i64>
855; SLM-NEXT:  Cost Model: Found an estimated cost of 8 for instruction: %xb16 = sext <16 x i16> %b16 to <16 x i64>
856; SLM-NEXT:  Cost Model: Found an estimated cost of 16 for instruction: %xa32 = sext <32 x i16> %a32 to <32 x i64>
857; SLM-NEXT:  Cost Model: Found an estimated cost of 16 for instruction: %xb32 = sext <32 x i16> %b32 to <32 x i64>
858; SLM-NEXT:  Cost Model: Found an estimated cost of 32 for instruction: %xa64 = sext <64 x i16> %a64 to <64 x i64>
859; SLM-NEXT:  Cost Model: Found an estimated cost of 32 for instruction: %xb64 = sext <64 x i16> %b64 to <64 x i64>
860; SLM-NEXT:  Cost Model: Found an estimated cost of 17 for instruction: %res2 = mul <2 x i64> %xa2, %xb2
861; SLM-NEXT:  Cost Model: Found an estimated cost of 34 for instruction: %res4 = mul <4 x i64> %xa4, %xb4
862; SLM-NEXT:  Cost Model: Found an estimated cost of 68 for instruction: %res8 = mul <8 x i64> %xa8, %xb8
863; SLM-NEXT:  Cost Model: Found an estimated cost of 136 for instruction: %res16 = mul <16 x i64> %xa16, %xb16
864; SLM-NEXT:  Cost Model: Found an estimated cost of 272 for instruction: %res32 = mul <32 x i64> %xa32, %xb32
865; SLM-NEXT:  Cost Model: Found an estimated cost of 544 for instruction: %res64 = mul <64 x i64> %xa64, %xb64
866; SLM-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret void
867;
868; GLM-LABEL: 'mul_sext_vXi16'
869; GLM-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xa2 = sext <2 x i16> %a2 to <2 x i64>
870; GLM-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xb2 = sext <2 x i16> %b2 to <2 x i64>
871; GLM-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %xa4 = sext <4 x i16> %a4 to <4 x i64>
872; GLM-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %xb4 = sext <4 x i16> %b4 to <4 x i64>
873; GLM-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %xa8 = sext <8 x i16> %a8 to <8 x i64>
874; GLM-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %xb8 = sext <8 x i16> %b8 to <8 x i64>
875; GLM-NEXT:  Cost Model: Found an estimated cost of 8 for instruction: %xa16 = sext <16 x i16> %a16 to <16 x i64>
876; GLM-NEXT:  Cost Model: Found an estimated cost of 8 for instruction: %xb16 = sext <16 x i16> %b16 to <16 x i64>
877; GLM-NEXT:  Cost Model: Found an estimated cost of 16 for instruction: %xa32 = sext <32 x i16> %a32 to <32 x i64>
878; GLM-NEXT:  Cost Model: Found an estimated cost of 16 for instruction: %xb32 = sext <32 x i16> %b32 to <32 x i64>
879; GLM-NEXT:  Cost Model: Found an estimated cost of 32 for instruction: %xa64 = sext <64 x i16> %a64 to <64 x i64>
880; GLM-NEXT:  Cost Model: Found an estimated cost of 32 for instruction: %xb64 = sext <64 x i16> %b64 to <64 x i64>
881; GLM-NEXT:  Cost Model: Found an estimated cost of 6 for instruction: %res2 = mul <2 x i64> %xa2, %xb2
882; GLM-NEXT:  Cost Model: Found an estimated cost of 12 for instruction: %res4 = mul <4 x i64> %xa4, %xb4
883; GLM-NEXT:  Cost Model: Found an estimated cost of 24 for instruction: %res8 = mul <8 x i64> %xa8, %xb8
884; GLM-NEXT:  Cost Model: Found an estimated cost of 48 for instruction: %res16 = mul <16 x i64> %xa16, %xb16
885; GLM-NEXT:  Cost Model: Found an estimated cost of 96 for instruction: %res32 = mul <32 x i64> %xa32, %xb32
886; GLM-NEXT:  Cost Model: Found an estimated cost of 192 for instruction: %res64 = mul <64 x i64> %xa64, %xb64
887; GLM-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret void
888;
889  %xa2 = sext <2 x i16> %a2 to <2 x i64>
890  %xb2 = sext <2 x i16> %b2 to <2 x i64>
891  %xa4 = sext <4 x i16> %a4 to <4 x i64>
892  %xb4 = sext <4 x i16> %b4 to <4 x i64>
893  %xa8 = sext <8 x i16> %a8 to <8 x i64>
894  %xb8 = sext <8 x i16> %b8 to <8 x i64>
895  %xa16 = sext <16 x i16> %a16 to <16 x i64>
896  %xb16 = sext <16 x i16> %b16 to <16 x i64>
897  %xa32 = sext <32 x i16> %a32 to <32 x i64>
898  %xb32 = sext <32 x i16> %b32 to <32 x i64>
899  %xa64 = sext <64 x i16> %a64 to <64 x i64>
900  %xb64 = sext <64 x i16> %b64 to <64 x i64>
901  %res2 = mul <2 x i64> %xa2, %xb2
902  %res4 = mul <4 x i64> %xa4, %xb4
903  %res8 = mul <8 x i64> %xa8, %xb8
904  %res16 = mul <16 x i64> %xa16, %xb16
905  %res32 = mul <32 x i64> %xa32, %xb32
906  %res64 = mul <64 x i64> %xa64, %xb64
907  ret void
908}
909
910define void @mul_zext_vXi16(<2 x i16> %a2, <2 x i16> %b2, <4 x i16> %a4, <4 x i16> %b4, <8 x i16> %a8, <8 x i16> %b8, <16 x i16> %a16, <16 x i16> %b16, <32 x i16> %a32, <32 x i16> %b32, <64 x i16> %a64, <64 x i16> %b64)  {
911; SSE2-LABEL: 'mul_zext_vXi16'
912; SSE2-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %xa2 = zext <2 x i16> %a2 to <2 x i64>
913; SSE2-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %xb2 = zext <2 x i16> %b2 to <2 x i64>
914; SSE2-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %xa4 = zext <4 x i16> %a4 to <4 x i64>
915; SSE2-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %xb4 = zext <4 x i16> %b4 to <4 x i64>
916; SSE2-NEXT:  Cost Model: Found an estimated cost of 8 for instruction: %xa8 = zext <8 x i16> %a8 to <8 x i64>
917; SSE2-NEXT:  Cost Model: Found an estimated cost of 8 for instruction: %xb8 = zext <8 x i16> %b8 to <8 x i64>
918; SSE2-NEXT:  Cost Model: Found an estimated cost of 16 for instruction: %xa16 = zext <16 x i16> %a16 to <16 x i64>
919; SSE2-NEXT:  Cost Model: Found an estimated cost of 16 for instruction: %xb16 = zext <16 x i16> %b16 to <16 x i64>
920; SSE2-NEXT:  Cost Model: Found an estimated cost of 32 for instruction: %xa32 = zext <32 x i16> %a32 to <32 x i64>
921; SSE2-NEXT:  Cost Model: Found an estimated cost of 32 for instruction: %xb32 = zext <32 x i16> %b32 to <32 x i64>
922; SSE2-NEXT:  Cost Model: Found an estimated cost of 64 for instruction: %xa64 = zext <64 x i16> %a64 to <64 x i64>
923; SSE2-NEXT:  Cost Model: Found an estimated cost of 64 for instruction: %xb64 = zext <64 x i16> %b64 to <64 x i64>
924; SSE2-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %res2 = mul <2 x i64> %xa2, %xb2
925; SSE2-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %res4 = mul <4 x i64> %xa4, %xb4
926; SSE2-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %res8 = mul <8 x i64> %xa8, %xb8
927; SSE2-NEXT:  Cost Model: Found an estimated cost of 8 for instruction: %res16 = mul <16 x i64> %xa16, %xb16
928; SSE2-NEXT:  Cost Model: Found an estimated cost of 16 for instruction: %res32 = mul <32 x i64> %xa32, %xb32
929; SSE2-NEXT:  Cost Model: Found an estimated cost of 32 for instruction: %res64 = mul <64 x i64> %xa64, %xb64
930; SSE2-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret void
931;
932; SSSE3-LABEL: 'mul_zext_vXi16'
933; SSSE3-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %xa2 = zext <2 x i16> %a2 to <2 x i64>
934; SSSE3-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %xb2 = zext <2 x i16> %b2 to <2 x i64>
935; SSSE3-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %xa4 = zext <4 x i16> %a4 to <4 x i64>
936; SSSE3-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %xb4 = zext <4 x i16> %b4 to <4 x i64>
937; SSSE3-NEXT:  Cost Model: Found an estimated cost of 8 for instruction: %xa8 = zext <8 x i16> %a8 to <8 x i64>
938; SSSE3-NEXT:  Cost Model: Found an estimated cost of 8 for instruction: %xb8 = zext <8 x i16> %b8 to <8 x i64>
939; SSSE3-NEXT:  Cost Model: Found an estimated cost of 16 for instruction: %xa16 = zext <16 x i16> %a16 to <16 x i64>
940; SSSE3-NEXT:  Cost Model: Found an estimated cost of 16 for instruction: %xb16 = zext <16 x i16> %b16 to <16 x i64>
941; SSSE3-NEXT:  Cost Model: Found an estimated cost of 32 for instruction: %xa32 = zext <32 x i16> %a32 to <32 x i64>
942; SSSE3-NEXT:  Cost Model: Found an estimated cost of 32 for instruction: %xb32 = zext <32 x i16> %b32 to <32 x i64>
943; SSSE3-NEXT:  Cost Model: Found an estimated cost of 64 for instruction: %xa64 = zext <64 x i16> %a64 to <64 x i64>
944; SSSE3-NEXT:  Cost Model: Found an estimated cost of 64 for instruction: %xb64 = zext <64 x i16> %b64 to <64 x i64>
945; SSSE3-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %res2 = mul <2 x i64> %xa2, %xb2
946; SSSE3-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %res4 = mul <4 x i64> %xa4, %xb4
947; SSSE3-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %res8 = mul <8 x i64> %xa8, %xb8
948; SSSE3-NEXT:  Cost Model: Found an estimated cost of 8 for instruction: %res16 = mul <16 x i64> %xa16, %xb16
949; SSSE3-NEXT:  Cost Model: Found an estimated cost of 16 for instruction: %res32 = mul <32 x i64> %xa32, %xb32
950; SSSE3-NEXT:  Cost Model: Found an estimated cost of 32 for instruction: %res64 = mul <64 x i64> %xa64, %xb64
951; SSSE3-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret void
952;
953; SSE42-LABEL: 'mul_zext_vXi16'
954; SSE42-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xa2 = zext <2 x i16> %a2 to <2 x i64>
955; SSE42-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xb2 = zext <2 x i16> %b2 to <2 x i64>
956; SSE42-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %xa4 = zext <4 x i16> %a4 to <4 x i64>
957; SSE42-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %xb4 = zext <4 x i16> %b4 to <4 x i64>
958; SSE42-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %xa8 = zext <8 x i16> %a8 to <8 x i64>
959; SSE42-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %xb8 = zext <8 x i16> %b8 to <8 x i64>
960; SSE42-NEXT:  Cost Model: Found an estimated cost of 8 for instruction: %xa16 = zext <16 x i16> %a16 to <16 x i64>
961; SSE42-NEXT:  Cost Model: Found an estimated cost of 8 for instruction: %xb16 = zext <16 x i16> %b16 to <16 x i64>
962; SSE42-NEXT:  Cost Model: Found an estimated cost of 16 for instruction: %xa32 = zext <32 x i16> %a32 to <32 x i64>
963; SSE42-NEXT:  Cost Model: Found an estimated cost of 16 for instruction: %xb32 = zext <32 x i16> %b32 to <32 x i64>
964; SSE42-NEXT:  Cost Model: Found an estimated cost of 32 for instruction: %xa64 = zext <64 x i16> %a64 to <64 x i64>
965; SSE42-NEXT:  Cost Model: Found an estimated cost of 32 for instruction: %xb64 = zext <64 x i16> %b64 to <64 x i64>
966; SSE42-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %res2 = mul <2 x i64> %xa2, %xb2
967; SSE42-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %res4 = mul <4 x i64> %xa4, %xb4
968; SSE42-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %res8 = mul <8 x i64> %xa8, %xb8
969; SSE42-NEXT:  Cost Model: Found an estimated cost of 8 for instruction: %res16 = mul <16 x i64> %xa16, %xb16
970; SSE42-NEXT:  Cost Model: Found an estimated cost of 16 for instruction: %res32 = mul <32 x i64> %xa32, %xb32
971; SSE42-NEXT:  Cost Model: Found an estimated cost of 32 for instruction: %res64 = mul <64 x i64> %xa64, %xb64
972; SSE42-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret void
973;
974; AVX1-LABEL: 'mul_zext_vXi16'
975; AVX1-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xa2 = zext <2 x i16> %a2 to <2 x i64>
976; AVX1-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xb2 = zext <2 x i16> %b2 to <2 x i64>
977; AVX1-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %xa4 = zext <4 x i16> %a4 to <4 x i64>
978; AVX1-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %xb4 = zext <4 x i16> %b4 to <4 x i64>
979; AVX1-NEXT:  Cost Model: Found an estimated cost of 6 for instruction: %xa8 = zext <8 x i16> %a8 to <8 x i64>
980; AVX1-NEXT:  Cost Model: Found an estimated cost of 6 for instruction: %xb8 = zext <8 x i16> %b8 to <8 x i64>
981; AVX1-NEXT:  Cost Model: Found an estimated cost of 13 for instruction: %xa16 = zext <16 x i16> %a16 to <16 x i64>
982; AVX1-NEXT:  Cost Model: Found an estimated cost of 13 for instruction: %xb16 = zext <16 x i16> %b16 to <16 x i64>
983; AVX1-NEXT:  Cost Model: Found an estimated cost of 26 for instruction: %xa32 = zext <32 x i16> %a32 to <32 x i64>
984; AVX1-NEXT:  Cost Model: Found an estimated cost of 26 for instruction: %xb32 = zext <32 x i16> %b32 to <32 x i64>
985; AVX1-NEXT:  Cost Model: Found an estimated cost of 52 for instruction: %xa64 = zext <64 x i16> %a64 to <64 x i64>
986; AVX1-NEXT:  Cost Model: Found an estimated cost of 52 for instruction: %xb64 = zext <64 x i16> %b64 to <64 x i64>
987; AVX1-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %res2 = mul <2 x i64> %xa2, %xb2
988; AVX1-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %res4 = mul <4 x i64> %xa4, %xb4
989; AVX1-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %res8 = mul <8 x i64> %xa8, %xb8
990; AVX1-NEXT:  Cost Model: Found an estimated cost of 8 for instruction: %res16 = mul <16 x i64> %xa16, %xb16
991; AVX1-NEXT:  Cost Model: Found an estimated cost of 16 for instruction: %res32 = mul <32 x i64> %xa32, %xb32
992; AVX1-NEXT:  Cost Model: Found an estimated cost of 32 for instruction: %res64 = mul <64 x i64> %xa64, %xb64
993; AVX1-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret void
994;
995; AVX2-LABEL: 'mul_zext_vXi16'
996; AVX2-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xa2 = zext <2 x i16> %a2 to <2 x i64>
997; AVX2-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xb2 = zext <2 x i16> %b2 to <2 x i64>
998; AVX2-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %xa4 = zext <4 x i16> %a4 to <4 x i64>
999; AVX2-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %xb4 = zext <4 x i16> %b4 to <4 x i64>
1000; AVX2-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %xa8 = zext <8 x i16> %a8 to <8 x i64>
1001; AVX2-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %xb8 = zext <8 x i16> %b8 to <8 x i64>
1002; AVX2-NEXT:  Cost Model: Found an estimated cost of 9 for instruction: %xa16 = zext <16 x i16> %a16 to <16 x i64>
1003; AVX2-NEXT:  Cost Model: Found an estimated cost of 9 for instruction: %xb16 = zext <16 x i16> %b16 to <16 x i64>
1004; AVX2-NEXT:  Cost Model: Found an estimated cost of 18 for instruction: %xa32 = zext <32 x i16> %a32 to <32 x i64>
1005; AVX2-NEXT:  Cost Model: Found an estimated cost of 18 for instruction: %xb32 = zext <32 x i16> %b32 to <32 x i64>
1006; AVX2-NEXT:  Cost Model: Found an estimated cost of 36 for instruction: %xa64 = zext <64 x i16> %a64 to <64 x i64>
1007; AVX2-NEXT:  Cost Model: Found an estimated cost of 36 for instruction: %xb64 = zext <64 x i16> %b64 to <64 x i64>
1008; AVX2-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %res2 = mul <2 x i64> %xa2, %xb2
1009; AVX2-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %res4 = mul <4 x i64> %xa4, %xb4
1010; AVX2-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %res8 = mul <8 x i64> %xa8, %xb8
1011; AVX2-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %res16 = mul <16 x i64> %xa16, %xb16
1012; AVX2-NEXT:  Cost Model: Found an estimated cost of 8 for instruction: %res32 = mul <32 x i64> %xa32, %xb32
1013; AVX2-NEXT:  Cost Model: Found an estimated cost of 16 for instruction: %res64 = mul <64 x i64> %xa64, %xb64
1014; AVX2-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret void
1015;
1016; AVX512-LABEL: 'mul_zext_vXi16'
1017; AVX512-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xa2 = zext <2 x i16> %a2 to <2 x i64>
1018; AVX512-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xb2 = zext <2 x i16> %b2 to <2 x i64>
1019; AVX512-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xa4 = zext <4 x i16> %a4 to <4 x i64>
1020; AVX512-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xb4 = zext <4 x i16> %b4 to <4 x i64>
1021; AVX512-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xa8 = zext <8 x i16> %a8 to <8 x i64>
1022; AVX512-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xb8 = zext <8 x i16> %b8 to <8 x i64>
1023; AVX512-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %xa16 = zext <16 x i16> %a16 to <16 x i64>
1024; AVX512-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %xb16 = zext <16 x i16> %b16 to <16 x i64>
1025; AVX512-NEXT:  Cost Model: Found an estimated cost of 7 for instruction: %xa32 = zext <32 x i16> %a32 to <32 x i64>
1026; AVX512-NEXT:  Cost Model: Found an estimated cost of 7 for instruction: %xb32 = zext <32 x i16> %b32 to <32 x i64>
1027; AVX512-NEXT:  Cost Model: Found an estimated cost of 14 for instruction: %xa64 = zext <64 x i16> %a64 to <64 x i64>
1028; AVX512-NEXT:  Cost Model: Found an estimated cost of 14 for instruction: %xb64 = zext <64 x i16> %b64 to <64 x i64>
1029; AVX512-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %res2 = mul <2 x i64> %xa2, %xb2
1030; AVX512-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %res4 = mul <4 x i64> %xa4, %xb4
1031; AVX512-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %res8 = mul <8 x i64> %xa8, %xb8
1032; AVX512-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %res16 = mul <16 x i64> %xa16, %xb16
1033; AVX512-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %res32 = mul <32 x i64> %xa32, %xb32
1034; AVX512-NEXT:  Cost Model: Found an estimated cost of 8 for instruction: %res64 = mul <64 x i64> %xa64, %xb64
1035; AVX512-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret void
1036;
1037; SLM-LABEL: 'mul_zext_vXi16'
1038; SLM-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xa2 = zext <2 x i16> %a2 to <2 x i64>
1039; SLM-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xb2 = zext <2 x i16> %b2 to <2 x i64>
1040; SLM-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %xa4 = zext <4 x i16> %a4 to <4 x i64>
1041; SLM-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %xb4 = zext <4 x i16> %b4 to <4 x i64>
1042; SLM-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %xa8 = zext <8 x i16> %a8 to <8 x i64>
1043; SLM-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %xb8 = zext <8 x i16> %b8 to <8 x i64>
1044; SLM-NEXT:  Cost Model: Found an estimated cost of 8 for instruction: %xa16 = zext <16 x i16> %a16 to <16 x i64>
1045; SLM-NEXT:  Cost Model: Found an estimated cost of 8 for instruction: %xb16 = zext <16 x i16> %b16 to <16 x i64>
1046; SLM-NEXT:  Cost Model: Found an estimated cost of 16 for instruction: %xa32 = zext <32 x i16> %a32 to <32 x i64>
1047; SLM-NEXT:  Cost Model: Found an estimated cost of 16 for instruction: %xb32 = zext <32 x i16> %b32 to <32 x i64>
1048; SLM-NEXT:  Cost Model: Found an estimated cost of 32 for instruction: %xa64 = zext <64 x i16> %a64 to <64 x i64>
1049; SLM-NEXT:  Cost Model: Found an estimated cost of 32 for instruction: %xb64 = zext <64 x i16> %b64 to <64 x i64>
1050; SLM-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %res2 = mul <2 x i64> %xa2, %xb2
1051; SLM-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %res4 = mul <4 x i64> %xa4, %xb4
1052; SLM-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %res8 = mul <8 x i64> %xa8, %xb8
1053; SLM-NEXT:  Cost Model: Found an estimated cost of 8 for instruction: %res16 = mul <16 x i64> %xa16, %xb16
1054; SLM-NEXT:  Cost Model: Found an estimated cost of 16 for instruction: %res32 = mul <32 x i64> %xa32, %xb32
1055; SLM-NEXT:  Cost Model: Found an estimated cost of 32 for instruction: %res64 = mul <64 x i64> %xa64, %xb64
1056; SLM-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret void
1057;
1058; GLM-LABEL: 'mul_zext_vXi16'
1059; GLM-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xa2 = zext <2 x i16> %a2 to <2 x i64>
1060; GLM-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xb2 = zext <2 x i16> %b2 to <2 x i64>
1061; GLM-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %xa4 = zext <4 x i16> %a4 to <4 x i64>
1062; GLM-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %xb4 = zext <4 x i16> %b4 to <4 x i64>
1063; GLM-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %xa8 = zext <8 x i16> %a8 to <8 x i64>
1064; GLM-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %xb8 = zext <8 x i16> %b8 to <8 x i64>
1065; GLM-NEXT:  Cost Model: Found an estimated cost of 8 for instruction: %xa16 = zext <16 x i16> %a16 to <16 x i64>
1066; GLM-NEXT:  Cost Model: Found an estimated cost of 8 for instruction: %xb16 = zext <16 x i16> %b16 to <16 x i64>
1067; GLM-NEXT:  Cost Model: Found an estimated cost of 16 for instruction: %xa32 = zext <32 x i16> %a32 to <32 x i64>
1068; GLM-NEXT:  Cost Model: Found an estimated cost of 16 for instruction: %xb32 = zext <32 x i16> %b32 to <32 x i64>
1069; GLM-NEXT:  Cost Model: Found an estimated cost of 32 for instruction: %xa64 = zext <64 x i16> %a64 to <64 x i64>
1070; GLM-NEXT:  Cost Model: Found an estimated cost of 32 for instruction: %xb64 = zext <64 x i16> %b64 to <64 x i64>
1071; GLM-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %res2 = mul <2 x i64> %xa2, %xb2
1072; GLM-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %res4 = mul <4 x i64> %xa4, %xb4
1073; GLM-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %res8 = mul <8 x i64> %xa8, %xb8
1074; GLM-NEXT:  Cost Model: Found an estimated cost of 8 for instruction: %res16 = mul <16 x i64> %xa16, %xb16
1075; GLM-NEXT:  Cost Model: Found an estimated cost of 16 for instruction: %res32 = mul <32 x i64> %xa32, %xb32
1076; GLM-NEXT:  Cost Model: Found an estimated cost of 32 for instruction: %res64 = mul <64 x i64> %xa64, %xb64
1077; GLM-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret void
1078;
1079  %xa2 = zext <2 x i16> %a2 to <2 x i64>
1080  %xb2 = zext <2 x i16> %b2 to <2 x i64>
1081  %xa4 = zext <4 x i16> %a4 to <4 x i64>
1082  %xb4 = zext <4 x i16> %b4 to <4 x i64>
1083  %xa8 = zext <8 x i16> %a8 to <8 x i64>
1084  %xb8 = zext <8 x i16> %b8 to <8 x i64>
1085  %xa16 = zext <16 x i16> %a16 to <16 x i64>
1086  %xb16 = zext <16 x i16> %b16 to <16 x i64>
1087  %xa32 = zext <32 x i16> %a32 to <32 x i64>
1088  %xb32 = zext <32 x i16> %b32 to <32 x i64>
1089  %xa64 = zext <64 x i16> %a64 to <64 x i64>
1090  %xb64 = zext <64 x i16> %b64 to <64 x i64>
1091  %res2 = mul <2 x i64> %xa2, %xb2
1092  %res4 = mul <4 x i64> %xa4, %xb4
1093  %res8 = mul <8 x i64> %xa8, %xb8
1094  %res16 = mul <16 x i64> %xa16, %xb16
1095  %res32 = mul <32 x i64> %xa32, %xb32
1096  %res64 = mul <64 x i64> %xa64, %xb64
1097  ret void
1098}
1099
1100define void @mul_sext_zext_vXi16(<2 x i16> %a2, <2 x i16> %b2, <4 x i16> %a4, <4 x i16> %b4, <8 x i16> %a8, <8 x i16> %b8, <16 x i16> %a16, <16 x i16> %b16, <32 x i16> %a32, <32 x i16> %b32, <64 x i16> %a64, <64 x i16> %b64)  {
1101; SSE2-LABEL: 'mul_sext_zext_vXi16'
1102; SSE2-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %xa2 = sext <2 x i16> %a2 to <2 x i64>
1103; SSE2-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %xb2 = zext <2 x i16> %b2 to <2 x i64>
1104; SSE2-NEXT:  Cost Model: Found an estimated cost of 6 for instruction: %xa4 = sext <4 x i16> %a4 to <4 x i64>
1105; SSE2-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %xb4 = zext <4 x i16> %b4 to <4 x i64>
1106; SSE2-NEXT:  Cost Model: Found an estimated cost of 12 for instruction: %xa8 = sext <8 x i16> %a8 to <8 x i64>
1107; SSE2-NEXT:  Cost Model: Found an estimated cost of 8 for instruction: %xb8 = zext <8 x i16> %b8 to <8 x i64>
1108; SSE2-NEXT:  Cost Model: Found an estimated cost of 24 for instruction: %xa16 = sext <16 x i16> %a16 to <16 x i64>
1109; SSE2-NEXT:  Cost Model: Found an estimated cost of 16 for instruction: %xb16 = zext <16 x i16> %b16 to <16 x i64>
1110; SSE2-NEXT:  Cost Model: Found an estimated cost of 48 for instruction: %xa32 = sext <32 x i16> %a32 to <32 x i64>
1111; SSE2-NEXT:  Cost Model: Found an estimated cost of 32 for instruction: %xb32 = zext <32 x i16> %b32 to <32 x i64>
1112; SSE2-NEXT:  Cost Model: Found an estimated cost of 96 for instruction: %xa64 = sext <64 x i16> %a64 to <64 x i64>
1113; SSE2-NEXT:  Cost Model: Found an estimated cost of 64 for instruction: %xb64 = zext <64 x i16> %b64 to <64 x i64>
1114; SSE2-NEXT:  Cost Model: Found an estimated cost of 7 for instruction: %res2 = mul <2 x i64> %xa2, %xb2
1115; SSE2-NEXT:  Cost Model: Found an estimated cost of 14 for instruction: %res4 = mul <4 x i64> %xa4, %xb4
1116; SSE2-NEXT:  Cost Model: Found an estimated cost of 28 for instruction: %res8 = mul <8 x i64> %xa8, %xb8
1117; SSE2-NEXT:  Cost Model: Found an estimated cost of 56 for instruction: %res16 = mul <16 x i64> %xa16, %xb16
1118; SSE2-NEXT:  Cost Model: Found an estimated cost of 112 for instruction: %res32 = mul <32 x i64> %xa32, %xb32
1119; SSE2-NEXT:  Cost Model: Found an estimated cost of 224 for instruction: %res64 = mul <64 x i64> %xa64, %xb64
1120; SSE2-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret void
1121;
1122; SSSE3-LABEL: 'mul_sext_zext_vXi16'
1123; SSSE3-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %xa2 = sext <2 x i16> %a2 to <2 x i64>
1124; SSSE3-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %xb2 = zext <2 x i16> %b2 to <2 x i64>
1125; SSSE3-NEXT:  Cost Model: Found an estimated cost of 6 for instruction: %xa4 = sext <4 x i16> %a4 to <4 x i64>
1126; SSSE3-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %xb4 = zext <4 x i16> %b4 to <4 x i64>
1127; SSSE3-NEXT:  Cost Model: Found an estimated cost of 12 for instruction: %xa8 = sext <8 x i16> %a8 to <8 x i64>
1128; SSSE3-NEXT:  Cost Model: Found an estimated cost of 8 for instruction: %xb8 = zext <8 x i16> %b8 to <8 x i64>
1129; SSSE3-NEXT:  Cost Model: Found an estimated cost of 24 for instruction: %xa16 = sext <16 x i16> %a16 to <16 x i64>
1130; SSSE3-NEXT:  Cost Model: Found an estimated cost of 16 for instruction: %xb16 = zext <16 x i16> %b16 to <16 x i64>
1131; SSSE3-NEXT:  Cost Model: Found an estimated cost of 48 for instruction: %xa32 = sext <32 x i16> %a32 to <32 x i64>
1132; SSSE3-NEXT:  Cost Model: Found an estimated cost of 32 for instruction: %xb32 = zext <32 x i16> %b32 to <32 x i64>
1133; SSSE3-NEXT:  Cost Model: Found an estimated cost of 96 for instruction: %xa64 = sext <64 x i16> %a64 to <64 x i64>
1134; SSSE3-NEXT:  Cost Model: Found an estimated cost of 64 for instruction: %xb64 = zext <64 x i16> %b64 to <64 x i64>
1135; SSSE3-NEXT:  Cost Model: Found an estimated cost of 7 for instruction: %res2 = mul <2 x i64> %xa2, %xb2
1136; SSSE3-NEXT:  Cost Model: Found an estimated cost of 14 for instruction: %res4 = mul <4 x i64> %xa4, %xb4
1137; SSSE3-NEXT:  Cost Model: Found an estimated cost of 28 for instruction: %res8 = mul <8 x i64> %xa8, %xb8
1138; SSSE3-NEXT:  Cost Model: Found an estimated cost of 56 for instruction: %res16 = mul <16 x i64> %xa16, %xb16
1139; SSSE3-NEXT:  Cost Model: Found an estimated cost of 112 for instruction: %res32 = mul <32 x i64> %xa32, %xb32
1140; SSSE3-NEXT:  Cost Model: Found an estimated cost of 224 for instruction: %res64 = mul <64 x i64> %xa64, %xb64
1141; SSSE3-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret void
1142;
1143; SSE42-LABEL: 'mul_sext_zext_vXi16'
1144; SSE42-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xa2 = sext <2 x i16> %a2 to <2 x i64>
1145; SSE42-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xb2 = zext <2 x i16> %b2 to <2 x i64>
1146; SSE42-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %xa4 = sext <4 x i16> %a4 to <4 x i64>
1147; SSE42-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %xb4 = zext <4 x i16> %b4 to <4 x i64>
1148; SSE42-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %xa8 = sext <8 x i16> %a8 to <8 x i64>
1149; SSE42-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %xb8 = zext <8 x i16> %b8 to <8 x i64>
1150; SSE42-NEXT:  Cost Model: Found an estimated cost of 8 for instruction: %xa16 = sext <16 x i16> %a16 to <16 x i64>
1151; SSE42-NEXT:  Cost Model: Found an estimated cost of 8 for instruction: %xb16 = zext <16 x i16> %b16 to <16 x i64>
1152; SSE42-NEXT:  Cost Model: Found an estimated cost of 16 for instruction: %xa32 = sext <32 x i16> %a32 to <32 x i64>
1153; SSE42-NEXT:  Cost Model: Found an estimated cost of 16 for instruction: %xb32 = zext <32 x i16> %b32 to <32 x i64>
1154; SSE42-NEXT:  Cost Model: Found an estimated cost of 32 for instruction: %xa64 = sext <64 x i16> %a64 to <64 x i64>
1155; SSE42-NEXT:  Cost Model: Found an estimated cost of 32 for instruction: %xb64 = zext <64 x i16> %b64 to <64 x i64>
1156; SSE42-NEXT:  Cost Model: Found an estimated cost of 6 for instruction: %res2 = mul <2 x i64> %xa2, %xb2
1157; SSE42-NEXT:  Cost Model: Found an estimated cost of 12 for instruction: %res4 = mul <4 x i64> %xa4, %xb4
1158; SSE42-NEXT:  Cost Model: Found an estimated cost of 24 for instruction: %res8 = mul <8 x i64> %xa8, %xb8
1159; SSE42-NEXT:  Cost Model: Found an estimated cost of 48 for instruction: %res16 = mul <16 x i64> %xa16, %xb16
1160; SSE42-NEXT:  Cost Model: Found an estimated cost of 96 for instruction: %res32 = mul <32 x i64> %xa32, %xb32
1161; SSE42-NEXT:  Cost Model: Found an estimated cost of 192 for instruction: %res64 = mul <64 x i64> %xa64, %xb64
1162; SSE42-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret void
1163;
1164; AVX1-LABEL: 'mul_sext_zext_vXi16'
1165; AVX1-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xa2 = sext <2 x i16> %a2 to <2 x i64>
1166; AVX1-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xb2 = zext <2 x i16> %b2 to <2 x i64>
1167; AVX1-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %xa4 = sext <4 x i16> %a4 to <4 x i64>
1168; AVX1-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %xb4 = zext <4 x i16> %b4 to <4 x i64>
1169; AVX1-NEXT:  Cost Model: Found an estimated cost of 6 for instruction: %xa8 = sext <8 x i16> %a8 to <8 x i64>
1170; AVX1-NEXT:  Cost Model: Found an estimated cost of 6 for instruction: %xb8 = zext <8 x i16> %b8 to <8 x i64>
1171; AVX1-NEXT:  Cost Model: Found an estimated cost of 13 for instruction: %xa16 = sext <16 x i16> %a16 to <16 x i64>
1172; AVX1-NEXT:  Cost Model: Found an estimated cost of 13 for instruction: %xb16 = zext <16 x i16> %b16 to <16 x i64>
1173; AVX1-NEXT:  Cost Model: Found an estimated cost of 26 for instruction: %xa32 = sext <32 x i16> %a32 to <32 x i64>
1174; AVX1-NEXT:  Cost Model: Found an estimated cost of 26 for instruction: %xb32 = zext <32 x i16> %b32 to <32 x i64>
1175; AVX1-NEXT:  Cost Model: Found an estimated cost of 52 for instruction: %xa64 = sext <64 x i16> %a64 to <64 x i64>
1176; AVX1-NEXT:  Cost Model: Found an estimated cost of 52 for instruction: %xb64 = zext <64 x i16> %b64 to <64 x i64>
1177; AVX1-NEXT:  Cost Model: Found an estimated cost of 6 for instruction: %res2 = mul <2 x i64> %xa2, %xb2
1178; AVX1-NEXT:  Cost Model: Found an estimated cost of 12 for instruction: %res4 = mul <4 x i64> %xa4, %xb4
1179; AVX1-NEXT:  Cost Model: Found an estimated cost of 24 for instruction: %res8 = mul <8 x i64> %xa8, %xb8
1180; AVX1-NEXT:  Cost Model: Found an estimated cost of 48 for instruction: %res16 = mul <16 x i64> %xa16, %xb16
1181; AVX1-NEXT:  Cost Model: Found an estimated cost of 96 for instruction: %res32 = mul <32 x i64> %xa32, %xb32
1182; AVX1-NEXT:  Cost Model: Found an estimated cost of 192 for instruction: %res64 = mul <64 x i64> %xa64, %xb64
1183; AVX1-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret void
1184;
1185; AVX2-LABEL: 'mul_sext_zext_vXi16'
1186; AVX2-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xa2 = sext <2 x i16> %a2 to <2 x i64>
1187; AVX2-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xb2 = zext <2 x i16> %b2 to <2 x i64>
1188; AVX2-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %xa4 = sext <4 x i16> %a4 to <4 x i64>
1189; AVX2-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %xb4 = zext <4 x i16> %b4 to <4 x i64>
1190; AVX2-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %xa8 = sext <8 x i16> %a8 to <8 x i64>
1191; AVX2-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %xb8 = zext <8 x i16> %b8 to <8 x i64>
1192; AVX2-NEXT:  Cost Model: Found an estimated cost of 9 for instruction: %xa16 = sext <16 x i16> %a16 to <16 x i64>
1193; AVX2-NEXT:  Cost Model: Found an estimated cost of 9 for instruction: %xb16 = zext <16 x i16> %b16 to <16 x i64>
1194; AVX2-NEXT:  Cost Model: Found an estimated cost of 18 for instruction: %xa32 = sext <32 x i16> %a32 to <32 x i64>
1195; AVX2-NEXT:  Cost Model: Found an estimated cost of 18 for instruction: %xb32 = zext <32 x i16> %b32 to <32 x i64>
1196; AVX2-NEXT:  Cost Model: Found an estimated cost of 36 for instruction: %xa64 = sext <64 x i16> %a64 to <64 x i64>
1197; AVX2-NEXT:  Cost Model: Found an estimated cost of 36 for instruction: %xb64 = zext <64 x i16> %b64 to <64 x i64>
1198; AVX2-NEXT:  Cost Model: Found an estimated cost of 6 for instruction: %res2 = mul <2 x i64> %xa2, %xb2
1199; AVX2-NEXT:  Cost Model: Found an estimated cost of 6 for instruction: %res4 = mul <4 x i64> %xa4, %xb4
1200; AVX2-NEXT:  Cost Model: Found an estimated cost of 12 for instruction: %res8 = mul <8 x i64> %xa8, %xb8
1201; AVX2-NEXT:  Cost Model: Found an estimated cost of 24 for instruction: %res16 = mul <16 x i64> %xa16, %xb16
1202; AVX2-NEXT:  Cost Model: Found an estimated cost of 48 for instruction: %res32 = mul <32 x i64> %xa32, %xb32
1203; AVX2-NEXT:  Cost Model: Found an estimated cost of 96 for instruction: %res64 = mul <64 x i64> %xa64, %xb64
1204; AVX2-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret void
1205;
1206; AVX512F-LABEL: 'mul_sext_zext_vXi16'
1207; AVX512F-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xa2 = sext <2 x i16> %a2 to <2 x i64>
1208; AVX512F-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xb2 = zext <2 x i16> %b2 to <2 x i64>
1209; AVX512F-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xa4 = sext <4 x i16> %a4 to <4 x i64>
1210; AVX512F-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xb4 = zext <4 x i16> %b4 to <4 x i64>
1211; AVX512F-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xa8 = sext <8 x i16> %a8 to <8 x i64>
1212; AVX512F-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xb8 = zext <8 x i16> %b8 to <8 x i64>
1213; AVX512F-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %xa16 = sext <16 x i16> %a16 to <16 x i64>
1214; AVX512F-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %xb16 = zext <16 x i16> %b16 to <16 x i64>
1215; AVX512F-NEXT:  Cost Model: Found an estimated cost of 7 for instruction: %xa32 = sext <32 x i16> %a32 to <32 x i64>
1216; AVX512F-NEXT:  Cost Model: Found an estimated cost of 7 for instruction: %xb32 = zext <32 x i16> %b32 to <32 x i64>
1217; AVX512F-NEXT:  Cost Model: Found an estimated cost of 14 for instruction: %xa64 = sext <64 x i16> %a64 to <64 x i64>
1218; AVX512F-NEXT:  Cost Model: Found an estimated cost of 14 for instruction: %xb64 = zext <64 x i16> %b64 to <64 x i64>
1219; AVX512F-NEXT:  Cost Model: Found an estimated cost of 6 for instruction: %res2 = mul <2 x i64> %xa2, %xb2
1220; AVX512F-NEXT:  Cost Model: Found an estimated cost of 6 for instruction: %res4 = mul <4 x i64> %xa4, %xb4
1221; AVX512F-NEXT:  Cost Model: Found an estimated cost of 6 for instruction: %res8 = mul <8 x i64> %xa8, %xb8
1222; AVX512F-NEXT:  Cost Model: Found an estimated cost of 12 for instruction: %res16 = mul <16 x i64> %xa16, %xb16
1223; AVX512F-NEXT:  Cost Model: Found an estimated cost of 24 for instruction: %res32 = mul <32 x i64> %xa32, %xb32
1224; AVX512F-NEXT:  Cost Model: Found an estimated cost of 48 for instruction: %res64 = mul <64 x i64> %xa64, %xb64
1225; AVX512F-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret void
1226;
1227; AVX512BW-LABEL: 'mul_sext_zext_vXi16'
1228; AVX512BW-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xa2 = sext <2 x i16> %a2 to <2 x i64>
1229; AVX512BW-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xb2 = zext <2 x i16> %b2 to <2 x i64>
1230; AVX512BW-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xa4 = sext <4 x i16> %a4 to <4 x i64>
1231; AVX512BW-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xb4 = zext <4 x i16> %b4 to <4 x i64>
1232; AVX512BW-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xa8 = sext <8 x i16> %a8 to <8 x i64>
1233; AVX512BW-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xb8 = zext <8 x i16> %b8 to <8 x i64>
1234; AVX512BW-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %xa16 = sext <16 x i16> %a16 to <16 x i64>
1235; AVX512BW-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %xb16 = zext <16 x i16> %b16 to <16 x i64>
1236; AVX512BW-NEXT:  Cost Model: Found an estimated cost of 7 for instruction: %xa32 = sext <32 x i16> %a32 to <32 x i64>
1237; AVX512BW-NEXT:  Cost Model: Found an estimated cost of 7 for instruction: %xb32 = zext <32 x i16> %b32 to <32 x i64>
1238; AVX512BW-NEXT:  Cost Model: Found an estimated cost of 14 for instruction: %xa64 = sext <64 x i16> %a64 to <64 x i64>
1239; AVX512BW-NEXT:  Cost Model: Found an estimated cost of 14 for instruction: %xb64 = zext <64 x i16> %b64 to <64 x i64>
1240; AVX512BW-NEXT:  Cost Model: Found an estimated cost of 6 for instruction: %res2 = mul <2 x i64> %xa2, %xb2
1241; AVX512BW-NEXT:  Cost Model: Found an estimated cost of 6 for instruction: %res4 = mul <4 x i64> %xa4, %xb4
1242; AVX512BW-NEXT:  Cost Model: Found an estimated cost of 6 for instruction: %res8 = mul <8 x i64> %xa8, %xb8
1243; AVX512BW-NEXT:  Cost Model: Found an estimated cost of 12 for instruction: %res16 = mul <16 x i64> %xa16, %xb16
1244; AVX512BW-NEXT:  Cost Model: Found an estimated cost of 24 for instruction: %res32 = mul <32 x i64> %xa32, %xb32
1245; AVX512BW-NEXT:  Cost Model: Found an estimated cost of 48 for instruction: %res64 = mul <64 x i64> %xa64, %xb64
1246; AVX512BW-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret void
1247;
1248; AVX512DQ-LABEL: 'mul_sext_zext_vXi16'
1249; AVX512DQ-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xa2 = sext <2 x i16> %a2 to <2 x i64>
1250; AVX512DQ-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xb2 = zext <2 x i16> %b2 to <2 x i64>
1251; AVX512DQ-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xa4 = sext <4 x i16> %a4 to <4 x i64>
1252; AVX512DQ-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xb4 = zext <4 x i16> %b4 to <4 x i64>
1253; AVX512DQ-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xa8 = sext <8 x i16> %a8 to <8 x i64>
1254; AVX512DQ-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xb8 = zext <8 x i16> %b8 to <8 x i64>
1255; AVX512DQ-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %xa16 = sext <16 x i16> %a16 to <16 x i64>
1256; AVX512DQ-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %xb16 = zext <16 x i16> %b16 to <16 x i64>
1257; AVX512DQ-NEXT:  Cost Model: Found an estimated cost of 7 for instruction: %xa32 = sext <32 x i16> %a32 to <32 x i64>
1258; AVX512DQ-NEXT:  Cost Model: Found an estimated cost of 7 for instruction: %xb32 = zext <32 x i16> %b32 to <32 x i64>
1259; AVX512DQ-NEXT:  Cost Model: Found an estimated cost of 14 for instruction: %xa64 = sext <64 x i16> %a64 to <64 x i64>
1260; AVX512DQ-NEXT:  Cost Model: Found an estimated cost of 14 for instruction: %xb64 = zext <64 x i16> %b64 to <64 x i64>
1261; AVX512DQ-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %res2 = mul <2 x i64> %xa2, %xb2
1262; AVX512DQ-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %res4 = mul <4 x i64> %xa4, %xb4
1263; AVX512DQ-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %res8 = mul <8 x i64> %xa8, %xb8
1264; AVX512DQ-NEXT:  Cost Model: Found an estimated cost of 6 for instruction: %res16 = mul <16 x i64> %xa16, %xb16
1265; AVX512DQ-NEXT:  Cost Model: Found an estimated cost of 12 for instruction: %res32 = mul <32 x i64> %xa32, %xb32
1266; AVX512DQ-NEXT:  Cost Model: Found an estimated cost of 24 for instruction: %res64 = mul <64 x i64> %xa64, %xb64
1267; AVX512DQ-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret void
1268;
1269; SLM-LABEL: 'mul_sext_zext_vXi16'
1270; SLM-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xa2 = sext <2 x i16> %a2 to <2 x i64>
1271; SLM-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xb2 = zext <2 x i16> %b2 to <2 x i64>
1272; SLM-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %xa4 = sext <4 x i16> %a4 to <4 x i64>
1273; SLM-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %xb4 = zext <4 x i16> %b4 to <4 x i64>
1274; SLM-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %xa8 = sext <8 x i16> %a8 to <8 x i64>
1275; SLM-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %xb8 = zext <8 x i16> %b8 to <8 x i64>
1276; SLM-NEXT:  Cost Model: Found an estimated cost of 8 for instruction: %xa16 = sext <16 x i16> %a16 to <16 x i64>
1277; SLM-NEXT:  Cost Model: Found an estimated cost of 8 for instruction: %xb16 = zext <16 x i16> %b16 to <16 x i64>
1278; SLM-NEXT:  Cost Model: Found an estimated cost of 16 for instruction: %xa32 = sext <32 x i16> %a32 to <32 x i64>
1279; SLM-NEXT:  Cost Model: Found an estimated cost of 16 for instruction: %xb32 = zext <32 x i16> %b32 to <32 x i64>
1280; SLM-NEXT:  Cost Model: Found an estimated cost of 32 for instruction: %xa64 = sext <64 x i16> %a64 to <64 x i64>
1281; SLM-NEXT:  Cost Model: Found an estimated cost of 32 for instruction: %xb64 = zext <64 x i16> %b64 to <64 x i64>
1282; SLM-NEXT:  Cost Model: Found an estimated cost of 17 for instruction: %res2 = mul <2 x i64> %xa2, %xb2
1283; SLM-NEXT:  Cost Model: Found an estimated cost of 34 for instruction: %res4 = mul <4 x i64> %xa4, %xb4
1284; SLM-NEXT:  Cost Model: Found an estimated cost of 68 for instruction: %res8 = mul <8 x i64> %xa8, %xb8
1285; SLM-NEXT:  Cost Model: Found an estimated cost of 136 for instruction: %res16 = mul <16 x i64> %xa16, %xb16
1286; SLM-NEXT:  Cost Model: Found an estimated cost of 272 for instruction: %res32 = mul <32 x i64> %xa32, %xb32
1287; SLM-NEXT:  Cost Model: Found an estimated cost of 544 for instruction: %res64 = mul <64 x i64> %xa64, %xb64
1288; SLM-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret void
1289;
1290; GLM-LABEL: 'mul_sext_zext_vXi16'
1291; GLM-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xa2 = sext <2 x i16> %a2 to <2 x i64>
1292; GLM-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xb2 = zext <2 x i16> %b2 to <2 x i64>
1293; GLM-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %xa4 = sext <4 x i16> %a4 to <4 x i64>
1294; GLM-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %xb4 = zext <4 x i16> %b4 to <4 x i64>
1295; GLM-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %xa8 = sext <8 x i16> %a8 to <8 x i64>
1296; GLM-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %xb8 = zext <8 x i16> %b8 to <8 x i64>
1297; GLM-NEXT:  Cost Model: Found an estimated cost of 8 for instruction: %xa16 = sext <16 x i16> %a16 to <16 x i64>
1298; GLM-NEXT:  Cost Model: Found an estimated cost of 8 for instruction: %xb16 = zext <16 x i16> %b16 to <16 x i64>
1299; GLM-NEXT:  Cost Model: Found an estimated cost of 16 for instruction: %xa32 = sext <32 x i16> %a32 to <32 x i64>
1300; GLM-NEXT:  Cost Model: Found an estimated cost of 16 for instruction: %xb32 = zext <32 x i16> %b32 to <32 x i64>
1301; GLM-NEXT:  Cost Model: Found an estimated cost of 32 for instruction: %xa64 = sext <64 x i16> %a64 to <64 x i64>
1302; GLM-NEXT:  Cost Model: Found an estimated cost of 32 for instruction: %xb64 = zext <64 x i16> %b64 to <64 x i64>
1303; GLM-NEXT:  Cost Model: Found an estimated cost of 6 for instruction: %res2 = mul <2 x i64> %xa2, %xb2
1304; GLM-NEXT:  Cost Model: Found an estimated cost of 12 for instruction: %res4 = mul <4 x i64> %xa4, %xb4
1305; GLM-NEXT:  Cost Model: Found an estimated cost of 24 for instruction: %res8 = mul <8 x i64> %xa8, %xb8
1306; GLM-NEXT:  Cost Model: Found an estimated cost of 48 for instruction: %res16 = mul <16 x i64> %xa16, %xb16
1307; GLM-NEXT:  Cost Model: Found an estimated cost of 96 for instruction: %res32 = mul <32 x i64> %xa32, %xb32
1308; GLM-NEXT:  Cost Model: Found an estimated cost of 192 for instruction: %res64 = mul <64 x i64> %xa64, %xb64
1309; GLM-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret void
1310;
1311  %xa2 = sext <2 x i16> %a2 to <2 x i64>
1312  %xb2 = zext <2 x i16> %b2 to <2 x i64>
1313  %xa4 = sext <4 x i16> %a4 to <4 x i64>
1314  %xb4 = zext <4 x i16> %b4 to <4 x i64>
1315  %xa8 = sext <8 x i16> %a8 to <8 x i64>
1316  %xb8 = zext <8 x i16> %b8 to <8 x i64>
1317  %xa16 = sext <16 x i16> %a16 to <16 x i64>
1318  %xb16 = zext <16 x i16> %b16 to <16 x i64>
1319  %xa32 = sext <32 x i16> %a32 to <32 x i64>
1320  %xb32 = zext <32 x i16> %b32 to <32 x i64>
1321  %xa64 = sext <64 x i16> %a64 to <64 x i64>
1322  %xb64 = zext <64 x i16> %b64 to <64 x i64>
1323  %res2 = mul <2 x i64> %xa2, %xb2
1324  %res4 = mul <4 x i64> %xa4, %xb4
1325  %res8 = mul <8 x i64> %xa8, %xb8
1326  %res16 = mul <16 x i64> %xa16, %xb16
1327  %res32 = mul <32 x i64> %xa32, %xb32
1328  %res64 = mul <64 x i64> %xa64, %xb64
1329  ret void
1330}
1331
1332;
1333; mul vXi32 -> mXi64
1334;
1335
1336define void @mul_sext_vXi32(<2 x i32> %a2, <2 x i32> %b2, <4 x i32> %a4, <4 x i32> %b4, <8 x i32> %a8, <8 x i32> %b8, <16 x i32> %a16, <16 x i32> %b16, <32 x i32> %a32, <32 x i32> %b32, <64 x i32> %a64, <64 x i32> %b64)  {
1337; SSE2-LABEL: 'mul_sext_vXi32'
1338; SSE2-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %xa2 = sext <2 x i32> %a2 to <2 x i64>
1339; SSE2-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %xb2 = sext <2 x i32> %b2 to <2 x i64>
1340; SSE2-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %xa4 = sext <4 x i32> %a4 to <4 x i64>
1341; SSE2-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %xb4 = sext <4 x i32> %b4 to <4 x i64>
1342; SSE2-NEXT:  Cost Model: Found an estimated cost of 8 for instruction: %xa8 = sext <8 x i32> %a8 to <8 x i64>
1343; SSE2-NEXT:  Cost Model: Found an estimated cost of 8 for instruction: %xb8 = sext <8 x i32> %b8 to <8 x i64>
1344; SSE2-NEXT:  Cost Model: Found an estimated cost of 16 for instruction: %xa16 = sext <16 x i32> %a16 to <16 x i64>
1345; SSE2-NEXT:  Cost Model: Found an estimated cost of 16 for instruction: %xb16 = sext <16 x i32> %b16 to <16 x i64>
1346; SSE2-NEXT:  Cost Model: Found an estimated cost of 32 for instruction: %xa32 = sext <32 x i32> %a32 to <32 x i64>
1347; SSE2-NEXT:  Cost Model: Found an estimated cost of 32 for instruction: %xb32 = sext <32 x i32> %b32 to <32 x i64>
1348; SSE2-NEXT:  Cost Model: Found an estimated cost of 64 for instruction: %xa64 = sext <64 x i32> %a64 to <64 x i64>
1349; SSE2-NEXT:  Cost Model: Found an estimated cost of 64 for instruction: %xb64 = sext <64 x i32> %b64 to <64 x i64>
1350; SSE2-NEXT:  Cost Model: Found an estimated cost of 7 for instruction: %res2 = mul <2 x i64> %xa2, %xb2
1351; SSE2-NEXT:  Cost Model: Found an estimated cost of 14 for instruction: %res4 = mul <4 x i64> %xa4, %xb4
1352; SSE2-NEXT:  Cost Model: Found an estimated cost of 28 for instruction: %res8 = mul <8 x i64> %xa8, %xb8
1353; SSE2-NEXT:  Cost Model: Found an estimated cost of 56 for instruction: %res16 = mul <16 x i64> %xa16, %xb16
1354; SSE2-NEXT:  Cost Model: Found an estimated cost of 112 for instruction: %res32 = mul <32 x i64> %xa32, %xb32
1355; SSE2-NEXT:  Cost Model: Found an estimated cost of 224 for instruction: %res64 = mul <64 x i64> %xa64, %xb64
1356; SSE2-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret void
1357;
1358; SSSE3-LABEL: 'mul_sext_vXi32'
1359; SSSE3-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %xa2 = sext <2 x i32> %a2 to <2 x i64>
1360; SSSE3-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %xb2 = sext <2 x i32> %b2 to <2 x i64>
1361; SSSE3-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %xa4 = sext <4 x i32> %a4 to <4 x i64>
1362; SSSE3-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %xb4 = sext <4 x i32> %b4 to <4 x i64>
1363; SSSE3-NEXT:  Cost Model: Found an estimated cost of 8 for instruction: %xa8 = sext <8 x i32> %a8 to <8 x i64>
1364; SSSE3-NEXT:  Cost Model: Found an estimated cost of 8 for instruction: %xb8 = sext <8 x i32> %b8 to <8 x i64>
1365; SSSE3-NEXT:  Cost Model: Found an estimated cost of 16 for instruction: %xa16 = sext <16 x i32> %a16 to <16 x i64>
1366; SSSE3-NEXT:  Cost Model: Found an estimated cost of 16 for instruction: %xb16 = sext <16 x i32> %b16 to <16 x i64>
1367; SSSE3-NEXT:  Cost Model: Found an estimated cost of 32 for instruction: %xa32 = sext <32 x i32> %a32 to <32 x i64>
1368; SSSE3-NEXT:  Cost Model: Found an estimated cost of 32 for instruction: %xb32 = sext <32 x i32> %b32 to <32 x i64>
1369; SSSE3-NEXT:  Cost Model: Found an estimated cost of 64 for instruction: %xa64 = sext <64 x i32> %a64 to <64 x i64>
1370; SSSE3-NEXT:  Cost Model: Found an estimated cost of 64 for instruction: %xb64 = sext <64 x i32> %b64 to <64 x i64>
1371; SSSE3-NEXT:  Cost Model: Found an estimated cost of 7 for instruction: %res2 = mul <2 x i64> %xa2, %xb2
1372; SSSE3-NEXT:  Cost Model: Found an estimated cost of 14 for instruction: %res4 = mul <4 x i64> %xa4, %xb4
1373; SSSE3-NEXT:  Cost Model: Found an estimated cost of 28 for instruction: %res8 = mul <8 x i64> %xa8, %xb8
1374; SSSE3-NEXT:  Cost Model: Found an estimated cost of 56 for instruction: %res16 = mul <16 x i64> %xa16, %xb16
1375; SSSE3-NEXT:  Cost Model: Found an estimated cost of 112 for instruction: %res32 = mul <32 x i64> %xa32, %xb32
1376; SSSE3-NEXT:  Cost Model: Found an estimated cost of 224 for instruction: %res64 = mul <64 x i64> %xa64, %xb64
1377; SSSE3-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret void
1378;
1379; SSE42-LABEL: 'mul_sext_vXi32'
1380; SSE42-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xa2 = sext <2 x i32> %a2 to <2 x i64>
1381; SSE42-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xb2 = sext <2 x i32> %b2 to <2 x i64>
1382; SSE42-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %xa4 = sext <4 x i32> %a4 to <4 x i64>
1383; SSE42-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %xb4 = sext <4 x i32> %b4 to <4 x i64>
1384; SSE42-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %xa8 = sext <8 x i32> %a8 to <8 x i64>
1385; SSE42-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %xb8 = sext <8 x i32> %b8 to <8 x i64>
1386; SSE42-NEXT:  Cost Model: Found an estimated cost of 8 for instruction: %xa16 = sext <16 x i32> %a16 to <16 x i64>
1387; SSE42-NEXT:  Cost Model: Found an estimated cost of 8 for instruction: %xb16 = sext <16 x i32> %b16 to <16 x i64>
1388; SSE42-NEXT:  Cost Model: Found an estimated cost of 16 for instruction: %xa32 = sext <32 x i32> %a32 to <32 x i64>
1389; SSE42-NEXT:  Cost Model: Found an estimated cost of 16 for instruction: %xb32 = sext <32 x i32> %b32 to <32 x i64>
1390; SSE42-NEXT:  Cost Model: Found an estimated cost of 32 for instruction: %xa64 = sext <64 x i32> %a64 to <64 x i64>
1391; SSE42-NEXT:  Cost Model: Found an estimated cost of 32 for instruction: %xb64 = sext <64 x i32> %b64 to <64 x i64>
1392; SSE42-NEXT:  Cost Model: Found an estimated cost of 6 for instruction: %res2 = mul <2 x i64> %xa2, %xb2
1393; SSE42-NEXT:  Cost Model: Found an estimated cost of 12 for instruction: %res4 = mul <4 x i64> %xa4, %xb4
1394; SSE42-NEXT:  Cost Model: Found an estimated cost of 24 for instruction: %res8 = mul <8 x i64> %xa8, %xb8
1395; SSE42-NEXT:  Cost Model: Found an estimated cost of 48 for instruction: %res16 = mul <16 x i64> %xa16, %xb16
1396; SSE42-NEXT:  Cost Model: Found an estimated cost of 96 for instruction: %res32 = mul <32 x i64> %xa32, %xb32
1397; SSE42-NEXT:  Cost Model: Found an estimated cost of 192 for instruction: %res64 = mul <64 x i64> %xa64, %xb64
1398; SSE42-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret void
1399;
1400; AVX1-LABEL: 'mul_sext_vXi32'
1401; AVX1-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xa2 = sext <2 x i32> %a2 to <2 x i64>
1402; AVX1-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xb2 = sext <2 x i32> %b2 to <2 x i64>
1403; AVX1-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %xa4 = sext <4 x i32> %a4 to <4 x i64>
1404; AVX1-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %xb4 = sext <4 x i32> %b4 to <4 x i64>
1405; AVX1-NEXT:  Cost Model: Found an estimated cost of 7 for instruction: %xa8 = sext <8 x i32> %a8 to <8 x i64>
1406; AVX1-NEXT:  Cost Model: Found an estimated cost of 7 for instruction: %xb8 = sext <8 x i32> %b8 to <8 x i64>
1407; AVX1-NEXT:  Cost Model: Found an estimated cost of 14 for instruction: %xa16 = sext <16 x i32> %a16 to <16 x i64>
1408; AVX1-NEXT:  Cost Model: Found an estimated cost of 14 for instruction: %xb16 = sext <16 x i32> %b16 to <16 x i64>
1409; AVX1-NEXT:  Cost Model: Found an estimated cost of 28 for instruction: %xa32 = sext <32 x i32> %a32 to <32 x i64>
1410; AVX1-NEXT:  Cost Model: Found an estimated cost of 28 for instruction: %xb32 = sext <32 x i32> %b32 to <32 x i64>
1411; AVX1-NEXT:  Cost Model: Found an estimated cost of 56 for instruction: %xa64 = sext <64 x i32> %a64 to <64 x i64>
1412; AVX1-NEXT:  Cost Model: Found an estimated cost of 56 for instruction: %xb64 = sext <64 x i32> %b64 to <64 x i64>
1413; AVX1-NEXT:  Cost Model: Found an estimated cost of 6 for instruction: %res2 = mul <2 x i64> %xa2, %xb2
1414; AVX1-NEXT:  Cost Model: Found an estimated cost of 12 for instruction: %res4 = mul <4 x i64> %xa4, %xb4
1415; AVX1-NEXT:  Cost Model: Found an estimated cost of 24 for instruction: %res8 = mul <8 x i64> %xa8, %xb8
1416; AVX1-NEXT:  Cost Model: Found an estimated cost of 48 for instruction: %res16 = mul <16 x i64> %xa16, %xb16
1417; AVX1-NEXT:  Cost Model: Found an estimated cost of 96 for instruction: %res32 = mul <32 x i64> %xa32, %xb32
1418; AVX1-NEXT:  Cost Model: Found an estimated cost of 192 for instruction: %res64 = mul <64 x i64> %xa64, %xb64
1419; AVX1-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret void
1420;
1421; AVX2-LABEL: 'mul_sext_vXi32'
1422; AVX2-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xa2 = sext <2 x i32> %a2 to <2 x i64>
1423; AVX2-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xb2 = sext <2 x i32> %b2 to <2 x i64>
1424; AVX2-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %xa4 = sext <4 x i32> %a4 to <4 x i64>
1425; AVX2-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %xb4 = sext <4 x i32> %b4 to <4 x i64>
1426; AVX2-NEXT:  Cost Model: Found an estimated cost of 5 for instruction: %xa8 = sext <8 x i32> %a8 to <8 x i64>
1427; AVX2-NEXT:  Cost Model: Found an estimated cost of 5 for instruction: %xb8 = sext <8 x i32> %b8 to <8 x i64>
1428; AVX2-NEXT:  Cost Model: Found an estimated cost of 10 for instruction: %xa16 = sext <16 x i32> %a16 to <16 x i64>
1429; AVX2-NEXT:  Cost Model: Found an estimated cost of 10 for instruction: %xb16 = sext <16 x i32> %b16 to <16 x i64>
1430; AVX2-NEXT:  Cost Model: Found an estimated cost of 20 for instruction: %xa32 = sext <32 x i32> %a32 to <32 x i64>
1431; AVX2-NEXT:  Cost Model: Found an estimated cost of 20 for instruction: %xb32 = sext <32 x i32> %b32 to <32 x i64>
1432; AVX2-NEXT:  Cost Model: Found an estimated cost of 40 for instruction: %xa64 = sext <64 x i32> %a64 to <64 x i64>
1433; AVX2-NEXT:  Cost Model: Found an estimated cost of 40 for instruction: %xb64 = sext <64 x i32> %b64 to <64 x i64>
1434; AVX2-NEXT:  Cost Model: Found an estimated cost of 6 for instruction: %res2 = mul <2 x i64> %xa2, %xb2
1435; AVX2-NEXT:  Cost Model: Found an estimated cost of 6 for instruction: %res4 = mul <4 x i64> %xa4, %xb4
1436; AVX2-NEXT:  Cost Model: Found an estimated cost of 12 for instruction: %res8 = mul <8 x i64> %xa8, %xb8
1437; AVX2-NEXT:  Cost Model: Found an estimated cost of 24 for instruction: %res16 = mul <16 x i64> %xa16, %xb16
1438; AVX2-NEXT:  Cost Model: Found an estimated cost of 48 for instruction: %res32 = mul <32 x i64> %xa32, %xb32
1439; AVX2-NEXT:  Cost Model: Found an estimated cost of 96 for instruction: %res64 = mul <64 x i64> %xa64, %xb64
1440; AVX2-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret void
1441;
1442; AVX512F-LABEL: 'mul_sext_vXi32'
1443; AVX512F-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xa2 = sext <2 x i32> %a2 to <2 x i64>
1444; AVX512F-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xb2 = sext <2 x i32> %b2 to <2 x i64>
1445; AVX512F-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xa4 = sext <4 x i32> %a4 to <4 x i64>
1446; AVX512F-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xb4 = sext <4 x i32> %b4 to <4 x i64>
1447; AVX512F-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xa8 = sext <8 x i32> %a8 to <8 x i64>
1448; AVX512F-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xb8 = sext <8 x i32> %b8 to <8 x i64>
1449; AVX512F-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %xa16 = sext <16 x i32> %a16 to <16 x i64>
1450; AVX512F-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %xb16 = sext <16 x i32> %b16 to <16 x i64>
1451; AVX512F-NEXT:  Cost Model: Found an estimated cost of 6 for instruction: %xa32 = sext <32 x i32> %a32 to <32 x i64>
1452; AVX512F-NEXT:  Cost Model: Found an estimated cost of 6 for instruction: %xb32 = sext <32 x i32> %b32 to <32 x i64>
1453; AVX512F-NEXT:  Cost Model: Found an estimated cost of 12 for instruction: %xa64 = sext <64 x i32> %a64 to <64 x i64>
1454; AVX512F-NEXT:  Cost Model: Found an estimated cost of 12 for instruction: %xb64 = sext <64 x i32> %b64 to <64 x i64>
1455; AVX512F-NEXT:  Cost Model: Found an estimated cost of 6 for instruction: %res2 = mul <2 x i64> %xa2, %xb2
1456; AVX512F-NEXT:  Cost Model: Found an estimated cost of 6 for instruction: %res4 = mul <4 x i64> %xa4, %xb4
1457; AVX512F-NEXT:  Cost Model: Found an estimated cost of 6 for instruction: %res8 = mul <8 x i64> %xa8, %xb8
1458; AVX512F-NEXT:  Cost Model: Found an estimated cost of 12 for instruction: %res16 = mul <16 x i64> %xa16, %xb16
1459; AVX512F-NEXT:  Cost Model: Found an estimated cost of 24 for instruction: %res32 = mul <32 x i64> %xa32, %xb32
1460; AVX512F-NEXT:  Cost Model: Found an estimated cost of 48 for instruction: %res64 = mul <64 x i64> %xa64, %xb64
1461; AVX512F-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret void
1462;
1463; AVX512BW-LABEL: 'mul_sext_vXi32'
1464; AVX512BW-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xa2 = sext <2 x i32> %a2 to <2 x i64>
1465; AVX512BW-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xb2 = sext <2 x i32> %b2 to <2 x i64>
1466; AVX512BW-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xa4 = sext <4 x i32> %a4 to <4 x i64>
1467; AVX512BW-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xb4 = sext <4 x i32> %b4 to <4 x i64>
1468; AVX512BW-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xa8 = sext <8 x i32> %a8 to <8 x i64>
1469; AVX512BW-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xb8 = sext <8 x i32> %b8 to <8 x i64>
1470; AVX512BW-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %xa16 = sext <16 x i32> %a16 to <16 x i64>
1471; AVX512BW-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %xb16 = sext <16 x i32> %b16 to <16 x i64>
1472; AVX512BW-NEXT:  Cost Model: Found an estimated cost of 6 for instruction: %xa32 = sext <32 x i32> %a32 to <32 x i64>
1473; AVX512BW-NEXT:  Cost Model: Found an estimated cost of 6 for instruction: %xb32 = sext <32 x i32> %b32 to <32 x i64>
1474; AVX512BW-NEXT:  Cost Model: Found an estimated cost of 12 for instruction: %xa64 = sext <64 x i32> %a64 to <64 x i64>
1475; AVX512BW-NEXT:  Cost Model: Found an estimated cost of 12 for instruction: %xb64 = sext <64 x i32> %b64 to <64 x i64>
1476; AVX512BW-NEXT:  Cost Model: Found an estimated cost of 6 for instruction: %res2 = mul <2 x i64> %xa2, %xb2
1477; AVX512BW-NEXT:  Cost Model: Found an estimated cost of 6 for instruction: %res4 = mul <4 x i64> %xa4, %xb4
1478; AVX512BW-NEXT:  Cost Model: Found an estimated cost of 6 for instruction: %res8 = mul <8 x i64> %xa8, %xb8
1479; AVX512BW-NEXT:  Cost Model: Found an estimated cost of 12 for instruction: %res16 = mul <16 x i64> %xa16, %xb16
1480; AVX512BW-NEXT:  Cost Model: Found an estimated cost of 24 for instruction: %res32 = mul <32 x i64> %xa32, %xb32
1481; AVX512BW-NEXT:  Cost Model: Found an estimated cost of 48 for instruction: %res64 = mul <64 x i64> %xa64, %xb64
1482; AVX512BW-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret void
1483;
1484; AVX512DQ-LABEL: 'mul_sext_vXi32'
1485; AVX512DQ-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xa2 = sext <2 x i32> %a2 to <2 x i64>
1486; AVX512DQ-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xb2 = sext <2 x i32> %b2 to <2 x i64>
1487; AVX512DQ-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xa4 = sext <4 x i32> %a4 to <4 x i64>
1488; AVX512DQ-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xb4 = sext <4 x i32> %b4 to <4 x i64>
1489; AVX512DQ-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xa8 = sext <8 x i32> %a8 to <8 x i64>
1490; AVX512DQ-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xb8 = sext <8 x i32> %b8 to <8 x i64>
1491; AVX512DQ-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %xa16 = sext <16 x i32> %a16 to <16 x i64>
1492; AVX512DQ-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %xb16 = sext <16 x i32> %b16 to <16 x i64>
1493; AVX512DQ-NEXT:  Cost Model: Found an estimated cost of 6 for instruction: %xa32 = sext <32 x i32> %a32 to <32 x i64>
1494; AVX512DQ-NEXT:  Cost Model: Found an estimated cost of 6 for instruction: %xb32 = sext <32 x i32> %b32 to <32 x i64>
1495; AVX512DQ-NEXT:  Cost Model: Found an estimated cost of 12 for instruction: %xa64 = sext <64 x i32> %a64 to <64 x i64>
1496; AVX512DQ-NEXT:  Cost Model: Found an estimated cost of 12 for instruction: %xb64 = sext <64 x i32> %b64 to <64 x i64>
1497; AVX512DQ-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %res2 = mul <2 x i64> %xa2, %xb2
1498; AVX512DQ-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %res4 = mul <4 x i64> %xa4, %xb4
1499; AVX512DQ-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %res8 = mul <8 x i64> %xa8, %xb8
1500; AVX512DQ-NEXT:  Cost Model: Found an estimated cost of 6 for instruction: %res16 = mul <16 x i64> %xa16, %xb16
1501; AVX512DQ-NEXT:  Cost Model: Found an estimated cost of 12 for instruction: %res32 = mul <32 x i64> %xa32, %xb32
1502; AVX512DQ-NEXT:  Cost Model: Found an estimated cost of 24 for instruction: %res64 = mul <64 x i64> %xa64, %xb64
1503; AVX512DQ-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret void
1504;
1505; SLM-LABEL: 'mul_sext_vXi32'
1506; SLM-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xa2 = sext <2 x i32> %a2 to <2 x i64>
1507; SLM-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xb2 = sext <2 x i32> %b2 to <2 x i64>
1508; SLM-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %xa4 = sext <4 x i32> %a4 to <4 x i64>
1509; SLM-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %xb4 = sext <4 x i32> %b4 to <4 x i64>
1510; SLM-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %xa8 = sext <8 x i32> %a8 to <8 x i64>
1511; SLM-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %xb8 = sext <8 x i32> %b8 to <8 x i64>
1512; SLM-NEXT:  Cost Model: Found an estimated cost of 8 for instruction: %xa16 = sext <16 x i32> %a16 to <16 x i64>
1513; SLM-NEXT:  Cost Model: Found an estimated cost of 8 for instruction: %xb16 = sext <16 x i32> %b16 to <16 x i64>
1514; SLM-NEXT:  Cost Model: Found an estimated cost of 16 for instruction: %xa32 = sext <32 x i32> %a32 to <32 x i64>
1515; SLM-NEXT:  Cost Model: Found an estimated cost of 16 for instruction: %xb32 = sext <32 x i32> %b32 to <32 x i64>
1516; SLM-NEXT:  Cost Model: Found an estimated cost of 32 for instruction: %xa64 = sext <64 x i32> %a64 to <64 x i64>
1517; SLM-NEXT:  Cost Model: Found an estimated cost of 32 for instruction: %xb64 = sext <64 x i32> %b64 to <64 x i64>
1518; SLM-NEXT:  Cost Model: Found an estimated cost of 17 for instruction: %res2 = mul <2 x i64> %xa2, %xb2
1519; SLM-NEXT:  Cost Model: Found an estimated cost of 34 for instruction: %res4 = mul <4 x i64> %xa4, %xb4
1520; SLM-NEXT:  Cost Model: Found an estimated cost of 68 for instruction: %res8 = mul <8 x i64> %xa8, %xb8
1521; SLM-NEXT:  Cost Model: Found an estimated cost of 136 for instruction: %res16 = mul <16 x i64> %xa16, %xb16
1522; SLM-NEXT:  Cost Model: Found an estimated cost of 272 for instruction: %res32 = mul <32 x i64> %xa32, %xb32
1523; SLM-NEXT:  Cost Model: Found an estimated cost of 544 for instruction: %res64 = mul <64 x i64> %xa64, %xb64
1524; SLM-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret void
1525;
1526; GLM-LABEL: 'mul_sext_vXi32'
1527; GLM-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xa2 = sext <2 x i32> %a2 to <2 x i64>
1528; GLM-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xb2 = sext <2 x i32> %b2 to <2 x i64>
1529; GLM-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %xa4 = sext <4 x i32> %a4 to <4 x i64>
1530; GLM-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %xb4 = sext <4 x i32> %b4 to <4 x i64>
1531; GLM-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %xa8 = sext <8 x i32> %a8 to <8 x i64>
1532; GLM-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %xb8 = sext <8 x i32> %b8 to <8 x i64>
1533; GLM-NEXT:  Cost Model: Found an estimated cost of 8 for instruction: %xa16 = sext <16 x i32> %a16 to <16 x i64>
1534; GLM-NEXT:  Cost Model: Found an estimated cost of 8 for instruction: %xb16 = sext <16 x i32> %b16 to <16 x i64>
1535; GLM-NEXT:  Cost Model: Found an estimated cost of 16 for instruction: %xa32 = sext <32 x i32> %a32 to <32 x i64>
1536; GLM-NEXT:  Cost Model: Found an estimated cost of 16 for instruction: %xb32 = sext <32 x i32> %b32 to <32 x i64>
1537; GLM-NEXT:  Cost Model: Found an estimated cost of 32 for instruction: %xa64 = sext <64 x i32> %a64 to <64 x i64>
1538; GLM-NEXT:  Cost Model: Found an estimated cost of 32 for instruction: %xb64 = sext <64 x i32> %b64 to <64 x i64>
1539; GLM-NEXT:  Cost Model: Found an estimated cost of 6 for instruction: %res2 = mul <2 x i64> %xa2, %xb2
1540; GLM-NEXT:  Cost Model: Found an estimated cost of 12 for instruction: %res4 = mul <4 x i64> %xa4, %xb4
1541; GLM-NEXT:  Cost Model: Found an estimated cost of 24 for instruction: %res8 = mul <8 x i64> %xa8, %xb8
1542; GLM-NEXT:  Cost Model: Found an estimated cost of 48 for instruction: %res16 = mul <16 x i64> %xa16, %xb16
1543; GLM-NEXT:  Cost Model: Found an estimated cost of 96 for instruction: %res32 = mul <32 x i64> %xa32, %xb32
1544; GLM-NEXT:  Cost Model: Found an estimated cost of 192 for instruction: %res64 = mul <64 x i64> %xa64, %xb64
1545; GLM-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret void
1546;
1547  %xa2 = sext <2 x i32> %a2 to <2 x i64>
1548  %xb2 = sext <2 x i32> %b2 to <2 x i64>
1549  %xa4 = sext <4 x i32> %a4 to <4 x i64>
1550  %xb4 = sext <4 x i32> %b4 to <4 x i64>
1551  %xa8 = sext <8 x i32> %a8 to <8 x i64>
1552  %xb8 = sext <8 x i32> %b8 to <8 x i64>
1553  %xa16 = sext <16 x i32> %a16 to <16 x i64>
1554  %xb16 = sext <16 x i32> %b16 to <16 x i64>
1555  %xa32 = sext <32 x i32> %a32 to <32 x i64>
1556  %xb32 = sext <32 x i32> %b32 to <32 x i64>
1557  %xa64 = sext <64 x i32> %a64 to <64 x i64>
1558  %xb64 = sext <64 x i32> %b64 to <64 x i64>
1559  %res2 = mul <2 x i64> %xa2, %xb2
1560  %res4 = mul <4 x i64> %xa4, %xb4
1561  %res8 = mul <8 x i64> %xa8, %xb8
1562  %res16 = mul <16 x i64> %xa16, %xb16
1563  %res32 = mul <32 x i64> %xa32, %xb32
1564  %res64 = mul <64 x i64> %xa64, %xb64
1565  ret void
1566}
1567
1568define void @mul_zext_vXi32(<2 x i32> %a2, <2 x i32> %b2, <4 x i32> %a4, <4 x i32> %b4, <8 x i32> %a8, <8 x i32> %b8, <16 x i32> %a16, <16 x i32> %b16, <32 x i32> %a32, <32 x i32> %b32, <64 x i32> %a64, <64 x i32> %b64)  {
1569; SSE2-LABEL: 'mul_zext_vXi32'
1570; SSE2-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xa2 = zext <2 x i32> %a2 to <2 x i64>
1571; SSE2-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xb2 = zext <2 x i32> %b2 to <2 x i64>
1572; SSE2-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %xa4 = zext <4 x i32> %a4 to <4 x i64>
1573; SSE2-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %xb4 = zext <4 x i32> %b4 to <4 x i64>
1574; SSE2-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %xa8 = zext <8 x i32> %a8 to <8 x i64>
1575; SSE2-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %xb8 = zext <8 x i32> %b8 to <8 x i64>
1576; SSE2-NEXT:  Cost Model: Found an estimated cost of 8 for instruction: %xa16 = zext <16 x i32> %a16 to <16 x i64>
1577; SSE2-NEXT:  Cost Model: Found an estimated cost of 8 for instruction: %xb16 = zext <16 x i32> %b16 to <16 x i64>
1578; SSE2-NEXT:  Cost Model: Found an estimated cost of 16 for instruction: %xa32 = zext <32 x i32> %a32 to <32 x i64>
1579; SSE2-NEXT:  Cost Model: Found an estimated cost of 16 for instruction: %xb32 = zext <32 x i32> %b32 to <32 x i64>
1580; SSE2-NEXT:  Cost Model: Found an estimated cost of 32 for instruction: %xa64 = zext <64 x i32> %a64 to <64 x i64>
1581; SSE2-NEXT:  Cost Model: Found an estimated cost of 32 for instruction: %xb64 = zext <64 x i32> %b64 to <64 x i64>
1582; SSE2-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %res2 = mul <2 x i64> %xa2, %xb2
1583; SSE2-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %res4 = mul <4 x i64> %xa4, %xb4
1584; SSE2-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %res8 = mul <8 x i64> %xa8, %xb8
1585; SSE2-NEXT:  Cost Model: Found an estimated cost of 8 for instruction: %res16 = mul <16 x i64> %xa16, %xb16
1586; SSE2-NEXT:  Cost Model: Found an estimated cost of 16 for instruction: %res32 = mul <32 x i64> %xa32, %xb32
1587; SSE2-NEXT:  Cost Model: Found an estimated cost of 32 for instruction: %res64 = mul <64 x i64> %xa64, %xb64
1588; SSE2-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret void
1589;
1590; SSSE3-LABEL: 'mul_zext_vXi32'
1591; SSSE3-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xa2 = zext <2 x i32> %a2 to <2 x i64>
1592; SSSE3-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xb2 = zext <2 x i32> %b2 to <2 x i64>
1593; SSSE3-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %xa4 = zext <4 x i32> %a4 to <4 x i64>
1594; SSSE3-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %xb4 = zext <4 x i32> %b4 to <4 x i64>
1595; SSSE3-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %xa8 = zext <8 x i32> %a8 to <8 x i64>
1596; SSSE3-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %xb8 = zext <8 x i32> %b8 to <8 x i64>
1597; SSSE3-NEXT:  Cost Model: Found an estimated cost of 8 for instruction: %xa16 = zext <16 x i32> %a16 to <16 x i64>
1598; SSSE3-NEXT:  Cost Model: Found an estimated cost of 8 for instruction: %xb16 = zext <16 x i32> %b16 to <16 x i64>
1599; SSSE3-NEXT:  Cost Model: Found an estimated cost of 16 for instruction: %xa32 = zext <32 x i32> %a32 to <32 x i64>
1600; SSSE3-NEXT:  Cost Model: Found an estimated cost of 16 for instruction: %xb32 = zext <32 x i32> %b32 to <32 x i64>
1601; SSSE3-NEXT:  Cost Model: Found an estimated cost of 32 for instruction: %xa64 = zext <64 x i32> %a64 to <64 x i64>
1602; SSSE3-NEXT:  Cost Model: Found an estimated cost of 32 for instruction: %xb64 = zext <64 x i32> %b64 to <64 x i64>
1603; SSSE3-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %res2 = mul <2 x i64> %xa2, %xb2
1604; SSSE3-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %res4 = mul <4 x i64> %xa4, %xb4
1605; SSSE3-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %res8 = mul <8 x i64> %xa8, %xb8
1606; SSSE3-NEXT:  Cost Model: Found an estimated cost of 8 for instruction: %res16 = mul <16 x i64> %xa16, %xb16
1607; SSSE3-NEXT:  Cost Model: Found an estimated cost of 16 for instruction: %res32 = mul <32 x i64> %xa32, %xb32
1608; SSSE3-NEXT:  Cost Model: Found an estimated cost of 32 for instruction: %res64 = mul <64 x i64> %xa64, %xb64
1609; SSSE3-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret void
1610;
1611; SSE42-LABEL: 'mul_zext_vXi32'
1612; SSE42-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xa2 = zext <2 x i32> %a2 to <2 x i64>
1613; SSE42-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xb2 = zext <2 x i32> %b2 to <2 x i64>
1614; SSE42-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %xa4 = zext <4 x i32> %a4 to <4 x i64>
1615; SSE42-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %xb4 = zext <4 x i32> %b4 to <4 x i64>
1616; SSE42-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %xa8 = zext <8 x i32> %a8 to <8 x i64>
1617; SSE42-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %xb8 = zext <8 x i32> %b8 to <8 x i64>
1618; SSE42-NEXT:  Cost Model: Found an estimated cost of 8 for instruction: %xa16 = zext <16 x i32> %a16 to <16 x i64>
1619; SSE42-NEXT:  Cost Model: Found an estimated cost of 8 for instruction: %xb16 = zext <16 x i32> %b16 to <16 x i64>
1620; SSE42-NEXT:  Cost Model: Found an estimated cost of 16 for instruction: %xa32 = zext <32 x i32> %a32 to <32 x i64>
1621; SSE42-NEXT:  Cost Model: Found an estimated cost of 16 for instruction: %xb32 = zext <32 x i32> %b32 to <32 x i64>
1622; SSE42-NEXT:  Cost Model: Found an estimated cost of 32 for instruction: %xa64 = zext <64 x i32> %a64 to <64 x i64>
1623; SSE42-NEXT:  Cost Model: Found an estimated cost of 32 for instruction: %xb64 = zext <64 x i32> %b64 to <64 x i64>
1624; SSE42-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %res2 = mul <2 x i64> %xa2, %xb2
1625; SSE42-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %res4 = mul <4 x i64> %xa4, %xb4
1626; SSE42-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %res8 = mul <8 x i64> %xa8, %xb8
1627; SSE42-NEXT:  Cost Model: Found an estimated cost of 8 for instruction: %res16 = mul <16 x i64> %xa16, %xb16
1628; SSE42-NEXT:  Cost Model: Found an estimated cost of 16 for instruction: %res32 = mul <32 x i64> %xa32, %xb32
1629; SSE42-NEXT:  Cost Model: Found an estimated cost of 32 for instruction: %res64 = mul <64 x i64> %xa64, %xb64
1630; SSE42-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret void
1631;
1632; AVX1-LABEL: 'mul_zext_vXi32'
1633; AVX1-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xa2 = zext <2 x i32> %a2 to <2 x i64>
1634; AVX1-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xb2 = zext <2 x i32> %b2 to <2 x i64>
1635; AVX1-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %xa4 = zext <4 x i32> %a4 to <4 x i64>
1636; AVX1-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %xb4 = zext <4 x i32> %b4 to <4 x i64>
1637; AVX1-NEXT:  Cost Model: Found an estimated cost of 7 for instruction: %xa8 = zext <8 x i32> %a8 to <8 x i64>
1638; AVX1-NEXT:  Cost Model: Found an estimated cost of 7 for instruction: %xb8 = zext <8 x i32> %b8 to <8 x i64>
1639; AVX1-NEXT:  Cost Model: Found an estimated cost of 14 for instruction: %xa16 = zext <16 x i32> %a16 to <16 x i64>
1640; AVX1-NEXT:  Cost Model: Found an estimated cost of 14 for instruction: %xb16 = zext <16 x i32> %b16 to <16 x i64>
1641; AVX1-NEXT:  Cost Model: Found an estimated cost of 28 for instruction: %xa32 = zext <32 x i32> %a32 to <32 x i64>
1642; AVX1-NEXT:  Cost Model: Found an estimated cost of 28 for instruction: %xb32 = zext <32 x i32> %b32 to <32 x i64>
1643; AVX1-NEXT:  Cost Model: Found an estimated cost of 56 for instruction: %xa64 = zext <64 x i32> %a64 to <64 x i64>
1644; AVX1-NEXT:  Cost Model: Found an estimated cost of 56 for instruction: %xb64 = zext <64 x i32> %b64 to <64 x i64>
1645; AVX1-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %res2 = mul <2 x i64> %xa2, %xb2
1646; AVX1-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %res4 = mul <4 x i64> %xa4, %xb4
1647; AVX1-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %res8 = mul <8 x i64> %xa8, %xb8
1648; AVX1-NEXT:  Cost Model: Found an estimated cost of 8 for instruction: %res16 = mul <16 x i64> %xa16, %xb16
1649; AVX1-NEXT:  Cost Model: Found an estimated cost of 16 for instruction: %res32 = mul <32 x i64> %xa32, %xb32
1650; AVX1-NEXT:  Cost Model: Found an estimated cost of 32 for instruction: %res64 = mul <64 x i64> %xa64, %xb64
1651; AVX1-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret void
1652;
1653; AVX2-LABEL: 'mul_zext_vXi32'
1654; AVX2-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xa2 = zext <2 x i32> %a2 to <2 x i64>
1655; AVX2-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xb2 = zext <2 x i32> %b2 to <2 x i64>
1656; AVX2-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %xa4 = zext <4 x i32> %a4 to <4 x i64>
1657; AVX2-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %xb4 = zext <4 x i32> %b4 to <4 x i64>
1658; AVX2-NEXT:  Cost Model: Found an estimated cost of 5 for instruction: %xa8 = zext <8 x i32> %a8 to <8 x i64>
1659; AVX2-NEXT:  Cost Model: Found an estimated cost of 5 for instruction: %xb8 = zext <8 x i32> %b8 to <8 x i64>
1660; AVX2-NEXT:  Cost Model: Found an estimated cost of 10 for instruction: %xa16 = zext <16 x i32> %a16 to <16 x i64>
1661; AVX2-NEXT:  Cost Model: Found an estimated cost of 10 for instruction: %xb16 = zext <16 x i32> %b16 to <16 x i64>
1662; AVX2-NEXT:  Cost Model: Found an estimated cost of 20 for instruction: %xa32 = zext <32 x i32> %a32 to <32 x i64>
1663; AVX2-NEXT:  Cost Model: Found an estimated cost of 20 for instruction: %xb32 = zext <32 x i32> %b32 to <32 x i64>
1664; AVX2-NEXT:  Cost Model: Found an estimated cost of 40 for instruction: %xa64 = zext <64 x i32> %a64 to <64 x i64>
1665; AVX2-NEXT:  Cost Model: Found an estimated cost of 40 for instruction: %xb64 = zext <64 x i32> %b64 to <64 x i64>
1666; AVX2-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %res2 = mul <2 x i64> %xa2, %xb2
1667; AVX2-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %res4 = mul <4 x i64> %xa4, %xb4
1668; AVX2-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %res8 = mul <8 x i64> %xa8, %xb8
1669; AVX2-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %res16 = mul <16 x i64> %xa16, %xb16
1670; AVX2-NEXT:  Cost Model: Found an estimated cost of 8 for instruction: %res32 = mul <32 x i64> %xa32, %xb32
1671; AVX2-NEXT:  Cost Model: Found an estimated cost of 16 for instruction: %res64 = mul <64 x i64> %xa64, %xb64
1672; AVX2-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret void
1673;
1674; AVX512-LABEL: 'mul_zext_vXi32'
1675; AVX512-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xa2 = zext <2 x i32> %a2 to <2 x i64>
1676; AVX512-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xb2 = zext <2 x i32> %b2 to <2 x i64>
1677; AVX512-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xa4 = zext <4 x i32> %a4 to <4 x i64>
1678; AVX512-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xb4 = zext <4 x i32> %b4 to <4 x i64>
1679; AVX512-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xa8 = zext <8 x i32> %a8 to <8 x i64>
1680; AVX512-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xb8 = zext <8 x i32> %b8 to <8 x i64>
1681; AVX512-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %xa16 = zext <16 x i32> %a16 to <16 x i64>
1682; AVX512-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %xb16 = zext <16 x i32> %b16 to <16 x i64>
1683; AVX512-NEXT:  Cost Model: Found an estimated cost of 6 for instruction: %xa32 = zext <32 x i32> %a32 to <32 x i64>
1684; AVX512-NEXT:  Cost Model: Found an estimated cost of 6 for instruction: %xb32 = zext <32 x i32> %b32 to <32 x i64>
1685; AVX512-NEXT:  Cost Model: Found an estimated cost of 12 for instruction: %xa64 = zext <64 x i32> %a64 to <64 x i64>
1686; AVX512-NEXT:  Cost Model: Found an estimated cost of 12 for instruction: %xb64 = zext <64 x i32> %b64 to <64 x i64>
1687; AVX512-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %res2 = mul <2 x i64> %xa2, %xb2
1688; AVX512-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %res4 = mul <4 x i64> %xa4, %xb4
1689; AVX512-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %res8 = mul <8 x i64> %xa8, %xb8
1690; AVX512-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %res16 = mul <16 x i64> %xa16, %xb16
1691; AVX512-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %res32 = mul <32 x i64> %xa32, %xb32
1692; AVX512-NEXT:  Cost Model: Found an estimated cost of 8 for instruction: %res64 = mul <64 x i64> %xa64, %xb64
1693; AVX512-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret void
1694;
1695; SLM-LABEL: 'mul_zext_vXi32'
1696; SLM-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xa2 = zext <2 x i32> %a2 to <2 x i64>
1697; SLM-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xb2 = zext <2 x i32> %b2 to <2 x i64>
1698; SLM-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %xa4 = zext <4 x i32> %a4 to <4 x i64>
1699; SLM-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %xb4 = zext <4 x i32> %b4 to <4 x i64>
1700; SLM-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %xa8 = zext <8 x i32> %a8 to <8 x i64>
1701; SLM-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %xb8 = zext <8 x i32> %b8 to <8 x i64>
1702; SLM-NEXT:  Cost Model: Found an estimated cost of 8 for instruction: %xa16 = zext <16 x i32> %a16 to <16 x i64>
1703; SLM-NEXT:  Cost Model: Found an estimated cost of 8 for instruction: %xb16 = zext <16 x i32> %b16 to <16 x i64>
1704; SLM-NEXT:  Cost Model: Found an estimated cost of 16 for instruction: %xa32 = zext <32 x i32> %a32 to <32 x i64>
1705; SLM-NEXT:  Cost Model: Found an estimated cost of 16 for instruction: %xb32 = zext <32 x i32> %b32 to <32 x i64>
1706; SLM-NEXT:  Cost Model: Found an estimated cost of 32 for instruction: %xa64 = zext <64 x i32> %a64 to <64 x i64>
1707; SLM-NEXT:  Cost Model: Found an estimated cost of 32 for instruction: %xb64 = zext <64 x i32> %b64 to <64 x i64>
1708; SLM-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %res2 = mul <2 x i64> %xa2, %xb2
1709; SLM-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %res4 = mul <4 x i64> %xa4, %xb4
1710; SLM-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %res8 = mul <8 x i64> %xa8, %xb8
1711; SLM-NEXT:  Cost Model: Found an estimated cost of 8 for instruction: %res16 = mul <16 x i64> %xa16, %xb16
1712; SLM-NEXT:  Cost Model: Found an estimated cost of 16 for instruction: %res32 = mul <32 x i64> %xa32, %xb32
1713; SLM-NEXT:  Cost Model: Found an estimated cost of 32 for instruction: %res64 = mul <64 x i64> %xa64, %xb64
1714; SLM-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret void
1715;
1716; GLM-LABEL: 'mul_zext_vXi32'
1717; GLM-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xa2 = zext <2 x i32> %a2 to <2 x i64>
1718; GLM-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xb2 = zext <2 x i32> %b2 to <2 x i64>
1719; GLM-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %xa4 = zext <4 x i32> %a4 to <4 x i64>
1720; GLM-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %xb4 = zext <4 x i32> %b4 to <4 x i64>
1721; GLM-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %xa8 = zext <8 x i32> %a8 to <8 x i64>
1722; GLM-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %xb8 = zext <8 x i32> %b8 to <8 x i64>
1723; GLM-NEXT:  Cost Model: Found an estimated cost of 8 for instruction: %xa16 = zext <16 x i32> %a16 to <16 x i64>
1724; GLM-NEXT:  Cost Model: Found an estimated cost of 8 for instruction: %xb16 = zext <16 x i32> %b16 to <16 x i64>
1725; GLM-NEXT:  Cost Model: Found an estimated cost of 16 for instruction: %xa32 = zext <32 x i32> %a32 to <32 x i64>
1726; GLM-NEXT:  Cost Model: Found an estimated cost of 16 for instruction: %xb32 = zext <32 x i32> %b32 to <32 x i64>
1727; GLM-NEXT:  Cost Model: Found an estimated cost of 32 for instruction: %xa64 = zext <64 x i32> %a64 to <64 x i64>
1728; GLM-NEXT:  Cost Model: Found an estimated cost of 32 for instruction: %xb64 = zext <64 x i32> %b64 to <64 x i64>
1729; GLM-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %res2 = mul <2 x i64> %xa2, %xb2
1730; GLM-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %res4 = mul <4 x i64> %xa4, %xb4
1731; GLM-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %res8 = mul <8 x i64> %xa8, %xb8
1732; GLM-NEXT:  Cost Model: Found an estimated cost of 8 for instruction: %res16 = mul <16 x i64> %xa16, %xb16
1733; GLM-NEXT:  Cost Model: Found an estimated cost of 16 for instruction: %res32 = mul <32 x i64> %xa32, %xb32
1734; GLM-NEXT:  Cost Model: Found an estimated cost of 32 for instruction: %res64 = mul <64 x i64> %xa64, %xb64
1735; GLM-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret void
1736;
1737  %xa2 = zext <2 x i32> %a2 to <2 x i64>
1738  %xb2 = zext <2 x i32> %b2 to <2 x i64>
1739  %xa4 = zext <4 x i32> %a4 to <4 x i64>
1740  %xb4 = zext <4 x i32> %b4 to <4 x i64>
1741  %xa8 = zext <8 x i32> %a8 to <8 x i64>
1742  %xb8 = zext <8 x i32> %b8 to <8 x i64>
1743  %xa16 = zext <16 x i32> %a16 to <16 x i64>
1744  %xb16 = zext <16 x i32> %b16 to <16 x i64>
1745  %xa32 = zext <32 x i32> %a32 to <32 x i64>
1746  %xb32 = zext <32 x i32> %b32 to <32 x i64>
1747  %xa64 = zext <64 x i32> %a64 to <64 x i64>
1748  %xb64 = zext <64 x i32> %b64 to <64 x i64>
1749  %res2 = mul <2 x i64> %xa2, %xb2
1750  %res4 = mul <4 x i64> %xa4, %xb4
1751  %res8 = mul <8 x i64> %xa8, %xb8
1752  %res16 = mul <16 x i64> %xa16, %xb16
1753  %res32 = mul <32 x i64> %xa32, %xb32
1754  %res64 = mul <64 x i64> %xa64, %xb64
1755  ret void
1756}
1757
1758define void @mul_sext_zext_vXi32(<2 x i32> %a2, <2 x i32> %b2, <4 x i32> %a4, <4 x i32> %b4, <8 x i32> %a8, <8 x i32> %b8, <16 x i32> %a16, <16 x i32> %b16, <32 x i32> %a32, <32 x i32> %b32, <64 x i32> %a64, <64 x i32> %b64)  {
1759; SSE2-LABEL: 'mul_sext_zext_vXi32'
1760; SSE2-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %xa2 = sext <2 x i32> %a2 to <2 x i64>
1761; SSE2-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xb2 = zext <2 x i32> %b2 to <2 x i64>
1762; SSE2-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %xa4 = sext <4 x i32> %a4 to <4 x i64>
1763; SSE2-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %xb4 = zext <4 x i32> %b4 to <4 x i64>
1764; SSE2-NEXT:  Cost Model: Found an estimated cost of 8 for instruction: %xa8 = sext <8 x i32> %a8 to <8 x i64>
1765; SSE2-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %xb8 = zext <8 x i32> %b8 to <8 x i64>
1766; SSE2-NEXT:  Cost Model: Found an estimated cost of 16 for instruction: %xa16 = sext <16 x i32> %a16 to <16 x i64>
1767; SSE2-NEXT:  Cost Model: Found an estimated cost of 8 for instruction: %xb16 = zext <16 x i32> %b16 to <16 x i64>
1768; SSE2-NEXT:  Cost Model: Found an estimated cost of 32 for instruction: %xa32 = sext <32 x i32> %a32 to <32 x i64>
1769; SSE2-NEXT:  Cost Model: Found an estimated cost of 16 for instruction: %xb32 = zext <32 x i32> %b32 to <32 x i64>
1770; SSE2-NEXT:  Cost Model: Found an estimated cost of 64 for instruction: %xa64 = sext <64 x i32> %a64 to <64 x i64>
1771; SSE2-NEXT:  Cost Model: Found an estimated cost of 32 for instruction: %xb64 = zext <64 x i32> %b64 to <64 x i64>
1772; SSE2-NEXT:  Cost Model: Found an estimated cost of 7 for instruction: %res2 = mul <2 x i64> %xa2, %xb2
1773; SSE2-NEXT:  Cost Model: Found an estimated cost of 14 for instruction: %res4 = mul <4 x i64> %xa4, %xb4
1774; SSE2-NEXT:  Cost Model: Found an estimated cost of 28 for instruction: %res8 = mul <8 x i64> %xa8, %xb8
1775; SSE2-NEXT:  Cost Model: Found an estimated cost of 56 for instruction: %res16 = mul <16 x i64> %xa16, %xb16
1776; SSE2-NEXT:  Cost Model: Found an estimated cost of 112 for instruction: %res32 = mul <32 x i64> %xa32, %xb32
1777; SSE2-NEXT:  Cost Model: Found an estimated cost of 224 for instruction: %res64 = mul <64 x i64> %xa64, %xb64
1778; SSE2-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret void
1779;
1780; SSSE3-LABEL: 'mul_sext_zext_vXi32'
1781; SSSE3-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %xa2 = sext <2 x i32> %a2 to <2 x i64>
1782; SSSE3-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xb2 = zext <2 x i32> %b2 to <2 x i64>
1783; SSSE3-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %xa4 = sext <4 x i32> %a4 to <4 x i64>
1784; SSSE3-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %xb4 = zext <4 x i32> %b4 to <4 x i64>
1785; SSSE3-NEXT:  Cost Model: Found an estimated cost of 8 for instruction: %xa8 = sext <8 x i32> %a8 to <8 x i64>
1786; SSSE3-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %xb8 = zext <8 x i32> %b8 to <8 x i64>
1787; SSSE3-NEXT:  Cost Model: Found an estimated cost of 16 for instruction: %xa16 = sext <16 x i32> %a16 to <16 x i64>
1788; SSSE3-NEXT:  Cost Model: Found an estimated cost of 8 for instruction: %xb16 = zext <16 x i32> %b16 to <16 x i64>
1789; SSSE3-NEXT:  Cost Model: Found an estimated cost of 32 for instruction: %xa32 = sext <32 x i32> %a32 to <32 x i64>
1790; SSSE3-NEXT:  Cost Model: Found an estimated cost of 16 for instruction: %xb32 = zext <32 x i32> %b32 to <32 x i64>
1791; SSSE3-NEXT:  Cost Model: Found an estimated cost of 64 for instruction: %xa64 = sext <64 x i32> %a64 to <64 x i64>
1792; SSSE3-NEXT:  Cost Model: Found an estimated cost of 32 for instruction: %xb64 = zext <64 x i32> %b64 to <64 x i64>
1793; SSSE3-NEXT:  Cost Model: Found an estimated cost of 7 for instruction: %res2 = mul <2 x i64> %xa2, %xb2
1794; SSSE3-NEXT:  Cost Model: Found an estimated cost of 14 for instruction: %res4 = mul <4 x i64> %xa4, %xb4
1795; SSSE3-NEXT:  Cost Model: Found an estimated cost of 28 for instruction: %res8 = mul <8 x i64> %xa8, %xb8
1796; SSSE3-NEXT:  Cost Model: Found an estimated cost of 56 for instruction: %res16 = mul <16 x i64> %xa16, %xb16
1797; SSSE3-NEXT:  Cost Model: Found an estimated cost of 112 for instruction: %res32 = mul <32 x i64> %xa32, %xb32
1798; SSSE3-NEXT:  Cost Model: Found an estimated cost of 224 for instruction: %res64 = mul <64 x i64> %xa64, %xb64
1799; SSSE3-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret void
1800;
1801; SSE42-LABEL: 'mul_sext_zext_vXi32'
1802; SSE42-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xa2 = sext <2 x i32> %a2 to <2 x i64>
1803; SSE42-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xb2 = zext <2 x i32> %b2 to <2 x i64>
1804; SSE42-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %xa4 = sext <4 x i32> %a4 to <4 x i64>
1805; SSE42-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %xb4 = zext <4 x i32> %b4 to <4 x i64>
1806; SSE42-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %xa8 = sext <8 x i32> %a8 to <8 x i64>
1807; SSE42-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %xb8 = zext <8 x i32> %b8 to <8 x i64>
1808; SSE42-NEXT:  Cost Model: Found an estimated cost of 8 for instruction: %xa16 = sext <16 x i32> %a16 to <16 x i64>
1809; SSE42-NEXT:  Cost Model: Found an estimated cost of 8 for instruction: %xb16 = zext <16 x i32> %b16 to <16 x i64>
1810; SSE42-NEXT:  Cost Model: Found an estimated cost of 16 for instruction: %xa32 = sext <32 x i32> %a32 to <32 x i64>
1811; SSE42-NEXT:  Cost Model: Found an estimated cost of 16 for instruction: %xb32 = zext <32 x i32> %b32 to <32 x i64>
1812; SSE42-NEXT:  Cost Model: Found an estimated cost of 32 for instruction: %xa64 = sext <64 x i32> %a64 to <64 x i64>
1813; SSE42-NEXT:  Cost Model: Found an estimated cost of 32 for instruction: %xb64 = zext <64 x i32> %b64 to <64 x i64>
1814; SSE42-NEXT:  Cost Model: Found an estimated cost of 6 for instruction: %res2 = mul <2 x i64> %xa2, %xb2
1815; SSE42-NEXT:  Cost Model: Found an estimated cost of 12 for instruction: %res4 = mul <4 x i64> %xa4, %xb4
1816; SSE42-NEXT:  Cost Model: Found an estimated cost of 24 for instruction: %res8 = mul <8 x i64> %xa8, %xb8
1817; SSE42-NEXT:  Cost Model: Found an estimated cost of 48 for instruction: %res16 = mul <16 x i64> %xa16, %xb16
1818; SSE42-NEXT:  Cost Model: Found an estimated cost of 96 for instruction: %res32 = mul <32 x i64> %xa32, %xb32
1819; SSE42-NEXT:  Cost Model: Found an estimated cost of 192 for instruction: %res64 = mul <64 x i64> %xa64, %xb64
1820; SSE42-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret void
1821;
1822; AVX1-LABEL: 'mul_sext_zext_vXi32'
1823; AVX1-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xa2 = sext <2 x i32> %a2 to <2 x i64>
1824; AVX1-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xb2 = zext <2 x i32> %b2 to <2 x i64>
1825; AVX1-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %xa4 = sext <4 x i32> %a4 to <4 x i64>
1826; AVX1-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %xb4 = zext <4 x i32> %b4 to <4 x i64>
1827; AVX1-NEXT:  Cost Model: Found an estimated cost of 7 for instruction: %xa8 = sext <8 x i32> %a8 to <8 x i64>
1828; AVX1-NEXT:  Cost Model: Found an estimated cost of 7 for instruction: %xb8 = zext <8 x i32> %b8 to <8 x i64>
1829; AVX1-NEXT:  Cost Model: Found an estimated cost of 14 for instruction: %xa16 = sext <16 x i32> %a16 to <16 x i64>
1830; AVX1-NEXT:  Cost Model: Found an estimated cost of 14 for instruction: %xb16 = zext <16 x i32> %b16 to <16 x i64>
1831; AVX1-NEXT:  Cost Model: Found an estimated cost of 28 for instruction: %xa32 = sext <32 x i32> %a32 to <32 x i64>
1832; AVX1-NEXT:  Cost Model: Found an estimated cost of 28 for instruction: %xb32 = zext <32 x i32> %b32 to <32 x i64>
1833; AVX1-NEXT:  Cost Model: Found an estimated cost of 56 for instruction: %xa64 = sext <64 x i32> %a64 to <64 x i64>
1834; AVX1-NEXT:  Cost Model: Found an estimated cost of 56 for instruction: %xb64 = zext <64 x i32> %b64 to <64 x i64>
1835; AVX1-NEXT:  Cost Model: Found an estimated cost of 6 for instruction: %res2 = mul <2 x i64> %xa2, %xb2
1836; AVX1-NEXT:  Cost Model: Found an estimated cost of 12 for instruction: %res4 = mul <4 x i64> %xa4, %xb4
1837; AVX1-NEXT:  Cost Model: Found an estimated cost of 24 for instruction: %res8 = mul <8 x i64> %xa8, %xb8
1838; AVX1-NEXT:  Cost Model: Found an estimated cost of 48 for instruction: %res16 = mul <16 x i64> %xa16, %xb16
1839; AVX1-NEXT:  Cost Model: Found an estimated cost of 96 for instruction: %res32 = mul <32 x i64> %xa32, %xb32
1840; AVX1-NEXT:  Cost Model: Found an estimated cost of 192 for instruction: %res64 = mul <64 x i64> %xa64, %xb64
1841; AVX1-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret void
1842;
1843; AVX2-LABEL: 'mul_sext_zext_vXi32'
1844; AVX2-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xa2 = sext <2 x i32> %a2 to <2 x i64>
1845; AVX2-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xb2 = zext <2 x i32> %b2 to <2 x i64>
1846; AVX2-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %xa4 = sext <4 x i32> %a4 to <4 x i64>
1847; AVX2-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %xb4 = zext <4 x i32> %b4 to <4 x i64>
1848; AVX2-NEXT:  Cost Model: Found an estimated cost of 5 for instruction: %xa8 = sext <8 x i32> %a8 to <8 x i64>
1849; AVX2-NEXT:  Cost Model: Found an estimated cost of 5 for instruction: %xb8 = zext <8 x i32> %b8 to <8 x i64>
1850; AVX2-NEXT:  Cost Model: Found an estimated cost of 10 for instruction: %xa16 = sext <16 x i32> %a16 to <16 x i64>
1851; AVX2-NEXT:  Cost Model: Found an estimated cost of 10 for instruction: %xb16 = zext <16 x i32> %b16 to <16 x i64>
1852; AVX2-NEXT:  Cost Model: Found an estimated cost of 20 for instruction: %xa32 = sext <32 x i32> %a32 to <32 x i64>
1853; AVX2-NEXT:  Cost Model: Found an estimated cost of 20 for instruction: %xb32 = zext <32 x i32> %b32 to <32 x i64>
1854; AVX2-NEXT:  Cost Model: Found an estimated cost of 40 for instruction: %xa64 = sext <64 x i32> %a64 to <64 x i64>
1855; AVX2-NEXT:  Cost Model: Found an estimated cost of 40 for instruction: %xb64 = zext <64 x i32> %b64 to <64 x i64>
1856; AVX2-NEXT:  Cost Model: Found an estimated cost of 6 for instruction: %res2 = mul <2 x i64> %xa2, %xb2
1857; AVX2-NEXT:  Cost Model: Found an estimated cost of 6 for instruction: %res4 = mul <4 x i64> %xa4, %xb4
1858; AVX2-NEXT:  Cost Model: Found an estimated cost of 12 for instruction: %res8 = mul <8 x i64> %xa8, %xb8
1859; AVX2-NEXT:  Cost Model: Found an estimated cost of 24 for instruction: %res16 = mul <16 x i64> %xa16, %xb16
1860; AVX2-NEXT:  Cost Model: Found an estimated cost of 48 for instruction: %res32 = mul <32 x i64> %xa32, %xb32
1861; AVX2-NEXT:  Cost Model: Found an estimated cost of 96 for instruction: %res64 = mul <64 x i64> %xa64, %xb64
1862; AVX2-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret void
1863;
1864; AVX512F-LABEL: 'mul_sext_zext_vXi32'
1865; AVX512F-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xa2 = sext <2 x i32> %a2 to <2 x i64>
1866; AVX512F-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xb2 = zext <2 x i32> %b2 to <2 x i64>
1867; AVX512F-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xa4 = sext <4 x i32> %a4 to <4 x i64>
1868; AVX512F-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xb4 = zext <4 x i32> %b4 to <4 x i64>
1869; AVX512F-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xa8 = sext <8 x i32> %a8 to <8 x i64>
1870; AVX512F-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xb8 = zext <8 x i32> %b8 to <8 x i64>
1871; AVX512F-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %xa16 = sext <16 x i32> %a16 to <16 x i64>
1872; AVX512F-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %xb16 = zext <16 x i32> %b16 to <16 x i64>
1873; AVX512F-NEXT:  Cost Model: Found an estimated cost of 6 for instruction: %xa32 = sext <32 x i32> %a32 to <32 x i64>
1874; AVX512F-NEXT:  Cost Model: Found an estimated cost of 6 for instruction: %xb32 = zext <32 x i32> %b32 to <32 x i64>
1875; AVX512F-NEXT:  Cost Model: Found an estimated cost of 12 for instruction: %xa64 = sext <64 x i32> %a64 to <64 x i64>
1876; AVX512F-NEXT:  Cost Model: Found an estimated cost of 12 for instruction: %xb64 = zext <64 x i32> %b64 to <64 x i64>
1877; AVX512F-NEXT:  Cost Model: Found an estimated cost of 6 for instruction: %res2 = mul <2 x i64> %xa2, %xb2
1878; AVX512F-NEXT:  Cost Model: Found an estimated cost of 6 for instruction: %res4 = mul <4 x i64> %xa4, %xb4
1879; AVX512F-NEXT:  Cost Model: Found an estimated cost of 6 for instruction: %res8 = mul <8 x i64> %xa8, %xb8
1880; AVX512F-NEXT:  Cost Model: Found an estimated cost of 12 for instruction: %res16 = mul <16 x i64> %xa16, %xb16
1881; AVX512F-NEXT:  Cost Model: Found an estimated cost of 24 for instruction: %res32 = mul <32 x i64> %xa32, %xb32
1882; AVX512F-NEXT:  Cost Model: Found an estimated cost of 48 for instruction: %res64 = mul <64 x i64> %xa64, %xb64
1883; AVX512F-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret void
1884;
1885; AVX512BW-LABEL: 'mul_sext_zext_vXi32'
1886; AVX512BW-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xa2 = sext <2 x i32> %a2 to <2 x i64>
1887; AVX512BW-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xb2 = zext <2 x i32> %b2 to <2 x i64>
1888; AVX512BW-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xa4 = sext <4 x i32> %a4 to <4 x i64>
1889; AVX512BW-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xb4 = zext <4 x i32> %b4 to <4 x i64>
1890; AVX512BW-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xa8 = sext <8 x i32> %a8 to <8 x i64>
1891; AVX512BW-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xb8 = zext <8 x i32> %b8 to <8 x i64>
1892; AVX512BW-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %xa16 = sext <16 x i32> %a16 to <16 x i64>
1893; AVX512BW-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %xb16 = zext <16 x i32> %b16 to <16 x i64>
1894; AVX512BW-NEXT:  Cost Model: Found an estimated cost of 6 for instruction: %xa32 = sext <32 x i32> %a32 to <32 x i64>
1895; AVX512BW-NEXT:  Cost Model: Found an estimated cost of 6 for instruction: %xb32 = zext <32 x i32> %b32 to <32 x i64>
1896; AVX512BW-NEXT:  Cost Model: Found an estimated cost of 12 for instruction: %xa64 = sext <64 x i32> %a64 to <64 x i64>
1897; AVX512BW-NEXT:  Cost Model: Found an estimated cost of 12 for instruction: %xb64 = zext <64 x i32> %b64 to <64 x i64>
1898; AVX512BW-NEXT:  Cost Model: Found an estimated cost of 6 for instruction: %res2 = mul <2 x i64> %xa2, %xb2
1899; AVX512BW-NEXT:  Cost Model: Found an estimated cost of 6 for instruction: %res4 = mul <4 x i64> %xa4, %xb4
1900; AVX512BW-NEXT:  Cost Model: Found an estimated cost of 6 for instruction: %res8 = mul <8 x i64> %xa8, %xb8
1901; AVX512BW-NEXT:  Cost Model: Found an estimated cost of 12 for instruction: %res16 = mul <16 x i64> %xa16, %xb16
1902; AVX512BW-NEXT:  Cost Model: Found an estimated cost of 24 for instruction: %res32 = mul <32 x i64> %xa32, %xb32
1903; AVX512BW-NEXT:  Cost Model: Found an estimated cost of 48 for instruction: %res64 = mul <64 x i64> %xa64, %xb64
1904; AVX512BW-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret void
1905;
1906; AVX512DQ-LABEL: 'mul_sext_zext_vXi32'
1907; AVX512DQ-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xa2 = sext <2 x i32> %a2 to <2 x i64>
1908; AVX512DQ-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xb2 = zext <2 x i32> %b2 to <2 x i64>
1909; AVX512DQ-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xa4 = sext <4 x i32> %a4 to <4 x i64>
1910; AVX512DQ-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xb4 = zext <4 x i32> %b4 to <4 x i64>
1911; AVX512DQ-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xa8 = sext <8 x i32> %a8 to <8 x i64>
1912; AVX512DQ-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xb8 = zext <8 x i32> %b8 to <8 x i64>
1913; AVX512DQ-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %xa16 = sext <16 x i32> %a16 to <16 x i64>
1914; AVX512DQ-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %xb16 = zext <16 x i32> %b16 to <16 x i64>
1915; AVX512DQ-NEXT:  Cost Model: Found an estimated cost of 6 for instruction: %xa32 = sext <32 x i32> %a32 to <32 x i64>
1916; AVX512DQ-NEXT:  Cost Model: Found an estimated cost of 6 for instruction: %xb32 = zext <32 x i32> %b32 to <32 x i64>
1917; AVX512DQ-NEXT:  Cost Model: Found an estimated cost of 12 for instruction: %xa64 = sext <64 x i32> %a64 to <64 x i64>
1918; AVX512DQ-NEXT:  Cost Model: Found an estimated cost of 12 for instruction: %xb64 = zext <64 x i32> %b64 to <64 x i64>
1919; AVX512DQ-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %res2 = mul <2 x i64> %xa2, %xb2
1920; AVX512DQ-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %res4 = mul <4 x i64> %xa4, %xb4
1921; AVX512DQ-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %res8 = mul <8 x i64> %xa8, %xb8
1922; AVX512DQ-NEXT:  Cost Model: Found an estimated cost of 6 for instruction: %res16 = mul <16 x i64> %xa16, %xb16
1923; AVX512DQ-NEXT:  Cost Model: Found an estimated cost of 12 for instruction: %res32 = mul <32 x i64> %xa32, %xb32
1924; AVX512DQ-NEXT:  Cost Model: Found an estimated cost of 24 for instruction: %res64 = mul <64 x i64> %xa64, %xb64
1925; AVX512DQ-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret void
1926;
1927; SLM-LABEL: 'mul_sext_zext_vXi32'
1928; SLM-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xa2 = sext <2 x i32> %a2 to <2 x i64>
1929; SLM-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xb2 = zext <2 x i32> %b2 to <2 x i64>
1930; SLM-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %xa4 = sext <4 x i32> %a4 to <4 x i64>
1931; SLM-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %xb4 = zext <4 x i32> %b4 to <4 x i64>
1932; SLM-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %xa8 = sext <8 x i32> %a8 to <8 x i64>
1933; SLM-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %xb8 = zext <8 x i32> %b8 to <8 x i64>
1934; SLM-NEXT:  Cost Model: Found an estimated cost of 8 for instruction: %xa16 = sext <16 x i32> %a16 to <16 x i64>
1935; SLM-NEXT:  Cost Model: Found an estimated cost of 8 for instruction: %xb16 = zext <16 x i32> %b16 to <16 x i64>
1936; SLM-NEXT:  Cost Model: Found an estimated cost of 16 for instruction: %xa32 = sext <32 x i32> %a32 to <32 x i64>
1937; SLM-NEXT:  Cost Model: Found an estimated cost of 16 for instruction: %xb32 = zext <32 x i32> %b32 to <32 x i64>
1938; SLM-NEXT:  Cost Model: Found an estimated cost of 32 for instruction: %xa64 = sext <64 x i32> %a64 to <64 x i64>
1939; SLM-NEXT:  Cost Model: Found an estimated cost of 32 for instruction: %xb64 = zext <64 x i32> %b64 to <64 x i64>
1940; SLM-NEXT:  Cost Model: Found an estimated cost of 17 for instruction: %res2 = mul <2 x i64> %xa2, %xb2
1941; SLM-NEXT:  Cost Model: Found an estimated cost of 34 for instruction: %res4 = mul <4 x i64> %xa4, %xb4
1942; SLM-NEXT:  Cost Model: Found an estimated cost of 68 for instruction: %res8 = mul <8 x i64> %xa8, %xb8
1943; SLM-NEXT:  Cost Model: Found an estimated cost of 136 for instruction: %res16 = mul <16 x i64> %xa16, %xb16
1944; SLM-NEXT:  Cost Model: Found an estimated cost of 272 for instruction: %res32 = mul <32 x i64> %xa32, %xb32
1945; SLM-NEXT:  Cost Model: Found an estimated cost of 544 for instruction: %res64 = mul <64 x i64> %xa64, %xb64
1946; SLM-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret void
1947;
1948; GLM-LABEL: 'mul_sext_zext_vXi32'
1949; GLM-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xa2 = sext <2 x i32> %a2 to <2 x i64>
1950; GLM-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xb2 = zext <2 x i32> %b2 to <2 x i64>
1951; GLM-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %xa4 = sext <4 x i32> %a4 to <4 x i64>
1952; GLM-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %xb4 = zext <4 x i32> %b4 to <4 x i64>
1953; GLM-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %xa8 = sext <8 x i32> %a8 to <8 x i64>
1954; GLM-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %xb8 = zext <8 x i32> %b8 to <8 x i64>
1955; GLM-NEXT:  Cost Model: Found an estimated cost of 8 for instruction: %xa16 = sext <16 x i32> %a16 to <16 x i64>
1956; GLM-NEXT:  Cost Model: Found an estimated cost of 8 for instruction: %xb16 = zext <16 x i32> %b16 to <16 x i64>
1957; GLM-NEXT:  Cost Model: Found an estimated cost of 16 for instruction: %xa32 = sext <32 x i32> %a32 to <32 x i64>
1958; GLM-NEXT:  Cost Model: Found an estimated cost of 16 for instruction: %xb32 = zext <32 x i32> %b32 to <32 x i64>
1959; GLM-NEXT:  Cost Model: Found an estimated cost of 32 for instruction: %xa64 = sext <64 x i32> %a64 to <64 x i64>
1960; GLM-NEXT:  Cost Model: Found an estimated cost of 32 for instruction: %xb64 = zext <64 x i32> %b64 to <64 x i64>
1961; GLM-NEXT:  Cost Model: Found an estimated cost of 6 for instruction: %res2 = mul <2 x i64> %xa2, %xb2
1962; GLM-NEXT:  Cost Model: Found an estimated cost of 12 for instruction: %res4 = mul <4 x i64> %xa4, %xb4
1963; GLM-NEXT:  Cost Model: Found an estimated cost of 24 for instruction: %res8 = mul <8 x i64> %xa8, %xb8
1964; GLM-NEXT:  Cost Model: Found an estimated cost of 48 for instruction: %res16 = mul <16 x i64> %xa16, %xb16
1965; GLM-NEXT:  Cost Model: Found an estimated cost of 96 for instruction: %res32 = mul <32 x i64> %xa32, %xb32
1966; GLM-NEXT:  Cost Model: Found an estimated cost of 192 for instruction: %res64 = mul <64 x i64> %xa64, %xb64
1967; GLM-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret void
1968;
1969  %xa2 = sext <2 x i32> %a2 to <2 x i64>
1970  %xb2 = zext <2 x i32> %b2 to <2 x i64>
1971  %xa4 = sext <4 x i32> %a4 to <4 x i64>
1972  %xb4 = zext <4 x i32> %b4 to <4 x i64>
1973  %xa8 = sext <8 x i32> %a8 to <8 x i64>
1974  %xb8 = zext <8 x i32> %b8 to <8 x i64>
1975  %xa16 = sext <16 x i32> %a16 to <16 x i64>
1976  %xb16 = zext <16 x i32> %b16 to <16 x i64>
1977  %xa32 = sext <32 x i32> %a32 to <32 x i64>
1978  %xb32 = zext <32 x i32> %b32 to <32 x i64>
1979  %xa64 = sext <64 x i32> %a64 to <64 x i64>
1980  %xb64 = zext <64 x i32> %b64 to <64 x i64>
1981  %res2 = mul <2 x i64> %xa2, %xb2
1982  %res4 = mul <4 x i64> %xa4, %xb4
1983  %res8 = mul <8 x i64> %xa8, %xb8
1984  %res16 = mul <16 x i64> %xa16, %xb16
1985  %res32 = mul <32 x i64> %xa32, %xb32
1986  %res64 = mul <64 x i64> %xa64, %xb64
1987  ret void
1988}
1989