brintos

brintos / llvm-project-archived public Read only

0
0
Text · 28.5 KiB · cebc3e5 Raw
302 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_analyze_test_checks.py2; RUN: opt < %s -passes="print<cost-model>" -mtriple=x86_64-apple-darwin 2>&1 -disable-output -cost-kind=all -mattr=+sse2 | FileCheck %s --check-prefixes=SSE,SSE23; RUN: opt < %s -passes="print<cost-model>" -mtriple=x86_64-apple-darwin 2>&1 -disable-output -cost-kind=all -mattr=+ssse3 | FileCheck %s --check-prefixes=SSE,SSSE34; RUN: opt < %s -passes="print<cost-model>" -mtriple=x86_64-apple-darwin 2>&1 -disable-output -cost-kind=all -mattr=+sse4.2 | FileCheck %s --check-prefixes=SSE,SSE425; RUN: opt < %s -passes="print<cost-model>" -mtriple=x86_64-apple-darwin 2>&1 -disable-output -cost-kind=all -mattr=+avx | FileCheck %s --check-prefixes=AVX16; RUN: opt < %s -passes="print<cost-model>" -mtriple=x86_64-apple-darwin 2>&1 -disable-output -cost-kind=all -mattr=+avx2 | FileCheck %s --check-prefixes=AVX27; RUN: opt < %s -passes="print<cost-model>" -mtriple=x86_64-apple-darwin 2>&1 -disable-output -cost-kind=all -mattr=+avx512f | FileCheck %s --check-prefixes=AVX512,AVX512F8; RUN: opt < %s -passes="print<cost-model>" -mtriple=x86_64-apple-darwin 2>&1 -disable-output -cost-kind=all -mattr=+avx512f,+avx512bw | FileCheck %s --check-prefixes=AVX512,AVX512BW9; RUN: opt < %s -passes="print<cost-model>" -mtriple=x86_64-apple-darwin 2>&1 -disable-output -cost-kind=all -mattr=+avx512f,+avx512dq | FileCheck %s --check-prefixes=AVX512,AVX512DQ10 11define i32 @reduce_i64(i32 %arg) {12; SSE2-LABEL: 'reduce_i64'13; SSE2-NEXT:  Cost Model: Found costs of 0 for: %V1 = call i64 @llvm.vector.reduce.mul.v1i64(<1 x i64> undef)14; SSE2-NEXT:  Cost Model: Found costs of RThru:9 CodeSize:12 Lat:12 SizeLat:12 for: %V2 = call i64 @llvm.vector.reduce.mul.v2i64(<2 x i64> undef)15; SSE2-NEXT:  Cost Model: Found costs of RThru:16 CodeSize:22 Lat:22 SizeLat:22 for: %V4 = call i64 @llvm.vector.reduce.mul.v4i64(<4 x i64> undef)16; SSE2-NEXT:  Cost Model: Found costs of RThru:30 CodeSize:42 Lat:42 SizeLat:42 for: %V8 = call i64 @llvm.vector.reduce.mul.v8i64(<8 x i64> undef)17; SSE2-NEXT:  Cost Model: Found costs of RThru:58 CodeSize:82 Lat:82 SizeLat:82 for: %V16 = call i64 @llvm.vector.reduce.mul.v16i64(<16 x i64> undef)18; SSE2-NEXT:  Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret i32 undef19;20; SSSE3-LABEL: 'reduce_i64'21; SSSE3-NEXT:  Cost Model: Found costs of 0 for: %V1 = call i64 @llvm.vector.reduce.mul.v1i64(<1 x i64> undef)22; SSSE3-NEXT:  Cost Model: Found costs of RThru:9 CodeSize:12 Lat:12 SizeLat:12 for: %V2 = call i64 @llvm.vector.reduce.mul.v2i64(<2 x i64> undef)23; SSSE3-NEXT:  Cost Model: Found costs of RThru:16 CodeSize:22 Lat:22 SizeLat:22 for: %V4 = call i64 @llvm.vector.reduce.mul.v4i64(<4 x i64> undef)24; SSSE3-NEXT:  Cost Model: Found costs of RThru:30 CodeSize:42 Lat:42 SizeLat:42 for: %V8 = call i64 @llvm.vector.reduce.mul.v8i64(<8 x i64> undef)25; SSSE3-NEXT:  Cost Model: Found costs of RThru:58 CodeSize:82 Lat:82 SizeLat:82 for: %V16 = call i64 @llvm.vector.reduce.mul.v16i64(<16 x i64> undef)26; SSSE3-NEXT:  Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret i32 undef27;28; SSE42-LABEL: 'reduce_i64'29; SSE42-NEXT:  Cost Model: Found costs of 0 for: %V1 = call i64 @llvm.vector.reduce.mul.v1i64(<1 x i64> undef)30; SSE42-NEXT:  Cost Model: Found costs of RThru:8 CodeSize:12 Lat:12 SizeLat:12 for: %V2 = call i64 @llvm.vector.reduce.mul.v2i64(<2 x i64> undef)31; SSE42-NEXT:  Cost Model: Found costs of RThru:14 CodeSize:22 Lat:22 SizeLat:22 for: %V4 = call i64 @llvm.vector.reduce.mul.v4i64(<4 x i64> undef)32; SSE42-NEXT:  Cost Model: Found costs of RThru:26 CodeSize:42 Lat:42 SizeLat:42 for: %V8 = call i64 @llvm.vector.reduce.mul.v8i64(<8 x i64> undef)33; SSE42-NEXT:  Cost Model: Found costs of RThru:50 CodeSize:82 Lat:82 SizeLat:82 for: %V16 = call i64 @llvm.vector.reduce.mul.v16i64(<16 x i64> undef)34; SSE42-NEXT:  Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret i32 undef35;36; AVX1-LABEL: 'reduce_i64'37; AVX1-NEXT:  Cost Model: Found costs of 0 for: %V1 = call i64 @llvm.vector.reduce.mul.v1i64(<1 x i64> undef)38; AVX1-NEXT:  Cost Model: Found costs of RThru:8 CodeSize:12 Lat:12 SizeLat:12 for: %V2 = call i64 @llvm.vector.reduce.mul.v2i64(<2 x i64> undef)39; AVX1-NEXT:  Cost Model: Found costs of RThru:15 CodeSize:23 Lat:23 SizeLat:23 for: %V4 = call i64 @llvm.vector.reduce.mul.v4i64(<4 x i64> undef)40; AVX1-NEXT:  Cost Model: Found costs of RThru:27 CodeSize:42 Lat:38 SizeLat:43 for: %V8 = call i64 @llvm.vector.reduce.mul.v8i64(<8 x i64> undef)41; AVX1-NEXT:  Cost Model: Found costs of RThru:51 CodeSize:80 Lat:68 SizeLat:83 for: %V16 = call i64 @llvm.vector.reduce.mul.v16i64(<16 x i64> undef)42; AVX1-NEXT:  Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret i32 undef43;44; AVX2-LABEL: 'reduce_i64'45; AVX2-NEXT:  Cost Model: Found costs of 0 for: %V1 = call i64 @llvm.vector.reduce.mul.v1i64(<1 x i64> undef)46; AVX2-NEXT:  Cost Model: Found costs of RThru:8 CodeSize:10 Lat:12 SizeLat:10 for: %V2 = call i64 @llvm.vector.reduce.mul.v2i64(<2 x i64> undef)47; AVX2-NEXT:  Cost Model: Found costs of RThru:15 CodeSize:19 Lat:23 SizeLat:19 for: %V4 = call i64 @llvm.vector.reduce.mul.v4i64(<4 x i64> undef)48; AVX2-NEXT:  Cost Model: Found costs of RThru:21 CodeSize:27 Lat:33 SizeLat:32 for: %V8 = call i64 @llvm.vector.reduce.mul.v8i64(<8 x i64> undef)49; AVX2-NEXT:  Cost Model: Found costs of RThru:33 CodeSize:43 Lat:53 SizeLat:58 for: %V16 = call i64 @llvm.vector.reduce.mul.v16i64(<16 x i64> undef)50; AVX2-NEXT:  Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret i32 undef51;52; AVX512F-LABEL: 'reduce_i64'53; AVX512F-NEXT:  Cost Model: Found costs of 0 for: %V1 = call i64 @llvm.vector.reduce.mul.v1i64(<1 x i64> undef)54; AVX512F-NEXT:  Cost Model: Found costs of RThru:8 CodeSize:10 Lat:14 SizeLat:10 for: %V2 = call i64 @llvm.vector.reduce.mul.v2i64(<2 x i64> undef)55; AVX512F-NEXT:  Cost Model: Found costs of RThru:15 CodeSize:19 Lat:25 SizeLat:19 for: %V4 = call i64 @llvm.vector.reduce.mul.v4i64(<4 x i64> undef)56; AVX512F-NEXT:  Cost Model: Found costs of RThru:22 CodeSize:28 Lat:36 SizeLat:33 for: %V8 = call i64 @llvm.vector.reduce.mul.v8i64(<8 x i64> undef)57; AVX512F-NEXT:  Cost Model: Found costs of RThru:28 CodeSize:36 Lat:45 SizeLat:41 for: %V16 = call i64 @llvm.vector.reduce.mul.v16i64(<16 x i64> undef)58; AVX512F-NEXT:  Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret i32 undef59;60; AVX512BW-LABEL: 'reduce_i64'61; AVX512BW-NEXT:  Cost Model: Found costs of 0 for: %V1 = call i64 @llvm.vector.reduce.mul.v1i64(<1 x i64> undef)62; AVX512BW-NEXT:  Cost Model: Found costs of RThru:8 CodeSize:10 Lat:14 SizeLat:10 for: %V2 = call i64 @llvm.vector.reduce.mul.v2i64(<2 x i64> undef)63; AVX512BW-NEXT:  Cost Model: Found costs of RThru:15 CodeSize:19 Lat:25 SizeLat:19 for: %V4 = call i64 @llvm.vector.reduce.mul.v4i64(<4 x i64> undef)64; AVX512BW-NEXT:  Cost Model: Found costs of RThru:22 CodeSize:28 Lat:36 SizeLat:33 for: %V8 = call i64 @llvm.vector.reduce.mul.v8i64(<8 x i64> undef)65; AVX512BW-NEXT:  Cost Model: Found costs of RThru:28 CodeSize:36 Lat:45 SizeLat:41 for: %V16 = call i64 @llvm.vector.reduce.mul.v16i64(<16 x i64> undef)66; AVX512BW-NEXT:  Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret i32 undef67;68; AVX512DQ-LABEL: 'reduce_i64'69; AVX512DQ-NEXT:  Cost Model: Found costs of 0 for: %V1 = call i64 @llvm.vector.reduce.mul.v1i64(<1 x i64> undef)70; AVX512DQ-NEXT:  Cost Model: Found costs of RThru:4 CodeSize:3 Lat:19 SizeLat:5 for: %V2 = call i64 @llvm.vector.reduce.mul.v2i64(<2 x i64> undef)71; AVX512DQ-NEXT:  Cost Model: Found costs of RThru:7 CodeSize:5 Lat:35 SizeLat:9 for: %V4 = call i64 @llvm.vector.reduce.mul.v4i64(<4 x i64> undef)72; AVX512DQ-NEXT:  Cost Model: Found costs of RThru:10 CodeSize:7 Lat:51 SizeLat:13 for: %V8 = call i64 @llvm.vector.reduce.mul.v8i64(<8 x i64> undef)73; AVX512DQ-NEXT:  Cost Model: Found costs of RThru:13 CodeSize:8 Lat:66 SizeLat:16 for: %V16 = call i64 @llvm.vector.reduce.mul.v16i64(<16 x i64> undef)74; AVX512DQ-NEXT:  Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret i32 undef75;76  %V1  = call i64 @llvm.vector.reduce.mul.v1i64(<1 x i64> undef)77  %V2  = call i64 @llvm.vector.reduce.mul.v2i64(<2 x i64> undef)78  %V4  = call i64 @llvm.vector.reduce.mul.v4i64(<4 x i64> undef)79  %V8  = call i64 @llvm.vector.reduce.mul.v8i64(<8 x i64> undef)80  %V16 = call i64 @llvm.vector.reduce.mul.v16i64(<16 x i64> undef)81  ret i32 undef82}83 84define i32 @reduce_i32(i32 %arg) {85; SSE2-LABEL: 'reduce_i32'86; SSE2-NEXT:  Cost Model: Found costs of RThru:8 CodeSize:9 Lat:10 SizeLat:9 for: %V2 = call i32 @llvm.vector.reduce.mul.v2i32(<2 x i32> undef)87; SSE2-NEXT:  Cost Model: Found costs of RThru:15 CodeSize:17 Lat:19 SizeLat:17 for: %V4 = call i32 @llvm.vector.reduce.mul.v4i32(<4 x i32> undef)88; SSE2-NEXT:  Cost Model: Found costs of RThru:21 CodeSize:24 Lat:27 SizeLat:24 for: %V8 = call i32 @llvm.vector.reduce.mul.v8i32(<8 x i32> undef)89; SSE2-NEXT:  Cost Model: Found costs of RThru:33 CodeSize:38 Lat:43 SizeLat:38 for: %V16 = call i32 @llvm.vector.reduce.mul.v16i32(<16 x i32> undef)90; SSE2-NEXT:  Cost Model: Found costs of RThru:57 CodeSize:66 Lat:75 SizeLat:66 for: %V32 = call i32 @llvm.vector.reduce.mul.v32i32(<32 x i32> undef)91; SSE2-NEXT:  Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret i32 undef92;93; SSSE3-LABEL: 'reduce_i32'94; SSSE3-NEXT:  Cost Model: Found costs of RThru:8 CodeSize:9 Lat:10 SizeLat:9 for: %V2 = call i32 @llvm.vector.reduce.mul.v2i32(<2 x i32> undef)95; SSSE3-NEXT:  Cost Model: Found costs of RThru:15 CodeSize:17 Lat:19 SizeLat:17 for: %V4 = call i32 @llvm.vector.reduce.mul.v4i32(<4 x i32> undef)96; SSSE3-NEXT:  Cost Model: Found costs of RThru:21 CodeSize:24 Lat:27 SizeLat:24 for: %V8 = call i32 @llvm.vector.reduce.mul.v8i32(<8 x i32> undef)97; SSSE3-NEXT:  Cost Model: Found costs of RThru:33 CodeSize:38 Lat:43 SizeLat:38 for: %V16 = call i32 @llvm.vector.reduce.mul.v16i32(<16 x i32> undef)98; SSSE3-NEXT:  Cost Model: Found costs of RThru:57 CodeSize:66 Lat:75 SizeLat:66 for: %V32 = call i32 @llvm.vector.reduce.mul.v32i32(<32 x i32> undef)99; SSSE3-NEXT:  Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret i32 undef100;101; SSE42-LABEL: 'reduce_i32'102; SSE42-NEXT:  Cost Model: Found costs of RThru:4 CodeSize:3 Lat:13 SizeLat:3 for: %V2 = call i32 @llvm.vector.reduce.mul.v2i32(<2 x i32> undef)103; SSE42-NEXT:  Cost Model: Found costs of RThru:7 CodeSize:5 Lat:25 SizeLat:5 for: %V4 = call i32 @llvm.vector.reduce.mul.v4i32(<4 x i32> undef)104; SSE42-NEXT:  Cost Model: Found costs of RThru:9 CodeSize:6 Lat:36 SizeLat:6 for: %V8 = call i32 @llvm.vector.reduce.mul.v8i32(<8 x i32> undef)105; SSE42-NEXT:  Cost Model: Found costs of RThru:13 CodeSize:8 Lat:58 SizeLat:8 for: %V16 = call i32 @llvm.vector.reduce.mul.v16i32(<16 x i32> undef)106; SSE42-NEXT:  Cost Model: Found costs of RThru:21 CodeSize:12 Lat:102 SizeLat:12 for: %V32 = call i32 @llvm.vector.reduce.mul.v32i32(<32 x i32> undef)107; SSE42-NEXT:  Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret i32 undef108;109; AVX1-LABEL: 'reduce_i32'110; AVX1-NEXT:  Cost Model: Found costs of RThru:4 CodeSize:3 Lat:7 SizeLat:5 for: %V2 = call i32 @llvm.vector.reduce.mul.v2i32(<2 x i32> undef)111; AVX1-NEXT:  Cost Model: Found costs of RThru:7 CodeSize:5 Lat:13 SizeLat:9 for: %V4 = call i32 @llvm.vector.reduce.mul.v4i32(<4 x i32> undef)112; AVX1-NEXT:  Cost Model: Found costs of RThru:10 CodeSize:7 Lat:19 SizeLat:13 for: %V8 = call i32 @llvm.vector.reduce.mul.v8i32(<8 x i32> undef)113; AVX1-NEXT:  Cost Model: Found costs of RThru:15 CodeSize:12 Lat:27 SizeLat:23 for: %V16 = call i32 @llvm.vector.reduce.mul.v16i32(<16 x i32> undef)114; AVX1-NEXT:  Cost Model: Found costs of RThru:25 CodeSize:22 Lat:43 SizeLat:43 for: %V32 = call i32 @llvm.vector.reduce.mul.v32i32(<32 x i32> undef)115; AVX1-NEXT:  Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret i32 undef116;117; AVX2-LABEL: 'reduce_i32'118; AVX2-NEXT:  Cost Model: Found costs of RThru:4 CodeSize:3 Lat:12 SizeLat:4 for: %V2 = call i32 @llvm.vector.reduce.mul.v2i32(<2 x i32> undef)119; AVX2-NEXT:  Cost Model: Found costs of RThru:7 CodeSize:5 Lat:23 SizeLat:7 for: %V4 = call i32 @llvm.vector.reduce.mul.v4i32(<4 x i32> undef)120; AVX2-NEXT:  Cost Model: Found costs of RThru:10 CodeSize:7 Lat:34 SizeLat:10 for: %V8 = call i32 @llvm.vector.reduce.mul.v8i32(<8 x i32> undef)121; AVX2-NEXT:  Cost Model: Found costs of RThru:14 CodeSize:8 Lat:44 SizeLat:12 for: %V16 = call i32 @llvm.vector.reduce.mul.v16i32(<16 x i32> undef)122; AVX2-NEXT:  Cost Model: Found costs of RThru:22 CodeSize:10 Lat:64 SizeLat:16 for: %V32 = call i32 @llvm.vector.reduce.mul.v32i32(<32 x i32> undef)123; AVX2-NEXT:  Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret i32 undef124;125; AVX512-LABEL: 'reduce_i32'126; AVX512-NEXT:  Cost Model: Found costs of RThru:3 CodeSize:3 Lat:14 SizeLat:4 for: %V2 = call i32 @llvm.vector.reduce.mul.v2i32(<2 x i32> undef)127; AVX512-NEXT:  Cost Model: Found costs of RThru:5 CodeSize:5 Lat:27 SizeLat:7 for: %V4 = call i32 @llvm.vector.reduce.mul.v4i32(<4 x i32> undef)128; AVX512-NEXT:  Cost Model: Found costs of RThru:7 CodeSize:7 Lat:38 SizeLat:10 for: %V8 = call i32 @llvm.vector.reduce.mul.v8i32(<8 x i32> undef)129; AVX512-NEXT:  Cost Model: Found costs of RThru:9 CodeSize:9 Lat:49 SizeLat:13 for: %V16 = call i32 @llvm.vector.reduce.mul.v16i32(<16 x i32> undef)130; AVX512-NEXT:  Cost Model: Found costs of RThru:10 CodeSize:10 Lat:59 SizeLat:15 for: %V32 = call i32 @llvm.vector.reduce.mul.v32i32(<32 x i32> undef)131; AVX512-NEXT:  Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret i32 undef132;133  %V2  = call i32 @llvm.vector.reduce.mul.v2i32(<2 x i32> undef)134  %V4  = call i32 @llvm.vector.reduce.mul.v4i32(<4 x i32> undef)135  %V8  = call i32 @llvm.vector.reduce.mul.v8i32(<8 x i32> undef)136  %V16 = call i32 @llvm.vector.reduce.mul.v16i32(<16 x i32> undef)137  %V32 = call i32 @llvm.vector.reduce.mul.v32i32(<32 x i32> undef)138  ret i32 undef139}140 141define i32 @reduce_i16(i32 %arg) {142; SSE-LABEL: 'reduce_i16'143; SSE-NEXT:  Cost Model: Found costs of RThru:3 CodeSize:3 Lat:7 SizeLat:3 for: %V2 = call i16 @llvm.vector.reduce.mul.v2i16(<2 x i16> undef)144; SSE-NEXT:  Cost Model: Found costs of RThru:5 CodeSize:5 Lat:13 SizeLat:5 for: %V4 = call i16 @llvm.vector.reduce.mul.v4i16(<4 x i16> undef)145; SSE-NEXT:  Cost Model: Found costs of RThru:7 CodeSize:7 Lat:19 SizeLat:7 for: %V8 = call i16 @llvm.vector.reduce.mul.v8i16(<8 x i16> undef)146; SSE-NEXT:  Cost Model: Found costs of RThru:8 CodeSize:8 Lat:24 SizeLat:8 for: %V16 = call i16 @llvm.vector.reduce.mul.v16i16(<16 x i16> undef)147; SSE-NEXT:  Cost Model: Found costs of RThru:10 CodeSize:10 Lat:34 SizeLat:10 for: %V32 = call i16 @llvm.vector.reduce.mul.v32i16(<32 x i16> undef)148; SSE-NEXT:  Cost Model: Found costs of RThru:14 CodeSize:14 Lat:54 SizeLat:14 for: %V64 = call i16 @llvm.vector.reduce.mul.v64i16(<64 x i16> undef)149; SSE-NEXT:  Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret i32 undef150;151; AVX1-LABEL: 'reduce_i16'152; AVX1-NEXT:  Cost Model: Found costs of RThru:3 CodeSize:3 Lat:8 SizeLat:3 for: %V2 = call i16 @llvm.vector.reduce.mul.v2i16(<2 x i16> undef)153; AVX1-NEXT:  Cost Model: Found costs of RThru:5 CodeSize:5 Lat:14 SizeLat:5 for: %V4 = call i16 @llvm.vector.reduce.mul.v4i16(<4 x i16> undef)154; AVX1-NEXT:  Cost Model: Found costs of RThru:7 CodeSize:7 Lat:20 SizeLat:7 for: %V8 = call i16 @llvm.vector.reduce.mul.v8i16(<8 x i16> undef)155; AVX1-NEXT:  Cost Model: Found costs of RThru:9 CodeSize:9 Lat:26 SizeLat:9 for: %V16 = call i16 @llvm.vector.reduce.mul.v16i16(<16 x i16> undef)156; AVX1-NEXT:  Cost Model: Found costs of RThru:13 CodeSize:14 Lat:34 SizeLat:15 for: %V32 = call i16 @llvm.vector.reduce.mul.v32i16(<32 x i16> undef)157; AVX1-NEXT:  Cost Model: Found costs of RThru:21 CodeSize:24 Lat:50 SizeLat:27 for: %V64 = call i16 @llvm.vector.reduce.mul.v64i16(<64 x i16> undef)158; AVX1-NEXT:  Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret i32 undef159;160; AVX2-LABEL: 'reduce_i16'161; AVX2-NEXT:  Cost Model: Found costs of RThru:3 CodeSize:3 Lat:7 SizeLat:3 for: %V2 = call i16 @llvm.vector.reduce.mul.v2i16(<2 x i16> undef)162; AVX2-NEXT:  Cost Model: Found costs of RThru:5 CodeSize:5 Lat:13 SizeLat:5 for: %V4 = call i16 @llvm.vector.reduce.mul.v4i16(<4 x i16> undef)163; AVX2-NEXT:  Cost Model: Found costs of RThru:7 CodeSize:7 Lat:19 SizeLat:7 for: %V8 = call i16 @llvm.vector.reduce.mul.v8i16(<8 x i16> undef)164; AVX2-NEXT:  Cost Model: Found costs of RThru:9 CodeSize:9 Lat:25 SizeLat:9 for: %V16 = call i16 @llvm.vector.reduce.mul.v16i16(<16 x i16> undef)165; AVX2-NEXT:  Cost Model: Found costs of RThru:11 CodeSize:10 Lat:30 SizeLat:11 for: %V32 = call i16 @llvm.vector.reduce.mul.v32i16(<32 x i16> undef)166; AVX2-NEXT:  Cost Model: Found costs of RThru:15 CodeSize:12 Lat:40 SizeLat:15 for: %V64 = call i16 @llvm.vector.reduce.mul.v64i16(<64 x i16> undef)167; AVX2-NEXT:  Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret i32 undef168;169; AVX512F-LABEL: 'reduce_i16'170; AVX512F-NEXT:  Cost Model: Found costs of RThru:3 CodeSize:3 Lat:7 SizeLat:3 for: %V2 = call i16 @llvm.vector.reduce.mul.v2i16(<2 x i16> undef)171; AVX512F-NEXT:  Cost Model: Found costs of RThru:5 CodeSize:5 Lat:15 SizeLat:5 for: %V4 = call i16 @llvm.vector.reduce.mul.v4i16(<4 x i16> undef)172; AVX512F-NEXT:  Cost Model: Found costs of RThru:7 CodeSize:7 Lat:23 SizeLat:7 for: %V8 = call i16 @llvm.vector.reduce.mul.v8i16(<8 x i16> undef)173; AVX512F-NEXT:  Cost Model: Found costs of RThru:9 CodeSize:9 Lat:29 SizeLat:9 for: %V16 = call i16 @llvm.vector.reduce.mul.v16i16(<16 x i16> undef)174; AVX512F-NEXT:  Cost Model: Found costs of RThru:12 CodeSize:11 Lat:35 SizeLat:12 for: %V32 = call i16 @llvm.vector.reduce.mul.v32i16(<32 x i16> undef)175; AVX512F-NEXT:  Cost Model: Found costs of RThru:14 CodeSize:12 Lat:36 SizeLat:13 for: %V64 = call i16 @llvm.vector.reduce.mul.v64i16(<64 x i16> undef)176; AVX512F-NEXT:  Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret i32 undef177;178; AVX512BW-LABEL: 'reduce_i16'179; AVX512BW-NEXT:  Cost Model: Found costs of RThru:3 CodeSize:3 Lat:7 SizeLat:3 for: %V2 = call i16 @llvm.vector.reduce.mul.v2i16(<2 x i16> undef)180; AVX512BW-NEXT:  Cost Model: Found costs of RThru:5 CodeSize:5 Lat:15 SizeLat:5 for: %V4 = call i16 @llvm.vector.reduce.mul.v4i16(<4 x i16> undef)181; AVX512BW-NEXT:  Cost Model: Found costs of RThru:7 CodeSize:7 Lat:23 SizeLat:7 for: %V8 = call i16 @llvm.vector.reduce.mul.v8i16(<8 x i16> undef)182; AVX512BW-NEXT:  Cost Model: Found costs of RThru:9 CodeSize:9 Lat:29 SizeLat:9 for: %V16 = call i16 @llvm.vector.reduce.mul.v16i16(<16 x i16> undef)183; AVX512BW-NEXT:  Cost Model: Found costs of RThru:12 CodeSize:11 Lat:35 SizeLat:12 for: %V32 = call i16 @llvm.vector.reduce.mul.v32i16(<32 x i16> undef)184; AVX512BW-NEXT:  Cost Model: Found costs of RThru:13 CodeSize:12 Lat:40 SizeLat:13 for: %V64 = call i16 @llvm.vector.reduce.mul.v64i16(<64 x i16> undef)185; AVX512BW-NEXT:  Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret i32 undef186;187; AVX512DQ-LABEL: 'reduce_i16'188; AVX512DQ-NEXT:  Cost Model: Found costs of RThru:3 CodeSize:3 Lat:7 SizeLat:3 for: %V2 = call i16 @llvm.vector.reduce.mul.v2i16(<2 x i16> undef)189; AVX512DQ-NEXT:  Cost Model: Found costs of RThru:5 CodeSize:5 Lat:15 SizeLat:5 for: %V4 = call i16 @llvm.vector.reduce.mul.v4i16(<4 x i16> undef)190; AVX512DQ-NEXT:  Cost Model: Found costs of RThru:7 CodeSize:7 Lat:23 SizeLat:7 for: %V8 = call i16 @llvm.vector.reduce.mul.v8i16(<8 x i16> undef)191; AVX512DQ-NEXT:  Cost Model: Found costs of RThru:9 CodeSize:9 Lat:29 SizeLat:9 for: %V16 = call i16 @llvm.vector.reduce.mul.v16i16(<16 x i16> undef)192; AVX512DQ-NEXT:  Cost Model: Found costs of RThru:12 CodeSize:11 Lat:35 SizeLat:12 for: %V32 = call i16 @llvm.vector.reduce.mul.v32i16(<32 x i16> undef)193; AVX512DQ-NEXT:  Cost Model: Found costs of RThru:14 CodeSize:12 Lat:36 SizeLat:13 for: %V64 = call i16 @llvm.vector.reduce.mul.v64i16(<64 x i16> undef)194; AVX512DQ-NEXT:  Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret i32 undef195;196  %V2  = call i16 @llvm.vector.reduce.mul.v2i16(<2 x i16> undef)197  %V4  = call i16 @llvm.vector.reduce.mul.v4i16(<4 x i16> undef)198  %V8  = call i16 @llvm.vector.reduce.mul.v8i16(<8 x i16> undef)199  %V16 = call i16 @llvm.vector.reduce.mul.v16i16(<16 x i16> undef)200  %V32 = call i16 @llvm.vector.reduce.mul.v32i16(<32 x i16> undef)201  %V64 = call i16 @llvm.vector.reduce.mul.v64i16(<64 x i16> undef)202  ret i32 undef203}204 205define i32 @reduce_i8(i32 %arg) {206; SSE-LABEL: 'reduce_i8'207; SSE-NEXT:  Cost Model: Found costs of RThru:4 CodeSize:4 Lat:8 SizeLat:4 for: %V2 = call i8 @llvm.vector.reduce.mul.v2i8(<2 x i8> undef)208; SSE-NEXT:  Cost Model: Found costs of RThru:6 CodeSize:6 Lat:14 SizeLat:6 for: %V4 = call i8 @llvm.vector.reduce.mul.v4i8(<4 x i8> undef)209; SSE-NEXT:  Cost Model: Found costs of RThru:8 CodeSize:8 Lat:20 SizeLat:8 for: %V8 = call i8 @llvm.vector.reduce.mul.v8i8(<8 x i8> undef)210; SSE-NEXT:  Cost Model: Found costs of RThru:10 CodeSize:10 Lat:26 SizeLat:10 for: %V16 = call i8 @llvm.vector.reduce.mul.v16i8(<16 x i8> undef)211; SSE-NEXT:  Cost Model: Found costs of RThru:14 CodeSize:14 Lat:38 SizeLat:14 for: %V32 = call i8 @llvm.vector.reduce.mul.v32i8(<32 x i8> undef)212; SSE-NEXT:  Cost Model: Found costs of RThru:22 CodeSize:22 Lat:62 SizeLat:22 for: %V64 = call i8 @llvm.vector.reduce.mul.v64i8(<64 x i8> undef)213; SSE-NEXT:  Cost Model: Found costs of RThru:38 CodeSize:38 Lat:110 SizeLat:38 for: %V128 = call i8 @llvm.vector.reduce.mul.v128i8(<128 x i8> undef)214; SSE-NEXT:  Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret i32 undef215;216; AVX1-LABEL: 'reduce_i8'217; AVX1-NEXT:  Cost Model: Found costs of RThru:4 CodeSize:4 Lat:9 SizeLat:4 for: %V2 = call i8 @llvm.vector.reduce.mul.v2i8(<2 x i8> undef)218; AVX1-NEXT:  Cost Model: Found costs of RThru:6 CodeSize:6 Lat:15 SizeLat:6 for: %V4 = call i8 @llvm.vector.reduce.mul.v4i8(<4 x i8> undef)219; AVX1-NEXT:  Cost Model: Found costs of RThru:8 CodeSize:8 Lat:21 SizeLat:8 for: %V8 = call i8 @llvm.vector.reduce.mul.v8i8(<8 x i8> undef)220; AVX1-NEXT:  Cost Model: Found costs of RThru:12 CodeSize:10 Lat:27 SizeLat:10 for: %V16 = call i8 @llvm.vector.reduce.mul.v16i8(<16 x i8> undef)221; AVX1-NEXT:  Cost Model: Found costs of RThru:20 CodeSize:15 Lat:35 SizeLat:16 for: %V32 = call i8 @llvm.vector.reduce.mul.v32i8(<32 x i8> undef)222; AVX1-NEXT:  Cost Model: Found costs of RThru:35 CodeSize:25 Lat:51 SizeLat:28 for: %V64 = call i8 @llvm.vector.reduce.mul.v64i8(<64 x i8> undef)223; AVX1-NEXT:  Cost Model: Found costs of RThru:65 CodeSize:45 Lat:83 SizeLat:52 for: %V128 = call i8 @llvm.vector.reduce.mul.v128i8(<128 x i8> undef)224; AVX1-NEXT:  Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret i32 undef225;226; AVX2-LABEL: 'reduce_i8'227; AVX2-NEXT:  Cost Model: Found costs of RThru:4 CodeSize:4 Lat:8 SizeLat:4 for: %V2 = call i8 @llvm.vector.reduce.mul.v2i8(<2 x i8> undef)228; AVX2-NEXT:  Cost Model: Found costs of RThru:6 CodeSize:6 Lat:14 SizeLat:6 for: %V4 = call i8 @llvm.vector.reduce.mul.v4i8(<4 x i8> undef)229; AVX2-NEXT:  Cost Model: Found costs of RThru:8 CodeSize:8 Lat:20 SizeLat:8 for: %V8 = call i8 @llvm.vector.reduce.mul.v8i8(<8 x i8> undef)230; AVX2-NEXT:  Cost Model: Found costs of RThru:11 CodeSize:10 Lat:26 SizeLat:10 for: %V16 = call i8 @llvm.vector.reduce.mul.v16i8(<16 x i8> undef)231; AVX2-NEXT:  Cost Model: Found costs of RThru:16 CodeSize:11 Lat:31 SizeLat:12 for: %V32 = call i8 @llvm.vector.reduce.mul.v32i8(<32 x i8> undef)232; AVX2-NEXT:  Cost Model: Found costs of RThru:25 CodeSize:13 Lat:41 SizeLat:16 for: %V64 = call i8 @llvm.vector.reduce.mul.v64i8(<64 x i8> undef)233; AVX2-NEXT:  Cost Model: Found costs of RThru:43 CodeSize:17 Lat:61 SizeLat:24 for: %V128 = call i8 @llvm.vector.reduce.mul.v128i8(<128 x i8> undef)234; AVX2-NEXT:  Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret i32 undef235;236; AVX512F-LABEL: 'reduce_i8'237; AVX512F-NEXT:  Cost Model: Found costs of RThru:4 CodeSize:4 Lat:8 SizeLat:4 for: %V2 = call i8 @llvm.vector.reduce.mul.v2i8(<2 x i8> undef)238; AVX512F-NEXT:  Cost Model: Found costs of RThru:6 CodeSize:6 Lat:16 SizeLat:6 for: %V4 = call i8 @llvm.vector.reduce.mul.v4i8(<4 x i8> undef)239; AVX512F-NEXT:  Cost Model: Found costs of RThru:8 CodeSize:8 Lat:24 SizeLat:8 for: %V8 = call i8 @llvm.vector.reduce.mul.v8i8(<8 x i8> undef)240; AVX512F-NEXT:  Cost Model: Found costs of RThru:10 CodeSize:10 Lat:30 SizeLat:10 for: %V16 = call i8 @llvm.vector.reduce.mul.v16i8(<16 x i8> undef)241; AVX512F-NEXT:  Cost Model: Found costs of RThru:15 CodeSize:12 Lat:36 SizeLat:13 for: %V32 = call i8 @llvm.vector.reduce.mul.v32i8(<32 x i8> undef)242; AVX512F-NEXT:  Cost Model: Found costs of RThru:21 CodeSize:13 Lat:37 SizeLat:14 for: %V64 = call i8 @llvm.vector.reduce.mul.v64i8(<64 x i8> undef)243; AVX512F-NEXT:  Cost Model: Found costs of RThru:32 CodeSize:15 Lat:39 SizeLat:16 for: %V128 = call i8 @llvm.vector.reduce.mul.v128i8(<128 x i8> undef)244; AVX512F-NEXT:  Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret i32 undef245;246; AVX512BW-LABEL: 'reduce_i8'247; AVX512BW-NEXT:  Cost Model: Found costs of RThru:4 CodeSize:4 Lat:8 SizeLat:4 for: %V2 = call i8 @llvm.vector.reduce.mul.v2i8(<2 x i8> undef)248; AVX512BW-NEXT:  Cost Model: Found costs of RThru:6 CodeSize:6 Lat:16 SizeLat:6 for: %V4 = call i8 @llvm.vector.reduce.mul.v4i8(<4 x i8> undef)249; AVX512BW-NEXT:  Cost Model: Found costs of RThru:8 CodeSize:8 Lat:24 SizeLat:8 for: %V8 = call i8 @llvm.vector.reduce.mul.v8i8(<8 x i8> undef)250; AVX512BW-NEXT:  Cost Model: Found costs of RThru:10 CodeSize:10 Lat:30 SizeLat:10 for: %V16 = call i8 @llvm.vector.reduce.mul.v16i8(<16 x i8> undef)251; AVX512BW-NEXT:  Cost Model: Found costs of RThru:13 CodeSize:12 Lat:36 SizeLat:13 for: %V32 = call i8 @llvm.vector.reduce.mul.v32i8(<32 x i8> undef)252; AVX512BW-NEXT:  Cost Model: Found costs of RThru:16 CodeSize:13 Lat:41 SizeLat:14 for: %V64 = call i8 @llvm.vector.reduce.mul.v64i8(<64 x i8> undef)253; AVX512BW-NEXT:  Cost Model: Found costs of RThru:21 CodeSize:15 Lat:51 SizeLat:16 for: %V128 = call i8 @llvm.vector.reduce.mul.v128i8(<128 x i8> undef)254; AVX512BW-NEXT:  Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret i32 undef255;256; AVX512DQ-LABEL: 'reduce_i8'257; AVX512DQ-NEXT:  Cost Model: Found costs of RThru:4 CodeSize:4 Lat:8 SizeLat:4 for: %V2 = call i8 @llvm.vector.reduce.mul.v2i8(<2 x i8> undef)258; AVX512DQ-NEXT:  Cost Model: Found costs of RThru:6 CodeSize:6 Lat:16 SizeLat:6 for: %V4 = call i8 @llvm.vector.reduce.mul.v4i8(<4 x i8> undef)259; AVX512DQ-NEXT:  Cost Model: Found costs of RThru:8 CodeSize:8 Lat:24 SizeLat:8 for: %V8 = call i8 @llvm.vector.reduce.mul.v8i8(<8 x i8> undef)260; AVX512DQ-NEXT:  Cost Model: Found costs of RThru:10 CodeSize:10 Lat:30 SizeLat:10 for: %V16 = call i8 @llvm.vector.reduce.mul.v16i8(<16 x i8> undef)261; AVX512DQ-NEXT:  Cost Model: Found costs of RThru:15 CodeSize:12 Lat:36 SizeLat:13 for: %V32 = call i8 @llvm.vector.reduce.mul.v32i8(<32 x i8> undef)262; AVX512DQ-NEXT:  Cost Model: Found costs of RThru:21 CodeSize:13 Lat:37 SizeLat:14 for: %V64 = call i8 @llvm.vector.reduce.mul.v64i8(<64 x i8> undef)263; AVX512DQ-NEXT:  Cost Model: Found costs of RThru:32 CodeSize:15 Lat:39 SizeLat:16 for: %V128 = call i8 @llvm.vector.reduce.mul.v128i8(<128 x i8> undef)264; AVX512DQ-NEXT:  Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret i32 undef265;266  %V2   = call i8 @llvm.vector.reduce.mul.v2i8(<2 x i8> undef)267  %V4   = call i8 @llvm.vector.reduce.mul.v4i8(<4 x i8> undef)268  %V8   = call i8 @llvm.vector.reduce.mul.v8i8(<8 x i8> undef)269  %V16  = call i8 @llvm.vector.reduce.mul.v16i8(<16 x i8> undef)270  %V32  = call i8 @llvm.vector.reduce.mul.v32i8(<32 x i8> undef)271  %V64  = call i8 @llvm.vector.reduce.mul.v64i8(<64 x i8> undef)272  %V128 = call i8 @llvm.vector.reduce.mul.v128i8(<128 x i8> undef)273  ret i32 undef274}275 276declare i64 @llvm.vector.reduce.mul.v1i64(<1 x i64>)277declare i64 @llvm.vector.reduce.mul.v2i64(<2 x i64>)278declare i64 @llvm.vector.reduce.mul.v4i64(<4 x i64>)279declare i64 @llvm.vector.reduce.mul.v8i64(<8 x i64>)280declare i64 @llvm.vector.reduce.mul.v16i64(<16 x i64>)281 282declare i32 @llvm.vector.reduce.mul.v2i32(<2 x i32>)283declare i32 @llvm.vector.reduce.mul.v4i32(<4 x i32>)284declare i32 @llvm.vector.reduce.mul.v8i32(<8 x i32>)285declare i32 @llvm.vector.reduce.mul.v16i32(<16 x i32>)286declare i32 @llvm.vector.reduce.mul.v32i32(<32 x i32>)287 288declare i16 @llvm.vector.reduce.mul.v2i16(<2 x i16>)289declare i16 @llvm.vector.reduce.mul.v4i16(<4 x i16>)290declare i16 @llvm.vector.reduce.mul.v8i16(<8 x i16>)291declare i16 @llvm.vector.reduce.mul.v16i16(<16 x i16>)292declare i16 @llvm.vector.reduce.mul.v32i16(<32 x i16>)293declare i16 @llvm.vector.reduce.mul.v64i16(<64 x i16>)294 295declare i8 @llvm.vector.reduce.mul.v2i8(<2 x i8>)296declare i8 @llvm.vector.reduce.mul.v4i8(<4 x i8>)297declare i8 @llvm.vector.reduce.mul.v8i8(<8 x i8>)298declare i8 @llvm.vector.reduce.mul.v16i8(<16 x i8>)299declare i8 @llvm.vector.reduce.mul.v32i8(<32 x i8>)300declare i8 @llvm.vector.reduce.mul.v64i8(<64 x i8>)301declare i8 @llvm.vector.reduce.mul.v128i8(<128 x i8>)302