brintos

brintos / llvm-project-archived public Read only

0
0
Text · 27.0 KiB · 9a717e7 Raw
323 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=SSE3; 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=SSE4; 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=SSE5; 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=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=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=AVX512DQ10 11; RUN: opt < %s -passes="print<cost-model>" -mtriple=x86_64-apple-darwin 2>&1 -disable-output -cost-kind=all -mcpu=slm | FileCheck %s --check-prefixes=SLM12 13define i32 @reduce_i64(i32 %arg) {14; SSE-LABEL: 'reduce_i64'15; SSE-NEXT:  Cost Model: Found costs of 0 for: %V1 = call i64 @llvm.vector.reduce.add.v1i64(<1 x i64> undef)16; SSE-NEXT:  Cost Model: Found costs of 2 for: %V2 = call i64 @llvm.vector.reduce.add.v2i64(<2 x i64> undef)17; SSE-NEXT:  Cost Model: Found costs of RThru:3 CodeSize:3 Lat:4 SizeLat:4 for: %V4 = call i64 @llvm.vector.reduce.add.v4i64(<4 x i64> undef)18; SSE-NEXT:  Cost Model: Found costs of RThru:5 CodeSize:5 Lat:8 SizeLat:8 for: %V8 = call i64 @llvm.vector.reduce.add.v8i64(<8 x i64> undef)19; SSE-NEXT:  Cost Model: Found costs of RThru:9 CodeSize:9 Lat:16 SizeLat:16 for: %V16 = call i64 @llvm.vector.reduce.add.v16i64(<16 x i64> undef)20; SSE-NEXT:  Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret i32 undef21;22; AVX1-LABEL: 'reduce_i64'23; AVX1-NEXT:  Cost Model: Found costs of 0 for: %V1 = call i64 @llvm.vector.reduce.add.v1i64(<1 x i64> undef)24; AVX1-NEXT:  Cost Model: Found costs of 1 for: %V2 = call i64 @llvm.vector.reduce.add.v2i64(<2 x i64> undef)25; AVX1-NEXT:  Cost Model: Found costs of 3 for: %V4 = call i64 @llvm.vector.reduce.add.v4i64(<4 x i64> undef)26; AVX1-NEXT:  Cost Model: Found costs of RThru:7 CodeSize:8 Lat:5 SizeLat:9 for: %V8 = call i64 @llvm.vector.reduce.add.v8i64(<8 x i64> undef)27; AVX1-NEXT:  Cost Model: Found costs of RThru:15 CodeSize:18 Lat:9 SizeLat:21 for: %V16 = call i64 @llvm.vector.reduce.add.v16i64(<16 x i64> undef)28; AVX1-NEXT:  Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret i32 undef29;30; AVX2-LABEL: 'reduce_i64'31; AVX2-NEXT:  Cost Model: Found costs of 0 for: %V1 = call i64 @llvm.vector.reduce.add.v1i64(<1 x i64> undef)32; AVX2-NEXT:  Cost Model: Found costs of 1 for: %V2 = call i64 @llvm.vector.reduce.add.v2i64(<2 x i64> undef)33; AVX2-NEXT:  Cost Model: Found costs of 3 for: %V4 = call i64 @llvm.vector.reduce.add.v4i64(<4 x i64> undef)34; AVX2-NEXT:  Cost Model: Found costs of RThru:4 CodeSize:4 Lat:4 SizeLat:5 for: %V8 = call i64 @llvm.vector.reduce.add.v8i64(<8 x i64> undef)35; AVX2-NEXT:  Cost Model: Found costs of RThru:6 CodeSize:6 Lat:6 SizeLat:9 for: %V16 = call i64 @llvm.vector.reduce.add.v16i64(<16 x i64> undef)36; AVX2-NEXT:  Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret i32 undef37;38; AVX512F-LABEL: 'reduce_i64'39; AVX512F-NEXT:  Cost Model: Found costs of 0 for: %V1 = call i64 @llvm.vector.reduce.add.v1i64(<1 x i64> undef)40; AVX512F-NEXT:  Cost Model: Found costs of 1 for: %V2 = call i64 @llvm.vector.reduce.add.v2i64(<2 x i64> undef)41; AVX512F-NEXT:  Cost Model: Found costs of 3 for: %V4 = call i64 @llvm.vector.reduce.add.v4i64(<4 x i64> undef)42; AVX512F-NEXT:  Cost Model: Found costs of RThru:7 CodeSize:7 Lat:9 SizeLat:8 for: %V8 = call i64 @llvm.vector.reduce.add.v8i64(<8 x i64> undef)43; AVX512F-NEXT:  Cost Model: Found costs of RThru:8 CodeSize:8 Lat:10 SizeLat:9 for: %V16 = call i64 @llvm.vector.reduce.add.v16i64(<16 x i64> undef)44; AVX512F-NEXT:  Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret i32 undef45;46; AVX512BW-LABEL: 'reduce_i64'47; AVX512BW-NEXT:  Cost Model: Found costs of 0 for: %V1 = call i64 @llvm.vector.reduce.add.v1i64(<1 x i64> undef)48; AVX512BW-NEXT:  Cost Model: Found costs of 1 for: %V2 = call i64 @llvm.vector.reduce.add.v2i64(<2 x i64> undef)49; AVX512BW-NEXT:  Cost Model: Found costs of 3 for: %V4 = call i64 @llvm.vector.reduce.add.v4i64(<4 x i64> undef)50; AVX512BW-NEXT:  Cost Model: Found costs of RThru:7 CodeSize:7 Lat:9 SizeLat:7 for: %V8 = call i64 @llvm.vector.reduce.add.v8i64(<8 x i64> undef)51; AVX512BW-NEXT:  Cost Model: Found costs of RThru:8 CodeSize:8 Lat:10 SizeLat:8 for: %V16 = call i64 @llvm.vector.reduce.add.v16i64(<16 x i64> undef)52; AVX512BW-NEXT:  Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret i32 undef53;54; AVX512DQ-LABEL: 'reduce_i64'55; AVX512DQ-NEXT:  Cost Model: Found costs of 0 for: %V1 = call i64 @llvm.vector.reduce.add.v1i64(<1 x i64> undef)56; AVX512DQ-NEXT:  Cost Model: Found costs of 1 for: %V2 = call i64 @llvm.vector.reduce.add.v2i64(<2 x i64> undef)57; AVX512DQ-NEXT:  Cost Model: Found costs of 3 for: %V4 = call i64 @llvm.vector.reduce.add.v4i64(<4 x i64> undef)58; AVX512DQ-NEXT:  Cost Model: Found costs of RThru:7 CodeSize:7 Lat:9 SizeLat:8 for: %V8 = call i64 @llvm.vector.reduce.add.v8i64(<8 x i64> undef)59; AVX512DQ-NEXT:  Cost Model: Found costs of RThru:8 CodeSize:8 Lat:10 SizeLat:9 for: %V16 = call i64 @llvm.vector.reduce.add.v16i64(<16 x i64> undef)60; AVX512DQ-NEXT:  Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret i32 undef61;62; SLM-LABEL: 'reduce_i64'63; SLM-NEXT:  Cost Model: Found costs of 0 for: %V1 = call i64 @llvm.vector.reduce.add.v1i64(<1 x i64> undef)64; SLM-NEXT:  Cost Model: Found costs of 5 for: %V2 = call i64 @llvm.vector.reduce.add.v2i64(<2 x i64> undef)65; SLM-NEXT:  Cost Model: Found costs of RThru:9 CodeSize:6 Lat:7 SizeLat:7 for: %V4 = call i64 @llvm.vector.reduce.add.v4i64(<4 x i64> undef)66; SLM-NEXT:  Cost Model: Found costs of RThru:17 CodeSize:8 Lat:11 SizeLat:11 for: %V8 = call i64 @llvm.vector.reduce.add.v8i64(<8 x i64> undef)67; SLM-NEXT:  Cost Model: Found costs of RThru:33 CodeSize:12 Lat:19 SizeLat:19 for: %V16 = call i64 @llvm.vector.reduce.add.v16i64(<16 x i64> undef)68; SLM-NEXT:  Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret i32 undef69;70  %V1  = call i64 @llvm.vector.reduce.add.v1i64(<1 x i64> undef)71  %V2  = call i64 @llvm.vector.reduce.add.v2i64(<2 x i64> undef)72  %V4  = call i64 @llvm.vector.reduce.add.v4i64(<4 x i64> undef)73  %V8  = call i64 @llvm.vector.reduce.add.v8i64(<8 x i64> undef)74  %V16 = call i64 @llvm.vector.reduce.add.v16i64(<16 x i64> undef)75  ret i32 undef76}77 78define i32 @reduce_i32(i32 %arg) {79; SSE-LABEL: 'reduce_i32'80; SSE-NEXT:  Cost Model: Found costs of 2 for: %V2 = call i32 @llvm.vector.reduce.add.v2i32(<2 x i32> undef)81; SSE-NEXT:  Cost Model: Found costs of 3 for: %V4 = call i32 @llvm.vector.reduce.add.v4i32(<4 x i32> undef)82; SSE-NEXT:  Cost Model: Found costs of 4 for: %V8 = call i32 @llvm.vector.reduce.add.v8i32(<8 x i32> undef)83; SSE-NEXT:  Cost Model: Found costs of 6 for: %V16 = call i32 @llvm.vector.reduce.add.v16i32(<16 x i32> undef)84; SSE-NEXT:  Cost Model: Found costs of 10 for: %V32 = call i32 @llvm.vector.reduce.add.v32i32(<32 x i32> undef)85; SSE-NEXT:  Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret i32 undef86;87; AVX1-LABEL: 'reduce_i32'88; AVX1-NEXT:  Cost Model: Found costs of 2 for: %V2 = call i32 @llvm.vector.reduce.add.v2i32(<2 x i32> undef)89; AVX1-NEXT:  Cost Model: Found costs of 3 for: %V4 = call i32 @llvm.vector.reduce.add.v4i32(<4 x i32> undef)90; AVX1-NEXT:  Cost Model: Found costs of 5 for: %V8 = call i32 @llvm.vector.reduce.add.v8i32(<8 x i32> undef)91; AVX1-NEXT:  Cost Model: Found costs of RThru:9 CodeSize:10 Lat:7 SizeLat:11 for: %V16 = call i32 @llvm.vector.reduce.add.v16i32(<16 x i32> undef)92; AVX1-NEXT:  Cost Model: Found costs of RThru:17 CodeSize:20 Lat:11 SizeLat:23 for: %V32 = call i32 @llvm.vector.reduce.add.v32i32(<32 x i32> undef)93; AVX1-NEXT:  Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret i32 undef94;95; AVX2-LABEL: 'reduce_i32'96; AVX2-NEXT:  Cost Model: Found costs of 2 for: %V2 = call i32 @llvm.vector.reduce.add.v2i32(<2 x i32> undef)97; AVX2-NEXT:  Cost Model: Found costs of 3 for: %V4 = call i32 @llvm.vector.reduce.add.v4i32(<4 x i32> undef)98; AVX2-NEXT:  Cost Model: Found costs of 5 for: %V8 = call i32 @llvm.vector.reduce.add.v8i32(<8 x i32> undef)99; AVX2-NEXT:  Cost Model: Found costs of RThru:6 CodeSize:6 Lat:6 SizeLat:7 for: %V16 = call i32 @llvm.vector.reduce.add.v16i32(<16 x i32> undef)100; AVX2-NEXT:  Cost Model: Found costs of RThru:8 CodeSize:8 Lat:8 SizeLat:11 for: %V32 = call i32 @llvm.vector.reduce.add.v32i32(<32 x i32> undef)101; AVX2-NEXT:  Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret i32 undef102;103; AVX512F-LABEL: 'reduce_i32'104; AVX512F-NEXT:  Cost Model: Found costs of 2 for: %V2 = call i32 @llvm.vector.reduce.add.v2i32(<2 x i32> undef)105; AVX512F-NEXT:  Cost Model: Found costs of 3 for: %V4 = call i32 @llvm.vector.reduce.add.v4i32(<4 x i32> undef)106; AVX512F-NEXT:  Cost Model: Found costs of 5 for: %V8 = call i32 @llvm.vector.reduce.add.v8i32(<8 x i32> undef)107; AVX512F-NEXT:  Cost Model: Found costs of RThru:9 CodeSize:9 Lat:13 SizeLat:10 for: %V16 = call i32 @llvm.vector.reduce.add.v16i32(<16 x i32> undef)108; AVX512F-NEXT:  Cost Model: Found costs of RThru:10 CodeSize:10 Lat:14 SizeLat:11 for: %V32 = call i32 @llvm.vector.reduce.add.v32i32(<32 x i32> undef)109; AVX512F-NEXT:  Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret i32 undef110;111; AVX512BW-LABEL: 'reduce_i32'112; AVX512BW-NEXT:  Cost Model: Found costs of 2 for: %V2 = call i32 @llvm.vector.reduce.add.v2i32(<2 x i32> undef)113; AVX512BW-NEXT:  Cost Model: Found costs of 3 for: %V4 = call i32 @llvm.vector.reduce.add.v4i32(<4 x i32> undef)114; AVX512BW-NEXT:  Cost Model: Found costs of 5 for: %V8 = call i32 @llvm.vector.reduce.add.v8i32(<8 x i32> undef)115; AVX512BW-NEXT:  Cost Model: Found costs of RThru:9 CodeSize:9 Lat:13 SizeLat:9 for: %V16 = call i32 @llvm.vector.reduce.add.v16i32(<16 x i32> undef)116; AVX512BW-NEXT:  Cost Model: Found costs of RThru:10 CodeSize:10 Lat:14 SizeLat:10 for: %V32 = call i32 @llvm.vector.reduce.add.v32i32(<32 x i32> undef)117; AVX512BW-NEXT:  Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret i32 undef118;119; AVX512DQ-LABEL: 'reduce_i32'120; AVX512DQ-NEXT:  Cost Model: Found costs of 2 for: %V2 = call i32 @llvm.vector.reduce.add.v2i32(<2 x i32> undef)121; AVX512DQ-NEXT:  Cost Model: Found costs of 3 for: %V4 = call i32 @llvm.vector.reduce.add.v4i32(<4 x i32> undef)122; AVX512DQ-NEXT:  Cost Model: Found costs of 5 for: %V8 = call i32 @llvm.vector.reduce.add.v8i32(<8 x i32> undef)123; AVX512DQ-NEXT:  Cost Model: Found costs of RThru:9 CodeSize:9 Lat:13 SizeLat:10 for: %V16 = call i32 @llvm.vector.reduce.add.v16i32(<16 x i32> undef)124; AVX512DQ-NEXT:  Cost Model: Found costs of RThru:10 CodeSize:10 Lat:14 SizeLat:11 for: %V32 = call i32 @llvm.vector.reduce.add.v32i32(<32 x i32> undef)125; AVX512DQ-NEXT:  Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret i32 undef126;127; SLM-LABEL: 'reduce_i32'128; SLM-NEXT:  Cost Model: Found costs of 2 for: %V2 = call i32 @llvm.vector.reduce.add.v2i32(<2 x i32> undef)129; SLM-NEXT:  Cost Model: Found costs of 3 for: %V4 = call i32 @llvm.vector.reduce.add.v4i32(<4 x i32> undef)130; SLM-NEXT:  Cost Model: Found costs of 4 for: %V8 = call i32 @llvm.vector.reduce.add.v8i32(<8 x i32> undef)131; SLM-NEXT:  Cost Model: Found costs of 6 for: %V16 = call i32 @llvm.vector.reduce.add.v16i32(<16 x i32> undef)132; SLM-NEXT:  Cost Model: Found costs of 10 for: %V32 = call i32 @llvm.vector.reduce.add.v32i32(<32 x i32> undef)133; SLM-NEXT:  Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret i32 undef134;135  %V2  = call i32 @llvm.vector.reduce.add.v2i32(<2 x i32> undef)136  %V4  = call i32 @llvm.vector.reduce.add.v4i32(<4 x i32> undef)137  %V8  = call i32 @llvm.vector.reduce.add.v8i32(<8 x i32> undef)138  %V16 = call i32 @llvm.vector.reduce.add.v16i32(<16 x i32> undef)139  %V32 = call i32 @llvm.vector.reduce.add.v32i32(<32 x i32> undef)140  ret i32 undef141}142 143define i32 @reduce_i16(i32 %arg) {144; SSE-LABEL: 'reduce_i16'145; SSE-NEXT:  Cost Model: Found costs of 2 for: %V2 = call i16 @llvm.vector.reduce.add.v2i16(<2 x i16> undef)146; SSE-NEXT:  Cost Model: Found costs of 3 for: %V4 = call i16 @llvm.vector.reduce.add.v4i16(<4 x i16> undef)147; SSE-NEXT:  Cost Model: Found costs of 4 for: %V8 = call i16 @llvm.vector.reduce.add.v8i16(<8 x i16> undef)148; SSE-NEXT:  Cost Model: Found costs of 5 for: %V16 = call i16 @llvm.vector.reduce.add.v16i16(<16 x i16> undef)149; SSE-NEXT:  Cost Model: Found costs of 7 for: %V32 = call i16 @llvm.vector.reduce.add.v32i16(<32 x i16> undef)150; SSE-NEXT:  Cost Model: Found costs of 11 for: %V64 = call i16 @llvm.vector.reduce.add.v64i16(<64 x i16> undef)151; SSE-NEXT:  Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret i32 undef152;153; AVX1-LABEL: 'reduce_i16'154; AVX1-NEXT:  Cost Model: Found costs of 2 for: %V2 = call i16 @llvm.vector.reduce.add.v2i16(<2 x i16> undef)155; AVX1-NEXT:  Cost Model: Found costs of 3 for: %V4 = call i16 @llvm.vector.reduce.add.v4i16(<4 x i16> undef)156; AVX1-NEXT:  Cost Model: Found costs of 4 for: %V8 = call i16 @llvm.vector.reduce.add.v8i16(<8 x i16> undef)157; AVX1-NEXT:  Cost Model: Found costs of 5 for: %V16 = call i16 @llvm.vector.reduce.add.v16i16(<16 x i16> undef)158; AVX1-NEXT:  Cost Model: Found costs of RThru:9 CodeSize:10 Lat:7 SizeLat:11 for: %V32 = call i16 @llvm.vector.reduce.add.v32i16(<32 x i16> undef)159; AVX1-NEXT:  Cost Model: Found costs of RThru:17 CodeSize:20 Lat:11 SizeLat:23 for: %V64 = call i16 @llvm.vector.reduce.add.v64i16(<64 x i16> undef)160; AVX1-NEXT:  Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret i32 undef161;162; AVX2-LABEL: 'reduce_i16'163; AVX2-NEXT:  Cost Model: Found costs of 2 for: %V2 = call i16 @llvm.vector.reduce.add.v2i16(<2 x i16> undef)164; AVX2-NEXT:  Cost Model: Found costs of 3 for: %V4 = call i16 @llvm.vector.reduce.add.v4i16(<4 x i16> undef)165; AVX2-NEXT:  Cost Model: Found costs of 4 for: %V8 = call i16 @llvm.vector.reduce.add.v8i16(<8 x i16> undef)166; AVX2-NEXT:  Cost Model: Found costs of 5 for: %V16 = call i16 @llvm.vector.reduce.add.v16i16(<16 x i16> undef)167; AVX2-NEXT:  Cost Model: Found costs of RThru:6 CodeSize:6 Lat:6 SizeLat:7 for: %V32 = call i16 @llvm.vector.reduce.add.v32i16(<32 x i16> undef)168; AVX2-NEXT:  Cost Model: Found costs of RThru:8 CodeSize:8 Lat:8 SizeLat:11 for: %V64 = call i16 @llvm.vector.reduce.add.v64i16(<64 x i16> undef)169; AVX2-NEXT:  Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret i32 undef170;171; AVX512F-LABEL: 'reduce_i16'172; AVX512F-NEXT:  Cost Model: Found costs of 2 for: %V2 = call i16 @llvm.vector.reduce.add.v2i16(<2 x i16> undef)173; AVX512F-NEXT:  Cost Model: Found costs of 3 for: %V4 = call i16 @llvm.vector.reduce.add.v4i16(<4 x i16> undef)174; AVX512F-NEXT:  Cost Model: Found costs of 4 for: %V8 = call i16 @llvm.vector.reduce.add.v8i16(<8 x i16> undef)175; AVX512F-NEXT:  Cost Model: Found costs of 5 for: %V16 = call i16 @llvm.vector.reduce.add.v16i16(<16 x i16> undef)176; AVX512F-NEXT:  Cost Model: Found costs of RThru:11 CodeSize:11 Lat:15 SizeLat:12 for: %V32 = call i16 @llvm.vector.reduce.add.v32i16(<32 x i16> undef)177; AVX512F-NEXT:  Cost Model: Found costs of RThru:14 CodeSize:16 Lat:22 SizeLat:17 for: %V64 = call i16 @llvm.vector.reduce.add.v64i16(<64 x i16> undef)178; AVX512F-NEXT:  Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret i32 undef179;180; AVX512BW-LABEL: 'reduce_i16'181; AVX512BW-NEXT:  Cost Model: Found costs of 2 for: %V2 = call i16 @llvm.vector.reduce.add.v2i16(<2 x i16> undef)182; AVX512BW-NEXT:  Cost Model: Found costs of 3 for: %V4 = call i16 @llvm.vector.reduce.add.v4i16(<4 x i16> undef)183; AVX512BW-NEXT:  Cost Model: Found costs of 4 for: %V8 = call i16 @llvm.vector.reduce.add.v8i16(<8 x i16> undef)184; AVX512BW-NEXT:  Cost Model: Found costs of 5 for: %V16 = call i16 @llvm.vector.reduce.add.v16i16(<16 x i16> undef)185; AVX512BW-NEXT:  Cost Model: Found costs of RThru:11 CodeSize:11 Lat:15 SizeLat:11 for: %V32 = call i16 @llvm.vector.reduce.add.v32i16(<32 x i16> undef)186; AVX512BW-NEXT:  Cost Model: Found costs of RThru:12 CodeSize:12 Lat:16 SizeLat:12 for: %V64 = call i16 @llvm.vector.reduce.add.v64i16(<64 x i16> undef)187; AVX512BW-NEXT:  Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret i32 undef188;189; AVX512DQ-LABEL: 'reduce_i16'190; AVX512DQ-NEXT:  Cost Model: Found costs of 2 for: %V2 = call i16 @llvm.vector.reduce.add.v2i16(<2 x i16> undef)191; AVX512DQ-NEXT:  Cost Model: Found costs of 3 for: %V4 = call i16 @llvm.vector.reduce.add.v4i16(<4 x i16> undef)192; AVX512DQ-NEXT:  Cost Model: Found costs of 4 for: %V8 = call i16 @llvm.vector.reduce.add.v8i16(<8 x i16> undef)193; AVX512DQ-NEXT:  Cost Model: Found costs of 5 for: %V16 = call i16 @llvm.vector.reduce.add.v16i16(<16 x i16> undef)194; AVX512DQ-NEXT:  Cost Model: Found costs of RThru:11 CodeSize:11 Lat:15 SizeLat:12 for: %V32 = call i16 @llvm.vector.reduce.add.v32i16(<32 x i16> undef)195; AVX512DQ-NEXT:  Cost Model: Found costs of RThru:14 CodeSize:16 Lat:22 SizeLat:17 for: %V64 = call i16 @llvm.vector.reduce.add.v64i16(<64 x i16> undef)196; AVX512DQ-NEXT:  Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret i32 undef197;198; SLM-LABEL: 'reduce_i16'199; SLM-NEXT:  Cost Model: Found costs of 2 for: %V2 = call i16 @llvm.vector.reduce.add.v2i16(<2 x i16> undef)200; SLM-NEXT:  Cost Model: Found costs of 3 for: %V4 = call i16 @llvm.vector.reduce.add.v4i16(<4 x i16> undef)201; SLM-NEXT:  Cost Model: Found costs of 4 for: %V8 = call i16 @llvm.vector.reduce.add.v8i16(<8 x i16> undef)202; SLM-NEXT:  Cost Model: Found costs of 5 for: %V16 = call i16 @llvm.vector.reduce.add.v16i16(<16 x i16> undef)203; SLM-NEXT:  Cost Model: Found costs of 7 for: %V32 = call i16 @llvm.vector.reduce.add.v32i16(<32 x i16> undef)204; SLM-NEXT:  Cost Model: Found costs of 11 for: %V64 = call i16 @llvm.vector.reduce.add.v64i16(<64 x i16> undef)205; SLM-NEXT:  Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret i32 undef206;207  %V2  = call i16 @llvm.vector.reduce.add.v2i16(<2 x i16> undef)208  %V4  = call i16 @llvm.vector.reduce.add.v4i16(<4 x i16> undef)209  %V8  = call i16 @llvm.vector.reduce.add.v8i16(<8 x i16> undef)210  %V16 = call i16 @llvm.vector.reduce.add.v16i16(<16 x i16> undef)211  %V32 = call i16 @llvm.vector.reduce.add.v32i16(<32 x i16> undef)212  %V64 = call i16 @llvm.vector.reduce.add.v64i16(<64 x i16> undef)213  ret i32 undef214}215 216define i32 @reduce_i8(i32 %arg) {217; SSE-LABEL: 'reduce_i8'218; SSE-NEXT:  Cost Model: Found costs of 2 for: %V2 = call i8 @llvm.vector.reduce.add.v2i8(<2 x i8> undef)219; SSE-NEXT:  Cost Model: Found costs of 2 for: %V4 = call i8 @llvm.vector.reduce.add.v4i8(<4 x i8> undef)220; SSE-NEXT:  Cost Model: Found costs of 2 for: %V8 = call i8 @llvm.vector.reduce.add.v8i8(<8 x i8> undef)221; SSE-NEXT:  Cost Model: Found costs of 3 for: %V16 = call i8 @llvm.vector.reduce.add.v16i8(<16 x i8> undef)222; SSE-NEXT:  Cost Model: Found costs of 4 for: %V32 = call i8 @llvm.vector.reduce.add.v32i8(<32 x i8> undef)223; SSE-NEXT:  Cost Model: Found costs of 6 for: %V64 = call i8 @llvm.vector.reduce.add.v64i8(<64 x i8> undef)224; SSE-NEXT:  Cost Model: Found costs of 10 for: %V128 = call i8 @llvm.vector.reduce.add.v128i8(<128 x i8> undef)225; SSE-NEXT:  Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret i32 undef226;227; AVX1-LABEL: 'reduce_i8'228; AVX1-NEXT:  Cost Model: Found costs of 2 for: %V2 = call i8 @llvm.vector.reduce.add.v2i8(<2 x i8> undef)229; AVX1-NEXT:  Cost Model: Found costs of 2 for: %V4 = call i8 @llvm.vector.reduce.add.v4i8(<4 x i8> undef)230; AVX1-NEXT:  Cost Model: Found costs of 2 for: %V8 = call i8 @llvm.vector.reduce.add.v8i8(<8 x i8> undef)231; AVX1-NEXT:  Cost Model: Found costs of 3 for: %V16 = call i8 @llvm.vector.reduce.add.v16i8(<16 x i8> undef)232; AVX1-NEXT:  Cost Model: Found costs of 4 for: %V32 = call i8 @llvm.vector.reduce.add.v32i8(<32 x i8> undef)233; AVX1-NEXT:  Cost Model: Found costs of RThru:8 CodeSize:9 Lat:6 SizeLat:10 for: %V64 = call i8 @llvm.vector.reduce.add.v64i8(<64 x i8> undef)234; AVX1-NEXT:  Cost Model: Found costs of RThru:16 CodeSize:19 Lat:10 SizeLat:22 for: %V128 = call i8 @llvm.vector.reduce.add.v128i8(<128 x i8> undef)235; AVX1-NEXT:  Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret i32 undef236;237; AVX2-LABEL: 'reduce_i8'238; AVX2-NEXT:  Cost Model: Found costs of 2 for: %V2 = call i8 @llvm.vector.reduce.add.v2i8(<2 x i8> undef)239; AVX2-NEXT:  Cost Model: Found costs of 2 for: %V4 = call i8 @llvm.vector.reduce.add.v4i8(<4 x i8> undef)240; AVX2-NEXT:  Cost Model: Found costs of 2 for: %V8 = call i8 @llvm.vector.reduce.add.v8i8(<8 x i8> undef)241; AVX2-NEXT:  Cost Model: Found costs of 3 for: %V16 = call i8 @llvm.vector.reduce.add.v16i8(<16 x i8> undef)242; AVX2-NEXT:  Cost Model: Found costs of 4 for: %V32 = call i8 @llvm.vector.reduce.add.v32i8(<32 x i8> undef)243; AVX2-NEXT:  Cost Model: Found costs of RThru:5 CodeSize:5 Lat:5 SizeLat:6 for: %V64 = call i8 @llvm.vector.reduce.add.v64i8(<64 x i8> undef)244; AVX2-NEXT:  Cost Model: Found costs of RThru:7 CodeSize:7 Lat:7 SizeLat:10 for: %V128 = call i8 @llvm.vector.reduce.add.v128i8(<128 x i8> undef)245; AVX2-NEXT:  Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret i32 undef246;247; AVX512F-LABEL: 'reduce_i8'248; AVX512F-NEXT:  Cost Model: Found costs of 2 for: %V2 = call i8 @llvm.vector.reduce.add.v2i8(<2 x i8> undef)249; AVX512F-NEXT:  Cost Model: Found costs of 2 for: %V4 = call i8 @llvm.vector.reduce.add.v4i8(<4 x i8> undef)250; AVX512F-NEXT:  Cost Model: Found costs of 2 for: %V8 = call i8 @llvm.vector.reduce.add.v8i8(<8 x i8> undef)251; AVX512F-NEXT:  Cost Model: Found costs of 3 for: %V16 = call i8 @llvm.vector.reduce.add.v16i8(<16 x i8> undef)252; AVX512F-NEXT:  Cost Model: Found costs of 4 for: %V32 = call i8 @llvm.vector.reduce.add.v32i8(<32 x i8> undef)253; AVX512F-NEXT:  Cost Model: Found costs of RThru:13 CodeSize:13 Lat:17 SizeLat:14 for: %V64 = call i8 @llvm.vector.reduce.add.v64i8(<64 x i8> undef)254; AVX512F-NEXT:  Cost Model: Found costs of RThru:16 CodeSize:18 Lat:24 SizeLat:19 for: %V128 = call i8 @llvm.vector.reduce.add.v128i8(<128 x i8> undef)255; AVX512F-NEXT:  Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret i32 undef256;257; AVX512BW-LABEL: 'reduce_i8'258; AVX512BW-NEXT:  Cost Model: Found costs of 2 for: %V2 = call i8 @llvm.vector.reduce.add.v2i8(<2 x i8> undef)259; AVX512BW-NEXT:  Cost Model: Found costs of 2 for: %V4 = call i8 @llvm.vector.reduce.add.v4i8(<4 x i8> undef)260; AVX512BW-NEXT:  Cost Model: Found costs of 2 for: %V8 = call i8 @llvm.vector.reduce.add.v8i8(<8 x i8> undef)261; AVX512BW-NEXT:  Cost Model: Found costs of 3 for: %V16 = call i8 @llvm.vector.reduce.add.v16i8(<16 x i8> undef)262; AVX512BW-NEXT:  Cost Model: Found costs of 4 for: %V32 = call i8 @llvm.vector.reduce.add.v32i8(<32 x i8> undef)263; AVX512BW-NEXT:  Cost Model: Found costs of RThru:13 CodeSize:13 Lat:17 SizeLat:13 for: %V64 = call i8 @llvm.vector.reduce.add.v64i8(<64 x i8> undef)264; AVX512BW-NEXT:  Cost Model: Found costs of RThru:14 CodeSize:14 Lat:18 SizeLat:14 for: %V128 = call i8 @llvm.vector.reduce.add.v128i8(<128 x i8> undef)265; AVX512BW-NEXT:  Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret i32 undef266;267; AVX512DQ-LABEL: 'reduce_i8'268; AVX512DQ-NEXT:  Cost Model: Found costs of 2 for: %V2 = call i8 @llvm.vector.reduce.add.v2i8(<2 x i8> undef)269; AVX512DQ-NEXT:  Cost Model: Found costs of 2 for: %V4 = call i8 @llvm.vector.reduce.add.v4i8(<4 x i8> undef)270; AVX512DQ-NEXT:  Cost Model: Found costs of 2 for: %V8 = call i8 @llvm.vector.reduce.add.v8i8(<8 x i8> undef)271; AVX512DQ-NEXT:  Cost Model: Found costs of 3 for: %V16 = call i8 @llvm.vector.reduce.add.v16i8(<16 x i8> undef)272; AVX512DQ-NEXT:  Cost Model: Found costs of 4 for: %V32 = call i8 @llvm.vector.reduce.add.v32i8(<32 x i8> undef)273; AVX512DQ-NEXT:  Cost Model: Found costs of RThru:13 CodeSize:13 Lat:17 SizeLat:14 for: %V64 = call i8 @llvm.vector.reduce.add.v64i8(<64 x i8> undef)274; AVX512DQ-NEXT:  Cost Model: Found costs of RThru:16 CodeSize:18 Lat:24 SizeLat:19 for: %V128 = call i8 @llvm.vector.reduce.add.v128i8(<128 x i8> undef)275; AVX512DQ-NEXT:  Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret i32 undef276;277; SLM-LABEL: 'reduce_i8'278; SLM-NEXT:  Cost Model: Found costs of 2 for: %V2 = call i8 @llvm.vector.reduce.add.v2i8(<2 x i8> undef)279; SLM-NEXT:  Cost Model: Found costs of 2 for: %V4 = call i8 @llvm.vector.reduce.add.v4i8(<4 x i8> undef)280; SLM-NEXT:  Cost Model: Found costs of 2 for: %V8 = call i8 @llvm.vector.reduce.add.v8i8(<8 x i8> undef)281; SLM-NEXT:  Cost Model: Found costs of 3 for: %V16 = call i8 @llvm.vector.reduce.add.v16i8(<16 x i8> undef)282; SLM-NEXT:  Cost Model: Found costs of 4 for: %V32 = call i8 @llvm.vector.reduce.add.v32i8(<32 x i8> undef)283; SLM-NEXT:  Cost Model: Found costs of 6 for: %V64 = call i8 @llvm.vector.reduce.add.v64i8(<64 x i8> undef)284; SLM-NEXT:  Cost Model: Found costs of 10 for: %V128 = call i8 @llvm.vector.reduce.add.v128i8(<128 x i8> undef)285; SLM-NEXT:  Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret i32 undef286;287  %V2   = call i8 @llvm.vector.reduce.add.v2i8(<2 x i8> undef)288  %V4   = call i8 @llvm.vector.reduce.add.v4i8(<4 x i8> undef)289  %V8   = call i8 @llvm.vector.reduce.add.v8i8(<8 x i8> undef)290  %V16  = call i8 @llvm.vector.reduce.add.v16i8(<16 x i8> undef)291  %V32  = call i8 @llvm.vector.reduce.add.v32i8(<32 x i8> undef)292  %V64  = call i8 @llvm.vector.reduce.add.v64i8(<64 x i8> undef)293  %V128 = call i8 @llvm.vector.reduce.add.v128i8(<128 x i8> undef)294  ret i32 undef295}296 297declare i64 @llvm.vector.reduce.add.v1i64(<1 x i64>)298declare i64 @llvm.vector.reduce.add.v2i64(<2 x i64>)299declare i64 @llvm.vector.reduce.add.v4i64(<4 x i64>)300declare i64 @llvm.vector.reduce.add.v8i64(<8 x i64>)301declare i64 @llvm.vector.reduce.add.v16i64(<16 x i64>)302 303declare i32 @llvm.vector.reduce.add.v2i32(<2 x i32>)304declare i32 @llvm.vector.reduce.add.v4i32(<4 x i32>)305declare i32 @llvm.vector.reduce.add.v8i32(<8 x i32>)306declare i32 @llvm.vector.reduce.add.v16i32(<16 x i32>)307declare i32 @llvm.vector.reduce.add.v32i32(<32 x i32>)308 309declare i16 @llvm.vector.reduce.add.v2i16(<2 x i16>)310declare i16 @llvm.vector.reduce.add.v4i16(<4 x i16>)311declare i16 @llvm.vector.reduce.add.v8i16(<8 x i16>)312declare i16 @llvm.vector.reduce.add.v16i16(<16 x i16>)313declare i16 @llvm.vector.reduce.add.v32i16(<32 x i16>)314declare i16 @llvm.vector.reduce.add.v64i16(<64 x i16>)315 316declare i8 @llvm.vector.reduce.add.v2i8(<2 x i8>)317declare i8 @llvm.vector.reduce.add.v4i8(<4 x i8>)318declare i8 @llvm.vector.reduce.add.v8i8(<8 x i8>)319declare i8 @llvm.vector.reduce.add.v16i8(<16 x i8>)320declare i8 @llvm.vector.reduce.add.v32i8(<32 x i8>)321declare i8 @llvm.vector.reduce.add.v64i8(<64 x i8>)322declare i8 @llvm.vector.reduce.add.v128i8(<128 x i8>)323