xref: /llvm-project/llvm/test/Analysis/CostModel/X86/vector-extract.ll (revision aca5f9aeea8da8857235347ed1363ccda5460cbb)
1; NOTE: Assertions have been autogenerated by utils/update_analyze_test_checks.py
2; RUN: opt < %s -mtriple=x86_64-apple-macosx10.8.0 -passes="print<cost-model>" 2>&1 -disable-output -mattr=+sse2 | FileCheck %s --check-prefixes=SSE,SSE2
3; RUN: opt < %s -mtriple=x86_64-apple-macosx10.8.0 -passes="print<cost-model>" 2>&1 -disable-output -mattr=+sse3 | FileCheck %s --check-prefixes=SSE,SSE3
4; RUN: opt < %s -mtriple=x86_64-apple-macosx10.8.0 -passes="print<cost-model>" 2>&1 -disable-output -mattr=+ssse3 | FileCheck %s --check-prefixes=SSE,SSSE3
5; RUN: opt < %s -mtriple=x86_64-apple-macosx10.8.0 -passes="print<cost-model>" 2>&1 -disable-output -mattr=+sse4.1 | FileCheck %s --check-prefixes=SSE,SSE4
6; RUN: opt < %s -mtriple=x86_64-apple-macosx10.8.0 -passes="print<cost-model>" 2>&1 -disable-output -mattr=+sse4.2 | FileCheck %s --check-prefixes=SSE,SSE4
7; RUN: opt < %s -mtriple=x86_64-apple-macosx10.8.0 -passes="print<cost-model>" 2>&1 -disable-output -mattr=+avx | FileCheck %s --check-prefixes=AVX
8; RUN: opt < %s -mtriple=x86_64-apple-macosx10.8.0 -passes="print<cost-model>" 2>&1 -disable-output -mattr=+avx2 | FileCheck %s --check-prefixes=AVX
9; RUN: opt < %s -mtriple=x86_64-apple-macosx10.8.0 -passes="print<cost-model>" 2>&1 -disable-output -mattr=+avx512f | FileCheck %s --check-prefixes=AVX512,AVX512F
10; RUN: opt < %s -mtriple=x86_64-apple-macosx10.8.0 -passes="print<cost-model>" 2>&1 -disable-output -mattr=+avx512f,+avx512bw | FileCheck %s --check-prefixes=AVX512,AVX512BW
11;
12; RUN: opt < %s -mtriple=x86_64-apple-macosx10.8.0 -passes="print<cost-model>" 2>&1 -disable-output -mcpu=slm | FileCheck %s --check-prefixes=SSE,SLM
13; RUN: opt < %s -mtriple=x86_64-apple-macosx10.8.0 -passes="print<cost-model>" 2>&1 -disable-output -mcpu=goldmont | FileCheck %s --check-prefixes=SSE,GLM
14; RUN: opt < %s -mtriple=x86_64-apple-macosx10.8.0 -passes="print<cost-model>" 2>&1 -disable-output -mcpu=btver2 | FileCheck %s --check-prefixes=AVX
15
16define i32 @extract_double(i32 %arg) {
17; SSE-LABEL: 'extract_double'
18; SSE-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v2f64_a = extractelement <2 x double> undef, i32 %arg
19; SSE-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %v2f64_0 = extractelement <2 x double> undef, i32 0
20; SSE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v2f64_1 = extractelement <2 x double> undef, i32 1
21; SSE-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %v4f64_a = extractelement <4 x double> undef, i32 %arg
22; SSE-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %v4f64_0 = extractelement <4 x double> undef, i32 0
23; SSE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v4f64_3 = extractelement <4 x double> undef, i32 3
24; SSE-NEXT:  Cost Model: Found an estimated cost of 5 for instruction: %v8f64_a = extractelement <8 x double> undef, i32 %arg
25; SSE-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %v8f64_0 = extractelement <8 x double> undef, i32 0
26; SSE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v8f64_3 = extractelement <8 x double> undef, i32 3
27; SSE-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %v8f64_4 = extractelement <8 x double> undef, i32 4
28; SSE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v8f64_7 = extractelement <8 x double> undef, i32 7
29; SSE-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef
30;
31; AVX-LABEL: 'extract_double'
32; AVX-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v2f64_a = extractelement <2 x double> undef, i32 %arg
33; AVX-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %v2f64_0 = extractelement <2 x double> undef, i32 0
34; AVX-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v2f64_1 = extractelement <2 x double> undef, i32 1
35; AVX-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v4f64_a = extractelement <4 x double> undef, i32 %arg
36; AVX-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %v4f64_0 = extractelement <4 x double> undef, i32 0
37; AVX-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v4f64_3 = extractelement <4 x double> undef, i32 3
38; AVX-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %v8f64_a = extractelement <8 x double> undef, i32 %arg
39; AVX-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %v8f64_0 = extractelement <8 x double> undef, i32 0
40; AVX-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v8f64_3 = extractelement <8 x double> undef, i32 3
41; AVX-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %v8f64_4 = extractelement <8 x double> undef, i32 4
42; AVX-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v8f64_7 = extractelement <8 x double> undef, i32 7
43; AVX-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef
44;
45; AVX512-LABEL: 'extract_double'
46; AVX512-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v2f64_a = extractelement <2 x double> undef, i32 %arg
47; AVX512-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %v2f64_0 = extractelement <2 x double> undef, i32 0
48; AVX512-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v2f64_1 = extractelement <2 x double> undef, i32 1
49; AVX512-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v4f64_a = extractelement <4 x double> undef, i32 %arg
50; AVX512-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %v4f64_0 = extractelement <4 x double> undef, i32 0
51; AVX512-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v4f64_3 = extractelement <4 x double> undef, i32 3
52; AVX512-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v8f64_a = extractelement <8 x double> undef, i32 %arg
53; AVX512-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %v8f64_0 = extractelement <8 x double> undef, i32 0
54; AVX512-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v8f64_3 = extractelement <8 x double> undef, i32 3
55; AVX512-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v8f64_4 = extractelement <8 x double> undef, i32 4
56; AVX512-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v8f64_7 = extractelement <8 x double> undef, i32 7
57; AVX512-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef
58;
59  %v2f64_a = extractelement <2 x double> undef, i32 %arg
60  %v2f64_0 = extractelement <2 x double> undef, i32 0
61  %v2f64_1 = extractelement <2 x double> undef, i32 1
62
63  %v4f64_a = extractelement <4 x double> undef, i32 %arg
64  %v4f64_0 = extractelement <4 x double> undef, i32 0
65  %v4f64_3 = extractelement <4 x double> undef, i32 3
66
67  %v8f64_a = extractelement <8 x double> undef, i32 %arg
68  %v8f64_0 = extractelement <8 x double> undef, i32 0
69  %v8f64_3 = extractelement <8 x double> undef, i32 3
70  %v8f64_4 = extractelement <8 x double> undef, i32 4
71  %v8f64_7 = extractelement <8 x double> undef, i32 7
72
73  ret i32 undef
74}
75
76define i32 @extract_float(i32 %arg) {
77; SSE-LABEL: 'extract_float'
78; SSE-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v2f32_a = extractelement <2 x float> undef, i32 %arg
79; SSE-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %v2f32_0 = extractelement <2 x float> undef, i32 0
80; SSE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v2f32_1 = extractelement <2 x float> undef, i32 1
81; SSE-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v4f32_a = extractelement <4 x float> undef, i32 %arg
82; SSE-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %v4f32_0 = extractelement <4 x float> undef, i32 0
83; SSE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v4f32_3 = extractelement <4 x float> undef, i32 3
84; SSE-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %v8f32_a = extractelement <8 x float> undef, i32 %arg
85; SSE-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %v8f32_0 = extractelement <8 x float> undef, i32 0
86; SSE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v8f32_3 = extractelement <8 x float> undef, i32 3
87; SSE-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %v8f32_4 = extractelement <8 x float> undef, i32 4
88; SSE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v8f32_7 = extractelement <8 x float> undef, i32 7
89; SSE-NEXT:  Cost Model: Found an estimated cost of 5 for instruction: %v16f32_a = extractelement <16 x float> undef, i32 %arg
90; SSE-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %v16f32_0 = extractelement <16 x float> undef, i32 0
91; SSE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v16f32_3 = extractelement <16 x float> undef, i32 3
92; SSE-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %v16f32_8 = extractelement <16 x float> undef, i32 8
93; SSE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v16f32_15 = extractelement <16 x float> undef, i32 15
94; SSE-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef
95;
96; AVX-LABEL: 'extract_float'
97; AVX-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v2f32_a = extractelement <2 x float> undef, i32 %arg
98; AVX-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %v2f32_0 = extractelement <2 x float> undef, i32 0
99; AVX-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v2f32_1 = extractelement <2 x float> undef, i32 1
100; AVX-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v4f32_a = extractelement <4 x float> undef, i32 %arg
101; AVX-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %v4f32_0 = extractelement <4 x float> undef, i32 0
102; AVX-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v4f32_3 = extractelement <4 x float> undef, i32 3
103; AVX-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v8f32_a = extractelement <8 x float> undef, i32 %arg
104; AVX-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %v8f32_0 = extractelement <8 x float> undef, i32 0
105; AVX-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v8f32_3 = extractelement <8 x float> undef, i32 3
106; AVX-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v8f32_4 = extractelement <8 x float> undef, i32 4
107; AVX-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v8f32_7 = extractelement <8 x float> undef, i32 7
108; AVX-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %v16f32_a = extractelement <16 x float> undef, i32 %arg
109; AVX-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %v16f32_0 = extractelement <16 x float> undef, i32 0
110; AVX-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v16f32_3 = extractelement <16 x float> undef, i32 3
111; AVX-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %v16f32_8 = extractelement <16 x float> undef, i32 8
112; AVX-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v16f32_15 = extractelement <16 x float> undef, i32 15
113; AVX-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef
114;
115; AVX512-LABEL: 'extract_float'
116; AVX512-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v2f32_a = extractelement <2 x float> undef, i32 %arg
117; AVX512-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %v2f32_0 = extractelement <2 x float> undef, i32 0
118; AVX512-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v2f32_1 = extractelement <2 x float> undef, i32 1
119; AVX512-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v4f32_a = extractelement <4 x float> undef, i32 %arg
120; AVX512-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %v4f32_0 = extractelement <4 x float> undef, i32 0
121; AVX512-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v4f32_3 = extractelement <4 x float> undef, i32 3
122; AVX512-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v8f32_a = extractelement <8 x float> undef, i32 %arg
123; AVX512-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %v8f32_0 = extractelement <8 x float> undef, i32 0
124; AVX512-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v8f32_3 = extractelement <8 x float> undef, i32 3
125; AVX512-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v8f32_4 = extractelement <8 x float> undef, i32 4
126; AVX512-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v8f32_7 = extractelement <8 x float> undef, i32 7
127; AVX512-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v16f32_a = extractelement <16 x float> undef, i32 %arg
128; AVX512-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %v16f32_0 = extractelement <16 x float> undef, i32 0
129; AVX512-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v16f32_3 = extractelement <16 x float> undef, i32 3
130; AVX512-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v16f32_8 = extractelement <16 x float> undef, i32 8
131; AVX512-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v16f32_15 = extractelement <16 x float> undef, i32 15
132; AVX512-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef
133;
134  %v2f32_a = extractelement <2 x float> undef, i32 %arg
135  %v2f32_0 = extractelement <2 x float> undef, i32 0
136  %v2f32_1 = extractelement <2 x float> undef, i32 1
137
138  %v4f32_a = extractelement <4 x float> undef, i32 %arg
139  %v4f32_0 = extractelement <4 x float> undef, i32 0
140  %v4f32_3 = extractelement <4 x float> undef, i32 3
141
142  %v8f32_a = extractelement <8 x float> undef, i32 %arg
143  %v8f32_0 = extractelement <8 x float> undef, i32 0
144  %v8f32_3 = extractelement <8 x float> undef, i32 3
145  %v8f32_4 = extractelement <8 x float> undef, i32 4
146  %v8f32_7 = extractelement <8 x float> undef, i32 7
147
148  %v16f32_a = extractelement <16 x float> undef, i32 %arg
149  %v16f32_0 = extractelement <16 x float> undef, i32 0
150  %v16f32_3 = extractelement <16 x float> undef, i32 3
151  %v16f32_8 = extractelement <16 x float> undef, i32 8
152  %v16f32_15 = extractelement <16 x float> undef, i32 15
153
154  ret i32 undef
155}
156
157define i32 @extract_i64(i32 %arg) {
158; SSE2-LABEL: 'extract_i64'
159; SSE2-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v2i64_a = extractelement <2 x i64> undef, i32 %arg
160; SSE2-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v2i64_0 = extractelement <2 x i64> undef, i32 0
161; SSE2-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v2i64_1 = extractelement <2 x i64> undef, i32 1
162; SSE2-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %v4i64_a = extractelement <4 x i64> undef, i32 %arg
163; SSE2-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v4i64_0 = extractelement <4 x i64> undef, i32 0
164; SSE2-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v4i64_3 = extractelement <4 x i64> undef, i32 3
165; SSE2-NEXT:  Cost Model: Found an estimated cost of 5 for instruction: %v8i64_a = extractelement <8 x i64> undef, i32 %arg
166; SSE2-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v8i64_0 = extractelement <8 x i64> undef, i32 0
167; SSE2-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v8i64_3 = extractelement <8 x i64> undef, i32 3
168; SSE2-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v8i64_4 = extractelement <8 x i64> undef, i32 4
169; SSE2-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v8i64_7 = extractelement <8 x i64> undef, i32 7
170; SSE2-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef
171;
172; SSE3-LABEL: 'extract_i64'
173; SSE3-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v2i64_a = extractelement <2 x i64> undef, i32 %arg
174; SSE3-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v2i64_0 = extractelement <2 x i64> undef, i32 0
175; SSE3-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v2i64_1 = extractelement <2 x i64> undef, i32 1
176; SSE3-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %v4i64_a = extractelement <4 x i64> undef, i32 %arg
177; SSE3-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v4i64_0 = extractelement <4 x i64> undef, i32 0
178; SSE3-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v4i64_3 = extractelement <4 x i64> undef, i32 3
179; SSE3-NEXT:  Cost Model: Found an estimated cost of 5 for instruction: %v8i64_a = extractelement <8 x i64> undef, i32 %arg
180; SSE3-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v8i64_0 = extractelement <8 x i64> undef, i32 0
181; SSE3-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v8i64_3 = extractelement <8 x i64> undef, i32 3
182; SSE3-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v8i64_4 = extractelement <8 x i64> undef, i32 4
183; SSE3-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v8i64_7 = extractelement <8 x i64> undef, i32 7
184; SSE3-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef
185;
186; SSSE3-LABEL: 'extract_i64'
187; SSSE3-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v2i64_a = extractelement <2 x i64> undef, i32 %arg
188; SSSE3-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v2i64_0 = extractelement <2 x i64> undef, i32 0
189; SSSE3-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v2i64_1 = extractelement <2 x i64> undef, i32 1
190; SSSE3-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %v4i64_a = extractelement <4 x i64> undef, i32 %arg
191; SSSE3-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v4i64_0 = extractelement <4 x i64> undef, i32 0
192; SSSE3-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v4i64_3 = extractelement <4 x i64> undef, i32 3
193; SSSE3-NEXT:  Cost Model: Found an estimated cost of 5 for instruction: %v8i64_a = extractelement <8 x i64> undef, i32 %arg
194; SSSE3-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v8i64_0 = extractelement <8 x i64> undef, i32 0
195; SSSE3-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v8i64_3 = extractelement <8 x i64> undef, i32 3
196; SSSE3-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v8i64_4 = extractelement <8 x i64> undef, i32 4
197; SSSE3-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v8i64_7 = extractelement <8 x i64> undef, i32 7
198; SSSE3-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef
199;
200; SSE4-LABEL: 'extract_i64'
201; SSE4-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v2i64_a = extractelement <2 x i64> undef, i32 %arg
202; SSE4-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v2i64_0 = extractelement <2 x i64> undef, i32 0
203; SSE4-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v2i64_1 = extractelement <2 x i64> undef, i32 1
204; SSE4-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %v4i64_a = extractelement <4 x i64> undef, i32 %arg
205; SSE4-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v4i64_0 = extractelement <4 x i64> undef, i32 0
206; SSE4-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v4i64_3 = extractelement <4 x i64> undef, i32 3
207; SSE4-NEXT:  Cost Model: Found an estimated cost of 5 for instruction: %v8i64_a = extractelement <8 x i64> undef, i32 %arg
208; SSE4-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v8i64_0 = extractelement <8 x i64> undef, i32 0
209; SSE4-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v8i64_3 = extractelement <8 x i64> undef, i32 3
210; SSE4-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v8i64_4 = extractelement <8 x i64> undef, i32 4
211; SSE4-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v8i64_7 = extractelement <8 x i64> undef, i32 7
212; SSE4-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef
213;
214; AVX-LABEL: 'extract_i64'
215; AVX-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v2i64_a = extractelement <2 x i64> undef, i32 %arg
216; AVX-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v2i64_0 = extractelement <2 x i64> undef, i32 0
217; AVX-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v2i64_1 = extractelement <2 x i64> undef, i32 1
218; AVX-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v4i64_a = extractelement <4 x i64> undef, i32 %arg
219; AVX-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v4i64_0 = extractelement <4 x i64> undef, i32 0
220; AVX-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v4i64_3 = extractelement <4 x i64> undef, i32 3
221; AVX-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %v8i64_a = extractelement <8 x i64> undef, i32 %arg
222; AVX-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v8i64_0 = extractelement <8 x i64> undef, i32 0
223; AVX-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v8i64_3 = extractelement <8 x i64> undef, i32 3
224; AVX-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v8i64_4 = extractelement <8 x i64> undef, i32 4
225; AVX-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v8i64_7 = extractelement <8 x i64> undef, i32 7
226; AVX-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef
227;
228; AVX512-LABEL: 'extract_i64'
229; AVX512-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v2i64_a = extractelement <2 x i64> undef, i32 %arg
230; AVX512-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v2i64_0 = extractelement <2 x i64> undef, i32 0
231; AVX512-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v2i64_1 = extractelement <2 x i64> undef, i32 1
232; AVX512-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v4i64_a = extractelement <4 x i64> undef, i32 %arg
233; AVX512-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v4i64_0 = extractelement <4 x i64> undef, i32 0
234; AVX512-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v4i64_3 = extractelement <4 x i64> undef, i32 3
235; AVX512-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v8i64_a = extractelement <8 x i64> undef, i32 %arg
236; AVX512-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v8i64_0 = extractelement <8 x i64> undef, i32 0
237; AVX512-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v8i64_3 = extractelement <8 x i64> undef, i32 3
238; AVX512-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v8i64_4 = extractelement <8 x i64> undef, i32 4
239; AVX512-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v8i64_7 = extractelement <8 x i64> undef, i32 7
240; AVX512-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef
241;
242; SLM-LABEL: 'extract_i64'
243; SLM-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v2i64_a = extractelement <2 x i64> undef, i32 %arg
244; SLM-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v2i64_0 = extractelement <2 x i64> undef, i32 0
245; SLM-NEXT:  Cost Model: Found an estimated cost of 7 for instruction: %v2i64_1 = extractelement <2 x i64> undef, i32 1
246; SLM-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %v4i64_a = extractelement <4 x i64> undef, i32 %arg
247; SLM-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v4i64_0 = extractelement <4 x i64> undef, i32 0
248; SLM-NEXT:  Cost Model: Found an estimated cost of 7 for instruction: %v4i64_3 = extractelement <4 x i64> undef, i32 3
249; SLM-NEXT:  Cost Model: Found an estimated cost of 5 for instruction: %v8i64_a = extractelement <8 x i64> undef, i32 %arg
250; SLM-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v8i64_0 = extractelement <8 x i64> undef, i32 0
251; SLM-NEXT:  Cost Model: Found an estimated cost of 7 for instruction: %v8i64_3 = extractelement <8 x i64> undef, i32 3
252; SLM-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v8i64_4 = extractelement <8 x i64> undef, i32 4
253; SLM-NEXT:  Cost Model: Found an estimated cost of 7 for instruction: %v8i64_7 = extractelement <8 x i64> undef, i32 7
254; SLM-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef
255;
256; GLM-LABEL: 'extract_i64'
257; GLM-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v2i64_a = extractelement <2 x i64> undef, i32 %arg
258; GLM-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v2i64_0 = extractelement <2 x i64> undef, i32 0
259; GLM-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v2i64_1 = extractelement <2 x i64> undef, i32 1
260; GLM-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %v4i64_a = extractelement <4 x i64> undef, i32 %arg
261; GLM-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v4i64_0 = extractelement <4 x i64> undef, i32 0
262; GLM-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v4i64_3 = extractelement <4 x i64> undef, i32 3
263; GLM-NEXT:  Cost Model: Found an estimated cost of 5 for instruction: %v8i64_a = extractelement <8 x i64> undef, i32 %arg
264; GLM-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v8i64_0 = extractelement <8 x i64> undef, i32 0
265; GLM-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v8i64_3 = extractelement <8 x i64> undef, i32 3
266; GLM-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v8i64_4 = extractelement <8 x i64> undef, i32 4
267; GLM-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v8i64_7 = extractelement <8 x i64> undef, i32 7
268; GLM-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef
269;
270  %v2i64_a = extractelement <2 x i64> undef, i32 %arg
271  %v2i64_0 = extractelement <2 x i64> undef, i32 0
272  %v2i64_1 = extractelement <2 x i64> undef, i32 1
273
274  %v4i64_a = extractelement <4 x i64> undef, i32 %arg
275  %v4i64_0 = extractelement <4 x i64> undef, i32 0
276  %v4i64_3 = extractelement <4 x i64> undef, i32 3
277
278  %v8i64_a = extractelement <8 x i64> undef, i32 %arg
279  %v8i64_0 = extractelement <8 x i64> undef, i32 0
280  %v8i64_3 = extractelement <8 x i64> undef, i32 3
281  %v8i64_4 = extractelement <8 x i64> undef, i32 4
282  %v8i64_7 = extractelement <8 x i64> undef, i32 7
283
284  ret i32 undef
285}
286
287define i32 @extract_i32(i32 %arg) {
288; SSE2-LABEL: 'extract_i32'
289; SSE2-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v2i32_a = extractelement <2 x i32> undef, i32 %arg
290; SSE2-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v2i32_0 = extractelement <2 x i32> undef, i32 0
291; SSE2-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v2i32_1 = extractelement <2 x i32> undef, i32 1
292; SSE2-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v4i32_a = extractelement <4 x i32> undef, i32 %arg
293; SSE2-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v4i32_0 = extractelement <4 x i32> undef, i32 0
294; SSE2-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v4i32_3 = extractelement <4 x i32> undef, i32 3
295; SSE2-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %v8i32_a = extractelement <8 x i32> undef, i32 %arg
296; SSE2-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v8i32_0 = extractelement <8 x i32> undef, i32 0
297; SSE2-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v8i32_3 = extractelement <8 x i32> undef, i32 3
298; SSE2-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v8i32_4 = extractelement <8 x i32> undef, i32 4
299; SSE2-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v8i32_7 = extractelement <8 x i32> undef, i32 7
300; SSE2-NEXT:  Cost Model: Found an estimated cost of 5 for instruction: %v16i32_a = extractelement <16 x i32> undef, i32 %arg
301; SSE2-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v16i32_0 = extractelement <16 x i32> undef, i32 0
302; SSE2-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v16i32_3 = extractelement <16 x i32> undef, i32 3
303; SSE2-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v16i32_8 = extractelement <16 x i32> undef, i32 8
304; SSE2-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v16i32_15 = extractelement <16 x i32> undef, i32 15
305; SSE2-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef
306;
307; SSE3-LABEL: 'extract_i32'
308; SSE3-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v2i32_a = extractelement <2 x i32> undef, i32 %arg
309; SSE3-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v2i32_0 = extractelement <2 x i32> undef, i32 0
310; SSE3-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v2i32_1 = extractelement <2 x i32> undef, i32 1
311; SSE3-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v4i32_a = extractelement <4 x i32> undef, i32 %arg
312; SSE3-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v4i32_0 = extractelement <4 x i32> undef, i32 0
313; SSE3-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v4i32_3 = extractelement <4 x i32> undef, i32 3
314; SSE3-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %v8i32_a = extractelement <8 x i32> undef, i32 %arg
315; SSE3-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v8i32_0 = extractelement <8 x i32> undef, i32 0
316; SSE3-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v8i32_3 = extractelement <8 x i32> undef, i32 3
317; SSE3-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v8i32_4 = extractelement <8 x i32> undef, i32 4
318; SSE3-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v8i32_7 = extractelement <8 x i32> undef, i32 7
319; SSE3-NEXT:  Cost Model: Found an estimated cost of 5 for instruction: %v16i32_a = extractelement <16 x i32> undef, i32 %arg
320; SSE3-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v16i32_0 = extractelement <16 x i32> undef, i32 0
321; SSE3-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v16i32_3 = extractelement <16 x i32> undef, i32 3
322; SSE3-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v16i32_8 = extractelement <16 x i32> undef, i32 8
323; SSE3-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v16i32_15 = extractelement <16 x i32> undef, i32 15
324; SSE3-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef
325;
326; SSSE3-LABEL: 'extract_i32'
327; SSSE3-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v2i32_a = extractelement <2 x i32> undef, i32 %arg
328; SSSE3-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v2i32_0 = extractelement <2 x i32> undef, i32 0
329; SSSE3-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v2i32_1 = extractelement <2 x i32> undef, i32 1
330; SSSE3-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v4i32_a = extractelement <4 x i32> undef, i32 %arg
331; SSSE3-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v4i32_0 = extractelement <4 x i32> undef, i32 0
332; SSSE3-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v4i32_3 = extractelement <4 x i32> undef, i32 3
333; SSSE3-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %v8i32_a = extractelement <8 x i32> undef, i32 %arg
334; SSSE3-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v8i32_0 = extractelement <8 x i32> undef, i32 0
335; SSSE3-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v8i32_3 = extractelement <8 x i32> undef, i32 3
336; SSSE3-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v8i32_4 = extractelement <8 x i32> undef, i32 4
337; SSSE3-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v8i32_7 = extractelement <8 x i32> undef, i32 7
338; SSSE3-NEXT:  Cost Model: Found an estimated cost of 5 for instruction: %v16i32_a = extractelement <16 x i32> undef, i32 %arg
339; SSSE3-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v16i32_0 = extractelement <16 x i32> undef, i32 0
340; SSSE3-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v16i32_3 = extractelement <16 x i32> undef, i32 3
341; SSSE3-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v16i32_8 = extractelement <16 x i32> undef, i32 8
342; SSSE3-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v16i32_15 = extractelement <16 x i32> undef, i32 15
343; SSSE3-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef
344;
345; SSE4-LABEL: 'extract_i32'
346; SSE4-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v2i32_a = extractelement <2 x i32> undef, i32 %arg
347; SSE4-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v2i32_0 = extractelement <2 x i32> undef, i32 0
348; SSE4-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v2i32_1 = extractelement <2 x i32> undef, i32 1
349; SSE4-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v4i32_a = extractelement <4 x i32> undef, i32 %arg
350; SSE4-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v4i32_0 = extractelement <4 x i32> undef, i32 0
351; SSE4-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v4i32_3 = extractelement <4 x i32> undef, i32 3
352; SSE4-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %v8i32_a = extractelement <8 x i32> undef, i32 %arg
353; SSE4-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v8i32_0 = extractelement <8 x i32> undef, i32 0
354; SSE4-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v8i32_3 = extractelement <8 x i32> undef, i32 3
355; SSE4-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v8i32_4 = extractelement <8 x i32> undef, i32 4
356; SSE4-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v8i32_7 = extractelement <8 x i32> undef, i32 7
357; SSE4-NEXT:  Cost Model: Found an estimated cost of 5 for instruction: %v16i32_a = extractelement <16 x i32> undef, i32 %arg
358; SSE4-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v16i32_0 = extractelement <16 x i32> undef, i32 0
359; SSE4-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v16i32_3 = extractelement <16 x i32> undef, i32 3
360; SSE4-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v16i32_8 = extractelement <16 x i32> undef, i32 8
361; SSE4-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v16i32_15 = extractelement <16 x i32> undef, i32 15
362; SSE4-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef
363;
364; AVX-LABEL: 'extract_i32'
365; AVX-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v2i32_a = extractelement <2 x i32> undef, i32 %arg
366; AVX-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v2i32_0 = extractelement <2 x i32> undef, i32 0
367; AVX-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v2i32_1 = extractelement <2 x i32> undef, i32 1
368; AVX-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v4i32_a = extractelement <4 x i32> undef, i32 %arg
369; AVX-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v4i32_0 = extractelement <4 x i32> undef, i32 0
370; AVX-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v4i32_3 = extractelement <4 x i32> undef, i32 3
371; AVX-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v8i32_a = extractelement <8 x i32> undef, i32 %arg
372; AVX-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v8i32_0 = extractelement <8 x i32> undef, i32 0
373; AVX-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v8i32_3 = extractelement <8 x i32> undef, i32 3
374; AVX-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v8i32_4 = extractelement <8 x i32> undef, i32 4
375; AVX-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v8i32_7 = extractelement <8 x i32> undef, i32 7
376; AVX-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %v16i32_a = extractelement <16 x i32> undef, i32 %arg
377; AVX-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v16i32_0 = extractelement <16 x i32> undef, i32 0
378; AVX-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v16i32_3 = extractelement <16 x i32> undef, i32 3
379; AVX-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v16i32_8 = extractelement <16 x i32> undef, i32 8
380; AVX-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v16i32_15 = extractelement <16 x i32> undef, i32 15
381; AVX-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef
382;
383; AVX512-LABEL: 'extract_i32'
384; AVX512-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v2i32_a = extractelement <2 x i32> undef, i32 %arg
385; AVX512-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v2i32_0 = extractelement <2 x i32> undef, i32 0
386; AVX512-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v2i32_1 = extractelement <2 x i32> undef, i32 1
387; AVX512-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v4i32_a = extractelement <4 x i32> undef, i32 %arg
388; AVX512-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v4i32_0 = extractelement <4 x i32> undef, i32 0
389; AVX512-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v4i32_3 = extractelement <4 x i32> undef, i32 3
390; AVX512-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v8i32_a = extractelement <8 x i32> undef, i32 %arg
391; AVX512-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v8i32_0 = extractelement <8 x i32> undef, i32 0
392; AVX512-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v8i32_3 = extractelement <8 x i32> undef, i32 3
393; AVX512-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v8i32_4 = extractelement <8 x i32> undef, i32 4
394; AVX512-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v8i32_7 = extractelement <8 x i32> undef, i32 7
395; AVX512-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v16i32_a = extractelement <16 x i32> undef, i32 %arg
396; AVX512-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v16i32_0 = extractelement <16 x i32> undef, i32 0
397; AVX512-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v16i32_3 = extractelement <16 x i32> undef, i32 3
398; AVX512-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v16i32_8 = extractelement <16 x i32> undef, i32 8
399; AVX512-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v16i32_15 = extractelement <16 x i32> undef, i32 15
400; AVX512-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef
401;
402; SLM-LABEL: 'extract_i32'
403; SLM-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v2i32_a = extractelement <2 x i32> undef, i32 %arg
404; SLM-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v2i32_0 = extractelement <2 x i32> undef, i32 0
405; SLM-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %v2i32_1 = extractelement <2 x i32> undef, i32 1
406; SLM-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v4i32_a = extractelement <4 x i32> undef, i32 %arg
407; SLM-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v4i32_0 = extractelement <4 x i32> undef, i32 0
408; SLM-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %v4i32_3 = extractelement <4 x i32> undef, i32 3
409; SLM-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %v8i32_a = extractelement <8 x i32> undef, i32 %arg
410; SLM-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v8i32_0 = extractelement <8 x i32> undef, i32 0
411; SLM-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %v8i32_3 = extractelement <8 x i32> undef, i32 3
412; SLM-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v8i32_4 = extractelement <8 x i32> undef, i32 4
413; SLM-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %v8i32_7 = extractelement <8 x i32> undef, i32 7
414; SLM-NEXT:  Cost Model: Found an estimated cost of 5 for instruction: %v16i32_a = extractelement <16 x i32> undef, i32 %arg
415; SLM-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v16i32_0 = extractelement <16 x i32> undef, i32 0
416; SLM-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %v16i32_3 = extractelement <16 x i32> undef, i32 3
417; SLM-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v16i32_8 = extractelement <16 x i32> undef, i32 8
418; SLM-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %v16i32_15 = extractelement <16 x i32> undef, i32 15
419; SLM-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef
420;
421; GLM-LABEL: 'extract_i32'
422; GLM-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v2i32_a = extractelement <2 x i32> undef, i32 %arg
423; GLM-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v2i32_0 = extractelement <2 x i32> undef, i32 0
424; GLM-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v2i32_1 = extractelement <2 x i32> undef, i32 1
425; GLM-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v4i32_a = extractelement <4 x i32> undef, i32 %arg
426; GLM-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v4i32_0 = extractelement <4 x i32> undef, i32 0
427; GLM-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v4i32_3 = extractelement <4 x i32> undef, i32 3
428; GLM-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %v8i32_a = extractelement <8 x i32> undef, i32 %arg
429; GLM-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v8i32_0 = extractelement <8 x i32> undef, i32 0
430; GLM-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v8i32_3 = extractelement <8 x i32> undef, i32 3
431; GLM-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v8i32_4 = extractelement <8 x i32> undef, i32 4
432; GLM-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v8i32_7 = extractelement <8 x i32> undef, i32 7
433; GLM-NEXT:  Cost Model: Found an estimated cost of 5 for instruction: %v16i32_a = extractelement <16 x i32> undef, i32 %arg
434; GLM-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v16i32_0 = extractelement <16 x i32> undef, i32 0
435; GLM-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v16i32_3 = extractelement <16 x i32> undef, i32 3
436; GLM-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v16i32_8 = extractelement <16 x i32> undef, i32 8
437; GLM-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v16i32_15 = extractelement <16 x i32> undef, i32 15
438; GLM-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef
439;
440  %v2i32_a = extractelement <2 x i32> undef, i32 %arg
441  %v2i32_0 = extractelement <2 x i32> undef, i32 0
442  %v2i32_1 = extractelement <2 x i32> undef, i32 1
443
444  %v4i32_a = extractelement <4 x i32> undef, i32 %arg
445  %v4i32_0 = extractelement <4 x i32> undef, i32 0
446  %v4i32_3 = extractelement <4 x i32> undef, i32 3
447
448  %v8i32_a = extractelement <8 x i32> undef, i32 %arg
449  %v8i32_0 = extractelement <8 x i32> undef, i32 0
450  %v8i32_3 = extractelement <8 x i32> undef, i32 3
451  %v8i32_4 = extractelement <8 x i32> undef, i32 4
452  %v8i32_7 = extractelement <8 x i32> undef, i32 7
453
454  %v16i32_a = extractelement <16 x i32> undef, i32 %arg
455  %v16i32_0 = extractelement <16 x i32> undef, i32 0
456  %v16i32_3 = extractelement <16 x i32> undef, i32 3
457  %v16i32_8 = extractelement <16 x i32> undef, i32 8
458  %v16i32_15 = extractelement <16 x i32> undef, i32 15
459
460  ret i32 undef
461}
462
463define i32 @extract_i16(i32 %arg) {
464; SSE2-LABEL: 'extract_i16'
465; SSE2-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v2i16_a = extractelement <2 x i16> undef, i32 %arg
466; SSE2-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v2i16_0 = extractelement <2 x i16> undef, i32 0
467; SSE2-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v2i16_1 = extractelement <2 x i16> undef, i32 1
468; SSE2-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v4i16_a = extractelement <4 x i16> undef, i32 %arg
469; SSE2-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v4i16_0 = extractelement <4 x i16> undef, i32 0
470; SSE2-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v4i16_3 = extractelement <4 x i16> undef, i32 3
471; SSE2-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v8i16_a = extractelement <8 x i16> undef, i32 %arg
472; SSE2-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v8i16_0 = extractelement <8 x i16> undef, i32 0
473; SSE2-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v8i16_7 = extractelement <8 x i16> undef, i32 7
474; SSE2-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %v16i16_a = extractelement <16 x i16> undef, i32 %arg
475; SSE2-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v16i16_0 = extractelement <16 x i16> undef, i32 0
476; SSE2-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v16i16_7 = extractelement <16 x i16> undef, i32 7
477; SSE2-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v16i16_8 = extractelement <16 x i16> undef, i32 8
478; SSE2-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v16i16_15 = extractelement <16 x i16> undef, i32 15
479; SSE2-NEXT:  Cost Model: Found an estimated cost of 5 for instruction: %v32i16_a = extractelement <32 x i16> undef, i32 %arg
480; SSE2-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v32i16_0 = extractelement <32 x i16> undef, i32 0
481; SSE2-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v32i16_7 = extractelement <32 x i16> undef, i32 7
482; SSE2-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v32i16_8 = extractelement <32 x i16> undef, i32 8
483; SSE2-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v32i16_15 = extractelement <32 x i16> undef, i32 15
484; SSE2-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v32i16_16 = extractelement <32 x i16> undef, i32 16
485; SSE2-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v32i16_24 = extractelement <32 x i16> undef, i32 24
486; SSE2-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v32i16_31 = extractelement <32 x i16> undef, i32 31
487; SSE2-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef
488;
489; SSE3-LABEL: 'extract_i16'
490; SSE3-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v2i16_a = extractelement <2 x i16> undef, i32 %arg
491; SSE3-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v2i16_0 = extractelement <2 x i16> undef, i32 0
492; SSE3-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v2i16_1 = extractelement <2 x i16> undef, i32 1
493; SSE3-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v4i16_a = extractelement <4 x i16> undef, i32 %arg
494; SSE3-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v4i16_0 = extractelement <4 x i16> undef, i32 0
495; SSE3-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v4i16_3 = extractelement <4 x i16> undef, i32 3
496; SSE3-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v8i16_a = extractelement <8 x i16> undef, i32 %arg
497; SSE3-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v8i16_0 = extractelement <8 x i16> undef, i32 0
498; SSE3-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v8i16_7 = extractelement <8 x i16> undef, i32 7
499; SSE3-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %v16i16_a = extractelement <16 x i16> undef, i32 %arg
500; SSE3-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v16i16_0 = extractelement <16 x i16> undef, i32 0
501; SSE3-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v16i16_7 = extractelement <16 x i16> undef, i32 7
502; SSE3-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v16i16_8 = extractelement <16 x i16> undef, i32 8
503; SSE3-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v16i16_15 = extractelement <16 x i16> undef, i32 15
504; SSE3-NEXT:  Cost Model: Found an estimated cost of 5 for instruction: %v32i16_a = extractelement <32 x i16> undef, i32 %arg
505; SSE3-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v32i16_0 = extractelement <32 x i16> undef, i32 0
506; SSE3-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v32i16_7 = extractelement <32 x i16> undef, i32 7
507; SSE3-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v32i16_8 = extractelement <32 x i16> undef, i32 8
508; SSE3-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v32i16_15 = extractelement <32 x i16> undef, i32 15
509; SSE3-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v32i16_16 = extractelement <32 x i16> undef, i32 16
510; SSE3-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v32i16_24 = extractelement <32 x i16> undef, i32 24
511; SSE3-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v32i16_31 = extractelement <32 x i16> undef, i32 31
512; SSE3-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef
513;
514; SSSE3-LABEL: 'extract_i16'
515; SSSE3-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v2i16_a = extractelement <2 x i16> undef, i32 %arg
516; SSSE3-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v2i16_0 = extractelement <2 x i16> undef, i32 0
517; SSSE3-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v2i16_1 = extractelement <2 x i16> undef, i32 1
518; SSSE3-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v4i16_a = extractelement <4 x i16> undef, i32 %arg
519; SSSE3-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v4i16_0 = extractelement <4 x i16> undef, i32 0
520; SSSE3-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v4i16_3 = extractelement <4 x i16> undef, i32 3
521; SSSE3-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v8i16_a = extractelement <8 x i16> undef, i32 %arg
522; SSSE3-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v8i16_0 = extractelement <8 x i16> undef, i32 0
523; SSSE3-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v8i16_7 = extractelement <8 x i16> undef, i32 7
524; SSSE3-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %v16i16_a = extractelement <16 x i16> undef, i32 %arg
525; SSSE3-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v16i16_0 = extractelement <16 x i16> undef, i32 0
526; SSSE3-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v16i16_7 = extractelement <16 x i16> undef, i32 7
527; SSSE3-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v16i16_8 = extractelement <16 x i16> undef, i32 8
528; SSSE3-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v16i16_15 = extractelement <16 x i16> undef, i32 15
529; SSSE3-NEXT:  Cost Model: Found an estimated cost of 5 for instruction: %v32i16_a = extractelement <32 x i16> undef, i32 %arg
530; SSSE3-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v32i16_0 = extractelement <32 x i16> undef, i32 0
531; SSSE3-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v32i16_7 = extractelement <32 x i16> undef, i32 7
532; SSSE3-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v32i16_8 = extractelement <32 x i16> undef, i32 8
533; SSSE3-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v32i16_15 = extractelement <32 x i16> undef, i32 15
534; SSSE3-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v32i16_16 = extractelement <32 x i16> undef, i32 16
535; SSSE3-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v32i16_24 = extractelement <32 x i16> undef, i32 24
536; SSSE3-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v32i16_31 = extractelement <32 x i16> undef, i32 31
537; SSSE3-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef
538;
539; SSE4-LABEL: 'extract_i16'
540; SSE4-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v2i16_a = extractelement <2 x i16> undef, i32 %arg
541; SSE4-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v2i16_0 = extractelement <2 x i16> undef, i32 0
542; SSE4-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v2i16_1 = extractelement <2 x i16> undef, i32 1
543; SSE4-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v4i16_a = extractelement <4 x i16> undef, i32 %arg
544; SSE4-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v4i16_0 = extractelement <4 x i16> undef, i32 0
545; SSE4-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v4i16_3 = extractelement <4 x i16> undef, i32 3
546; SSE4-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v8i16_a = extractelement <8 x i16> undef, i32 %arg
547; SSE4-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v8i16_0 = extractelement <8 x i16> undef, i32 0
548; SSE4-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v8i16_7 = extractelement <8 x i16> undef, i32 7
549; SSE4-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %v16i16_a = extractelement <16 x i16> undef, i32 %arg
550; SSE4-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v16i16_0 = extractelement <16 x i16> undef, i32 0
551; SSE4-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v16i16_7 = extractelement <16 x i16> undef, i32 7
552; SSE4-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v16i16_8 = extractelement <16 x i16> undef, i32 8
553; SSE4-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v16i16_15 = extractelement <16 x i16> undef, i32 15
554; SSE4-NEXT:  Cost Model: Found an estimated cost of 5 for instruction: %v32i16_a = extractelement <32 x i16> undef, i32 %arg
555; SSE4-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v32i16_0 = extractelement <32 x i16> undef, i32 0
556; SSE4-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v32i16_7 = extractelement <32 x i16> undef, i32 7
557; SSE4-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v32i16_8 = extractelement <32 x i16> undef, i32 8
558; SSE4-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v32i16_15 = extractelement <32 x i16> undef, i32 15
559; SSE4-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v32i16_16 = extractelement <32 x i16> undef, i32 16
560; SSE4-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v32i16_24 = extractelement <32 x i16> undef, i32 24
561; SSE4-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v32i16_31 = extractelement <32 x i16> undef, i32 31
562; SSE4-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef
563;
564; AVX-LABEL: 'extract_i16'
565; AVX-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v2i16_a = extractelement <2 x i16> undef, i32 %arg
566; AVX-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v2i16_0 = extractelement <2 x i16> undef, i32 0
567; AVX-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v2i16_1 = extractelement <2 x i16> undef, i32 1
568; AVX-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v4i16_a = extractelement <4 x i16> undef, i32 %arg
569; AVX-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v4i16_0 = extractelement <4 x i16> undef, i32 0
570; AVX-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v4i16_3 = extractelement <4 x i16> undef, i32 3
571; AVX-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v8i16_a = extractelement <8 x i16> undef, i32 %arg
572; AVX-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v8i16_0 = extractelement <8 x i16> undef, i32 0
573; AVX-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v8i16_7 = extractelement <8 x i16> undef, i32 7
574; AVX-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v16i16_a = extractelement <16 x i16> undef, i32 %arg
575; AVX-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v16i16_0 = extractelement <16 x i16> undef, i32 0
576; AVX-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v16i16_7 = extractelement <16 x i16> undef, i32 7
577; AVX-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v16i16_8 = extractelement <16 x i16> undef, i32 8
578; AVX-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v16i16_15 = extractelement <16 x i16> undef, i32 15
579; AVX-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %v32i16_a = extractelement <32 x i16> undef, i32 %arg
580; AVX-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v32i16_0 = extractelement <32 x i16> undef, i32 0
581; AVX-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v32i16_7 = extractelement <32 x i16> undef, i32 7
582; AVX-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v32i16_8 = extractelement <32 x i16> undef, i32 8
583; AVX-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v32i16_15 = extractelement <32 x i16> undef, i32 15
584; AVX-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v32i16_16 = extractelement <32 x i16> undef, i32 16
585; AVX-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v32i16_24 = extractelement <32 x i16> undef, i32 24
586; AVX-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v32i16_31 = extractelement <32 x i16> undef, i32 31
587; AVX-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef
588;
589; AVX512-LABEL: 'extract_i16'
590; AVX512-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v2i16_a = extractelement <2 x i16> undef, i32 %arg
591; AVX512-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v2i16_0 = extractelement <2 x i16> undef, i32 0
592; AVX512-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v2i16_1 = extractelement <2 x i16> undef, i32 1
593; AVX512-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v4i16_a = extractelement <4 x i16> undef, i32 %arg
594; AVX512-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v4i16_0 = extractelement <4 x i16> undef, i32 0
595; AVX512-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v4i16_3 = extractelement <4 x i16> undef, i32 3
596; AVX512-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v8i16_a = extractelement <8 x i16> undef, i32 %arg
597; AVX512-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v8i16_0 = extractelement <8 x i16> undef, i32 0
598; AVX512-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v8i16_7 = extractelement <8 x i16> undef, i32 7
599; AVX512-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v16i16_a = extractelement <16 x i16> undef, i32 %arg
600; AVX512-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v16i16_0 = extractelement <16 x i16> undef, i32 0
601; AVX512-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v16i16_7 = extractelement <16 x i16> undef, i32 7
602; AVX512-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v16i16_8 = extractelement <16 x i16> undef, i32 8
603; AVX512-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v16i16_15 = extractelement <16 x i16> undef, i32 15
604; AVX512-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v32i16_a = extractelement <32 x i16> undef, i32 %arg
605; AVX512-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v32i16_0 = extractelement <32 x i16> undef, i32 0
606; AVX512-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v32i16_7 = extractelement <32 x i16> undef, i32 7
607; AVX512-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v32i16_8 = extractelement <32 x i16> undef, i32 8
608; AVX512-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v32i16_15 = extractelement <32 x i16> undef, i32 15
609; AVX512-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v32i16_16 = extractelement <32 x i16> undef, i32 16
610; AVX512-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v32i16_24 = extractelement <32 x i16> undef, i32 24
611; AVX512-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v32i16_31 = extractelement <32 x i16> undef, i32 31
612; AVX512-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef
613;
614; SLM-LABEL: 'extract_i16'
615; SLM-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v2i16_a = extractelement <2 x i16> undef, i32 %arg
616; SLM-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v2i16_0 = extractelement <2 x i16> undef, i32 0
617; SLM-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %v2i16_1 = extractelement <2 x i16> undef, i32 1
618; SLM-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v4i16_a = extractelement <4 x i16> undef, i32 %arg
619; SLM-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v4i16_0 = extractelement <4 x i16> undef, i32 0
620; SLM-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %v4i16_3 = extractelement <4 x i16> undef, i32 3
621; SLM-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v8i16_a = extractelement <8 x i16> undef, i32 %arg
622; SLM-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v8i16_0 = extractelement <8 x i16> undef, i32 0
623; SLM-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %v8i16_7 = extractelement <8 x i16> undef, i32 7
624; SLM-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %v16i16_a = extractelement <16 x i16> undef, i32 %arg
625; SLM-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v16i16_0 = extractelement <16 x i16> undef, i32 0
626; SLM-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %v16i16_7 = extractelement <16 x i16> undef, i32 7
627; SLM-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v16i16_8 = extractelement <16 x i16> undef, i32 8
628; SLM-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %v16i16_15 = extractelement <16 x i16> undef, i32 15
629; SLM-NEXT:  Cost Model: Found an estimated cost of 5 for instruction: %v32i16_a = extractelement <32 x i16> undef, i32 %arg
630; SLM-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v32i16_0 = extractelement <32 x i16> undef, i32 0
631; SLM-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %v32i16_7 = extractelement <32 x i16> undef, i32 7
632; SLM-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v32i16_8 = extractelement <32 x i16> undef, i32 8
633; SLM-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %v32i16_15 = extractelement <32 x i16> undef, i32 15
634; SLM-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v32i16_16 = extractelement <32 x i16> undef, i32 16
635; SLM-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v32i16_24 = extractelement <32 x i16> undef, i32 24
636; SLM-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %v32i16_31 = extractelement <32 x i16> undef, i32 31
637; SLM-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef
638;
639; GLM-LABEL: 'extract_i16'
640; GLM-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v2i16_a = extractelement <2 x i16> undef, i32 %arg
641; GLM-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v2i16_0 = extractelement <2 x i16> undef, i32 0
642; GLM-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v2i16_1 = extractelement <2 x i16> undef, i32 1
643; GLM-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v4i16_a = extractelement <4 x i16> undef, i32 %arg
644; GLM-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v4i16_0 = extractelement <4 x i16> undef, i32 0
645; GLM-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v4i16_3 = extractelement <4 x i16> undef, i32 3
646; GLM-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v8i16_a = extractelement <8 x i16> undef, i32 %arg
647; GLM-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v8i16_0 = extractelement <8 x i16> undef, i32 0
648; GLM-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v8i16_7 = extractelement <8 x i16> undef, i32 7
649; GLM-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %v16i16_a = extractelement <16 x i16> undef, i32 %arg
650; GLM-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v16i16_0 = extractelement <16 x i16> undef, i32 0
651; GLM-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v16i16_7 = extractelement <16 x i16> undef, i32 7
652; GLM-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v16i16_8 = extractelement <16 x i16> undef, i32 8
653; GLM-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v16i16_15 = extractelement <16 x i16> undef, i32 15
654; GLM-NEXT:  Cost Model: Found an estimated cost of 5 for instruction: %v32i16_a = extractelement <32 x i16> undef, i32 %arg
655; GLM-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v32i16_0 = extractelement <32 x i16> undef, i32 0
656; GLM-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v32i16_7 = extractelement <32 x i16> undef, i32 7
657; GLM-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v32i16_8 = extractelement <32 x i16> undef, i32 8
658; GLM-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v32i16_15 = extractelement <32 x i16> undef, i32 15
659; GLM-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v32i16_16 = extractelement <32 x i16> undef, i32 16
660; GLM-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v32i16_24 = extractelement <32 x i16> undef, i32 24
661; GLM-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v32i16_31 = extractelement <32 x i16> undef, i32 31
662; GLM-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef
663;
664  %v2i16_a = extractelement <2 x i16> undef, i32 %arg
665  %v2i16_0 = extractelement <2 x i16> undef, i32 0
666  %v2i16_1 = extractelement <2 x i16> undef, i32 1
667
668  %v4i16_a = extractelement <4 x i16> undef, i32 %arg
669  %v4i16_0 = extractelement <4 x i16> undef, i32 0
670  %v4i16_3 = extractelement <4 x i16> undef, i32 3
671
672  %v8i16_a = extractelement <8 x i16> undef, i32 %arg
673  %v8i16_0 = extractelement <8 x i16> undef, i32 0
674  %v8i16_7 = extractelement <8 x i16> undef, i32 7
675
676  %v16i16_a = extractelement <16 x i16> undef, i32 %arg
677  %v16i16_0 = extractelement <16 x i16> undef, i32 0
678  %v16i16_7 = extractelement <16 x i16> undef, i32 7
679  %v16i16_8 = extractelement <16 x i16> undef, i32 8
680  %v16i16_15 = extractelement <16 x i16> undef, i32 15
681
682  %v32i16_a = extractelement <32 x i16> undef, i32 %arg
683  %v32i16_0 = extractelement <32 x i16> undef, i32 0
684  %v32i16_7 = extractelement <32 x i16> undef, i32 7
685  %v32i16_8 = extractelement <32 x i16> undef, i32 8
686  %v32i16_15 = extractelement <32 x i16> undef, i32 15
687  %v32i16_16 = extractelement <32 x i16> undef, i32 16
688  %v32i16_24 = extractelement <32 x i16> undef, i32 24
689  %v32i16_31 = extractelement <32 x i16> undef, i32 31
690
691  ret i32 undef
692}
693
694define i32 @extract_i8(i32 %arg) {
695; SSE2-LABEL: 'extract_i8'
696; SSE2-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %v2i8_a = extractelement <2 x i8> undef, i32 %arg
697; SSE2-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v2i8_0 = extractelement <2 x i8> undef, i32 0
698; SSE2-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v2i8_1 = extractelement <2 x i8> undef, i32 1
699; SSE2-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v4i8_a = extractelement <4 x i8> undef, i32 %arg
700; SSE2-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v4i8_0 = extractelement <4 x i8> undef, i32 0
701; SSE2-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v4i8_3 = extractelement <4 x i8> undef, i32 3
702; SSE2-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v8i8_a = extractelement <8 x i8> undef, i32 %arg
703; SSE2-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v8i8_0 = extractelement <8 x i8> undef, i32 0
704; SSE2-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v8i8_7 = extractelement <8 x i8> undef, i32 7
705; SSE2-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v16i8_a = extractelement <16 x i8> undef, i32 %arg
706; SSE2-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v16i8_0 = extractelement <16 x i8> undef, i32 0
707; SSE2-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v16i8_8 = extractelement <16 x i8> undef, i32 8
708; SSE2-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v16i8_15 = extractelement <16 x i8> undef, i32 15
709; SSE2-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %v32i8_a = extractelement <32 x i8> undef, i32 %arg
710; SSE2-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v32i8_0 = extractelement <32 x i8> undef, i32 0
711; SSE2-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v32i8_7 = extractelement <32 x i8> undef, i32 7
712; SSE2-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v32i8_8 = extractelement <32 x i8> undef, i32 8
713; SSE2-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v32i8_15 = extractelement <32 x i8> undef, i32 15
714; SSE2-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v32i8_24 = extractelement <32 x i8> undef, i32 24
715; SSE2-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v32i8_31 = extractelement <32 x i8> undef, i32 31
716; SSE2-NEXT:  Cost Model: Found an estimated cost of 5 for instruction: %v64i8_a = extractelement <64 x i8> undef, i32 %arg
717; SSE2-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v64i8_0 = extractelement <64 x i8> undef, i32 0
718; SSE2-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v64i8_7 = extractelement <64 x i8> undef, i32 7
719; SSE2-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v64i8_8 = extractelement <64 x i8> undef, i32 8
720; SSE2-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v64i8_15 = extractelement <64 x i8> undef, i32 15
721; SSE2-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v64i8_24 = extractelement <64 x i8> undef, i32 24
722; SSE2-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v64i8_31 = extractelement <64 x i8> undef, i32 31
723; SSE2-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v64i8_32 = extractelement <64 x i8> undef, i32 32
724; SSE2-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v64i8_48 = extractelement <64 x i8> undef, i32 48
725; SSE2-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v64i8_63 = extractelement <64 x i8> undef, i32 63
726; SSE2-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef
727;
728; SSE3-LABEL: 'extract_i8'
729; SSE3-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %v2i8_a = extractelement <2 x i8> undef, i32 %arg
730; SSE3-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v2i8_0 = extractelement <2 x i8> undef, i32 0
731; SSE3-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v2i8_1 = extractelement <2 x i8> undef, i32 1
732; SSE3-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v4i8_a = extractelement <4 x i8> undef, i32 %arg
733; SSE3-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v4i8_0 = extractelement <4 x i8> undef, i32 0
734; SSE3-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v4i8_3 = extractelement <4 x i8> undef, i32 3
735; SSE3-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v8i8_a = extractelement <8 x i8> undef, i32 %arg
736; SSE3-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v8i8_0 = extractelement <8 x i8> undef, i32 0
737; SSE3-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v8i8_7 = extractelement <8 x i8> undef, i32 7
738; SSE3-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v16i8_a = extractelement <16 x i8> undef, i32 %arg
739; SSE3-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v16i8_0 = extractelement <16 x i8> undef, i32 0
740; SSE3-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v16i8_8 = extractelement <16 x i8> undef, i32 8
741; SSE3-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v16i8_15 = extractelement <16 x i8> undef, i32 15
742; SSE3-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %v32i8_a = extractelement <32 x i8> undef, i32 %arg
743; SSE3-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v32i8_0 = extractelement <32 x i8> undef, i32 0
744; SSE3-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v32i8_7 = extractelement <32 x i8> undef, i32 7
745; SSE3-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v32i8_8 = extractelement <32 x i8> undef, i32 8
746; SSE3-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v32i8_15 = extractelement <32 x i8> undef, i32 15
747; SSE3-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v32i8_24 = extractelement <32 x i8> undef, i32 24
748; SSE3-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v32i8_31 = extractelement <32 x i8> undef, i32 31
749; SSE3-NEXT:  Cost Model: Found an estimated cost of 5 for instruction: %v64i8_a = extractelement <64 x i8> undef, i32 %arg
750; SSE3-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v64i8_0 = extractelement <64 x i8> undef, i32 0
751; SSE3-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v64i8_7 = extractelement <64 x i8> undef, i32 7
752; SSE3-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v64i8_8 = extractelement <64 x i8> undef, i32 8
753; SSE3-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v64i8_15 = extractelement <64 x i8> undef, i32 15
754; SSE3-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v64i8_24 = extractelement <64 x i8> undef, i32 24
755; SSE3-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v64i8_31 = extractelement <64 x i8> undef, i32 31
756; SSE3-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v64i8_32 = extractelement <64 x i8> undef, i32 32
757; SSE3-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v64i8_48 = extractelement <64 x i8> undef, i32 48
758; SSE3-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v64i8_63 = extractelement <64 x i8> undef, i32 63
759; SSE3-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef
760;
761; SSSE3-LABEL: 'extract_i8'
762; SSSE3-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %v2i8_a = extractelement <2 x i8> undef, i32 %arg
763; SSSE3-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v2i8_0 = extractelement <2 x i8> undef, i32 0
764; SSSE3-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v2i8_1 = extractelement <2 x i8> undef, i32 1
765; SSSE3-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v4i8_a = extractelement <4 x i8> undef, i32 %arg
766; SSSE3-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v4i8_0 = extractelement <4 x i8> undef, i32 0
767; SSSE3-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v4i8_3 = extractelement <4 x i8> undef, i32 3
768; SSSE3-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v8i8_a = extractelement <8 x i8> undef, i32 %arg
769; SSSE3-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v8i8_0 = extractelement <8 x i8> undef, i32 0
770; SSSE3-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v8i8_7 = extractelement <8 x i8> undef, i32 7
771; SSSE3-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v16i8_a = extractelement <16 x i8> undef, i32 %arg
772; SSSE3-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v16i8_0 = extractelement <16 x i8> undef, i32 0
773; SSSE3-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v16i8_8 = extractelement <16 x i8> undef, i32 8
774; SSSE3-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v16i8_15 = extractelement <16 x i8> undef, i32 15
775; SSSE3-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %v32i8_a = extractelement <32 x i8> undef, i32 %arg
776; SSSE3-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v32i8_0 = extractelement <32 x i8> undef, i32 0
777; SSSE3-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v32i8_7 = extractelement <32 x i8> undef, i32 7
778; SSSE3-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v32i8_8 = extractelement <32 x i8> undef, i32 8
779; SSSE3-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v32i8_15 = extractelement <32 x i8> undef, i32 15
780; SSSE3-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v32i8_24 = extractelement <32 x i8> undef, i32 24
781; SSSE3-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v32i8_31 = extractelement <32 x i8> undef, i32 31
782; SSSE3-NEXT:  Cost Model: Found an estimated cost of 5 for instruction: %v64i8_a = extractelement <64 x i8> undef, i32 %arg
783; SSSE3-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v64i8_0 = extractelement <64 x i8> undef, i32 0
784; SSSE3-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v64i8_7 = extractelement <64 x i8> undef, i32 7
785; SSSE3-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v64i8_8 = extractelement <64 x i8> undef, i32 8
786; SSSE3-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v64i8_15 = extractelement <64 x i8> undef, i32 15
787; SSSE3-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v64i8_24 = extractelement <64 x i8> undef, i32 24
788; SSSE3-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v64i8_31 = extractelement <64 x i8> undef, i32 31
789; SSSE3-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v64i8_32 = extractelement <64 x i8> undef, i32 32
790; SSSE3-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v64i8_48 = extractelement <64 x i8> undef, i32 48
791; SSSE3-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v64i8_63 = extractelement <64 x i8> undef, i32 63
792; SSSE3-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef
793;
794; SSE4-LABEL: 'extract_i8'
795; SSE4-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %v2i8_a = extractelement <2 x i8> undef, i32 %arg
796; SSE4-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v2i8_0 = extractelement <2 x i8> undef, i32 0
797; SSE4-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v2i8_1 = extractelement <2 x i8> undef, i32 1
798; SSE4-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v4i8_a = extractelement <4 x i8> undef, i32 %arg
799; SSE4-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v4i8_0 = extractelement <4 x i8> undef, i32 0
800; SSE4-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v4i8_3 = extractelement <4 x i8> undef, i32 3
801; SSE4-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v8i8_a = extractelement <8 x i8> undef, i32 %arg
802; SSE4-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v8i8_0 = extractelement <8 x i8> undef, i32 0
803; SSE4-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v8i8_7 = extractelement <8 x i8> undef, i32 7
804; SSE4-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v16i8_a = extractelement <16 x i8> undef, i32 %arg
805; SSE4-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v16i8_0 = extractelement <16 x i8> undef, i32 0
806; SSE4-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v16i8_8 = extractelement <16 x i8> undef, i32 8
807; SSE4-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v16i8_15 = extractelement <16 x i8> undef, i32 15
808; SSE4-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %v32i8_a = extractelement <32 x i8> undef, i32 %arg
809; SSE4-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v32i8_0 = extractelement <32 x i8> undef, i32 0
810; SSE4-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v32i8_7 = extractelement <32 x i8> undef, i32 7
811; SSE4-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v32i8_8 = extractelement <32 x i8> undef, i32 8
812; SSE4-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v32i8_15 = extractelement <32 x i8> undef, i32 15
813; SSE4-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v32i8_24 = extractelement <32 x i8> undef, i32 24
814; SSE4-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v32i8_31 = extractelement <32 x i8> undef, i32 31
815; SSE4-NEXT:  Cost Model: Found an estimated cost of 5 for instruction: %v64i8_a = extractelement <64 x i8> undef, i32 %arg
816; SSE4-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v64i8_0 = extractelement <64 x i8> undef, i32 0
817; SSE4-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v64i8_7 = extractelement <64 x i8> undef, i32 7
818; SSE4-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v64i8_8 = extractelement <64 x i8> undef, i32 8
819; SSE4-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v64i8_15 = extractelement <64 x i8> undef, i32 15
820; SSE4-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v64i8_24 = extractelement <64 x i8> undef, i32 24
821; SSE4-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v64i8_31 = extractelement <64 x i8> undef, i32 31
822; SSE4-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v64i8_32 = extractelement <64 x i8> undef, i32 32
823; SSE4-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v64i8_48 = extractelement <64 x i8> undef, i32 48
824; SSE4-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v64i8_63 = extractelement <64 x i8> undef, i32 63
825; SSE4-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef
826;
827; AVX-LABEL: 'extract_i8'
828; AVX-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %v2i8_a = extractelement <2 x i8> undef, i32 %arg
829; AVX-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v2i8_0 = extractelement <2 x i8> undef, i32 0
830; AVX-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v2i8_1 = extractelement <2 x i8> undef, i32 1
831; AVX-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v4i8_a = extractelement <4 x i8> undef, i32 %arg
832; AVX-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v4i8_0 = extractelement <4 x i8> undef, i32 0
833; AVX-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v4i8_3 = extractelement <4 x i8> undef, i32 3
834; AVX-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v8i8_a = extractelement <8 x i8> undef, i32 %arg
835; AVX-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v8i8_0 = extractelement <8 x i8> undef, i32 0
836; AVX-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v8i8_7 = extractelement <8 x i8> undef, i32 7
837; AVX-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v16i8_a = extractelement <16 x i8> undef, i32 %arg
838; AVX-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v16i8_0 = extractelement <16 x i8> undef, i32 0
839; AVX-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v16i8_8 = extractelement <16 x i8> undef, i32 8
840; AVX-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v16i8_15 = extractelement <16 x i8> undef, i32 15
841; AVX-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v32i8_a = extractelement <32 x i8> undef, i32 %arg
842; AVX-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v32i8_0 = extractelement <32 x i8> undef, i32 0
843; AVX-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v32i8_7 = extractelement <32 x i8> undef, i32 7
844; AVX-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v32i8_8 = extractelement <32 x i8> undef, i32 8
845; AVX-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v32i8_15 = extractelement <32 x i8> undef, i32 15
846; AVX-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v32i8_24 = extractelement <32 x i8> undef, i32 24
847; AVX-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v32i8_31 = extractelement <32 x i8> undef, i32 31
848; AVX-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %v64i8_a = extractelement <64 x i8> undef, i32 %arg
849; AVX-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v64i8_0 = extractelement <64 x i8> undef, i32 0
850; AVX-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v64i8_7 = extractelement <64 x i8> undef, i32 7
851; AVX-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v64i8_8 = extractelement <64 x i8> undef, i32 8
852; AVX-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v64i8_15 = extractelement <64 x i8> undef, i32 15
853; AVX-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v64i8_24 = extractelement <64 x i8> undef, i32 24
854; AVX-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v64i8_31 = extractelement <64 x i8> undef, i32 31
855; AVX-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v64i8_32 = extractelement <64 x i8> undef, i32 32
856; AVX-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v64i8_48 = extractelement <64 x i8> undef, i32 48
857; AVX-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v64i8_63 = extractelement <64 x i8> undef, i32 63
858; AVX-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef
859;
860; AVX512-LABEL: 'extract_i8'
861; AVX512-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %v2i8_a = extractelement <2 x i8> undef, i32 %arg
862; AVX512-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v2i8_0 = extractelement <2 x i8> undef, i32 0
863; AVX512-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v2i8_1 = extractelement <2 x i8> undef, i32 1
864; AVX512-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v4i8_a = extractelement <4 x i8> undef, i32 %arg
865; AVX512-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v4i8_0 = extractelement <4 x i8> undef, i32 0
866; AVX512-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v4i8_3 = extractelement <4 x i8> undef, i32 3
867; AVX512-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v8i8_a = extractelement <8 x i8> undef, i32 %arg
868; AVX512-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v8i8_0 = extractelement <8 x i8> undef, i32 0
869; AVX512-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v8i8_7 = extractelement <8 x i8> undef, i32 7
870; AVX512-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v16i8_a = extractelement <16 x i8> undef, i32 %arg
871; AVX512-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v16i8_0 = extractelement <16 x i8> undef, i32 0
872; AVX512-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v16i8_8 = extractelement <16 x i8> undef, i32 8
873; AVX512-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v16i8_15 = extractelement <16 x i8> undef, i32 15
874; AVX512-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v32i8_a = extractelement <32 x i8> undef, i32 %arg
875; AVX512-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v32i8_0 = extractelement <32 x i8> undef, i32 0
876; AVX512-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v32i8_7 = extractelement <32 x i8> undef, i32 7
877; AVX512-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v32i8_8 = extractelement <32 x i8> undef, i32 8
878; AVX512-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v32i8_15 = extractelement <32 x i8> undef, i32 15
879; AVX512-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v32i8_24 = extractelement <32 x i8> undef, i32 24
880; AVX512-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v32i8_31 = extractelement <32 x i8> undef, i32 31
881; AVX512-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v64i8_a = extractelement <64 x i8> undef, i32 %arg
882; AVX512-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v64i8_0 = extractelement <64 x i8> undef, i32 0
883; AVX512-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v64i8_7 = extractelement <64 x i8> undef, i32 7
884; AVX512-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v64i8_8 = extractelement <64 x i8> undef, i32 8
885; AVX512-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v64i8_15 = extractelement <64 x i8> undef, i32 15
886; AVX512-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v64i8_24 = extractelement <64 x i8> undef, i32 24
887; AVX512-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v64i8_31 = extractelement <64 x i8> undef, i32 31
888; AVX512-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v64i8_32 = extractelement <64 x i8> undef, i32 32
889; AVX512-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v64i8_48 = extractelement <64 x i8> undef, i32 48
890; AVX512-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v64i8_63 = extractelement <64 x i8> undef, i32 63
891; AVX512-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef
892;
893; SLM-LABEL: 'extract_i8'
894; SLM-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %v2i8_a = extractelement <2 x i8> undef, i32 %arg
895; SLM-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v2i8_0 = extractelement <2 x i8> undef, i32 0
896; SLM-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %v2i8_1 = extractelement <2 x i8> undef, i32 1
897; SLM-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v4i8_a = extractelement <4 x i8> undef, i32 %arg
898; SLM-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v4i8_0 = extractelement <4 x i8> undef, i32 0
899; SLM-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %v4i8_3 = extractelement <4 x i8> undef, i32 3
900; SLM-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v8i8_a = extractelement <8 x i8> undef, i32 %arg
901; SLM-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v8i8_0 = extractelement <8 x i8> undef, i32 0
902; SLM-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %v8i8_7 = extractelement <8 x i8> undef, i32 7
903; SLM-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v16i8_a = extractelement <16 x i8> undef, i32 %arg
904; SLM-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v16i8_0 = extractelement <16 x i8> undef, i32 0
905; SLM-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %v16i8_8 = extractelement <16 x i8> undef, i32 8
906; SLM-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %v16i8_15 = extractelement <16 x i8> undef, i32 15
907; SLM-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %v32i8_a = extractelement <32 x i8> undef, i32 %arg
908; SLM-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v32i8_0 = extractelement <32 x i8> undef, i32 0
909; SLM-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %v32i8_7 = extractelement <32 x i8> undef, i32 7
910; SLM-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %v32i8_8 = extractelement <32 x i8> undef, i32 8
911; SLM-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %v32i8_15 = extractelement <32 x i8> undef, i32 15
912; SLM-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %v32i8_24 = extractelement <32 x i8> undef, i32 24
913; SLM-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %v32i8_31 = extractelement <32 x i8> undef, i32 31
914; SLM-NEXT:  Cost Model: Found an estimated cost of 5 for instruction: %v64i8_a = extractelement <64 x i8> undef, i32 %arg
915; SLM-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v64i8_0 = extractelement <64 x i8> undef, i32 0
916; SLM-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %v64i8_7 = extractelement <64 x i8> undef, i32 7
917; SLM-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %v64i8_8 = extractelement <64 x i8> undef, i32 8
918; SLM-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %v64i8_15 = extractelement <64 x i8> undef, i32 15
919; SLM-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %v64i8_24 = extractelement <64 x i8> undef, i32 24
920; SLM-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %v64i8_31 = extractelement <64 x i8> undef, i32 31
921; SLM-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v64i8_32 = extractelement <64 x i8> undef, i32 32
922; SLM-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v64i8_48 = extractelement <64 x i8> undef, i32 48
923; SLM-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %v64i8_63 = extractelement <64 x i8> undef, i32 63
924; SLM-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef
925;
926; GLM-LABEL: 'extract_i8'
927; GLM-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %v2i8_a = extractelement <2 x i8> undef, i32 %arg
928; GLM-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v2i8_0 = extractelement <2 x i8> undef, i32 0
929; GLM-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v2i8_1 = extractelement <2 x i8> undef, i32 1
930; GLM-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v4i8_a = extractelement <4 x i8> undef, i32 %arg
931; GLM-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v4i8_0 = extractelement <4 x i8> undef, i32 0
932; GLM-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v4i8_3 = extractelement <4 x i8> undef, i32 3
933; GLM-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v8i8_a = extractelement <8 x i8> undef, i32 %arg
934; GLM-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v8i8_0 = extractelement <8 x i8> undef, i32 0
935; GLM-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v8i8_7 = extractelement <8 x i8> undef, i32 7
936; GLM-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v16i8_a = extractelement <16 x i8> undef, i32 %arg
937; GLM-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v16i8_0 = extractelement <16 x i8> undef, i32 0
938; GLM-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v16i8_8 = extractelement <16 x i8> undef, i32 8
939; GLM-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v16i8_15 = extractelement <16 x i8> undef, i32 15
940; GLM-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %v32i8_a = extractelement <32 x i8> undef, i32 %arg
941; GLM-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v32i8_0 = extractelement <32 x i8> undef, i32 0
942; GLM-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v32i8_7 = extractelement <32 x i8> undef, i32 7
943; GLM-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v32i8_8 = extractelement <32 x i8> undef, i32 8
944; GLM-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v32i8_15 = extractelement <32 x i8> undef, i32 15
945; GLM-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v32i8_24 = extractelement <32 x i8> undef, i32 24
946; GLM-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v32i8_31 = extractelement <32 x i8> undef, i32 31
947; GLM-NEXT:  Cost Model: Found an estimated cost of 5 for instruction: %v64i8_a = extractelement <64 x i8> undef, i32 %arg
948; GLM-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v64i8_0 = extractelement <64 x i8> undef, i32 0
949; GLM-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v64i8_7 = extractelement <64 x i8> undef, i32 7
950; GLM-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v64i8_8 = extractelement <64 x i8> undef, i32 8
951; GLM-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v64i8_15 = extractelement <64 x i8> undef, i32 15
952; GLM-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v64i8_24 = extractelement <64 x i8> undef, i32 24
953; GLM-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v64i8_31 = extractelement <64 x i8> undef, i32 31
954; GLM-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v64i8_32 = extractelement <64 x i8> undef, i32 32
955; GLM-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v64i8_48 = extractelement <64 x i8> undef, i32 48
956; GLM-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v64i8_63 = extractelement <64 x i8> undef, i32 63
957; GLM-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef
958;
959  %v2i8_a = extractelement <2 x i8> undef, i32 %arg
960  %v2i8_0 = extractelement <2 x i8> undef, i32 0
961  %v2i8_1 = extractelement <2 x i8> undef, i32 1
962
963  %v4i8_a = extractelement <4 x i8> undef, i32 %arg
964  %v4i8_0 = extractelement <4 x i8> undef, i32 0
965  %v4i8_3 = extractelement <4 x i8> undef, i32 3
966
967  %v8i8_a = extractelement <8 x i8> undef, i32 %arg
968  %v8i8_0 = extractelement <8 x i8> undef, i32 0
969  %v8i8_7 = extractelement <8 x i8> undef, i32 7
970
971  %v16i8_a = extractelement <16 x i8> undef, i32 %arg
972  %v16i8_0 = extractelement <16 x i8> undef, i32 0
973  %v16i8_8 = extractelement <16 x i8> undef, i32 8
974  %v16i8_15 = extractelement <16 x i8> undef, i32 15
975
976  %v32i8_a = extractelement <32 x i8> undef, i32 %arg
977  %v32i8_0 = extractelement <32 x i8> undef, i32 0
978  %v32i8_7 = extractelement <32 x i8> undef, i32 7
979  %v32i8_8 = extractelement <32 x i8> undef, i32 8
980  %v32i8_15 = extractelement <32 x i8> undef, i32 15
981  %v32i8_24 = extractelement <32 x i8> undef, i32 24
982  %v32i8_31 = extractelement <32 x i8> undef, i32 31
983
984  %v64i8_a = extractelement <64 x i8> undef, i32 %arg
985  %v64i8_0 = extractelement <64 x i8> undef, i32 0
986  %v64i8_7 = extractelement <64 x i8> undef, i32 7
987  %v64i8_8 = extractelement <64 x i8> undef, i32 8
988  %v64i8_15 = extractelement <64 x i8> undef, i32 15
989  %v64i8_24 = extractelement <64 x i8> undef, i32 24
990  %v64i8_31 = extractelement <64 x i8> undef, i32 31
991  %v64i8_32 = extractelement <64 x i8> undef, i32 32
992  %v64i8_48 = extractelement <64 x i8> undef, i32 48
993  %v64i8_63 = extractelement <64 x i8> undef, i32 63
994
995  ret i32 undef
996}
997
998define i32 @extract_i1(i32 %arg) {
999; SSE-LABEL: 'extract_i1'
1000; SSE-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %v2i1_a = extractelement <2 x i1> undef, i32 %arg
1001; SSE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v2i1_0 = extractelement <2 x i1> undef, i32 0
1002; SSE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v2i1_1 = extractelement <2 x i1> undef, i32 1
1003; SSE-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %v4i1_a = extractelement <4 x i1> undef, i32 %arg
1004; SSE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v4i1_0 = extractelement <4 x i1> undef, i32 0
1005; SSE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v4i1_2 = extractelement <4 x i1> undef, i32 2
1006; SSE-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %v8i1_a = extractelement <8 x i1> undef, i32 %arg
1007; SSE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v8i1_0 = extractelement <8 x i1> undef, i32 0
1008; SSE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v8i1_4 = extractelement <8 x i1> undef, i32 4
1009; SSE-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %v16i1_a = extractelement <16 x i1> undef, i32 %arg
1010; SSE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v16i1_0 = extractelement <16 x i1> undef, i32 0
1011; SSE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v16i1_8 = extractelement <16 x i1> undef, i32 8
1012; SSE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v16i1_15 = extractelement <16 x i1> undef, i32 15
1013; SSE-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v32i1_a = extractelement <32 x i1> undef, i32 %arg
1014; SSE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v32i1_0 = extractelement <32 x i1> undef, i32 0
1015; SSE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v32i1_7 = extractelement <32 x i1> undef, i32 7
1016; SSE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v32i1_8 = extractelement <32 x i1> undef, i32 8
1017; SSE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v32i1_15 = extractelement <32 x i1> undef, i32 15
1018; SSE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v32i1_24 = extractelement <32 x i1> undef, i32 24
1019; SSE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v32i1_31 = extractelement <32 x i1> undef, i32 31
1020; SSE-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v64i1_a = extractelement <64 x i1> undef, i32 %arg
1021; SSE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v64i1_0 = extractelement <64 x i1> undef, i32 0
1022; SSE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v64i1_7 = extractelement <64 x i1> undef, i32 7
1023; SSE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v64i1_8 = extractelement <64 x i1> undef, i32 8
1024; SSE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v64i1_15 = extractelement <64 x i1> undef, i32 15
1025; SSE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v64i1_24 = extractelement <64 x i1> undef, i32 24
1026; SSE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v64i1_31 = extractelement <64 x i1> undef, i32 31
1027; SSE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v64i1_32 = extractelement <64 x i1> undef, i32 32
1028; SSE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v64i1_48 = extractelement <64 x i1> undef, i32 48
1029; SSE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v64i1_63 = extractelement <64 x i1> undef, i32 63
1030; SSE-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef
1031;
1032; AVX-LABEL: 'extract_i1'
1033; AVX-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %v2i1_a = extractelement <2 x i1> undef, i32 %arg
1034; AVX-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v2i1_0 = extractelement <2 x i1> undef, i32 0
1035; AVX-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v2i1_1 = extractelement <2 x i1> undef, i32 1
1036; AVX-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %v4i1_a = extractelement <4 x i1> undef, i32 %arg
1037; AVX-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v4i1_0 = extractelement <4 x i1> undef, i32 0
1038; AVX-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v4i1_2 = extractelement <4 x i1> undef, i32 2
1039; AVX-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %v8i1_a = extractelement <8 x i1> undef, i32 %arg
1040; AVX-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v8i1_0 = extractelement <8 x i1> undef, i32 0
1041; AVX-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v8i1_4 = extractelement <8 x i1> undef, i32 4
1042; AVX-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %v16i1_a = extractelement <16 x i1> undef, i32 %arg
1043; AVX-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v16i1_0 = extractelement <16 x i1> undef, i32 0
1044; AVX-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v16i1_8 = extractelement <16 x i1> undef, i32 8
1045; AVX-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v16i1_15 = extractelement <16 x i1> undef, i32 15
1046; AVX-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v32i1_a = extractelement <32 x i1> undef, i32 %arg
1047; AVX-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v32i1_0 = extractelement <32 x i1> undef, i32 0
1048; AVX-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v32i1_7 = extractelement <32 x i1> undef, i32 7
1049; AVX-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v32i1_8 = extractelement <32 x i1> undef, i32 8
1050; AVX-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v32i1_15 = extractelement <32 x i1> undef, i32 15
1051; AVX-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v32i1_24 = extractelement <32 x i1> undef, i32 24
1052; AVX-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v32i1_31 = extractelement <32 x i1> undef, i32 31
1053; AVX-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v64i1_a = extractelement <64 x i1> undef, i32 %arg
1054; AVX-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v64i1_0 = extractelement <64 x i1> undef, i32 0
1055; AVX-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v64i1_7 = extractelement <64 x i1> undef, i32 7
1056; AVX-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v64i1_8 = extractelement <64 x i1> undef, i32 8
1057; AVX-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v64i1_15 = extractelement <64 x i1> undef, i32 15
1058; AVX-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v64i1_24 = extractelement <64 x i1> undef, i32 24
1059; AVX-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v64i1_31 = extractelement <64 x i1> undef, i32 31
1060; AVX-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v64i1_32 = extractelement <64 x i1> undef, i32 32
1061; AVX-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v64i1_48 = extractelement <64 x i1> undef, i32 48
1062; AVX-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v64i1_63 = extractelement <64 x i1> undef, i32 63
1063; AVX-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef
1064;
1065; AVX512F-LABEL: 'extract_i1'
1066; AVX512F-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %v2i1_a = extractelement <2 x i1> undef, i32 %arg
1067; AVX512F-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v2i1_0 = extractelement <2 x i1> undef, i32 0
1068; AVX512F-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v2i1_1 = extractelement <2 x i1> undef, i32 1
1069; AVX512F-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %v4i1_a = extractelement <4 x i1> undef, i32 %arg
1070; AVX512F-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v4i1_0 = extractelement <4 x i1> undef, i32 0
1071; AVX512F-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v4i1_2 = extractelement <4 x i1> undef, i32 2
1072; AVX512F-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %v8i1_a = extractelement <8 x i1> undef, i32 %arg
1073; AVX512F-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v8i1_0 = extractelement <8 x i1> undef, i32 0
1074; AVX512F-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v8i1_4 = extractelement <8 x i1> undef, i32 4
1075; AVX512F-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %v16i1_a = extractelement <16 x i1> undef, i32 %arg
1076; AVX512F-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v16i1_0 = extractelement <16 x i1> undef, i32 0
1077; AVX512F-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v16i1_8 = extractelement <16 x i1> undef, i32 8
1078; AVX512F-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v16i1_15 = extractelement <16 x i1> undef, i32 15
1079; AVX512F-NEXT:  Cost Model: Found an estimated cost of 5 for instruction: %v32i1_a = extractelement <32 x i1> undef, i32 %arg
1080; AVX512F-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v32i1_0 = extractelement <32 x i1> undef, i32 0
1081; AVX512F-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v32i1_7 = extractelement <32 x i1> undef, i32 7
1082; AVX512F-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v32i1_8 = extractelement <32 x i1> undef, i32 8
1083; AVX512F-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v32i1_15 = extractelement <32 x i1> undef, i32 15
1084; AVX512F-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v32i1_24 = extractelement <32 x i1> undef, i32 24
1085; AVX512F-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v32i1_31 = extractelement <32 x i1> undef, i32 31
1086; AVX512F-NEXT:  Cost Model: Found an estimated cost of 9 for instruction: %v64i1_a = extractelement <64 x i1> undef, i32 %arg
1087; AVX512F-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v64i1_0 = extractelement <64 x i1> undef, i32 0
1088; AVX512F-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v64i1_7 = extractelement <64 x i1> undef, i32 7
1089; AVX512F-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v64i1_8 = extractelement <64 x i1> undef, i32 8
1090; AVX512F-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v64i1_15 = extractelement <64 x i1> undef, i32 15
1091; AVX512F-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v64i1_24 = extractelement <64 x i1> undef, i32 24
1092; AVX512F-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v64i1_31 = extractelement <64 x i1> undef, i32 31
1093; AVX512F-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v64i1_32 = extractelement <64 x i1> undef, i32 32
1094; AVX512F-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v64i1_48 = extractelement <64 x i1> undef, i32 48
1095; AVX512F-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v64i1_63 = extractelement <64 x i1> undef, i32 63
1096; AVX512F-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef
1097;
1098; AVX512BW-LABEL: 'extract_i1'
1099; AVX512BW-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %v2i1_a = extractelement <2 x i1> undef, i32 %arg
1100; AVX512BW-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v2i1_0 = extractelement <2 x i1> undef, i32 0
1101; AVX512BW-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v2i1_1 = extractelement <2 x i1> undef, i32 1
1102; AVX512BW-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %v4i1_a = extractelement <4 x i1> undef, i32 %arg
1103; AVX512BW-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v4i1_0 = extractelement <4 x i1> undef, i32 0
1104; AVX512BW-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v4i1_2 = extractelement <4 x i1> undef, i32 2
1105; AVX512BW-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %v8i1_a = extractelement <8 x i1> undef, i32 %arg
1106; AVX512BW-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v8i1_0 = extractelement <8 x i1> undef, i32 0
1107; AVX512BW-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v8i1_4 = extractelement <8 x i1> undef, i32 4
1108; AVX512BW-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %v16i1_a = extractelement <16 x i1> undef, i32 %arg
1109; AVX512BW-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v16i1_0 = extractelement <16 x i1> undef, i32 0
1110; AVX512BW-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v16i1_8 = extractelement <16 x i1> undef, i32 8
1111; AVX512BW-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v16i1_15 = extractelement <16 x i1> undef, i32 15
1112; AVX512BW-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v32i1_a = extractelement <32 x i1> undef, i32 %arg
1113; AVX512BW-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v32i1_0 = extractelement <32 x i1> undef, i32 0
1114; AVX512BW-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v32i1_7 = extractelement <32 x i1> undef, i32 7
1115; AVX512BW-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v32i1_8 = extractelement <32 x i1> undef, i32 8
1116; AVX512BW-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v32i1_15 = extractelement <32 x i1> undef, i32 15
1117; AVX512BW-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v32i1_24 = extractelement <32 x i1> undef, i32 24
1118; AVX512BW-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v32i1_31 = extractelement <32 x i1> undef, i32 31
1119; AVX512BW-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v64i1_a = extractelement <64 x i1> undef, i32 %arg
1120; AVX512BW-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v64i1_0 = extractelement <64 x i1> undef, i32 0
1121; AVX512BW-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v64i1_7 = extractelement <64 x i1> undef, i32 7
1122; AVX512BW-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v64i1_8 = extractelement <64 x i1> undef, i32 8
1123; AVX512BW-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v64i1_15 = extractelement <64 x i1> undef, i32 15
1124; AVX512BW-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v64i1_24 = extractelement <64 x i1> undef, i32 24
1125; AVX512BW-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v64i1_31 = extractelement <64 x i1> undef, i32 31
1126; AVX512BW-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v64i1_32 = extractelement <64 x i1> undef, i32 32
1127; AVX512BW-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v64i1_48 = extractelement <64 x i1> undef, i32 48
1128; AVX512BW-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v64i1_63 = extractelement <64 x i1> undef, i32 63
1129; AVX512BW-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef
1130;
1131  %v2i1_a = extractelement <2 x i1> undef, i32 %arg
1132  %v2i1_0 = extractelement <2 x i1> undef, i32 0
1133  %v2i1_1 = extractelement <2 x i1> undef, i32 1
1134
1135  %v4i1_a = extractelement <4 x i1> undef, i32 %arg
1136  %v4i1_0 = extractelement <4 x i1> undef, i32 0
1137  %v4i1_2 = extractelement <4 x i1> undef, i32 2
1138
1139  %v8i1_a = extractelement <8 x i1> undef, i32 %arg
1140  %v8i1_0 = extractelement <8 x i1> undef, i32 0
1141  %v8i1_4 = extractelement <8 x i1> undef, i32 4
1142
1143  %v16i1_a = extractelement <16 x i1> undef, i32 %arg
1144  %v16i1_0 = extractelement <16 x i1> undef, i32 0
1145  %v16i1_8 = extractelement <16 x i1> undef, i32 8
1146  %v16i1_15 = extractelement <16 x i1> undef, i32 15
1147
1148  %v32i1_a = extractelement <32 x i1> undef, i32 %arg
1149  %v32i1_0 = extractelement <32 x i1> undef, i32 0
1150  %v32i1_7 = extractelement <32 x i1> undef, i32 7
1151  %v32i1_8 = extractelement <32 x i1> undef, i32 8
1152  %v32i1_15 = extractelement <32 x i1> undef, i32 15
1153  %v32i1_24 = extractelement <32 x i1> undef, i32 24
1154  %v32i1_31 = extractelement <32 x i1> undef, i32 31
1155
1156  %v64i1_a = extractelement <64 x i1> undef, i32 %arg
1157  %v64i1_0 = extractelement <64 x i1> undef, i32 0
1158  %v64i1_7 = extractelement <64 x i1> undef, i32 7
1159  %v64i1_8 = extractelement <64 x i1> undef, i32 8
1160  %v64i1_15 = extractelement <64 x i1> undef, i32 15
1161  %v64i1_24 = extractelement <64 x i1> undef, i32 24
1162  %v64i1_31 = extractelement <64 x i1> undef, i32 31
1163  %v64i1_32 = extractelement <64 x i1> undef, i32 32
1164  %v64i1_48 = extractelement <64 x i1> undef, i32 48
1165  %v64i1_63 = extractelement <64 x i1> undef, i32 63
1166
1167  ret i32 undef
1168}
1169