1; NOTE: Assertions have been autogenerated by utils/update_analyze_test_checks.py
2; RUN: opt < %s -cost-model -analyze -mtriple=x86_64-apple-macosx10.8.0 -mattr=+sse2 | FileCheck %s --check-prefixes=SSE2
3; RUN: opt < %s -cost-model -analyze -mtriple=x86_64-apple-macosx10.8.0 -mattr=+ssse3 | FileCheck %s --check-prefixes=SSSE3
4; RUN: opt < %s -cost-model -analyze -mtriple=x86_64-apple-macosx10.8.0 -mattr=+sse4.2 | FileCheck %s --check-prefixes=SSE42
5; RUN: opt < %s -cost-model -analyze -mtriple=x86_64-apple-macosx10.8.0 -mattr=+avx | FileCheck %s --check-prefixes=AVX1
6; RUN: opt < %s -cost-model -analyze -mtriple=x86_64-apple-macosx10.8.0 -mattr=+avx2 | FileCheck %s --check-prefixes=AVX2
7; RUN: opt < %s -cost-model -analyze -mtriple=x86_64-apple-macosx10.8.0 -mattr=+avx512f | FileCheck %s --check-prefixes=AVX512
8; RUN: opt < %s -cost-model -analyze -mtriple=x86_64-apple-macosx10.8.0 -mattr=+avx512f,+avx512bw | FileCheck %s --check-prefixes=AVX512
9; RUN: opt < %s -cost-model -analyze -mtriple=x86_64-apple-macosx10.8.0 -mattr=+avx512f,+avx512dq | FileCheck %s --check-prefixes=AVX512
10;
11; RUN: opt < %s -cost-model -analyze -mtriple=x86_64-apple-macosx10.8.0 -mcpu=slm | FileCheck %s --check-prefixes=SLM
12; RUN: opt < %s -cost-model -analyze -mtriple=x86_64-apple-macosx10.8.0 -mcpu=goldmont | FileCheck %s --check-prefixes=GLM
13; RUN: opt < %s -cost-model -analyze -mtriple=x86_64-apple-macosx10.8.0 -mcpu=btver2 | FileCheck %s --check-prefixes=AVX1
14; RUN: opt < %s -cost-model -analyze -mtriple=x86_64-apple-macosx10.8.0 -mcpu=knl | FileCheck %s --check-prefixes=AVX512
15
16target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64-S128"
17target triple = "x86_64-apple-macosx10.8.0"
18
19;
20; mul vXi8 -> mXi32
21;
22
23define void @mul_sext_vXi8(<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)  {
24; SSE2-LABEL: 'mul_sext_vXi8'
25; SSE2-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %xa4 = sext <4 x i8> %a4 to <4 x i32>
26; SSE2-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %xb4 = sext <4 x i8> %b4 to <4 x i32>
27; SSE2-NEXT:  Cost Model: Found an estimated cost of 6 for instruction: %xa8 = sext <8 x i8> %a8 to <8 x i32>
28; SSE2-NEXT:  Cost Model: Found an estimated cost of 6 for instruction: %xb8 = sext <8 x i8> %b8 to <8 x i32>
29; SSE2-NEXT:  Cost Model: Found an estimated cost of 12 for instruction: %xa16 = sext <16 x i8> %a16 to <16 x i32>
30; SSE2-NEXT:  Cost Model: Found an estimated cost of 12 for instruction: %xb16 = sext <16 x i8> %b16 to <16 x i32>
31; SSE2-NEXT:  Cost Model: Found an estimated cost of 24 for instruction: %xa32 = sext <32 x i8> %a32 to <32 x i32>
32; SSE2-NEXT:  Cost Model: Found an estimated cost of 24 for instruction: %xb32 = sext <32 x i8> %b32 to <32 x i32>
33; SSE2-NEXT:  Cost Model: Found an estimated cost of 48 for instruction: %xa64 = sext <64 x i8> %a64 to <64 x i32>
34; SSE2-NEXT:  Cost Model: Found an estimated cost of 48 for instruction: %xb64 = sext <64 x i8> %b64 to <64 x i32>
35; SSE2-NEXT:  Cost Model: Found an estimated cost of 6 for instruction: %res4 = mul <4 x i32> %xa4, %xb4
36; SSE2-NEXT:  Cost Model: Found an estimated cost of 12 for instruction: %res8 = mul <8 x i32> %xa8, %xb8
37; SSE2-NEXT:  Cost Model: Found an estimated cost of 24 for instruction: %res16 = mul <16 x i32> %xa16, %xb16
38; SSE2-NEXT:  Cost Model: Found an estimated cost of 48 for instruction: %res32 = mul <32 x i32> %xa32, %xb32
39; SSE2-NEXT:  Cost Model: Found an estimated cost of 96 for instruction: %res64 = mul <64 x i32> %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 3 for instruction: %xa4 = sext <4 x i8> %a4 to <4 x i32>
44; SSSE3-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %xb4 = sext <4 x i8> %b4 to <4 x i32>
45; SSSE3-NEXT:  Cost Model: Found an estimated cost of 6 for instruction: %xa8 = sext <8 x i8> %a8 to <8 x i32>
46; SSSE3-NEXT:  Cost Model: Found an estimated cost of 6 for instruction: %xb8 = sext <8 x i8> %b8 to <8 x i32>
47; SSSE3-NEXT:  Cost Model: Found an estimated cost of 12 for instruction: %xa16 = sext <16 x i8> %a16 to <16 x i32>
48; SSSE3-NEXT:  Cost Model: Found an estimated cost of 12 for instruction: %xb16 = sext <16 x i8> %b16 to <16 x i32>
49; SSSE3-NEXT:  Cost Model: Found an estimated cost of 24 for instruction: %xa32 = sext <32 x i8> %a32 to <32 x i32>
50; SSSE3-NEXT:  Cost Model: Found an estimated cost of 24 for instruction: %xb32 = sext <32 x i8> %b32 to <32 x i32>
51; SSSE3-NEXT:  Cost Model: Found an estimated cost of 48 for instruction: %xa64 = sext <64 x i8> %a64 to <64 x i32>
52; SSSE3-NEXT:  Cost Model: Found an estimated cost of 48 for instruction: %xb64 = sext <64 x i8> %b64 to <64 x i32>
53; SSSE3-NEXT:  Cost Model: Found an estimated cost of 6 for instruction: %res4 = mul <4 x i32> %xa4, %xb4
54; SSSE3-NEXT:  Cost Model: Found an estimated cost of 12 for instruction: %res8 = mul <8 x i32> %xa8, %xb8
55; SSSE3-NEXT:  Cost Model: Found an estimated cost of 24 for instruction: %res16 = mul <16 x i32> %xa16, %xb16
56; SSSE3-NEXT:  Cost Model: Found an estimated cost of 48 for instruction: %res32 = mul <32 x i32> %xa32, %xb32
57; SSSE3-NEXT:  Cost Model: Found an estimated cost of 96 for instruction: %res64 = mul <64 x i32> %xa64, %xb64
58; SSSE3-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret void
59;
60; SSE42-LABEL: 'mul_sext_vXi8'
61; SSE42-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xa4 = sext <4 x i8> %a4 to <4 x i32>
62; SSE42-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xb4 = sext <4 x i8> %b4 to <4 x i32>
63; SSE42-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %xa8 = sext <8 x i8> %a8 to <8 x i32>
64; SSE42-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %xb8 = sext <8 x i8> %b8 to <8 x i32>
65; SSE42-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %xa16 = sext <16 x i8> %a16 to <16 x i32>
66; SSE42-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %xb16 = sext <16 x i8> %b16 to <16 x i32>
67; SSE42-NEXT:  Cost Model: Found an estimated cost of 8 for instruction: %xa32 = sext <32 x i8> %a32 to <32 x i32>
68; SSE42-NEXT:  Cost Model: Found an estimated cost of 8 for instruction: %xb32 = sext <32 x i8> %b32 to <32 x i32>
69; SSE42-NEXT:  Cost Model: Found an estimated cost of 16 for instruction: %xa64 = sext <64 x i8> %a64 to <64 x i32>
70; SSE42-NEXT:  Cost Model: Found an estimated cost of 16 for instruction: %xb64 = sext <64 x i8> %b64 to <64 x i32>
71; SSE42-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %res4 = mul <4 x i32> %xa4, %xb4
72; SSE42-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %res8 = mul <8 x i32> %xa8, %xb8
73; SSE42-NEXT:  Cost Model: Found an estimated cost of 8 for instruction: %res16 = mul <16 x i32> %xa16, %xb16
74; SSE42-NEXT:  Cost Model: Found an estimated cost of 16 for instruction: %res32 = mul <32 x i32> %xa32, %xb32
75; SSE42-NEXT:  Cost Model: Found an estimated cost of 32 for instruction: %res64 = mul <64 x i32> %xa64, %xb64
76; SSE42-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret void
77;
78; AVX1-LABEL: 'mul_sext_vXi8'
79; AVX1-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xa4 = sext <4 x i8> %a4 to <4 x i32>
80; AVX1-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xb4 = sext <4 x i8> %b4 to <4 x i32>
81; AVX1-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %xa8 = sext <8 x i8> %a8 to <8 x i32>
82; AVX1-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %xb8 = sext <8 x i8> %b8 to <8 x i32>
83; AVX1-NEXT:  Cost Model: Found an estimated cost of 6 for instruction: %xa16 = sext <16 x i8> %a16 to <16 x i32>
84; AVX1-NEXT:  Cost Model: Found an estimated cost of 6 for instruction: %xb16 = sext <16 x i8> %b16 to <16 x i32>
85; AVX1-NEXT:  Cost Model: Found an estimated cost of 13 for instruction: %xa32 = sext <32 x i8> %a32 to <32 x i32>
86; AVX1-NEXT:  Cost Model: Found an estimated cost of 13 for instruction: %xb32 = sext <32 x i8> %b32 to <32 x i32>
87; AVX1-NEXT:  Cost Model: Found an estimated cost of 26 for instruction: %xa64 = sext <64 x i8> %a64 to <64 x i32>
88; AVX1-NEXT:  Cost Model: Found an estimated cost of 26 for instruction: %xb64 = sext <64 x i8> %b64 to <64 x i32>
89; AVX1-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %res4 = mul <4 x i32> %xa4, %xb4
90; AVX1-NEXT:  Cost Model: Found an estimated cost of 5 for instruction: %res8 = mul <8 x i32> %xa8, %xb8
91; AVX1-NEXT:  Cost Model: Found an estimated cost of 10 for instruction: %res16 = mul <16 x i32> %xa16, %xb16
92; AVX1-NEXT:  Cost Model: Found an estimated cost of 20 for instruction: %res32 = mul <32 x i32> %xa32, %xb32
93; AVX1-NEXT:  Cost Model: Found an estimated cost of 40 for instruction: %res64 = mul <64 x i32> %xa64, %xb64
94; AVX1-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret void
95;
96; AVX2-LABEL: 'mul_sext_vXi8'
97; AVX2-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xa4 = sext <4 x i8> %a4 to <4 x i32>
98; AVX2-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xb4 = sext <4 x i8> %b4 to <4 x i32>
99; AVX2-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %xa8 = sext <8 x i8> %a8 to <8 x i32>
100; AVX2-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %xb8 = sext <8 x i8> %b8 to <8 x i32>
101; AVX2-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %xa16 = sext <16 x i8> %a16 to <16 x i32>
102; AVX2-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %xb16 = sext <16 x i8> %b16 to <16 x i32>
103; AVX2-NEXT:  Cost Model: Found an estimated cost of 9 for instruction: %xa32 = sext <32 x i8> %a32 to <32 x i32>
104; AVX2-NEXT:  Cost Model: Found an estimated cost of 9 for instruction: %xb32 = sext <32 x i8> %b32 to <32 x i32>
105; AVX2-NEXT:  Cost Model: Found an estimated cost of 18 for instruction: %xa64 = sext <64 x i8> %a64 to <64 x i32>
106; AVX2-NEXT:  Cost Model: Found an estimated cost of 18 for instruction: %xb64 = sext <64 x i8> %b64 to <64 x i32>
107; AVX2-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %res4 = mul <4 x i32> %xa4, %xb4
108; AVX2-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %res8 = mul <8 x i32> %xa8, %xb8
109; AVX2-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %res16 = mul <16 x i32> %xa16, %xb16
110; AVX2-NEXT:  Cost Model: Found an estimated cost of 8 for instruction: %res32 = mul <32 x i32> %xa32, %xb32
111; AVX2-NEXT:  Cost Model: Found an estimated cost of 16 for instruction: %res64 = mul <64 x i32> %xa64, %xb64
112; AVX2-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret void
113;
114; AVX512-LABEL: 'mul_sext_vXi8'
115; AVX512-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xa4 = sext <4 x i8> %a4 to <4 x i32>
116; AVX512-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xb4 = sext <4 x i8> %b4 to <4 x i32>
117; AVX512-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xa8 = sext <8 x i8> %a8 to <8 x i32>
118; AVX512-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xb8 = sext <8 x i8> %b8 to <8 x i32>
119; AVX512-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xa16 = sext <16 x i8> %a16 to <16 x i32>
120; AVX512-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xb16 = sext <16 x i8> %b16 to <16 x i32>
121; AVX512-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %xa32 = sext <32 x i8> %a32 to <32 x i32>
122; AVX512-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %xb32 = sext <32 x i8> %b32 to <32 x i32>
123; AVX512-NEXT:  Cost Model: Found an estimated cost of 7 for instruction: %xa64 = sext <64 x i8> %a64 to <64 x i32>
124; AVX512-NEXT:  Cost Model: Found an estimated cost of 7 for instruction: %xb64 = sext <64 x i8> %b64 to <64 x i32>
125; AVX512-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %res4 = mul <4 x i32> %xa4, %xb4
126; AVX512-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %res8 = mul <8 x i32> %xa8, %xb8
127; AVX512-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %res16 = mul <16 x i32> %xa16, %xb16
128; AVX512-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %res32 = mul <32 x i32> %xa32, %xb32
129; AVX512-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %res64 = mul <64 x i32> %xa64, %xb64
130; AVX512-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret void
131;
132; SLM-LABEL: 'mul_sext_vXi8'
133; SLM-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xa4 = sext <4 x i8> %a4 to <4 x i32>
134; SLM-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xb4 = sext <4 x i8> %b4 to <4 x i32>
135; SLM-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %xa8 = sext <8 x i8> %a8 to <8 x i32>
136; SLM-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %xb8 = sext <8 x i8> %b8 to <8 x i32>
137; SLM-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %xa16 = sext <16 x i8> %a16 to <16 x i32>
138; SLM-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %xb16 = sext <16 x i8> %b16 to <16 x i32>
139; SLM-NEXT:  Cost Model: Found an estimated cost of 8 for instruction: %xa32 = sext <32 x i8> %a32 to <32 x i32>
140; SLM-NEXT:  Cost Model: Found an estimated cost of 8 for instruction: %xb32 = sext <32 x i8> %b32 to <32 x i32>
141; SLM-NEXT:  Cost Model: Found an estimated cost of 16 for instruction: %xa64 = sext <64 x i8> %a64 to <64 x i32>
142; SLM-NEXT:  Cost Model: Found an estimated cost of 16 for instruction: %xb64 = sext <64 x i8> %b64 to <64 x i32>
143; SLM-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %res4 = mul <4 x i32> %xa4, %xb4
144; SLM-NEXT:  Cost Model: Found an estimated cost of 6 for instruction: %res8 = mul <8 x i32> %xa8, %xb8
145; SLM-NEXT:  Cost Model: Found an estimated cost of 12 for instruction: %res16 = mul <16 x i32> %xa16, %xb16
146; SLM-NEXT:  Cost Model: Found an estimated cost of 24 for instruction: %res32 = mul <32 x i32> %xa32, %xb32
147; SLM-NEXT:  Cost Model: Found an estimated cost of 48 for instruction: %res64 = mul <64 x i32> %xa64, %xb64
148; SLM-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret void
149;
150; GLM-LABEL: 'mul_sext_vXi8'
151; GLM-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xa4 = sext <4 x i8> %a4 to <4 x i32>
152; GLM-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xb4 = sext <4 x i8> %b4 to <4 x i32>
153; GLM-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %xa8 = sext <8 x i8> %a8 to <8 x i32>
154; GLM-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %xb8 = sext <8 x i8> %b8 to <8 x i32>
155; GLM-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %xa16 = sext <16 x i8> %a16 to <16 x i32>
156; GLM-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %xb16 = sext <16 x i8> %b16 to <16 x i32>
157; GLM-NEXT:  Cost Model: Found an estimated cost of 8 for instruction: %xa32 = sext <32 x i8> %a32 to <32 x i32>
158; GLM-NEXT:  Cost Model: Found an estimated cost of 8 for instruction: %xb32 = sext <32 x i8> %b32 to <32 x i32>
159; GLM-NEXT:  Cost Model: Found an estimated cost of 16 for instruction: %xa64 = sext <64 x i8> %a64 to <64 x i32>
160; GLM-NEXT:  Cost Model: Found an estimated cost of 16 for instruction: %xb64 = sext <64 x i8> %b64 to <64 x i32>
161; GLM-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %res4 = mul <4 x i32> %xa4, %xb4
162; GLM-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %res8 = mul <8 x i32> %xa8, %xb8
163; GLM-NEXT:  Cost Model: Found an estimated cost of 8 for instruction: %res16 = mul <16 x i32> %xa16, %xb16
164; GLM-NEXT:  Cost Model: Found an estimated cost of 16 for instruction: %res32 = mul <32 x i32> %xa32, %xb32
165; GLM-NEXT:  Cost Model: Found an estimated cost of 32 for instruction: %res64 = mul <64 x i32> %xa64, %xb64
166; GLM-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret void
167;
168  %xa4 = sext <4 x i8> %a4 to <4 x i32>
169  %xb4 = sext <4 x i8> %b4 to <4 x i32>
170  %xa8 = sext <8 x i8> %a8 to <8 x i32>
171  %xb8 = sext <8 x i8> %b8 to <8 x i32>
172  %xa16 = sext <16 x i8> %a16 to <16 x i32>
173  %xb16 = sext <16 x i8> %b16 to <16 x i32>
174  %xa32 = sext <32 x i8> %a32 to <32 x i32>
175  %xb32 = sext <32 x i8> %b32 to <32 x i32>
176  %xa64 = sext <64 x i8> %a64 to <64 x i32>
177  %xb64 = sext <64 x i8> %b64 to <64 x i32>
178  %res4 = mul <4 x i32> %xa4, %xb4
179  %res8 = mul <8 x i32> %xa8, %xb8
180  %res16 = mul <16 x i32> %xa16, %xb16
181  %res32 = mul <32 x i32> %xa32, %xb32
182  %res64 = mul <64 x i32> %xa64, %xb64
183  ret void
184}
185
186define void @mul_zext_vXi8(<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)  {
187; SSE2-LABEL: 'mul_zext_vXi8'
188; SSE2-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %xa4 = zext <4 x i8> %a4 to <4 x i32>
189; SSE2-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %xb4 = zext <4 x i8> %b4 to <4 x i32>
190; SSE2-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %xa8 = zext <8 x i8> %a8 to <8 x i32>
191; SSE2-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %xb8 = zext <8 x i8> %b8 to <8 x i32>
192; SSE2-NEXT:  Cost Model: Found an estimated cost of 8 for instruction: %xa16 = zext <16 x i8> %a16 to <16 x i32>
193; SSE2-NEXT:  Cost Model: Found an estimated cost of 8 for instruction: %xb16 = zext <16 x i8> %b16 to <16 x i32>
194; SSE2-NEXT:  Cost Model: Found an estimated cost of 16 for instruction: %xa32 = zext <32 x i8> %a32 to <32 x i32>
195; SSE2-NEXT:  Cost Model: Found an estimated cost of 16 for instruction: %xb32 = zext <32 x i8> %b32 to <32 x i32>
196; SSE2-NEXT:  Cost Model: Found an estimated cost of 32 for instruction: %xa64 = zext <64 x i8> %a64 to <64 x i32>
197; SSE2-NEXT:  Cost Model: Found an estimated cost of 32 for instruction: %xb64 = zext <64 x i8> %b64 to <64 x i32>
198; SSE2-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %res4 = mul <4 x i32> %xa4, %xb4
199; SSE2-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %res8 = mul <8 x i32> %xa8, %xb8
200; SSE2-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %res16 = mul <16 x i32> %xa16, %xb16
201; SSE2-NEXT:  Cost Model: Found an estimated cost of 8 for instruction: %res32 = mul <32 x i32> %xa32, %xb32
202; SSE2-NEXT:  Cost Model: Found an estimated cost of 16 for instruction: %res64 = mul <64 x i32> %xa64, %xb64
203; SSE2-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret void
204;
205; SSSE3-LABEL: 'mul_zext_vXi8'
206; SSSE3-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %xa4 = zext <4 x i8> %a4 to <4 x i32>
207; SSSE3-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %xb4 = zext <4 x i8> %b4 to <4 x i32>
208; SSSE3-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %xa8 = zext <8 x i8> %a8 to <8 x i32>
209; SSSE3-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %xb8 = zext <8 x i8> %b8 to <8 x i32>
210; SSSE3-NEXT:  Cost Model: Found an estimated cost of 8 for instruction: %xa16 = zext <16 x i8> %a16 to <16 x i32>
211; SSSE3-NEXT:  Cost Model: Found an estimated cost of 8 for instruction: %xb16 = zext <16 x i8> %b16 to <16 x i32>
212; SSSE3-NEXT:  Cost Model: Found an estimated cost of 16 for instruction: %xa32 = zext <32 x i8> %a32 to <32 x i32>
213; SSSE3-NEXT:  Cost Model: Found an estimated cost of 16 for instruction: %xb32 = zext <32 x i8> %b32 to <32 x i32>
214; SSSE3-NEXT:  Cost Model: Found an estimated cost of 32 for instruction: %xa64 = zext <64 x i8> %a64 to <64 x i32>
215; SSSE3-NEXT:  Cost Model: Found an estimated cost of 32 for instruction: %xb64 = zext <64 x i8> %b64 to <64 x i32>
216; SSSE3-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %res4 = mul <4 x i32> %xa4, %xb4
217; SSSE3-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %res8 = mul <8 x i32> %xa8, %xb8
218; SSSE3-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %res16 = mul <16 x i32> %xa16, %xb16
219; SSSE3-NEXT:  Cost Model: Found an estimated cost of 8 for instruction: %res32 = mul <32 x i32> %xa32, %xb32
220; SSSE3-NEXT:  Cost Model: Found an estimated cost of 16 for instruction: %res64 = mul <64 x i32> %xa64, %xb64
221; SSSE3-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret void
222;
223; SSE42-LABEL: 'mul_zext_vXi8'
224; SSE42-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xa4 = zext <4 x i8> %a4 to <4 x i32>
225; SSE42-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xb4 = zext <4 x i8> %b4 to <4 x i32>
226; SSE42-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %xa8 = zext <8 x i8> %a8 to <8 x i32>
227; SSE42-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %xb8 = zext <8 x i8> %b8 to <8 x i32>
228; SSE42-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %xa16 = zext <16 x i8> %a16 to <16 x i32>
229; SSE42-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %xb16 = zext <16 x i8> %b16 to <16 x i32>
230; SSE42-NEXT:  Cost Model: Found an estimated cost of 8 for instruction: %xa32 = zext <32 x i8> %a32 to <32 x i32>
231; SSE42-NEXT:  Cost Model: Found an estimated cost of 8 for instruction: %xb32 = zext <32 x i8> %b32 to <32 x i32>
232; SSE42-NEXT:  Cost Model: Found an estimated cost of 16 for instruction: %xa64 = zext <64 x i8> %a64 to <64 x i32>
233; SSE42-NEXT:  Cost Model: Found an estimated cost of 16 for instruction: %xb64 = zext <64 x i8> %b64 to <64 x i32>
234; SSE42-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %res4 = mul <4 x i32> %xa4, %xb4
235; SSE42-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %res8 = mul <8 x i32> %xa8, %xb8
236; SSE42-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %res16 = mul <16 x i32> %xa16, %xb16
237; SSE42-NEXT:  Cost Model: Found an estimated cost of 8 for instruction: %res32 = mul <32 x i32> %xa32, %xb32
238; SSE42-NEXT:  Cost Model: Found an estimated cost of 16 for instruction: %res64 = mul <64 x i32> %xa64, %xb64
239; SSE42-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret void
240;
241; AVX1-LABEL: 'mul_zext_vXi8'
242; AVX1-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xa4 = zext <4 x i8> %a4 to <4 x i32>
243; AVX1-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xb4 = zext <4 x i8> %b4 to <4 x i32>
244; AVX1-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %xa8 = zext <8 x i8> %a8 to <8 x i32>
245; AVX1-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %xb8 = zext <8 x i8> %b8 to <8 x i32>
246; AVX1-NEXT:  Cost Model: Found an estimated cost of 6 for instruction: %xa16 = zext <16 x i8> %a16 to <16 x i32>
247; AVX1-NEXT:  Cost Model: Found an estimated cost of 6 for instruction: %xb16 = zext <16 x i8> %b16 to <16 x i32>
248; AVX1-NEXT:  Cost Model: Found an estimated cost of 13 for instruction: %xa32 = zext <32 x i8> %a32 to <32 x i32>
249; AVX1-NEXT:  Cost Model: Found an estimated cost of 13 for instruction: %xb32 = zext <32 x i8> %b32 to <32 x i32>
250; AVX1-NEXT:  Cost Model: Found an estimated cost of 26 for instruction: %xa64 = zext <64 x i8> %a64 to <64 x i32>
251; AVX1-NEXT:  Cost Model: Found an estimated cost of 26 for instruction: %xb64 = zext <64 x i8> %b64 to <64 x i32>
252; AVX1-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %res4 = mul <4 x i32> %xa4, %xb4
253; AVX1-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %res8 = mul <8 x i32> %xa8, %xb8
254; AVX1-NEXT:  Cost Model: Found an estimated cost of 8 for instruction: %res16 = mul <16 x i32> %xa16, %xb16
255; AVX1-NEXT:  Cost Model: Found an estimated cost of 16 for instruction: %res32 = mul <32 x i32> %xa32, %xb32
256; AVX1-NEXT:  Cost Model: Found an estimated cost of 32 for instruction: %res64 = mul <64 x i32> %xa64, %xb64
257; AVX1-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret void
258;
259; AVX2-LABEL: 'mul_zext_vXi8'
260; AVX2-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xa4 = zext <4 x i8> %a4 to <4 x i32>
261; AVX2-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xb4 = zext <4 x i8> %b4 to <4 x i32>
262; AVX2-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %xa8 = zext <8 x i8> %a8 to <8 x i32>
263; AVX2-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %xb8 = zext <8 x i8> %b8 to <8 x i32>
264; AVX2-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %xa16 = zext <16 x i8> %a16 to <16 x i32>
265; AVX2-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %xb16 = zext <16 x i8> %b16 to <16 x i32>
266; AVX2-NEXT:  Cost Model: Found an estimated cost of 9 for instruction: %xa32 = zext <32 x i8> %a32 to <32 x i32>
267; AVX2-NEXT:  Cost Model: Found an estimated cost of 9 for instruction: %xb32 = zext <32 x i8> %b32 to <32 x i32>
268; AVX2-NEXT:  Cost Model: Found an estimated cost of 18 for instruction: %xa64 = zext <64 x i8> %a64 to <64 x i32>
269; AVX2-NEXT:  Cost Model: Found an estimated cost of 18 for instruction: %xb64 = zext <64 x i8> %b64 to <64 x i32>
270; AVX2-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %res4 = mul <4 x i32> %xa4, %xb4
271; AVX2-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %res8 = mul <8 x i32> %xa8, %xb8
272; AVX2-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %res16 = mul <16 x i32> %xa16, %xb16
273; AVX2-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %res32 = mul <32 x i32> %xa32, %xb32
274; AVX2-NEXT:  Cost Model: Found an estimated cost of 8 for instruction: %res64 = mul <64 x i32> %xa64, %xb64
275; AVX2-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret void
276;
277; AVX512-LABEL: 'mul_zext_vXi8'
278; AVX512-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xa4 = zext <4 x i8> %a4 to <4 x i32>
279; AVX512-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xb4 = zext <4 x i8> %b4 to <4 x i32>
280; AVX512-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xa8 = zext <8 x i8> %a8 to <8 x i32>
281; AVX512-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xb8 = zext <8 x i8> %b8 to <8 x i32>
282; AVX512-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xa16 = zext <16 x i8> %a16 to <16 x i32>
283; AVX512-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xb16 = zext <16 x i8> %b16 to <16 x i32>
284; AVX512-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %xa32 = zext <32 x i8> %a32 to <32 x i32>
285; AVX512-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %xb32 = zext <32 x i8> %b32 to <32 x i32>
286; AVX512-NEXT:  Cost Model: Found an estimated cost of 7 for instruction: %xa64 = zext <64 x i8> %a64 to <64 x i32>
287; AVX512-NEXT:  Cost Model: Found an estimated cost of 7 for instruction: %xb64 = zext <64 x i8> %b64 to <64 x i32>
288; AVX512-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %res4 = mul <4 x i32> %xa4, %xb4
289; AVX512-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %res8 = mul <8 x i32> %xa8, %xb8
290; AVX512-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %res16 = mul <16 x i32> %xa16, %xb16
291; AVX512-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %res32 = mul <32 x i32> %xa32, %xb32
292; AVX512-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %res64 = mul <64 x i32> %xa64, %xb64
293; AVX512-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret void
294;
295; SLM-LABEL: 'mul_zext_vXi8'
296; SLM-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xa4 = zext <4 x i8> %a4 to <4 x i32>
297; SLM-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xb4 = zext <4 x i8> %b4 to <4 x i32>
298; SLM-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %xa8 = zext <8 x i8> %a8 to <8 x i32>
299; SLM-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %xb8 = zext <8 x i8> %b8 to <8 x i32>
300; SLM-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %xa16 = zext <16 x i8> %a16 to <16 x i32>
301; SLM-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %xb16 = zext <16 x i8> %b16 to <16 x i32>
302; SLM-NEXT:  Cost Model: Found an estimated cost of 8 for instruction: %xa32 = zext <32 x i8> %a32 to <32 x i32>
303; SLM-NEXT:  Cost Model: Found an estimated cost of 8 for instruction: %xb32 = zext <32 x i8> %b32 to <32 x i32>
304; SLM-NEXT:  Cost Model: Found an estimated cost of 16 for instruction: %xa64 = zext <64 x i8> %a64 to <64 x i32>
305; SLM-NEXT:  Cost Model: Found an estimated cost of 16 for instruction: %xb64 = zext <64 x i8> %b64 to <64 x i32>
306; SLM-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %res4 = mul <4 x i32> %xa4, %xb4
307; SLM-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %res8 = mul <8 x i32> %xa8, %xb8
308; SLM-NEXT:  Cost Model: Found an estimated cost of 8 for instruction: %res16 = mul <16 x i32> %xa16, %xb16
309; SLM-NEXT:  Cost Model: Found an estimated cost of 16 for instruction: %res32 = mul <32 x i32> %xa32, %xb32
310; SLM-NEXT:  Cost Model: Found an estimated cost of 32 for instruction: %res64 = mul <64 x i32> %xa64, %xb64
311; SLM-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret void
312;
313; GLM-LABEL: 'mul_zext_vXi8'
314; GLM-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xa4 = zext <4 x i8> %a4 to <4 x i32>
315; GLM-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xb4 = zext <4 x i8> %b4 to <4 x i32>
316; GLM-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %xa8 = zext <8 x i8> %a8 to <8 x i32>
317; GLM-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %xb8 = zext <8 x i8> %b8 to <8 x i32>
318; GLM-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %xa16 = zext <16 x i8> %a16 to <16 x i32>
319; GLM-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %xb16 = zext <16 x i8> %b16 to <16 x i32>
320; GLM-NEXT:  Cost Model: Found an estimated cost of 8 for instruction: %xa32 = zext <32 x i8> %a32 to <32 x i32>
321; GLM-NEXT:  Cost Model: Found an estimated cost of 8 for instruction: %xb32 = zext <32 x i8> %b32 to <32 x i32>
322; GLM-NEXT:  Cost Model: Found an estimated cost of 16 for instruction: %xa64 = zext <64 x i8> %a64 to <64 x i32>
323; GLM-NEXT:  Cost Model: Found an estimated cost of 16 for instruction: %xb64 = zext <64 x i8> %b64 to <64 x i32>
324; GLM-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %res4 = mul <4 x i32> %xa4, %xb4
325; GLM-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %res8 = mul <8 x i32> %xa8, %xb8
326; GLM-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %res16 = mul <16 x i32> %xa16, %xb16
327; GLM-NEXT:  Cost Model: Found an estimated cost of 8 for instruction: %res32 = mul <32 x i32> %xa32, %xb32
328; GLM-NEXT:  Cost Model: Found an estimated cost of 16 for instruction: %res64 = mul <64 x i32> %xa64, %xb64
329; GLM-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret void
330;
331  %xa4 = zext <4 x i8> %a4 to <4 x i32>
332  %xb4 = zext <4 x i8> %b4 to <4 x i32>
333  %xa8 = zext <8 x i8> %a8 to <8 x i32>
334  %xb8 = zext <8 x i8> %b8 to <8 x i32>
335  %xa16 = zext <16 x i8> %a16 to <16 x i32>
336  %xb16 = zext <16 x i8> %b16 to <16 x i32>
337  %xa32 = zext <32 x i8> %a32 to <32 x i32>
338  %xb32 = zext <32 x i8> %b32 to <32 x i32>
339  %xa64 = zext <64 x i8> %a64 to <64 x i32>
340  %xb64 = zext <64 x i8> %b64 to <64 x i32>
341  %res4 = mul <4 x i32> %xa4, %xb4
342  %res8 = mul <8 x i32> %xa8, %xb8
343  %res16 = mul <16 x i32> %xa16, %xb16
344  %res32 = mul <32 x i32> %xa32, %xb32
345  %res64 = mul <64 x i32> %xa64, %xb64
346  ret void
347}
348
349define void @mul_sext_zext_vXi8(<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)  {
350; SSE2-LABEL: 'mul_sext_zext_vXi8'
351; SSE2-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %xa4 = sext <4 x i8> %a4 to <4 x i32>
352; SSE2-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %xb4 = zext <4 x i8> %b4 to <4 x i32>
353; SSE2-NEXT:  Cost Model: Found an estimated cost of 6 for instruction: %xa8 = sext <8 x i8> %a8 to <8 x i32>
354; SSE2-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %xb8 = zext <8 x i8> %b8 to <8 x i32>
355; SSE2-NEXT:  Cost Model: Found an estimated cost of 12 for instruction: %xa16 = sext <16 x i8> %a16 to <16 x i32>
356; SSE2-NEXT:  Cost Model: Found an estimated cost of 8 for instruction: %xb16 = zext <16 x i8> %b16 to <16 x i32>
357; SSE2-NEXT:  Cost Model: Found an estimated cost of 24 for instruction: %xa32 = sext <32 x i8> %a32 to <32 x i32>
358; SSE2-NEXT:  Cost Model: Found an estimated cost of 16 for instruction: %xb32 = zext <32 x i8> %b32 to <32 x i32>
359; SSE2-NEXT:  Cost Model: Found an estimated cost of 48 for instruction: %xa64 = sext <64 x i8> %a64 to <64 x i32>
360; SSE2-NEXT:  Cost Model: Found an estimated cost of 32 for instruction: %xb64 = zext <64 x i8> %b64 to <64 x i32>
361; SSE2-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %res4 = mul <4 x i32> %xa4, %xb4
362; SSE2-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %res8 = mul <8 x i32> %xa8, %xb8
363; SSE2-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %res16 = mul <16 x i32> %xa16, %xb16
364; SSE2-NEXT:  Cost Model: Found an estimated cost of 8 for instruction: %res32 = mul <32 x i32> %xa32, %xb32
365; SSE2-NEXT:  Cost Model: Found an estimated cost of 16 for instruction: %res64 = mul <64 x i32> %xa64, %xb64
366; SSE2-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret void
367;
368; SSSE3-LABEL: 'mul_sext_zext_vXi8'
369; SSSE3-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %xa4 = sext <4 x i8> %a4 to <4 x i32>
370; SSSE3-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %xb4 = zext <4 x i8> %b4 to <4 x i32>
371; SSSE3-NEXT:  Cost Model: Found an estimated cost of 6 for instruction: %xa8 = sext <8 x i8> %a8 to <8 x i32>
372; SSSE3-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %xb8 = zext <8 x i8> %b8 to <8 x i32>
373; SSSE3-NEXT:  Cost Model: Found an estimated cost of 12 for instruction: %xa16 = sext <16 x i8> %a16 to <16 x i32>
374; SSSE3-NEXT:  Cost Model: Found an estimated cost of 8 for instruction: %xb16 = zext <16 x i8> %b16 to <16 x i32>
375; SSSE3-NEXT:  Cost Model: Found an estimated cost of 24 for instruction: %xa32 = sext <32 x i8> %a32 to <32 x i32>
376; SSSE3-NEXT:  Cost Model: Found an estimated cost of 16 for instruction: %xb32 = zext <32 x i8> %b32 to <32 x i32>
377; SSSE3-NEXT:  Cost Model: Found an estimated cost of 48 for instruction: %xa64 = sext <64 x i8> %a64 to <64 x i32>
378; SSSE3-NEXT:  Cost Model: Found an estimated cost of 32 for instruction: %xb64 = zext <64 x i8> %b64 to <64 x i32>
379; SSSE3-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %res4 = mul <4 x i32> %xa4, %xb4
380; SSSE3-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %res8 = mul <8 x i32> %xa8, %xb8
381; SSSE3-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %res16 = mul <16 x i32> %xa16, %xb16
382; SSSE3-NEXT:  Cost Model: Found an estimated cost of 8 for instruction: %res32 = mul <32 x i32> %xa32, %xb32
383; SSSE3-NEXT:  Cost Model: Found an estimated cost of 16 for instruction: %res64 = mul <64 x i32> %xa64, %xb64
384; SSSE3-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret void
385;
386; SSE42-LABEL: 'mul_sext_zext_vXi8'
387; SSE42-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xa4 = sext <4 x i8> %a4 to <4 x i32>
388; SSE42-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xb4 = zext <4 x i8> %b4 to <4 x i32>
389; SSE42-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %xa8 = sext <8 x i8> %a8 to <8 x i32>
390; SSE42-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %xb8 = zext <8 x i8> %b8 to <8 x i32>
391; SSE42-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %xa16 = sext <16 x i8> %a16 to <16 x i32>
392; SSE42-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %xb16 = zext <16 x i8> %b16 to <16 x i32>
393; SSE42-NEXT:  Cost Model: Found an estimated cost of 8 for instruction: %xa32 = sext <32 x i8> %a32 to <32 x i32>
394; SSE42-NEXT:  Cost Model: Found an estimated cost of 8 for instruction: %xb32 = zext <32 x i8> %b32 to <32 x i32>
395; SSE42-NEXT:  Cost Model: Found an estimated cost of 16 for instruction: %xa64 = sext <64 x i8> %a64 to <64 x i32>
396; SSE42-NEXT:  Cost Model: Found an estimated cost of 16 for instruction: %xb64 = zext <64 x i8> %b64 to <64 x i32>
397; SSE42-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %res4 = mul <4 x i32> %xa4, %xb4
398; SSE42-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %res8 = mul <8 x i32> %xa8, %xb8
399; SSE42-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %res16 = mul <16 x i32> %xa16, %xb16
400; SSE42-NEXT:  Cost Model: Found an estimated cost of 8 for instruction: %res32 = mul <32 x i32> %xa32, %xb32
401; SSE42-NEXT:  Cost Model: Found an estimated cost of 16 for instruction: %res64 = mul <64 x i32> %xa64, %xb64
402; SSE42-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret void
403;
404; AVX1-LABEL: 'mul_sext_zext_vXi8'
405; AVX1-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xa4 = sext <4 x i8> %a4 to <4 x i32>
406; AVX1-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xb4 = zext <4 x i8> %b4 to <4 x i32>
407; AVX1-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %xa8 = sext <8 x i8> %a8 to <8 x i32>
408; AVX1-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %xb8 = zext <8 x i8> %b8 to <8 x i32>
409; AVX1-NEXT:  Cost Model: Found an estimated cost of 6 for instruction: %xa16 = sext <16 x i8> %a16 to <16 x i32>
410; AVX1-NEXT:  Cost Model: Found an estimated cost of 6 for instruction: %xb16 = zext <16 x i8> %b16 to <16 x i32>
411; AVX1-NEXT:  Cost Model: Found an estimated cost of 13 for instruction: %xa32 = sext <32 x i8> %a32 to <32 x i32>
412; AVX1-NEXT:  Cost Model: Found an estimated cost of 13 for instruction: %xb32 = zext <32 x i8> %b32 to <32 x i32>
413; AVX1-NEXT:  Cost Model: Found an estimated cost of 26 for instruction: %xa64 = sext <64 x i8> %a64 to <64 x i32>
414; AVX1-NEXT:  Cost Model: Found an estimated cost of 26 for instruction: %xb64 = zext <64 x i8> %b64 to <64 x i32>
415; AVX1-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %res4 = mul <4 x i32> %xa4, %xb4
416; AVX1-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %res8 = mul <8 x i32> %xa8, %xb8
417; AVX1-NEXT:  Cost Model: Found an estimated cost of 8 for instruction: %res16 = mul <16 x i32> %xa16, %xb16
418; AVX1-NEXT:  Cost Model: Found an estimated cost of 16 for instruction: %res32 = mul <32 x i32> %xa32, %xb32
419; AVX1-NEXT:  Cost Model: Found an estimated cost of 32 for instruction: %res64 = mul <64 x i32> %xa64, %xb64
420; AVX1-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret void
421;
422; AVX2-LABEL: 'mul_sext_zext_vXi8'
423; AVX2-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xa4 = sext <4 x i8> %a4 to <4 x i32>
424; AVX2-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xb4 = zext <4 x i8> %b4 to <4 x i32>
425; AVX2-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %xa8 = sext <8 x i8> %a8 to <8 x i32>
426; AVX2-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %xb8 = zext <8 x i8> %b8 to <8 x i32>
427; AVX2-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %xa16 = sext <16 x i8> %a16 to <16 x i32>
428; AVX2-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %xb16 = zext <16 x i8> %b16 to <16 x i32>
429; AVX2-NEXT:  Cost Model: Found an estimated cost of 9 for instruction: %xa32 = sext <32 x i8> %a32 to <32 x i32>
430; AVX2-NEXT:  Cost Model: Found an estimated cost of 9 for instruction: %xb32 = zext <32 x i8> %b32 to <32 x i32>
431; AVX2-NEXT:  Cost Model: Found an estimated cost of 18 for instruction: %xa64 = sext <64 x i8> %a64 to <64 x i32>
432; AVX2-NEXT:  Cost Model: Found an estimated cost of 18 for instruction: %xb64 = zext <64 x i8> %b64 to <64 x i32>
433; AVX2-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %res4 = mul <4 x i32> %xa4, %xb4
434; AVX2-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %res8 = mul <8 x i32> %xa8, %xb8
435; AVX2-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %res16 = mul <16 x i32> %xa16, %xb16
436; AVX2-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %res32 = mul <32 x i32> %xa32, %xb32
437; AVX2-NEXT:  Cost Model: Found an estimated cost of 8 for instruction: %res64 = mul <64 x i32> %xa64, %xb64
438; AVX2-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret void
439;
440; AVX512-LABEL: 'mul_sext_zext_vXi8'
441; AVX512-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xa4 = sext <4 x i8> %a4 to <4 x i32>
442; AVX512-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xb4 = zext <4 x i8> %b4 to <4 x i32>
443; AVX512-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xa8 = sext <8 x i8> %a8 to <8 x i32>
444; AVX512-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xb8 = zext <8 x i8> %b8 to <8 x i32>
445; AVX512-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xa16 = sext <16 x i8> %a16 to <16 x i32>
446; AVX512-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xb16 = zext <16 x i8> %b16 to <16 x i32>
447; AVX512-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %xa32 = sext <32 x i8> %a32 to <32 x i32>
448; AVX512-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %xb32 = zext <32 x i8> %b32 to <32 x i32>
449; AVX512-NEXT:  Cost Model: Found an estimated cost of 7 for instruction: %xa64 = sext <64 x i8> %a64 to <64 x i32>
450; AVX512-NEXT:  Cost Model: Found an estimated cost of 7 for instruction: %xb64 = zext <64 x i8> %b64 to <64 x i32>
451; AVX512-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %res4 = mul <4 x i32> %xa4, %xb4
452; AVX512-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %res8 = mul <8 x i32> %xa8, %xb8
453; AVX512-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %res16 = mul <16 x i32> %xa16, %xb16
454; AVX512-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %res32 = mul <32 x i32> %xa32, %xb32
455; AVX512-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %res64 = mul <64 x i32> %xa64, %xb64
456; AVX512-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret void
457;
458; SLM-LABEL: 'mul_sext_zext_vXi8'
459; SLM-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xa4 = sext <4 x i8> %a4 to <4 x i32>
460; SLM-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xb4 = zext <4 x i8> %b4 to <4 x i32>
461; SLM-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %xa8 = sext <8 x i8> %a8 to <8 x i32>
462; SLM-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %xb8 = zext <8 x i8> %b8 to <8 x i32>
463; SLM-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %xa16 = sext <16 x i8> %a16 to <16 x i32>
464; SLM-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %xb16 = zext <16 x i8> %b16 to <16 x i32>
465; SLM-NEXT:  Cost Model: Found an estimated cost of 8 for instruction: %xa32 = sext <32 x i8> %a32 to <32 x i32>
466; SLM-NEXT:  Cost Model: Found an estimated cost of 8 for instruction: %xb32 = zext <32 x i8> %b32 to <32 x i32>
467; SLM-NEXT:  Cost Model: Found an estimated cost of 16 for instruction: %xa64 = sext <64 x i8> %a64 to <64 x i32>
468; SLM-NEXT:  Cost Model: Found an estimated cost of 16 for instruction: %xb64 = zext <64 x i8> %b64 to <64 x i32>
469; SLM-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %res4 = mul <4 x i32> %xa4, %xb4
470; SLM-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %res8 = mul <8 x i32> %xa8, %xb8
471; SLM-NEXT:  Cost Model: Found an estimated cost of 8 for instruction: %res16 = mul <16 x i32> %xa16, %xb16
472; SLM-NEXT:  Cost Model: Found an estimated cost of 16 for instruction: %res32 = mul <32 x i32> %xa32, %xb32
473; SLM-NEXT:  Cost Model: Found an estimated cost of 32 for instruction: %res64 = mul <64 x i32> %xa64, %xb64
474; SLM-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret void
475;
476; GLM-LABEL: 'mul_sext_zext_vXi8'
477; GLM-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xa4 = sext <4 x i8> %a4 to <4 x i32>
478; GLM-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xb4 = zext <4 x i8> %b4 to <4 x i32>
479; GLM-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %xa8 = sext <8 x i8> %a8 to <8 x i32>
480; GLM-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %xb8 = zext <8 x i8> %b8 to <8 x i32>
481; GLM-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %xa16 = sext <16 x i8> %a16 to <16 x i32>
482; GLM-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %xb16 = zext <16 x i8> %b16 to <16 x i32>
483; GLM-NEXT:  Cost Model: Found an estimated cost of 8 for instruction: %xa32 = sext <32 x i8> %a32 to <32 x i32>
484; GLM-NEXT:  Cost Model: Found an estimated cost of 8 for instruction: %xb32 = zext <32 x i8> %b32 to <32 x i32>
485; GLM-NEXT:  Cost Model: Found an estimated cost of 16 for instruction: %xa64 = sext <64 x i8> %a64 to <64 x i32>
486; GLM-NEXT:  Cost Model: Found an estimated cost of 16 for instruction: %xb64 = zext <64 x i8> %b64 to <64 x i32>
487; GLM-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %res4 = mul <4 x i32> %xa4, %xb4
488; GLM-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %res8 = mul <8 x i32> %xa8, %xb8
489; GLM-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %res16 = mul <16 x i32> %xa16, %xb16
490; GLM-NEXT:  Cost Model: Found an estimated cost of 8 for instruction: %res32 = mul <32 x i32> %xa32, %xb32
491; GLM-NEXT:  Cost Model: Found an estimated cost of 16 for instruction: %res64 = mul <64 x i32> %xa64, %xb64
492; GLM-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret void
493;
494  %xa4 = sext <4 x i8> %a4 to <4 x i32>
495  %xb4 = zext <4 x i8> %b4 to <4 x i32>
496  %xa8 = sext <8 x i8> %a8 to <8 x i32>
497  %xb8 = zext <8 x i8> %b8 to <8 x i32>
498  %xa16 = sext <16 x i8> %a16 to <16 x i32>
499  %xb16 = zext <16 x i8> %b16 to <16 x i32>
500  %xa32 = sext <32 x i8> %a32 to <32 x i32>
501  %xb32 = zext <32 x i8> %b32 to <32 x i32>
502  %xa64 = sext <64 x i8> %a64 to <64 x i32>
503  %xb64 = zext <64 x i8> %b64 to <64 x i32>
504  %res4 = mul <4 x i32> %xa4, %xb4
505  %res8 = mul <8 x i32> %xa8, %xb8
506  %res16 = mul <16 x i32> %xa16, %xb16
507  %res32 = mul <32 x i32> %xa32, %xb32
508  %res64 = mul <64 x i32> %xa64, %xb64
509  ret void
510}
511
512;
513; mul vXi16 -> mXi32
514;
515
516define void @mul_sext_vXi16(<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)  {
517; SSE2-LABEL: 'mul_sext_vXi16'
518; SSE2-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %xa4 = sext <4 x i16> %a4 to <4 x i32>
519; SSE2-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %xb4 = sext <4 x i16> %b4 to <4 x i32>
520; SSE2-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %xa8 = sext <8 x i16> %a8 to <8 x i32>
521; SSE2-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %xb8 = sext <8 x i16> %b8 to <8 x i32>
522; SSE2-NEXT:  Cost Model: Found an estimated cost of 8 for instruction: %xa16 = sext <16 x i16> %a16 to <16 x i32>
523; SSE2-NEXT:  Cost Model: Found an estimated cost of 8 for instruction: %xb16 = sext <16 x i16> %b16 to <16 x i32>
524; SSE2-NEXT:  Cost Model: Found an estimated cost of 16 for instruction: %xa32 = sext <32 x i16> %a32 to <32 x i32>
525; SSE2-NEXT:  Cost Model: Found an estimated cost of 16 for instruction: %xb32 = sext <32 x i16> %b32 to <32 x i32>
526; SSE2-NEXT:  Cost Model: Found an estimated cost of 32 for instruction: %xa64 = sext <64 x i16> %a64 to <64 x i32>
527; SSE2-NEXT:  Cost Model: Found an estimated cost of 32 for instruction: %xb64 = sext <64 x i16> %b64 to <64 x i32>
528; SSE2-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %res4 = mul <4 x i32> %xa4, %xb4
529; SSE2-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %res8 = mul <8 x i32> %xa8, %xb8
530; SSE2-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %res16 = mul <16 x i32> %xa16, %xb16
531; SSE2-NEXT:  Cost Model: Found an estimated cost of 8 for instruction: %res32 = mul <32 x i32> %xa32, %xb32
532; SSE2-NEXT:  Cost Model: Found an estimated cost of 16 for instruction: %res64 = mul <64 x i32> %xa64, %xb64
533; SSE2-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret void
534;
535; SSSE3-LABEL: 'mul_sext_vXi16'
536; SSSE3-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %xa4 = sext <4 x i16> %a4 to <4 x i32>
537; SSSE3-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %xb4 = sext <4 x i16> %b4 to <4 x i32>
538; SSSE3-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %xa8 = sext <8 x i16> %a8 to <8 x i32>
539; SSSE3-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %xb8 = sext <8 x i16> %b8 to <8 x i32>
540; SSSE3-NEXT:  Cost Model: Found an estimated cost of 8 for instruction: %xa16 = sext <16 x i16> %a16 to <16 x i32>
541; SSSE3-NEXT:  Cost Model: Found an estimated cost of 8 for instruction: %xb16 = sext <16 x i16> %b16 to <16 x i32>
542; SSSE3-NEXT:  Cost Model: Found an estimated cost of 16 for instruction: %xa32 = sext <32 x i16> %a32 to <32 x i32>
543; SSSE3-NEXT:  Cost Model: Found an estimated cost of 16 for instruction: %xb32 = sext <32 x i16> %b32 to <32 x i32>
544; SSSE3-NEXT:  Cost Model: Found an estimated cost of 32 for instruction: %xa64 = sext <64 x i16> %a64 to <64 x i32>
545; SSSE3-NEXT:  Cost Model: Found an estimated cost of 32 for instruction: %xb64 = sext <64 x i16> %b64 to <64 x i32>
546; SSSE3-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %res4 = mul <4 x i32> %xa4, %xb4
547; SSSE3-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %res8 = mul <8 x i32> %xa8, %xb8
548; SSSE3-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %res16 = mul <16 x i32> %xa16, %xb16
549; SSSE3-NEXT:  Cost Model: Found an estimated cost of 8 for instruction: %res32 = mul <32 x i32> %xa32, %xb32
550; SSSE3-NEXT:  Cost Model: Found an estimated cost of 16 for instruction: %res64 = mul <64 x i32> %xa64, %xb64
551; SSSE3-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret void
552;
553; SSE42-LABEL: 'mul_sext_vXi16'
554; SSE42-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xa4 = sext <4 x i16> %a4 to <4 x i32>
555; SSE42-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xb4 = sext <4 x i16> %b4 to <4 x i32>
556; SSE42-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %xa8 = sext <8 x i16> %a8 to <8 x i32>
557; SSE42-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %xb8 = sext <8 x i16> %b8 to <8 x i32>
558; SSE42-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %xa16 = sext <16 x i16> %a16 to <16 x i32>
559; SSE42-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %xb16 = sext <16 x i16> %b16 to <16 x i32>
560; SSE42-NEXT:  Cost Model: Found an estimated cost of 8 for instruction: %xa32 = sext <32 x i16> %a32 to <32 x i32>
561; SSE42-NEXT:  Cost Model: Found an estimated cost of 8 for instruction: %xb32 = sext <32 x i16> %b32 to <32 x i32>
562; SSE42-NEXT:  Cost Model: Found an estimated cost of 16 for instruction: %xa64 = sext <64 x i16> %a64 to <64 x i32>
563; SSE42-NEXT:  Cost Model: Found an estimated cost of 16 for instruction: %xb64 = sext <64 x i16> %b64 to <64 x i32>
564; SSE42-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %res4 = mul <4 x i32> %xa4, %xb4
565; SSE42-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %res8 = mul <8 x i32> %xa8, %xb8
566; SSE42-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %res16 = mul <16 x i32> %xa16, %xb16
567; SSE42-NEXT:  Cost Model: Found an estimated cost of 8 for instruction: %res32 = mul <32 x i32> %xa32, %xb32
568; SSE42-NEXT:  Cost Model: Found an estimated cost of 16 for instruction: %res64 = mul <64 x i32> %xa64, %xb64
569; SSE42-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret void
570;
571; AVX1-LABEL: 'mul_sext_vXi16'
572; AVX1-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xa4 = sext <4 x i16> %a4 to <4 x i32>
573; AVX1-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xb4 = sext <4 x i16> %b4 to <4 x i32>
574; AVX1-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %xa8 = sext <8 x i16> %a8 to <8 x i32>
575; AVX1-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %xb8 = sext <8 x i16> %b8 to <8 x i32>
576; AVX1-NEXT:  Cost Model: Found an estimated cost of 7 for instruction: %xa16 = sext <16 x i16> %a16 to <16 x i32>
577; AVX1-NEXT:  Cost Model: Found an estimated cost of 7 for instruction: %xb16 = sext <16 x i16> %b16 to <16 x i32>
578; AVX1-NEXT:  Cost Model: Found an estimated cost of 14 for instruction: %xa32 = sext <32 x i16> %a32 to <32 x i32>
579; AVX1-NEXT:  Cost Model: Found an estimated cost of 14 for instruction: %xb32 = sext <32 x i16> %b32 to <32 x i32>
580; AVX1-NEXT:  Cost Model: Found an estimated cost of 28 for instruction: %xa64 = sext <64 x i16> %a64 to <64 x i32>
581; AVX1-NEXT:  Cost Model: Found an estimated cost of 28 for instruction: %xb64 = sext <64 x i16> %b64 to <64 x i32>
582; AVX1-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %res4 = mul <4 x i32> %xa4, %xb4
583; AVX1-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %res8 = mul <8 x i32> %xa8, %xb8
584; AVX1-NEXT:  Cost Model: Found an estimated cost of 8 for instruction: %res16 = mul <16 x i32> %xa16, %xb16
585; AVX1-NEXT:  Cost Model: Found an estimated cost of 16 for instruction: %res32 = mul <32 x i32> %xa32, %xb32
586; AVX1-NEXT:  Cost Model: Found an estimated cost of 32 for instruction: %res64 = mul <64 x i32> %xa64, %xb64
587; AVX1-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret void
588;
589; AVX2-LABEL: 'mul_sext_vXi16'
590; AVX2-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xa4 = sext <4 x i16> %a4 to <4 x i32>
591; AVX2-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xb4 = sext <4 x i16> %b4 to <4 x i32>
592; AVX2-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %xa8 = sext <8 x i16> %a8 to <8 x i32>
593; AVX2-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %xb8 = sext <8 x i16> %b8 to <8 x i32>
594; AVX2-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %xa16 = sext <16 x i16> %a16 to <16 x i32>
595; AVX2-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %xb16 = sext <16 x i16> %b16 to <16 x i32>
596; AVX2-NEXT:  Cost Model: Found an estimated cost of 6 for instruction: %xa32 = sext <32 x i16> %a32 to <32 x i32>
597; AVX2-NEXT:  Cost Model: Found an estimated cost of 6 for instruction: %xb32 = sext <32 x i16> %b32 to <32 x i32>
598; AVX2-NEXT:  Cost Model: Found an estimated cost of 12 for instruction: %xa64 = sext <64 x i16> %a64 to <64 x i32>
599; AVX2-NEXT:  Cost Model: Found an estimated cost of 12 for instruction: %xb64 = sext <64 x i16> %b64 to <64 x i32>
600; AVX2-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %res4 = mul <4 x i32> %xa4, %xb4
601; AVX2-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %res8 = mul <8 x i32> %xa8, %xb8
602; AVX2-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %res16 = mul <16 x i32> %xa16, %xb16
603; AVX2-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %res32 = mul <32 x i32> %xa32, %xb32
604; AVX2-NEXT:  Cost Model: Found an estimated cost of 8 for instruction: %res64 = mul <64 x i32> %xa64, %xb64
605; AVX2-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret void
606;
607; AVX512-LABEL: 'mul_sext_vXi16'
608; AVX512-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xa4 = sext <4 x i16> %a4 to <4 x i32>
609; AVX512-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xb4 = sext <4 x i16> %b4 to <4 x i32>
610; AVX512-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xa8 = sext <8 x i16> %a8 to <8 x i32>
611; AVX512-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xb8 = sext <8 x i16> %b8 to <8 x i32>
612; AVX512-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xa16 = sext <16 x i16> %a16 to <16 x i32>
613; AVX512-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xb16 = sext <16 x i16> %b16 to <16 x i32>
614; AVX512-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %xa32 = sext <32 x i16> %a32 to <32 x i32>
615; AVX512-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %xb32 = sext <32 x i16> %b32 to <32 x i32>
616; AVX512-NEXT:  Cost Model: Found an estimated cost of 6 for instruction: %xa64 = sext <64 x i16> %a64 to <64 x i32>
617; AVX512-NEXT:  Cost Model: Found an estimated cost of 6 for instruction: %xb64 = sext <64 x i16> %b64 to <64 x i32>
618; AVX512-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %res4 = mul <4 x i32> %xa4, %xb4
619; AVX512-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %res8 = mul <8 x i32> %xa8, %xb8
620; AVX512-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %res16 = mul <16 x i32> %xa16, %xb16
621; AVX512-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %res32 = mul <32 x i32> %xa32, %xb32
622; AVX512-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %res64 = mul <64 x i32> %xa64, %xb64
623; AVX512-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret void
624;
625; SLM-LABEL: 'mul_sext_vXi16'
626; SLM-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xa4 = sext <4 x i16> %a4 to <4 x i32>
627; SLM-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xb4 = sext <4 x i16> %b4 to <4 x i32>
628; SLM-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %xa8 = sext <8 x i16> %a8 to <8 x i32>
629; SLM-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %xb8 = sext <8 x i16> %b8 to <8 x i32>
630; SLM-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %xa16 = sext <16 x i16> %a16 to <16 x i32>
631; SLM-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %xb16 = sext <16 x i16> %b16 to <16 x i32>
632; SLM-NEXT:  Cost Model: Found an estimated cost of 8 for instruction: %xa32 = sext <32 x i16> %a32 to <32 x i32>
633; SLM-NEXT:  Cost Model: Found an estimated cost of 8 for instruction: %xb32 = sext <32 x i16> %b32 to <32 x i32>
634; SLM-NEXT:  Cost Model: Found an estimated cost of 16 for instruction: %xa64 = sext <64 x i16> %a64 to <64 x i32>
635; SLM-NEXT:  Cost Model: Found an estimated cost of 16 for instruction: %xb64 = sext <64 x i16> %b64 to <64 x i32>
636; SLM-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %res4 = mul <4 x i32> %xa4, %xb4
637; SLM-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %res8 = mul <8 x i32> %xa8, %xb8
638; SLM-NEXT:  Cost Model: Found an estimated cost of 8 for instruction: %res16 = mul <16 x i32> %xa16, %xb16
639; SLM-NEXT:  Cost Model: Found an estimated cost of 16 for instruction: %res32 = mul <32 x i32> %xa32, %xb32
640; SLM-NEXT:  Cost Model: Found an estimated cost of 32 for instruction: %res64 = mul <64 x i32> %xa64, %xb64
641; SLM-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret void
642;
643; GLM-LABEL: 'mul_sext_vXi16'
644; GLM-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xa4 = sext <4 x i16> %a4 to <4 x i32>
645; GLM-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xb4 = sext <4 x i16> %b4 to <4 x i32>
646; GLM-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %xa8 = sext <8 x i16> %a8 to <8 x i32>
647; GLM-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %xb8 = sext <8 x i16> %b8 to <8 x i32>
648; GLM-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %xa16 = sext <16 x i16> %a16 to <16 x i32>
649; GLM-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %xb16 = sext <16 x i16> %b16 to <16 x i32>
650; GLM-NEXT:  Cost Model: Found an estimated cost of 8 for instruction: %xa32 = sext <32 x i16> %a32 to <32 x i32>
651; GLM-NEXT:  Cost Model: Found an estimated cost of 8 for instruction: %xb32 = sext <32 x i16> %b32 to <32 x i32>
652; GLM-NEXT:  Cost Model: Found an estimated cost of 16 for instruction: %xa64 = sext <64 x i16> %a64 to <64 x i32>
653; GLM-NEXT:  Cost Model: Found an estimated cost of 16 for instruction: %xb64 = sext <64 x i16> %b64 to <64 x i32>
654; GLM-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %res4 = mul <4 x i32> %xa4, %xb4
655; GLM-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %res8 = mul <8 x i32> %xa8, %xb8
656; GLM-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %res16 = mul <16 x i32> %xa16, %xb16
657; GLM-NEXT:  Cost Model: Found an estimated cost of 8 for instruction: %res32 = mul <32 x i32> %xa32, %xb32
658; GLM-NEXT:  Cost Model: Found an estimated cost of 16 for instruction: %res64 = mul <64 x i32> %xa64, %xb64
659; GLM-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret void
660;
661  %xa4 = sext <4 x i16> %a4 to <4 x i32>
662  %xb4 = sext <4 x i16> %b4 to <4 x i32>
663  %xa8 = sext <8 x i16> %a8 to <8 x i32>
664  %xb8 = sext <8 x i16> %b8 to <8 x i32>
665  %xa16 = sext <16 x i16> %a16 to <16 x i32>
666  %xb16 = sext <16 x i16> %b16 to <16 x i32>
667  %xa32 = sext <32 x i16> %a32 to <32 x i32>
668  %xb32 = sext <32 x i16> %b32 to <32 x i32>
669  %xa64 = sext <64 x i16> %a64 to <64 x i32>
670  %xb64 = sext <64 x i16> %b64 to <64 x i32>
671  %res4 = mul <4 x i32> %xa4, %xb4
672  %res8 = mul <8 x i32> %xa8, %xb8
673  %res16 = mul <16 x i32> %xa16, %xb16
674  %res32 = mul <32 x i32> %xa32, %xb32
675  %res64 = mul <64 x i32> %xa64, %xb64
676  ret void
677}
678
679define void @mul_zext_vXi16(<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)  {
680; SSE2-LABEL: 'mul_zext_vXi16'
681; SSE2-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xa4 = zext <4 x i16> %a4 to <4 x i32>
682; SSE2-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xb4 = zext <4 x i16> %b4 to <4 x i32>
683; SSE2-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %xa8 = zext <8 x i16> %a8 to <8 x i32>
684; SSE2-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %xb8 = zext <8 x i16> %b8 to <8 x i32>
685; SSE2-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %xa16 = zext <16 x i16> %a16 to <16 x i32>
686; SSE2-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %xb16 = zext <16 x i16> %b16 to <16 x i32>
687; SSE2-NEXT:  Cost Model: Found an estimated cost of 8 for instruction: %xa32 = zext <32 x i16> %a32 to <32 x i32>
688; SSE2-NEXT:  Cost Model: Found an estimated cost of 8 for instruction: %xb32 = zext <32 x i16> %b32 to <32 x i32>
689; SSE2-NEXT:  Cost Model: Found an estimated cost of 16 for instruction: %xa64 = zext <64 x i16> %a64 to <64 x i32>
690; SSE2-NEXT:  Cost Model: Found an estimated cost of 16 for instruction: %xb64 = zext <64 x i16> %b64 to <64 x i32>
691; SSE2-NEXT:  Cost Model: Found an estimated cost of 6 for instruction: %res4 = mul <4 x i32> %xa4, %xb4
692; SSE2-NEXT:  Cost Model: Found an estimated cost of 12 for instruction: %res8 = mul <8 x i32> %xa8, %xb8
693; SSE2-NEXT:  Cost Model: Found an estimated cost of 24 for instruction: %res16 = mul <16 x i32> %xa16, %xb16
694; SSE2-NEXT:  Cost Model: Found an estimated cost of 48 for instruction: %res32 = mul <32 x i32> %xa32, %xb32
695; SSE2-NEXT:  Cost Model: Found an estimated cost of 96 for instruction: %res64 = mul <64 x i32> %xa64, %xb64
696; SSE2-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret void
697;
698; SSSE3-LABEL: 'mul_zext_vXi16'
699; SSSE3-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xa4 = zext <4 x i16> %a4 to <4 x i32>
700; SSSE3-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xb4 = zext <4 x i16> %b4 to <4 x i32>
701; SSSE3-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %xa8 = zext <8 x i16> %a8 to <8 x i32>
702; SSSE3-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %xb8 = zext <8 x i16> %b8 to <8 x i32>
703; SSSE3-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %xa16 = zext <16 x i16> %a16 to <16 x i32>
704; SSSE3-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %xb16 = zext <16 x i16> %b16 to <16 x i32>
705; SSSE3-NEXT:  Cost Model: Found an estimated cost of 8 for instruction: %xa32 = zext <32 x i16> %a32 to <32 x i32>
706; SSSE3-NEXT:  Cost Model: Found an estimated cost of 8 for instruction: %xb32 = zext <32 x i16> %b32 to <32 x i32>
707; SSSE3-NEXT:  Cost Model: Found an estimated cost of 16 for instruction: %xa64 = zext <64 x i16> %a64 to <64 x i32>
708; SSSE3-NEXT:  Cost Model: Found an estimated cost of 16 for instruction: %xb64 = zext <64 x i16> %b64 to <64 x i32>
709; SSSE3-NEXT:  Cost Model: Found an estimated cost of 6 for instruction: %res4 = mul <4 x i32> %xa4, %xb4
710; SSSE3-NEXT:  Cost Model: Found an estimated cost of 12 for instruction: %res8 = mul <8 x i32> %xa8, %xb8
711; SSSE3-NEXT:  Cost Model: Found an estimated cost of 24 for instruction: %res16 = mul <16 x i32> %xa16, %xb16
712; SSSE3-NEXT:  Cost Model: Found an estimated cost of 48 for instruction: %res32 = mul <32 x i32> %xa32, %xb32
713; SSSE3-NEXT:  Cost Model: Found an estimated cost of 96 for instruction: %res64 = mul <64 x i32> %xa64, %xb64
714; SSSE3-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret void
715;
716; SSE42-LABEL: 'mul_zext_vXi16'
717; SSE42-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xa4 = zext <4 x i16> %a4 to <4 x i32>
718; SSE42-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xb4 = zext <4 x i16> %b4 to <4 x i32>
719; SSE42-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %xa8 = zext <8 x i16> %a8 to <8 x i32>
720; SSE42-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %xb8 = zext <8 x i16> %b8 to <8 x i32>
721; SSE42-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %xa16 = zext <16 x i16> %a16 to <16 x i32>
722; SSE42-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %xb16 = zext <16 x i16> %b16 to <16 x i32>
723; SSE42-NEXT:  Cost Model: Found an estimated cost of 8 for instruction: %xa32 = zext <32 x i16> %a32 to <32 x i32>
724; SSE42-NEXT:  Cost Model: Found an estimated cost of 8 for instruction: %xb32 = zext <32 x i16> %b32 to <32 x i32>
725; SSE42-NEXT:  Cost Model: Found an estimated cost of 16 for instruction: %xa64 = zext <64 x i16> %a64 to <64 x i32>
726; SSE42-NEXT:  Cost Model: Found an estimated cost of 16 for instruction: %xb64 = zext <64 x i16> %b64 to <64 x i32>
727; SSE42-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %res4 = mul <4 x i32> %xa4, %xb4
728; SSE42-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %res8 = mul <8 x i32> %xa8, %xb8
729; SSE42-NEXT:  Cost Model: Found an estimated cost of 8 for instruction: %res16 = mul <16 x i32> %xa16, %xb16
730; SSE42-NEXT:  Cost Model: Found an estimated cost of 16 for instruction: %res32 = mul <32 x i32> %xa32, %xb32
731; SSE42-NEXT:  Cost Model: Found an estimated cost of 32 for instruction: %res64 = mul <64 x i32> %xa64, %xb64
732; SSE42-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret void
733;
734; AVX1-LABEL: 'mul_zext_vXi16'
735; AVX1-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xa4 = zext <4 x i16> %a4 to <4 x i32>
736; AVX1-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xb4 = zext <4 x i16> %b4 to <4 x i32>
737; AVX1-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %xa8 = zext <8 x i16> %a8 to <8 x i32>
738; AVX1-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %xb8 = zext <8 x i16> %b8 to <8 x i32>
739; AVX1-NEXT:  Cost Model: Found an estimated cost of 7 for instruction: %xa16 = zext <16 x i16> %a16 to <16 x i32>
740; AVX1-NEXT:  Cost Model: Found an estimated cost of 7 for instruction: %xb16 = zext <16 x i16> %b16 to <16 x i32>
741; AVX1-NEXT:  Cost Model: Found an estimated cost of 14 for instruction: %xa32 = zext <32 x i16> %a32 to <32 x i32>
742; AVX1-NEXT:  Cost Model: Found an estimated cost of 14 for instruction: %xb32 = zext <32 x i16> %b32 to <32 x i32>
743; AVX1-NEXT:  Cost Model: Found an estimated cost of 28 for instruction: %xa64 = zext <64 x i16> %a64 to <64 x i32>
744; AVX1-NEXT:  Cost Model: Found an estimated cost of 28 for instruction: %xb64 = zext <64 x i16> %b64 to <64 x i32>
745; AVX1-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %res4 = mul <4 x i32> %xa4, %xb4
746; AVX1-NEXT:  Cost Model: Found an estimated cost of 5 for instruction: %res8 = mul <8 x i32> %xa8, %xb8
747; AVX1-NEXT:  Cost Model: Found an estimated cost of 10 for instruction: %res16 = mul <16 x i32> %xa16, %xb16
748; AVX1-NEXT:  Cost Model: Found an estimated cost of 20 for instruction: %res32 = mul <32 x i32> %xa32, %xb32
749; AVX1-NEXT:  Cost Model: Found an estimated cost of 40 for instruction: %res64 = mul <64 x i32> %xa64, %xb64
750; AVX1-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret void
751;
752; AVX2-LABEL: 'mul_zext_vXi16'
753; AVX2-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xa4 = zext <4 x i16> %a4 to <4 x i32>
754; AVX2-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xb4 = zext <4 x i16> %b4 to <4 x i32>
755; AVX2-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %xa8 = zext <8 x i16> %a8 to <8 x i32>
756; AVX2-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %xb8 = zext <8 x i16> %b8 to <8 x i32>
757; AVX2-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %xa16 = zext <16 x i16> %a16 to <16 x i32>
758; AVX2-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %xb16 = zext <16 x i16> %b16 to <16 x i32>
759; AVX2-NEXT:  Cost Model: Found an estimated cost of 6 for instruction: %xa32 = zext <32 x i16> %a32 to <32 x i32>
760; AVX2-NEXT:  Cost Model: Found an estimated cost of 6 for instruction: %xb32 = zext <32 x i16> %b32 to <32 x i32>
761; AVX2-NEXT:  Cost Model: Found an estimated cost of 12 for instruction: %xa64 = zext <64 x i16> %a64 to <64 x i32>
762; AVX2-NEXT:  Cost Model: Found an estimated cost of 12 for instruction: %xb64 = zext <64 x i16> %b64 to <64 x i32>
763; AVX2-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %res4 = mul <4 x i32> %xa4, %xb4
764; AVX2-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %res8 = mul <8 x i32> %xa8, %xb8
765; AVX2-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %res16 = mul <16 x i32> %xa16, %xb16
766; AVX2-NEXT:  Cost Model: Found an estimated cost of 8 for instruction: %res32 = mul <32 x i32> %xa32, %xb32
767; AVX2-NEXT:  Cost Model: Found an estimated cost of 16 for instruction: %res64 = mul <64 x i32> %xa64, %xb64
768; AVX2-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret void
769;
770; AVX512-LABEL: 'mul_zext_vXi16'
771; AVX512-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xa4 = zext <4 x i16> %a4 to <4 x i32>
772; AVX512-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xb4 = zext <4 x i16> %b4 to <4 x i32>
773; AVX512-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xa8 = zext <8 x i16> %a8 to <8 x i32>
774; AVX512-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xb8 = zext <8 x i16> %b8 to <8 x i32>
775; AVX512-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xa16 = zext <16 x i16> %a16 to <16 x i32>
776; AVX512-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xb16 = zext <16 x i16> %b16 to <16 x i32>
777; AVX512-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %xa32 = zext <32 x i16> %a32 to <32 x i32>
778; AVX512-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %xb32 = zext <32 x i16> %b32 to <32 x i32>
779; AVX512-NEXT:  Cost Model: Found an estimated cost of 6 for instruction: %xa64 = zext <64 x i16> %a64 to <64 x i32>
780; AVX512-NEXT:  Cost Model: Found an estimated cost of 6 for instruction: %xb64 = zext <64 x i16> %b64 to <64 x i32>
781; AVX512-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %res4 = mul <4 x i32> %xa4, %xb4
782; AVX512-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %res8 = mul <8 x i32> %xa8, %xb8
783; AVX512-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %res16 = mul <16 x i32> %xa16, %xb16
784; AVX512-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %res32 = mul <32 x i32> %xa32, %xb32
785; AVX512-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %res64 = mul <64 x i32> %xa64, %xb64
786; AVX512-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret void
787;
788; SLM-LABEL: 'mul_zext_vXi16'
789; SLM-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xa4 = zext <4 x i16> %a4 to <4 x i32>
790; SLM-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xb4 = zext <4 x i16> %b4 to <4 x i32>
791; SLM-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %xa8 = zext <8 x i16> %a8 to <8 x i32>
792; SLM-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %xb8 = zext <8 x i16> %b8 to <8 x i32>
793; SLM-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %xa16 = zext <16 x i16> %a16 to <16 x i32>
794; SLM-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %xb16 = zext <16 x i16> %b16 to <16 x i32>
795; SLM-NEXT:  Cost Model: Found an estimated cost of 8 for instruction: %xa32 = zext <32 x i16> %a32 to <32 x i32>
796; SLM-NEXT:  Cost Model: Found an estimated cost of 8 for instruction: %xb32 = zext <32 x i16> %b32 to <32 x i32>
797; SLM-NEXT:  Cost Model: Found an estimated cost of 16 for instruction: %xa64 = zext <64 x i16> %a64 to <64 x i32>
798; SLM-NEXT:  Cost Model: Found an estimated cost of 16 for instruction: %xb64 = zext <64 x i16> %b64 to <64 x i32>
799; SLM-NEXT:  Cost Model: Found an estimated cost of 5 for instruction: %res4 = mul <4 x i32> %xa4, %xb4
800; SLM-NEXT:  Cost Model: Found an estimated cost of 10 for instruction: %res8 = mul <8 x i32> %xa8, %xb8
801; SLM-NEXT:  Cost Model: Found an estimated cost of 20 for instruction: %res16 = mul <16 x i32> %xa16, %xb16
802; SLM-NEXT:  Cost Model: Found an estimated cost of 40 for instruction: %res32 = mul <32 x i32> %xa32, %xb32
803; SLM-NEXT:  Cost Model: Found an estimated cost of 80 for instruction: %res64 = mul <64 x i32> %xa64, %xb64
804; SLM-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret void
805;
806; GLM-LABEL: 'mul_zext_vXi16'
807; GLM-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xa4 = zext <4 x i16> %a4 to <4 x i32>
808; GLM-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xb4 = zext <4 x i16> %b4 to <4 x i32>
809; GLM-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %xa8 = zext <8 x i16> %a8 to <8 x i32>
810; GLM-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %xb8 = zext <8 x i16> %b8 to <8 x i32>
811; GLM-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %xa16 = zext <16 x i16> %a16 to <16 x i32>
812; GLM-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %xb16 = zext <16 x i16> %b16 to <16 x i32>
813; GLM-NEXT:  Cost Model: Found an estimated cost of 8 for instruction: %xa32 = zext <32 x i16> %a32 to <32 x i32>
814; GLM-NEXT:  Cost Model: Found an estimated cost of 8 for instruction: %xb32 = zext <32 x i16> %b32 to <32 x i32>
815; GLM-NEXT:  Cost Model: Found an estimated cost of 16 for instruction: %xa64 = zext <64 x i16> %a64 to <64 x i32>
816; GLM-NEXT:  Cost Model: Found an estimated cost of 16 for instruction: %xb64 = zext <64 x i16> %b64 to <64 x i32>
817; GLM-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %res4 = mul <4 x i32> %xa4, %xb4
818; GLM-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %res8 = mul <8 x i32> %xa8, %xb8
819; GLM-NEXT:  Cost Model: Found an estimated cost of 8 for instruction: %res16 = mul <16 x i32> %xa16, %xb16
820; GLM-NEXT:  Cost Model: Found an estimated cost of 16 for instruction: %res32 = mul <32 x i32> %xa32, %xb32
821; GLM-NEXT:  Cost Model: Found an estimated cost of 32 for instruction: %res64 = mul <64 x i32> %xa64, %xb64
822; GLM-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret void
823;
824  %xa4 = zext <4 x i16> %a4 to <4 x i32>
825  %xb4 = zext <4 x i16> %b4 to <4 x i32>
826  %xa8 = zext <8 x i16> %a8 to <8 x i32>
827  %xb8 = zext <8 x i16> %b8 to <8 x i32>
828  %xa16 = zext <16 x i16> %a16 to <16 x i32>
829  %xb16 = zext <16 x i16> %b16 to <16 x i32>
830  %xa32 = zext <32 x i16> %a32 to <32 x i32>
831  %xb32 = zext <32 x i16> %b32 to <32 x i32>
832  %xa64 = zext <64 x i16> %a64 to <64 x i32>
833  %xb64 = zext <64 x i16> %b64 to <64 x i32>
834  %res4 = mul <4 x i32> %xa4, %xb4
835  %res8 = mul <8 x i32> %xa8, %xb8
836  %res16 = mul <16 x i32> %xa16, %xb16
837  %res32 = mul <32 x i32> %xa32, %xb32
838  %res64 = mul <64 x i32> %xa64, %xb64
839  ret void
840}
841
842define void @mul_sext_zext_vXi16(<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)  {
843; SSE2-LABEL: 'mul_sext_zext_vXi16'
844; SSE2-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %xa4 = sext <4 x i16> %a4 to <4 x i32>
845; SSE2-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xb4 = zext <4 x i16> %b4 to <4 x i32>
846; SSE2-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %xa8 = sext <8 x i16> %a8 to <8 x i32>
847; SSE2-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %xb8 = zext <8 x i16> %b8 to <8 x i32>
848; SSE2-NEXT:  Cost Model: Found an estimated cost of 8 for instruction: %xa16 = sext <16 x i16> %a16 to <16 x i32>
849; SSE2-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %xb16 = zext <16 x i16> %b16 to <16 x i32>
850; SSE2-NEXT:  Cost Model: Found an estimated cost of 16 for instruction: %xa32 = sext <32 x i16> %a32 to <32 x i32>
851; SSE2-NEXT:  Cost Model: Found an estimated cost of 8 for instruction: %xb32 = zext <32 x i16> %b32 to <32 x i32>
852; SSE2-NEXT:  Cost Model: Found an estimated cost of 32 for instruction: %xa64 = sext <64 x i16> %a64 to <64 x i32>
853; SSE2-NEXT:  Cost Model: Found an estimated cost of 16 for instruction: %xb64 = zext <64 x i16> %b64 to <64 x i32>
854; SSE2-NEXT:  Cost Model: Found an estimated cost of 6 for instruction: %res4 = mul <4 x i32> %xa4, %xb4
855; SSE2-NEXT:  Cost Model: Found an estimated cost of 12 for instruction: %res8 = mul <8 x i32> %xa8, %xb8
856; SSE2-NEXT:  Cost Model: Found an estimated cost of 24 for instruction: %res16 = mul <16 x i32> %xa16, %xb16
857; SSE2-NEXT:  Cost Model: Found an estimated cost of 48 for instruction: %res32 = mul <32 x i32> %xa32, %xb32
858; SSE2-NEXT:  Cost Model: Found an estimated cost of 96 for instruction: %res64 = mul <64 x i32> %xa64, %xb64
859; SSE2-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret void
860;
861; SSSE3-LABEL: 'mul_sext_zext_vXi16'
862; SSSE3-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %xa4 = sext <4 x i16> %a4 to <4 x i32>
863; SSSE3-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xb4 = zext <4 x i16> %b4 to <4 x i32>
864; SSSE3-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %xa8 = sext <8 x i16> %a8 to <8 x i32>
865; SSSE3-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %xb8 = zext <8 x i16> %b8 to <8 x i32>
866; SSSE3-NEXT:  Cost Model: Found an estimated cost of 8 for instruction: %xa16 = sext <16 x i16> %a16 to <16 x i32>
867; SSSE3-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %xb16 = zext <16 x i16> %b16 to <16 x i32>
868; SSSE3-NEXT:  Cost Model: Found an estimated cost of 16 for instruction: %xa32 = sext <32 x i16> %a32 to <32 x i32>
869; SSSE3-NEXT:  Cost Model: Found an estimated cost of 8 for instruction: %xb32 = zext <32 x i16> %b32 to <32 x i32>
870; SSSE3-NEXT:  Cost Model: Found an estimated cost of 32 for instruction: %xa64 = sext <64 x i16> %a64 to <64 x i32>
871; SSSE3-NEXT:  Cost Model: Found an estimated cost of 16 for instruction: %xb64 = zext <64 x i16> %b64 to <64 x i32>
872; SSSE3-NEXT:  Cost Model: Found an estimated cost of 6 for instruction: %res4 = mul <4 x i32> %xa4, %xb4
873; SSSE3-NEXT:  Cost Model: Found an estimated cost of 12 for instruction: %res8 = mul <8 x i32> %xa8, %xb8
874; SSSE3-NEXT:  Cost Model: Found an estimated cost of 24 for instruction: %res16 = mul <16 x i32> %xa16, %xb16
875; SSSE3-NEXT:  Cost Model: Found an estimated cost of 48 for instruction: %res32 = mul <32 x i32> %xa32, %xb32
876; SSSE3-NEXT:  Cost Model: Found an estimated cost of 96 for instruction: %res64 = mul <64 x i32> %xa64, %xb64
877; SSSE3-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret void
878;
879; SSE42-LABEL: 'mul_sext_zext_vXi16'
880; SSE42-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xa4 = sext <4 x i16> %a4 to <4 x i32>
881; SSE42-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xb4 = zext <4 x i16> %b4 to <4 x i32>
882; SSE42-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %xa8 = sext <8 x i16> %a8 to <8 x i32>
883; SSE42-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %xb8 = zext <8 x i16> %b8 to <8 x i32>
884; SSE42-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %xa16 = sext <16 x i16> %a16 to <16 x i32>
885; SSE42-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %xb16 = zext <16 x i16> %b16 to <16 x i32>
886; SSE42-NEXT:  Cost Model: Found an estimated cost of 8 for instruction: %xa32 = sext <32 x i16> %a32 to <32 x i32>
887; SSE42-NEXT:  Cost Model: Found an estimated cost of 8 for instruction: %xb32 = zext <32 x i16> %b32 to <32 x i32>
888; SSE42-NEXT:  Cost Model: Found an estimated cost of 16 for instruction: %xa64 = sext <64 x i16> %a64 to <64 x i32>
889; SSE42-NEXT:  Cost Model: Found an estimated cost of 16 for instruction: %xb64 = zext <64 x i16> %b64 to <64 x i32>
890; SSE42-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %res4 = mul <4 x i32> %xa4, %xb4
891; SSE42-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %res8 = mul <8 x i32> %xa8, %xb8
892; SSE42-NEXT:  Cost Model: Found an estimated cost of 8 for instruction: %res16 = mul <16 x i32> %xa16, %xb16
893; SSE42-NEXT:  Cost Model: Found an estimated cost of 16 for instruction: %res32 = mul <32 x i32> %xa32, %xb32
894; SSE42-NEXT:  Cost Model: Found an estimated cost of 32 for instruction: %res64 = mul <64 x i32> %xa64, %xb64
895; SSE42-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret void
896;
897; AVX1-LABEL: 'mul_sext_zext_vXi16'
898; AVX1-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xa4 = sext <4 x i16> %a4 to <4 x i32>
899; AVX1-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xb4 = zext <4 x i16> %b4 to <4 x i32>
900; AVX1-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %xa8 = sext <8 x i16> %a8 to <8 x i32>
901; AVX1-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %xb8 = zext <8 x i16> %b8 to <8 x i32>
902; AVX1-NEXT:  Cost Model: Found an estimated cost of 7 for instruction: %xa16 = sext <16 x i16> %a16 to <16 x i32>
903; AVX1-NEXT:  Cost Model: Found an estimated cost of 7 for instruction: %xb16 = zext <16 x i16> %b16 to <16 x i32>
904; AVX1-NEXT:  Cost Model: Found an estimated cost of 14 for instruction: %xa32 = sext <32 x i16> %a32 to <32 x i32>
905; AVX1-NEXT:  Cost Model: Found an estimated cost of 14 for instruction: %xb32 = zext <32 x i16> %b32 to <32 x i32>
906; AVX1-NEXT:  Cost Model: Found an estimated cost of 28 for instruction: %xa64 = sext <64 x i16> %a64 to <64 x i32>
907; AVX1-NEXT:  Cost Model: Found an estimated cost of 28 for instruction: %xb64 = zext <64 x i16> %b64 to <64 x i32>
908; AVX1-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %res4 = mul <4 x i32> %xa4, %xb4
909; AVX1-NEXT:  Cost Model: Found an estimated cost of 5 for instruction: %res8 = mul <8 x i32> %xa8, %xb8
910; AVX1-NEXT:  Cost Model: Found an estimated cost of 10 for instruction: %res16 = mul <16 x i32> %xa16, %xb16
911; AVX1-NEXT:  Cost Model: Found an estimated cost of 20 for instruction: %res32 = mul <32 x i32> %xa32, %xb32
912; AVX1-NEXT:  Cost Model: Found an estimated cost of 40 for instruction: %res64 = mul <64 x i32> %xa64, %xb64
913; AVX1-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret void
914;
915; AVX2-LABEL: 'mul_sext_zext_vXi16'
916; AVX2-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xa4 = sext <4 x i16> %a4 to <4 x i32>
917; AVX2-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xb4 = zext <4 x i16> %b4 to <4 x i32>
918; AVX2-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %xa8 = sext <8 x i16> %a8 to <8 x i32>
919; AVX2-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %xb8 = zext <8 x i16> %b8 to <8 x i32>
920; AVX2-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %xa16 = sext <16 x i16> %a16 to <16 x i32>
921; AVX2-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %xb16 = zext <16 x i16> %b16 to <16 x i32>
922; AVX2-NEXT:  Cost Model: Found an estimated cost of 6 for instruction: %xa32 = sext <32 x i16> %a32 to <32 x i32>
923; AVX2-NEXT:  Cost Model: Found an estimated cost of 6 for instruction: %xb32 = zext <32 x i16> %b32 to <32 x i32>
924; AVX2-NEXT:  Cost Model: Found an estimated cost of 12 for instruction: %xa64 = sext <64 x i16> %a64 to <64 x i32>
925; AVX2-NEXT:  Cost Model: Found an estimated cost of 12 for instruction: %xb64 = zext <64 x i16> %b64 to <64 x i32>
926; AVX2-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %res4 = mul <4 x i32> %xa4, %xb4
927; AVX2-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %res8 = mul <8 x i32> %xa8, %xb8
928; AVX2-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %res16 = mul <16 x i32> %xa16, %xb16
929; AVX2-NEXT:  Cost Model: Found an estimated cost of 8 for instruction: %res32 = mul <32 x i32> %xa32, %xb32
930; AVX2-NEXT:  Cost Model: Found an estimated cost of 16 for instruction: %res64 = mul <64 x i32> %xa64, %xb64
931; AVX2-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret void
932;
933; AVX512-LABEL: 'mul_sext_zext_vXi16'
934; AVX512-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xa4 = sext <4 x i16> %a4 to <4 x i32>
935; AVX512-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xb4 = zext <4 x i16> %b4 to <4 x i32>
936; AVX512-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xa8 = sext <8 x i16> %a8 to <8 x i32>
937; AVX512-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xb8 = zext <8 x i16> %b8 to <8 x i32>
938; AVX512-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xa16 = sext <16 x i16> %a16 to <16 x i32>
939; AVX512-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xb16 = zext <16 x i16> %b16 to <16 x i32>
940; AVX512-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %xa32 = sext <32 x i16> %a32 to <32 x i32>
941; AVX512-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %xb32 = zext <32 x i16> %b32 to <32 x i32>
942; AVX512-NEXT:  Cost Model: Found an estimated cost of 6 for instruction: %xa64 = sext <64 x i16> %a64 to <64 x i32>
943; AVX512-NEXT:  Cost Model: Found an estimated cost of 6 for instruction: %xb64 = zext <64 x i16> %b64 to <64 x i32>
944; AVX512-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %res4 = mul <4 x i32> %xa4, %xb4
945; AVX512-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %res8 = mul <8 x i32> %xa8, %xb8
946; AVX512-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %res16 = mul <16 x i32> %xa16, %xb16
947; AVX512-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %res32 = mul <32 x i32> %xa32, %xb32
948; AVX512-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %res64 = mul <64 x i32> %xa64, %xb64
949; AVX512-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret void
950;
951; SLM-LABEL: 'mul_sext_zext_vXi16'
952; SLM-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xa4 = sext <4 x i16> %a4 to <4 x i32>
953; SLM-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xb4 = zext <4 x i16> %b4 to <4 x i32>
954; SLM-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %xa8 = sext <8 x i16> %a8 to <8 x i32>
955; SLM-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %xb8 = zext <8 x i16> %b8 to <8 x i32>
956; SLM-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %xa16 = sext <16 x i16> %a16 to <16 x i32>
957; SLM-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %xb16 = zext <16 x i16> %b16 to <16 x i32>
958; SLM-NEXT:  Cost Model: Found an estimated cost of 8 for instruction: %xa32 = sext <32 x i16> %a32 to <32 x i32>
959; SLM-NEXT:  Cost Model: Found an estimated cost of 8 for instruction: %xb32 = zext <32 x i16> %b32 to <32 x i32>
960; SLM-NEXT:  Cost Model: Found an estimated cost of 16 for instruction: %xa64 = sext <64 x i16> %a64 to <64 x i32>
961; SLM-NEXT:  Cost Model: Found an estimated cost of 16 for instruction: %xb64 = zext <64 x i16> %b64 to <64 x i32>
962; SLM-NEXT:  Cost Model: Found an estimated cost of 11 for instruction: %res4 = mul <4 x i32> %xa4, %xb4
963; SLM-NEXT:  Cost Model: Found an estimated cost of 22 for instruction: %res8 = mul <8 x i32> %xa8, %xb8
964; SLM-NEXT:  Cost Model: Found an estimated cost of 44 for instruction: %res16 = mul <16 x i32> %xa16, %xb16
965; SLM-NEXT:  Cost Model: Found an estimated cost of 88 for instruction: %res32 = mul <32 x i32> %xa32, %xb32
966; SLM-NEXT:  Cost Model: Found an estimated cost of 176 for instruction: %res64 = mul <64 x i32> %xa64, %xb64
967; SLM-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret void
968;
969; GLM-LABEL: 'mul_sext_zext_vXi16'
970; GLM-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xa4 = sext <4 x i16> %a4 to <4 x i32>
971; GLM-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %xb4 = zext <4 x i16> %b4 to <4 x i32>
972; GLM-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %xa8 = sext <8 x i16> %a8 to <8 x i32>
973; GLM-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %xb8 = zext <8 x i16> %b8 to <8 x i32>
974; GLM-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %xa16 = sext <16 x i16> %a16 to <16 x i32>
975; GLM-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %xb16 = zext <16 x i16> %b16 to <16 x i32>
976; GLM-NEXT:  Cost Model: Found an estimated cost of 8 for instruction: %xa32 = sext <32 x i16> %a32 to <32 x i32>
977; GLM-NEXT:  Cost Model: Found an estimated cost of 8 for instruction: %xb32 = zext <32 x i16> %b32 to <32 x i32>
978; GLM-NEXT:  Cost Model: Found an estimated cost of 16 for instruction: %xa64 = sext <64 x i16> %a64 to <64 x i32>
979; GLM-NEXT:  Cost Model: Found an estimated cost of 16 for instruction: %xb64 = zext <64 x i16> %b64 to <64 x i32>
980; GLM-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %res4 = mul <4 x i32> %xa4, %xb4
981; GLM-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %res8 = mul <8 x i32> %xa8, %xb8
982; GLM-NEXT:  Cost Model: Found an estimated cost of 8 for instruction: %res16 = mul <16 x i32> %xa16, %xb16
983; GLM-NEXT:  Cost Model: Found an estimated cost of 16 for instruction: %res32 = mul <32 x i32> %xa32, %xb32
984; GLM-NEXT:  Cost Model: Found an estimated cost of 32 for instruction: %res64 = mul <64 x i32> %xa64, %xb64
985; GLM-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret void
986;
987  %xa4 = sext <4 x i16> %a4 to <4 x i32>
988  %xb4 = zext <4 x i16> %b4 to <4 x i32>
989  %xa8 = sext <8 x i16> %a8 to <8 x i32>
990  %xb8 = zext <8 x i16> %b8 to <8 x i32>
991  %xa16 = sext <16 x i16> %a16 to <16 x i32>
992  %xb16 = zext <16 x i16> %b16 to <16 x i32>
993  %xa32 = sext <32 x i16> %a32 to <32 x i32>
994  %xb32 = zext <32 x i16> %b32 to <32 x i32>
995  %xa64 = sext <64 x i16> %a64 to <64 x i32>
996  %xb64 = zext <64 x i16> %b64 to <64 x i32>
997  %res4 = mul <4 x i32> %xa4, %xb4
998  %res8 = mul <8 x i32> %xa8, %xb8
999  %res16 = mul <16 x i32> %xa16, %xb16
1000  %res32 = mul <32 x i32> %xa32, %xb32
1001  %res64 = mul <64 x i32> %xa64, %xb64
1002  ret void
1003}
1004