brintos

brintos / llvm-project-archived public Read only

0
0
Text · 82.6 KiB · 131e89f Raw
1542 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_analyze_test_checks.py2; RUN: opt < %s -mtriple=riscv32 -mattr=+v -passes="print<cost-model>" -cost-kind=throughput 2>&1 -disable-output | FileCheck %s3; RUN: opt < %s -mtriple=riscv64 -mattr=+v -passes="print<cost-model>" -cost-kind=throughput 2>&1 -disable-output | FileCheck %s4; RUN: opt < %s -mtriple=riscv32 -mattr=+v -passes="print<cost-model>" -cost-kind=code-size 2>&1 -disable-output | FileCheck %s --check-prefix=SIZE5; RUN: opt < %s -mtriple=riscv64 -mattr=+v -passes="print<cost-model>" -cost-kind=code-size 2>&1 -disable-output | FileCheck %s --check-prefix=SIZE6 7define signext i8 @vreduce_add_nxv1i8(<vscale x 1 x i8> %v) {8; CHECK-LABEL: 'vreduce_add_nxv1i8'9; CHECK-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %red = call i8 @llvm.vector.reduce.add.nxv1i8(<vscale x 1 x i8> %v)10; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret i8 %red11;12; SIZE-LABEL: 'vreduce_add_nxv1i8'13; SIZE-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %red = call i8 @llvm.vector.reduce.add.nxv1i8(<vscale x 1 x i8> %v)14; SIZE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret i8 %red15;16  %red = call i8 @llvm.vector.reduce.add.nxv1i8(<vscale x 1 x i8> %v)17  ret i8 %red18}19 20define signext i8 @vreduce_umax_nxv1i8(<vscale x 1 x i8> %v) {21; CHECK-LABEL: 'vreduce_umax_nxv1i8'22; CHECK-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %red = call i8 @llvm.vector.reduce.umax.nxv1i8(<vscale x 1 x i8> %v)23; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret i8 %red24;25; SIZE-LABEL: 'vreduce_umax_nxv1i8'26; SIZE-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %red = call i8 @llvm.vector.reduce.umax.nxv1i8(<vscale x 1 x i8> %v)27; SIZE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret i8 %red28;29  %red = call i8 @llvm.vector.reduce.umax.nxv1i8(<vscale x 1 x i8> %v)30  ret i8 %red31}32 33define signext i8 @vreduce_smax_nxv1i8(<vscale x 1 x i8> %v) {34; CHECK-LABEL: 'vreduce_smax_nxv1i8'35; CHECK-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %red = call i8 @llvm.vector.reduce.smax.nxv1i8(<vscale x 1 x i8> %v)36; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret i8 %red37;38; SIZE-LABEL: 'vreduce_smax_nxv1i8'39; SIZE-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %red = call i8 @llvm.vector.reduce.smax.nxv1i8(<vscale x 1 x i8> %v)40; SIZE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret i8 %red41;42  %red = call i8 @llvm.vector.reduce.smax.nxv1i8(<vscale x 1 x i8> %v)43  ret i8 %red44}45 46define signext i8 @vreduce_umin_nxv1i8(<vscale x 1 x i8> %v) {47; CHECK-LABEL: 'vreduce_umin_nxv1i8'48; CHECK-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %red = call i8 @llvm.vector.reduce.umin.nxv1i8(<vscale x 1 x i8> %v)49; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret i8 %red50;51; SIZE-LABEL: 'vreduce_umin_nxv1i8'52; SIZE-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %red = call i8 @llvm.vector.reduce.umin.nxv1i8(<vscale x 1 x i8> %v)53; SIZE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret i8 %red54;55  %red = call i8 @llvm.vector.reduce.umin.nxv1i8(<vscale x 1 x i8> %v)56  ret i8 %red57}58 59define signext i8 @vreduce_smin_nxv1i8(<vscale x 1 x i8> %v) {60; CHECK-LABEL: 'vreduce_smin_nxv1i8'61; CHECK-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %red = call i8 @llvm.vector.reduce.smin.nxv1i8(<vscale x 1 x i8> %v)62; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret i8 %red63;64; SIZE-LABEL: 'vreduce_smin_nxv1i8'65; SIZE-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %red = call i8 @llvm.vector.reduce.smin.nxv1i8(<vscale x 1 x i8> %v)66; SIZE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret i8 %red67;68  %red = call i8 @llvm.vector.reduce.smin.nxv1i8(<vscale x 1 x i8> %v)69  ret i8 %red70}71 72define signext i8 @vreduce_and_nxv1i8(<vscale x 1 x i8> %v) {73; CHECK-LABEL: 'vreduce_and_nxv1i8'74; CHECK-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %red = call i8 @llvm.vector.reduce.and.nxv1i8(<vscale x 1 x i8> %v)75; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret i8 %red76;77; SIZE-LABEL: 'vreduce_and_nxv1i8'78; SIZE-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %red = call i8 @llvm.vector.reduce.and.nxv1i8(<vscale x 1 x i8> %v)79; SIZE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret i8 %red80;81  %red = call i8 @llvm.vector.reduce.and.nxv1i8(<vscale x 1 x i8> %v)82  ret i8 %red83}84 85define signext i8 @vreduce_or_nxv1i8(<vscale x 1 x i8> %v) {86; CHECK-LABEL: 'vreduce_or_nxv1i8'87; CHECK-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %red = call i8 @llvm.vector.reduce.or.nxv1i8(<vscale x 1 x i8> %v)88; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret i8 %red89;90; SIZE-LABEL: 'vreduce_or_nxv1i8'91; SIZE-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %red = call i8 @llvm.vector.reduce.or.nxv1i8(<vscale x 1 x i8> %v)92; SIZE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret i8 %red93;94  %red = call i8 @llvm.vector.reduce.or.nxv1i8(<vscale x 1 x i8> %v)95  ret i8 %red96}97 98define signext i8 @vreduce_xor_nxv1i8(<vscale x 1 x i8> %v) {99; CHECK-LABEL: 'vreduce_xor_nxv1i8'100; CHECK-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %red = call i8 @llvm.vector.reduce.xor.nxv1i8(<vscale x 1 x i8> %v)101; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret i8 %red102;103; SIZE-LABEL: 'vreduce_xor_nxv1i8'104; SIZE-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %red = call i8 @llvm.vector.reduce.xor.nxv1i8(<vscale x 1 x i8> %v)105; SIZE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret i8 %red106;107  %red = call i8 @llvm.vector.reduce.xor.nxv1i8(<vscale x 1 x i8> %v)108  ret i8 %red109}110 111define signext i8 @vreduce_add_nxv2i8(<vscale x 2 x i8> %v) {112; CHECK-LABEL: 'vreduce_add_nxv2i8'113; CHECK-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %red = call i8 @llvm.vector.reduce.add.nxv2i8(<vscale x 2 x i8> %v)114; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret i8 %red115;116; SIZE-LABEL: 'vreduce_add_nxv2i8'117; SIZE-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %red = call i8 @llvm.vector.reduce.add.nxv2i8(<vscale x 2 x i8> %v)118; SIZE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret i8 %red119;120  %red = call i8 @llvm.vector.reduce.add.nxv2i8(<vscale x 2 x i8> %v)121  ret i8 %red122}123 124define signext i8 @vreduce_umax_nxv2i8(<vscale x 2 x i8> %v) {125; CHECK-LABEL: 'vreduce_umax_nxv2i8'126; CHECK-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %red = call i8 @llvm.vector.reduce.umax.nxv2i8(<vscale x 2 x i8> %v)127; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret i8 %red128;129; SIZE-LABEL: 'vreduce_umax_nxv2i8'130; SIZE-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %red = call i8 @llvm.vector.reduce.umax.nxv2i8(<vscale x 2 x i8> %v)131; SIZE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret i8 %red132;133  %red = call i8 @llvm.vector.reduce.umax.nxv2i8(<vscale x 2 x i8> %v)134  ret i8 %red135}136 137define signext i8 @vreduce_smax_nxv2i8(<vscale x 2 x i8> %v) {138; CHECK-LABEL: 'vreduce_smax_nxv2i8'139; CHECK-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %red = call i8 @llvm.vector.reduce.smax.nxv2i8(<vscale x 2 x i8> %v)140; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret i8 %red141;142; SIZE-LABEL: 'vreduce_smax_nxv2i8'143; SIZE-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %red = call i8 @llvm.vector.reduce.smax.nxv2i8(<vscale x 2 x i8> %v)144; SIZE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret i8 %red145;146  %red = call i8 @llvm.vector.reduce.smax.nxv2i8(<vscale x 2 x i8> %v)147  ret i8 %red148}149 150define signext i8 @vreduce_umin_nxv2i8(<vscale x 2 x i8> %v) {151; CHECK-LABEL: 'vreduce_umin_nxv2i8'152; CHECK-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %red = call i8 @llvm.vector.reduce.umin.nxv2i8(<vscale x 2 x i8> %v)153; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret i8 %red154;155; SIZE-LABEL: 'vreduce_umin_nxv2i8'156; SIZE-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %red = call i8 @llvm.vector.reduce.umin.nxv2i8(<vscale x 2 x i8> %v)157; SIZE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret i8 %red158;159  %red = call i8 @llvm.vector.reduce.umin.nxv2i8(<vscale x 2 x i8> %v)160  ret i8 %red161}162 163define signext i8 @vreduce_smin_nxv2i8(<vscale x 2 x i8> %v) {164; CHECK-LABEL: 'vreduce_smin_nxv2i8'165; CHECK-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %red = call i8 @llvm.vector.reduce.smin.nxv2i8(<vscale x 2 x i8> %v)166; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret i8 %red167;168; SIZE-LABEL: 'vreduce_smin_nxv2i8'169; SIZE-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %red = call i8 @llvm.vector.reduce.smin.nxv2i8(<vscale x 2 x i8> %v)170; SIZE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret i8 %red171;172  %red = call i8 @llvm.vector.reduce.smin.nxv2i8(<vscale x 2 x i8> %v)173  ret i8 %red174}175 176define signext i8 @vreduce_and_nxv2i8(<vscale x 2 x i8> %v) {177; CHECK-LABEL: 'vreduce_and_nxv2i8'178; CHECK-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %red = call i8 @llvm.vector.reduce.and.nxv2i8(<vscale x 2 x i8> %v)179; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret i8 %red180;181; SIZE-LABEL: 'vreduce_and_nxv2i8'182; SIZE-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %red = call i8 @llvm.vector.reduce.and.nxv2i8(<vscale x 2 x i8> %v)183; SIZE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret i8 %red184;185  %red = call i8 @llvm.vector.reduce.and.nxv2i8(<vscale x 2 x i8> %v)186  ret i8 %red187}188 189define signext i8 @vreduce_or_nxv2i8(<vscale x 2 x i8> %v) {190; CHECK-LABEL: 'vreduce_or_nxv2i8'191; CHECK-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %red = call i8 @llvm.vector.reduce.or.nxv2i8(<vscale x 2 x i8> %v)192; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret i8 %red193;194; SIZE-LABEL: 'vreduce_or_nxv2i8'195; SIZE-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %red = call i8 @llvm.vector.reduce.or.nxv2i8(<vscale x 2 x i8> %v)196; SIZE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret i8 %red197;198  %red = call i8 @llvm.vector.reduce.or.nxv2i8(<vscale x 2 x i8> %v)199  ret i8 %red200}201 202define signext i8 @vreduce_xor_nxv2i8(<vscale x 2 x i8> %v) {203; CHECK-LABEL: 'vreduce_xor_nxv2i8'204; CHECK-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %red = call i8 @llvm.vector.reduce.xor.nxv2i8(<vscale x 2 x i8> %v)205; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret i8 %red206;207; SIZE-LABEL: 'vreduce_xor_nxv2i8'208; SIZE-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %red = call i8 @llvm.vector.reduce.xor.nxv2i8(<vscale x 2 x i8> %v)209; SIZE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret i8 %red210;211  %red = call i8 @llvm.vector.reduce.xor.nxv2i8(<vscale x 2 x i8> %v)212  ret i8 %red213}214 215define signext i8 @vreduce_add_nxv4i8(<vscale x 4 x i8> %v) {216; CHECK-LABEL: 'vreduce_add_nxv4i8'217; CHECK-NEXT:  Cost Model: Found an estimated cost of 5 for instruction: %red = call i8 @llvm.vector.reduce.add.nxv4i8(<vscale x 4 x i8> %v)218; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret i8 %red219;220; SIZE-LABEL: 'vreduce_add_nxv4i8'221; SIZE-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %red = call i8 @llvm.vector.reduce.add.nxv4i8(<vscale x 4 x i8> %v)222; SIZE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret i8 %red223;224  %red = call i8 @llvm.vector.reduce.add.nxv4i8(<vscale x 4 x i8> %v)225  ret i8 %red226}227 228define signext i8 @vreduce_umax_nxv4i8(<vscale x 4 x i8> %v) {229; CHECK-LABEL: 'vreduce_umax_nxv4i8'230; CHECK-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %red = call i8 @llvm.vector.reduce.umax.nxv4i8(<vscale x 4 x i8> %v)231; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret i8 %red232;233; SIZE-LABEL: 'vreduce_umax_nxv4i8'234; SIZE-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %red = call i8 @llvm.vector.reduce.umax.nxv4i8(<vscale x 4 x i8> %v)235; SIZE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret i8 %red236;237  %red = call i8 @llvm.vector.reduce.umax.nxv4i8(<vscale x 4 x i8> %v)238  ret i8 %red239}240 241define signext i8 @vreduce_smax_nxv4i8(<vscale x 4 x i8> %v) {242; CHECK-LABEL: 'vreduce_smax_nxv4i8'243; CHECK-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %red = call i8 @llvm.vector.reduce.smax.nxv4i8(<vscale x 4 x i8> %v)244; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret i8 %red245;246; SIZE-LABEL: 'vreduce_smax_nxv4i8'247; SIZE-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %red = call i8 @llvm.vector.reduce.smax.nxv4i8(<vscale x 4 x i8> %v)248; SIZE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret i8 %red249;250  %red = call i8 @llvm.vector.reduce.smax.nxv4i8(<vscale x 4 x i8> %v)251  ret i8 %red252}253 254define signext i8 @vreduce_umin_nxv4i8(<vscale x 4 x i8> %v) {255; CHECK-LABEL: 'vreduce_umin_nxv4i8'256; CHECK-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %red = call i8 @llvm.vector.reduce.umin.nxv4i8(<vscale x 4 x i8> %v)257; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret i8 %red258;259; SIZE-LABEL: 'vreduce_umin_nxv4i8'260; SIZE-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %red = call i8 @llvm.vector.reduce.umin.nxv4i8(<vscale x 4 x i8> %v)261; SIZE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret i8 %red262;263  %red = call i8 @llvm.vector.reduce.umin.nxv4i8(<vscale x 4 x i8> %v)264  ret i8 %red265}266 267define signext i8 @vreduce_smin_nxv4i8(<vscale x 4 x i8> %v) {268; CHECK-LABEL: 'vreduce_smin_nxv4i8'269; CHECK-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %red = call i8 @llvm.vector.reduce.smin.nxv4i8(<vscale x 4 x i8> %v)270; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret i8 %red271;272; SIZE-LABEL: 'vreduce_smin_nxv4i8'273; SIZE-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %red = call i8 @llvm.vector.reduce.smin.nxv4i8(<vscale x 4 x i8> %v)274; SIZE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret i8 %red275;276  %red = call i8 @llvm.vector.reduce.smin.nxv4i8(<vscale x 4 x i8> %v)277  ret i8 %red278}279 280define signext i8 @vreduce_and_nxv4i8(<vscale x 4 x i8> %v) {281; CHECK-LABEL: 'vreduce_and_nxv4i8'282; CHECK-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %red = call i8 @llvm.vector.reduce.and.nxv4i8(<vscale x 4 x i8> %v)283; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret i8 %red284;285; SIZE-LABEL: 'vreduce_and_nxv4i8'286; SIZE-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %red = call i8 @llvm.vector.reduce.and.nxv4i8(<vscale x 4 x i8> %v)287; SIZE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret i8 %red288;289  %red = call i8 @llvm.vector.reduce.and.nxv4i8(<vscale x 4 x i8> %v)290  ret i8 %red291}292 293define signext i8 @vreduce_or_nxv4i8(<vscale x 4 x i8> %v) {294; CHECK-LABEL: 'vreduce_or_nxv4i8'295; CHECK-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %red = call i8 @llvm.vector.reduce.or.nxv4i8(<vscale x 4 x i8> %v)296; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret i8 %red297;298; SIZE-LABEL: 'vreduce_or_nxv4i8'299; SIZE-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %red = call i8 @llvm.vector.reduce.or.nxv4i8(<vscale x 4 x i8> %v)300; SIZE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret i8 %red301;302  %red = call i8 @llvm.vector.reduce.or.nxv4i8(<vscale x 4 x i8> %v)303  ret i8 %red304}305 306define signext i8 @vreduce_xor_nxv4i8(<vscale x 4 x i8> %v) {307; CHECK-LABEL: 'vreduce_xor_nxv4i8'308; CHECK-NEXT:  Cost Model: Found an estimated cost of 5 for instruction: %red = call i8 @llvm.vector.reduce.xor.nxv4i8(<vscale x 4 x i8> %v)309; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret i8 %red310;311; SIZE-LABEL: 'vreduce_xor_nxv4i8'312; SIZE-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %red = call i8 @llvm.vector.reduce.xor.nxv4i8(<vscale x 4 x i8> %v)313; SIZE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret i8 %red314;315  %red = call i8 @llvm.vector.reduce.xor.nxv4i8(<vscale x 4 x i8> %v)316  ret i8 %red317}318 319define signext i16 @vreduce_add_nxv1i16(<vscale x 1 x i16> %v) {320; CHECK-LABEL: 'vreduce_add_nxv1i16'321; CHECK-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %red = call i16 @llvm.vector.reduce.add.nxv1i16(<vscale x 1 x i16> %v)322; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret i16 %red323;324; SIZE-LABEL: 'vreduce_add_nxv1i16'325; SIZE-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %red = call i16 @llvm.vector.reduce.add.nxv1i16(<vscale x 1 x i16> %v)326; SIZE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret i16 %red327;328  %red = call i16 @llvm.vector.reduce.add.nxv1i16(<vscale x 1 x i16> %v)329  ret i16 %red330}331 332define signext i16 @vwreduce_add_nxv1i8(<vscale x 1 x i8> %v) {333; CHECK-LABEL: 'vwreduce_add_nxv1i8'334; CHECK-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %e = sext <vscale x 1 x i8> %v to <vscale x 1 x i16>335; CHECK-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %red = call i16 @llvm.vector.reduce.add.nxv1i16(<vscale x 1 x i16> %e)336; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret i16 %red337;338; SIZE-LABEL: 'vwreduce_add_nxv1i8'339; SIZE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %e = sext <vscale x 1 x i8> %v to <vscale x 1 x i16>340; SIZE-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %red = call i16 @llvm.vector.reduce.add.nxv1i16(<vscale x 1 x i16> %e)341; SIZE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret i16 %red342;343  %e = sext <vscale x 1 x i8> %v to <vscale x 1 x i16>344  %red = call i16 @llvm.vector.reduce.add.nxv1i16(<vscale x 1 x i16> %e)345  ret i16 %red346}347 348define signext i16 @vwreduce_uadd_nxv1i8(<vscale x 1 x i8> %v) {349; CHECK-LABEL: 'vwreduce_uadd_nxv1i8'350; CHECK-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %e = sext <vscale x 1 x i8> %v to <vscale x 1 x i16>351; CHECK-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %red = call i16 @llvm.vector.reduce.add.nxv1i16(<vscale x 1 x i16> %e)352; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret i16 %red353;354; SIZE-LABEL: 'vwreduce_uadd_nxv1i8'355; SIZE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %e = sext <vscale x 1 x i8> %v to <vscale x 1 x i16>356; SIZE-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %red = call i16 @llvm.vector.reduce.add.nxv1i16(<vscale x 1 x i16> %e)357; SIZE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret i16 %red358;359  %e = sext <vscale x 1 x i8> %v to <vscale x 1 x i16>360  %red = call i16 @llvm.vector.reduce.add.nxv1i16(<vscale x 1 x i16> %e)361  ret i16 %red362}363 364define signext i16 @vreduce_umax_nxv1i16(<vscale x 1 x i16> %v) {365; CHECK-LABEL: 'vreduce_umax_nxv1i16'366; CHECK-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %red = call i16 @llvm.vector.reduce.umax.nxv1i16(<vscale x 1 x i16> %v)367; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret i16 %red368;369; SIZE-LABEL: 'vreduce_umax_nxv1i16'370; SIZE-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %red = call i16 @llvm.vector.reduce.umax.nxv1i16(<vscale x 1 x i16> %v)371; SIZE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret i16 %red372;373  %red = call i16 @llvm.vector.reduce.umax.nxv1i16(<vscale x 1 x i16> %v)374  ret i16 %red375}376 377define signext i16 @vreduce_smax_nxv1i16(<vscale x 1 x i16> %v) {378; CHECK-LABEL: 'vreduce_smax_nxv1i16'379; CHECK-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %red = call i16 @llvm.vector.reduce.smax.nxv1i16(<vscale x 1 x i16> %v)380; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret i16 %red381;382; SIZE-LABEL: 'vreduce_smax_nxv1i16'383; SIZE-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %red = call i16 @llvm.vector.reduce.smax.nxv1i16(<vscale x 1 x i16> %v)384; SIZE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret i16 %red385;386  %red = call i16 @llvm.vector.reduce.smax.nxv1i16(<vscale x 1 x i16> %v)387  ret i16 %red388}389 390define signext i16 @vreduce_umin_nxv1i16(<vscale x 1 x i16> %v) {391; CHECK-LABEL: 'vreduce_umin_nxv1i16'392; CHECK-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %red = call i16 @llvm.vector.reduce.umin.nxv1i16(<vscale x 1 x i16> %v)393; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret i16 %red394;395; SIZE-LABEL: 'vreduce_umin_nxv1i16'396; SIZE-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %red = call i16 @llvm.vector.reduce.umin.nxv1i16(<vscale x 1 x i16> %v)397; SIZE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret i16 %red398;399  %red = call i16 @llvm.vector.reduce.umin.nxv1i16(<vscale x 1 x i16> %v)400  ret i16 %red401}402 403define signext i16 @vreduce_smin_nxv1i16(<vscale x 1 x i16> %v) {404; CHECK-LABEL: 'vreduce_smin_nxv1i16'405; CHECK-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %red = call i16 @llvm.vector.reduce.smin.nxv1i16(<vscale x 1 x i16> %v)406; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret i16 %red407;408; SIZE-LABEL: 'vreduce_smin_nxv1i16'409; SIZE-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %red = call i16 @llvm.vector.reduce.smin.nxv1i16(<vscale x 1 x i16> %v)410; SIZE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret i16 %red411;412  %red = call i16 @llvm.vector.reduce.smin.nxv1i16(<vscale x 1 x i16> %v)413  ret i16 %red414}415 416define signext i16 @vreduce_and_nxv1i16(<vscale x 1 x i16> %v) {417; CHECK-LABEL: 'vreduce_and_nxv1i16'418; CHECK-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %red = call i16 @llvm.vector.reduce.and.nxv1i16(<vscale x 1 x i16> %v)419; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret i16 %red420;421; SIZE-LABEL: 'vreduce_and_nxv1i16'422; SIZE-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %red = call i16 @llvm.vector.reduce.and.nxv1i16(<vscale x 1 x i16> %v)423; SIZE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret i16 %red424;425  %red = call i16 @llvm.vector.reduce.and.nxv1i16(<vscale x 1 x i16> %v)426  ret i16 %red427}428 429define signext i16 @vreduce_or_nxv1i16(<vscale x 1 x i16> %v) {430; CHECK-LABEL: 'vreduce_or_nxv1i16'431; CHECK-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %red = call i16 @llvm.vector.reduce.or.nxv1i16(<vscale x 1 x i16> %v)432; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret i16 %red433;434; SIZE-LABEL: 'vreduce_or_nxv1i16'435; SIZE-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %red = call i16 @llvm.vector.reduce.or.nxv1i16(<vscale x 1 x i16> %v)436; SIZE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret i16 %red437;438  %red = call i16 @llvm.vector.reduce.or.nxv1i16(<vscale x 1 x i16> %v)439  ret i16 %red440}441 442define signext i16 @vreduce_xor_nxv1i16(<vscale x 1 x i16> %v) {443; CHECK-LABEL: 'vreduce_xor_nxv1i16'444; CHECK-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %red = call i16 @llvm.vector.reduce.xor.nxv1i16(<vscale x 1 x i16> %v)445; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret i16 %red446;447; SIZE-LABEL: 'vreduce_xor_nxv1i16'448; SIZE-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %red = call i16 @llvm.vector.reduce.xor.nxv1i16(<vscale x 1 x i16> %v)449; SIZE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret i16 %red450;451  %red = call i16 @llvm.vector.reduce.xor.nxv1i16(<vscale x 1 x i16> %v)452  ret i16 %red453}454 455define signext i16 @vreduce_add_nxv2i16(<vscale x 2 x i16> %v) {456; CHECK-LABEL: 'vreduce_add_nxv2i16'457; CHECK-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %red = call i16 @llvm.vector.reduce.add.nxv2i16(<vscale x 2 x i16> %v)458; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret i16 %red459;460; SIZE-LABEL: 'vreduce_add_nxv2i16'461; SIZE-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %red = call i16 @llvm.vector.reduce.add.nxv2i16(<vscale x 2 x i16> %v)462; SIZE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret i16 %red463;464  %red = call i16 @llvm.vector.reduce.add.nxv2i16(<vscale x 2 x i16> %v)465  ret i16 %red466}467 468define signext i16 @vwreduce_add_nxv2i8(<vscale x 2 x i8> %v) {469; CHECK-LABEL: 'vwreduce_add_nxv2i8'470; CHECK-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %e = sext <vscale x 2 x i8> %v to <vscale x 2 x i16>471; CHECK-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %red = call i16 @llvm.vector.reduce.add.nxv2i16(<vscale x 2 x i16> %e)472; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret i16 %red473;474; SIZE-LABEL: 'vwreduce_add_nxv2i8'475; SIZE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %e = sext <vscale x 2 x i8> %v to <vscale x 2 x i16>476; SIZE-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %red = call i16 @llvm.vector.reduce.add.nxv2i16(<vscale x 2 x i16> %e)477; SIZE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret i16 %red478;479  %e = sext <vscale x 2 x i8> %v to <vscale x 2 x i16>480  %red = call i16 @llvm.vector.reduce.add.nxv2i16(<vscale x 2 x i16> %e)481  ret i16 %red482}483 484define signext i16 @vwreduce_uadd_nxv2i8(<vscale x 2 x i8> %v) {485; CHECK-LABEL: 'vwreduce_uadd_nxv2i8'486; CHECK-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %e = sext <vscale x 2 x i8> %v to <vscale x 2 x i16>487; CHECK-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %red = call i16 @llvm.vector.reduce.add.nxv2i16(<vscale x 2 x i16> %e)488; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret i16 %red489;490; SIZE-LABEL: 'vwreduce_uadd_nxv2i8'491; SIZE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %e = sext <vscale x 2 x i8> %v to <vscale x 2 x i16>492; SIZE-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %red = call i16 @llvm.vector.reduce.add.nxv2i16(<vscale x 2 x i16> %e)493; SIZE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret i16 %red494;495  %e = sext <vscale x 2 x i8> %v to <vscale x 2 x i16>496  %red = call i16 @llvm.vector.reduce.add.nxv2i16(<vscale x 2 x i16> %e)497  ret i16 %red498}499 500define signext i16 @vreduce_umax_nxv2i16(<vscale x 2 x i16> %v) {501; CHECK-LABEL: 'vreduce_umax_nxv2i16'502; CHECK-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %red = call i16 @llvm.vector.reduce.umax.nxv2i16(<vscale x 2 x i16> %v)503; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret i16 %red504;505; SIZE-LABEL: 'vreduce_umax_nxv2i16'506; SIZE-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %red = call i16 @llvm.vector.reduce.umax.nxv2i16(<vscale x 2 x i16> %v)507; SIZE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret i16 %red508;509  %red = call i16 @llvm.vector.reduce.umax.nxv2i16(<vscale x 2 x i16> %v)510  ret i16 %red511}512 513define signext i16 @vreduce_smax_nxv2i16(<vscale x 2 x i16> %v) {514; CHECK-LABEL: 'vreduce_smax_nxv2i16'515; CHECK-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %red = call i16 @llvm.vector.reduce.smax.nxv2i16(<vscale x 2 x i16> %v)516; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret i16 %red517;518; SIZE-LABEL: 'vreduce_smax_nxv2i16'519; SIZE-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %red = call i16 @llvm.vector.reduce.smax.nxv2i16(<vscale x 2 x i16> %v)520; SIZE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret i16 %red521;522  %red = call i16 @llvm.vector.reduce.smax.nxv2i16(<vscale x 2 x i16> %v)523  ret i16 %red524}525 526define signext i16 @vreduce_umin_nxv2i16(<vscale x 2 x i16> %v) {527; CHECK-LABEL: 'vreduce_umin_nxv2i16'528; CHECK-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %red = call i16 @llvm.vector.reduce.umin.nxv2i16(<vscale x 2 x i16> %v)529; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret i16 %red530;531; SIZE-LABEL: 'vreduce_umin_nxv2i16'532; SIZE-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %red = call i16 @llvm.vector.reduce.umin.nxv2i16(<vscale x 2 x i16> %v)533; SIZE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret i16 %red534;535  %red = call i16 @llvm.vector.reduce.umin.nxv2i16(<vscale x 2 x i16> %v)536  ret i16 %red537}538 539define signext i16 @vreduce_smin_nxv2i16(<vscale x 2 x i16> %v) {540; CHECK-LABEL: 'vreduce_smin_nxv2i16'541; CHECK-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %red = call i16 @llvm.vector.reduce.smin.nxv2i16(<vscale x 2 x i16> %v)542; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret i16 %red543;544; SIZE-LABEL: 'vreduce_smin_nxv2i16'545; SIZE-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %red = call i16 @llvm.vector.reduce.smin.nxv2i16(<vscale x 2 x i16> %v)546; SIZE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret i16 %red547;548  %red = call i16 @llvm.vector.reduce.smin.nxv2i16(<vscale x 2 x i16> %v)549  ret i16 %red550}551 552define signext i16 @vreduce_and_nxv2i16(<vscale x 2 x i16> %v) {553; CHECK-LABEL: 'vreduce_and_nxv2i16'554; CHECK-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %red = call i16 @llvm.vector.reduce.and.nxv2i16(<vscale x 2 x i16> %v)555; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret i16 %red556;557; SIZE-LABEL: 'vreduce_and_nxv2i16'558; SIZE-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %red = call i16 @llvm.vector.reduce.and.nxv2i16(<vscale x 2 x i16> %v)559; SIZE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret i16 %red560;561  %red = call i16 @llvm.vector.reduce.and.nxv2i16(<vscale x 2 x i16> %v)562  ret i16 %red563}564 565define signext i16 @vreduce_or_nxv2i16(<vscale x 2 x i16> %v) {566; CHECK-LABEL: 'vreduce_or_nxv2i16'567; CHECK-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %red = call i16 @llvm.vector.reduce.or.nxv2i16(<vscale x 2 x i16> %v)568; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret i16 %red569;570; SIZE-LABEL: 'vreduce_or_nxv2i16'571; SIZE-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %red = call i16 @llvm.vector.reduce.or.nxv2i16(<vscale x 2 x i16> %v)572; SIZE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret i16 %red573;574  %red = call i16 @llvm.vector.reduce.or.nxv2i16(<vscale x 2 x i16> %v)575  ret i16 %red576}577 578define signext i16 @vreduce_xor_nxv2i16(<vscale x 2 x i16> %v) {579; CHECK-LABEL: 'vreduce_xor_nxv2i16'580; CHECK-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %red = call i16 @llvm.vector.reduce.xor.nxv2i16(<vscale x 2 x i16> %v)581; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret i16 %red582;583; SIZE-LABEL: 'vreduce_xor_nxv2i16'584; SIZE-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %red = call i16 @llvm.vector.reduce.xor.nxv2i16(<vscale x 2 x i16> %v)585; SIZE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret i16 %red586;587  %red = call i16 @llvm.vector.reduce.xor.nxv2i16(<vscale x 2 x i16> %v)588  ret i16 %red589}590 591define signext i16 @vreduce_add_nxv4i16(<vscale x 4 x i16> %v) {592; CHECK-LABEL: 'vreduce_add_nxv4i16'593; CHECK-NEXT:  Cost Model: Found an estimated cost of 5 for instruction: %red = call i16 @llvm.vector.reduce.add.nxv4i16(<vscale x 4 x i16> %v)594; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret i16 %red595;596; SIZE-LABEL: 'vreduce_add_nxv4i16'597; SIZE-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %red = call i16 @llvm.vector.reduce.add.nxv4i16(<vscale x 4 x i16> %v)598; SIZE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret i16 %red599;600  %red = call i16 @llvm.vector.reduce.add.nxv4i16(<vscale x 4 x i16> %v)601  ret i16 %red602}603 604define signext i16 @vwreduce_add_nxv4i8(<vscale x 4 x i8> %v) {605; CHECK-LABEL: 'vwreduce_add_nxv4i8'606; CHECK-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %e = sext <vscale x 4 x i8> %v to <vscale x 4 x i16>607; CHECK-NEXT:  Cost Model: Found an estimated cost of 5 for instruction: %red = call i16 @llvm.vector.reduce.add.nxv4i16(<vscale x 4 x i16> %e)608; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret i16 %red609;610; SIZE-LABEL: 'vwreduce_add_nxv4i8'611; SIZE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %e = sext <vscale x 4 x i8> %v to <vscale x 4 x i16>612; SIZE-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %red = call i16 @llvm.vector.reduce.add.nxv4i16(<vscale x 4 x i16> %e)613; SIZE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret i16 %red614;615  %e = sext <vscale x 4 x i8> %v to <vscale x 4 x i16>616  %red = call i16 @llvm.vector.reduce.add.nxv4i16(<vscale x 4 x i16> %e)617  ret i16 %red618}619 620define signext i16 @vwreduce_uadd_nxv4i8(<vscale x 4 x i8> %v) {621; CHECK-LABEL: 'vwreduce_uadd_nxv4i8'622; CHECK-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %e = sext <vscale x 4 x i8> %v to <vscale x 4 x i16>623; CHECK-NEXT:  Cost Model: Found an estimated cost of 5 for instruction: %red = call i16 @llvm.vector.reduce.add.nxv4i16(<vscale x 4 x i16> %e)624; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret i16 %red625;626; SIZE-LABEL: 'vwreduce_uadd_nxv4i8'627; SIZE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %e = sext <vscale x 4 x i8> %v to <vscale x 4 x i16>628; SIZE-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %red = call i16 @llvm.vector.reduce.add.nxv4i16(<vscale x 4 x i16> %e)629; SIZE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret i16 %red630;631  %e = sext <vscale x 4 x i8> %v to <vscale x 4 x i16>632  %red = call i16 @llvm.vector.reduce.add.nxv4i16(<vscale x 4 x i16> %e)633  ret i16 %red634}635 636define signext i16 @vreduce_umax_nxv4i16(<vscale x 4 x i16> %v) {637; CHECK-LABEL: 'vreduce_umax_nxv4i16'638; CHECK-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %red = call i16 @llvm.vector.reduce.umax.nxv4i16(<vscale x 4 x i16> %v)639; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret i16 %red640;641; SIZE-LABEL: 'vreduce_umax_nxv4i16'642; SIZE-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %red = call i16 @llvm.vector.reduce.umax.nxv4i16(<vscale x 4 x i16> %v)643; SIZE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret i16 %red644;645  %red = call i16 @llvm.vector.reduce.umax.nxv4i16(<vscale x 4 x i16> %v)646  ret i16 %red647}648 649define signext i16 @vreduce_smax_nxv4i16(<vscale x 4 x i16> %v) {650; CHECK-LABEL: 'vreduce_smax_nxv4i16'651; CHECK-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %red = call i16 @llvm.vector.reduce.smax.nxv4i16(<vscale x 4 x i16> %v)652; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret i16 %red653;654; SIZE-LABEL: 'vreduce_smax_nxv4i16'655; SIZE-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %red = call i16 @llvm.vector.reduce.smax.nxv4i16(<vscale x 4 x i16> %v)656; SIZE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret i16 %red657;658  %red = call i16 @llvm.vector.reduce.smax.nxv4i16(<vscale x 4 x i16> %v)659  ret i16 %red660}661 662define signext i16 @vreduce_umin_nxv4i16(<vscale x 4 x i16> %v) {663; CHECK-LABEL: 'vreduce_umin_nxv4i16'664; CHECK-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %red = call i16 @llvm.vector.reduce.umin.nxv4i16(<vscale x 4 x i16> %v)665; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret i16 %red666;667; SIZE-LABEL: 'vreduce_umin_nxv4i16'668; SIZE-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %red = call i16 @llvm.vector.reduce.umin.nxv4i16(<vscale x 4 x i16> %v)669; SIZE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret i16 %red670;671  %red = call i16 @llvm.vector.reduce.umin.nxv4i16(<vscale x 4 x i16> %v)672  ret i16 %red673}674 675define signext i16 @vreduce_smin_nxv4i16(<vscale x 4 x i16> %v) {676; CHECK-LABEL: 'vreduce_smin_nxv4i16'677; CHECK-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %red = call i16 @llvm.vector.reduce.smin.nxv4i16(<vscale x 4 x i16> %v)678; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret i16 %red679;680; SIZE-LABEL: 'vreduce_smin_nxv4i16'681; SIZE-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %red = call i16 @llvm.vector.reduce.smin.nxv4i16(<vscale x 4 x i16> %v)682; SIZE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret i16 %red683;684  %red = call i16 @llvm.vector.reduce.smin.nxv4i16(<vscale x 4 x i16> %v)685  ret i16 %red686}687 688define signext i16 @vreduce_and_nxv4i16(<vscale x 4 x i16> %v) {689; CHECK-LABEL: 'vreduce_and_nxv4i16'690; CHECK-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %red = call i16 @llvm.vector.reduce.and.nxv4i16(<vscale x 4 x i16> %v)691; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret i16 %red692;693; SIZE-LABEL: 'vreduce_and_nxv4i16'694; SIZE-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %red = call i16 @llvm.vector.reduce.and.nxv4i16(<vscale x 4 x i16> %v)695; SIZE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret i16 %red696;697  %red = call i16 @llvm.vector.reduce.and.nxv4i16(<vscale x 4 x i16> %v)698  ret i16 %red699}700 701define signext i16 @vreduce_or_nxv4i16(<vscale x 4 x i16> %v) {702; CHECK-LABEL: 'vreduce_or_nxv4i16'703; CHECK-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %red = call i16 @llvm.vector.reduce.or.nxv4i16(<vscale x 4 x i16> %v)704; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret i16 %red705;706; SIZE-LABEL: 'vreduce_or_nxv4i16'707; SIZE-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %red = call i16 @llvm.vector.reduce.or.nxv4i16(<vscale x 4 x i16> %v)708; SIZE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret i16 %red709;710  %red = call i16 @llvm.vector.reduce.or.nxv4i16(<vscale x 4 x i16> %v)711  ret i16 %red712}713 714define signext i16 @vreduce_xor_nxv4i16(<vscale x 4 x i16> %v) {715; CHECK-LABEL: 'vreduce_xor_nxv4i16'716; CHECK-NEXT:  Cost Model: Found an estimated cost of 5 for instruction: %red = call i16 @llvm.vector.reduce.xor.nxv4i16(<vscale x 4 x i16> %v)717; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret i16 %red718;719; SIZE-LABEL: 'vreduce_xor_nxv4i16'720; SIZE-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %red = call i16 @llvm.vector.reduce.xor.nxv4i16(<vscale x 4 x i16> %v)721; SIZE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret i16 %red722;723  %red = call i16 @llvm.vector.reduce.xor.nxv4i16(<vscale x 4 x i16> %v)724  ret i16 %red725}726 727define signext i32 @vreduce_add_nxv1i32(<vscale x 1 x i32> %v) {728; CHECK-LABEL: 'vreduce_add_nxv1i32'729; CHECK-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %red = call i32 @llvm.vector.reduce.add.nxv1i32(<vscale x 1 x i32> %v)730; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret i32 %red731;732; SIZE-LABEL: 'vreduce_add_nxv1i32'733; SIZE-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %red = call i32 @llvm.vector.reduce.add.nxv1i32(<vscale x 1 x i32> %v)734; SIZE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret i32 %red735;736  %red = call i32 @llvm.vector.reduce.add.nxv1i32(<vscale x 1 x i32> %v)737  ret i32 %red738}739 740define signext i32 @vwreduce_add_nxv1i16(<vscale x 1 x i16> %v) {741; CHECK-LABEL: 'vwreduce_add_nxv1i16'742; CHECK-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %e = sext <vscale x 1 x i16> %v to <vscale x 1 x i32>743; CHECK-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %red = call i32 @llvm.vector.reduce.add.nxv1i32(<vscale x 1 x i32> %e)744; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret i32 %red745;746; SIZE-LABEL: 'vwreduce_add_nxv1i16'747; SIZE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %e = sext <vscale x 1 x i16> %v to <vscale x 1 x i32>748; SIZE-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %red = call i32 @llvm.vector.reduce.add.nxv1i32(<vscale x 1 x i32> %e)749; SIZE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret i32 %red750;751  %e = sext <vscale x 1 x i16> %v to <vscale x 1 x i32>752  %red = call i32 @llvm.vector.reduce.add.nxv1i32(<vscale x 1 x i32> %e)753  ret i32 %red754}755 756define signext i32 @vwreduce_uadd_nxv1i16(<vscale x 1 x i16> %v) {757; CHECK-LABEL: 'vwreduce_uadd_nxv1i16'758; CHECK-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %e = zext <vscale x 1 x i16> %v to <vscale x 1 x i32>759; CHECK-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %red = call i32 @llvm.vector.reduce.add.nxv1i32(<vscale x 1 x i32> %e)760; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret i32 %red761;762; SIZE-LABEL: 'vwreduce_uadd_nxv1i16'763; SIZE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %e = zext <vscale x 1 x i16> %v to <vscale x 1 x i32>764; SIZE-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %red = call i32 @llvm.vector.reduce.add.nxv1i32(<vscale x 1 x i32> %e)765; SIZE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret i32 %red766;767  %e = zext <vscale x 1 x i16> %v to <vscale x 1 x i32>768  %red = call i32 @llvm.vector.reduce.add.nxv1i32(<vscale x 1 x i32> %e)769  ret i32 %red770}771 772define signext i32 @vreduce_umax_nxv1i32(<vscale x 1 x i32> %v) {773; CHECK-LABEL: 'vreduce_umax_nxv1i32'774; CHECK-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %red = call i32 @llvm.vector.reduce.umax.nxv1i32(<vscale x 1 x i32> %v)775; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret i32 %red776;777; SIZE-LABEL: 'vreduce_umax_nxv1i32'778; SIZE-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %red = call i32 @llvm.vector.reduce.umax.nxv1i32(<vscale x 1 x i32> %v)779; SIZE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret i32 %red780;781  %red = call i32 @llvm.vector.reduce.umax.nxv1i32(<vscale x 1 x i32> %v)782  ret i32 %red783}784 785define signext i32 @vreduce_smax_nxv1i32(<vscale x 1 x i32> %v) {786; CHECK-LABEL: 'vreduce_smax_nxv1i32'787; CHECK-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %red = call i32 @llvm.vector.reduce.smax.nxv1i32(<vscale x 1 x i32> %v)788; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret i32 %red789;790; SIZE-LABEL: 'vreduce_smax_nxv1i32'791; SIZE-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %red = call i32 @llvm.vector.reduce.smax.nxv1i32(<vscale x 1 x i32> %v)792; SIZE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret i32 %red793;794  %red = call i32 @llvm.vector.reduce.smax.nxv1i32(<vscale x 1 x i32> %v)795  ret i32 %red796}797 798define signext i32 @vreduce_umin_nxv1i32(<vscale x 1 x i32> %v) {799; CHECK-LABEL: 'vreduce_umin_nxv1i32'800; CHECK-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %red = call i32 @llvm.vector.reduce.umin.nxv1i32(<vscale x 1 x i32> %v)801; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret i32 %red802;803; SIZE-LABEL: 'vreduce_umin_nxv1i32'804; SIZE-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %red = call i32 @llvm.vector.reduce.umin.nxv1i32(<vscale x 1 x i32> %v)805; SIZE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret i32 %red806;807  %red = call i32 @llvm.vector.reduce.umin.nxv1i32(<vscale x 1 x i32> %v)808  ret i32 %red809}810 811define signext i32 @vreduce_smin_nxv1i32(<vscale x 1 x i32> %v) {812; CHECK-LABEL: 'vreduce_smin_nxv1i32'813; CHECK-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %red = call i32 @llvm.vector.reduce.smin.nxv1i32(<vscale x 1 x i32> %v)814; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret i32 %red815;816; SIZE-LABEL: 'vreduce_smin_nxv1i32'817; SIZE-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %red = call i32 @llvm.vector.reduce.smin.nxv1i32(<vscale x 1 x i32> %v)818; SIZE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret i32 %red819;820  %red = call i32 @llvm.vector.reduce.smin.nxv1i32(<vscale x 1 x i32> %v)821  ret i32 %red822}823 824define signext i32 @vreduce_and_nxv1i32(<vscale x 1 x i32> %v) {825; CHECK-LABEL: 'vreduce_and_nxv1i32'826; CHECK-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %red = call i32 @llvm.vector.reduce.and.nxv1i32(<vscale x 1 x i32> %v)827; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret i32 %red828;829; SIZE-LABEL: 'vreduce_and_nxv1i32'830; SIZE-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %red = call i32 @llvm.vector.reduce.and.nxv1i32(<vscale x 1 x i32> %v)831; SIZE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret i32 %red832;833  %red = call i32 @llvm.vector.reduce.and.nxv1i32(<vscale x 1 x i32> %v)834  ret i32 %red835}836 837define signext i32 @vreduce_or_nxv1i32(<vscale x 1 x i32> %v) {838; CHECK-LABEL: 'vreduce_or_nxv1i32'839; CHECK-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %red = call i32 @llvm.vector.reduce.or.nxv1i32(<vscale x 1 x i32> %v)840; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret i32 %red841;842; SIZE-LABEL: 'vreduce_or_nxv1i32'843; SIZE-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %red = call i32 @llvm.vector.reduce.or.nxv1i32(<vscale x 1 x i32> %v)844; SIZE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret i32 %red845;846  %red = call i32 @llvm.vector.reduce.or.nxv1i32(<vscale x 1 x i32> %v)847  ret i32 %red848}849 850define signext i32 @vreduce_xor_nxv1i32(<vscale x 1 x i32> %v) {851; CHECK-LABEL: 'vreduce_xor_nxv1i32'852; CHECK-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %red = call i32 @llvm.vector.reduce.xor.nxv1i32(<vscale x 1 x i32> %v)853; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret i32 %red854;855; SIZE-LABEL: 'vreduce_xor_nxv1i32'856; SIZE-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %red = call i32 @llvm.vector.reduce.xor.nxv1i32(<vscale x 1 x i32> %v)857; SIZE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret i32 %red858;859  %red = call i32 @llvm.vector.reduce.xor.nxv1i32(<vscale x 1 x i32> %v)860  ret i32 %red861}862 863define signext i32 @vreduce_add_nxv2i32(<vscale x 2 x i32> %v) {864; CHECK-LABEL: 'vreduce_add_nxv2i32'865; CHECK-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %red = call i32 @llvm.vector.reduce.add.nxv2i32(<vscale x 2 x i32> %v)866; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret i32 %red867;868; SIZE-LABEL: 'vreduce_add_nxv2i32'869; SIZE-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %red = call i32 @llvm.vector.reduce.add.nxv2i32(<vscale x 2 x i32> %v)870; SIZE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret i32 %red871;872  %red = call i32 @llvm.vector.reduce.add.nxv2i32(<vscale x 2 x i32> %v)873  ret i32 %red874}875 876define signext i32 @vwreduce_add_nxv2i16(<vscale x 2 x i16> %v) {877; CHECK-LABEL: 'vwreduce_add_nxv2i16'878; CHECK-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %e = sext <vscale x 2 x i16> %v to <vscale x 2 x i32>879; CHECK-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %red = call i32 @llvm.vector.reduce.add.nxv2i32(<vscale x 2 x i32> %e)880; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret i32 %red881;882; SIZE-LABEL: 'vwreduce_add_nxv2i16'883; SIZE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %e = sext <vscale x 2 x i16> %v to <vscale x 2 x i32>884; SIZE-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %red = call i32 @llvm.vector.reduce.add.nxv2i32(<vscale x 2 x i32> %e)885; SIZE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret i32 %red886;887  %e = sext <vscale x 2 x i16> %v to <vscale x 2 x i32>888  %red = call i32 @llvm.vector.reduce.add.nxv2i32(<vscale x 2 x i32> %e)889  ret i32 %red890}891 892define signext i32 @vwreduce_uadd_nxv2i16(<vscale x 2 x i16> %v) {893; CHECK-LABEL: 'vwreduce_uadd_nxv2i16'894; CHECK-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %e = zext <vscale x 2 x i16> %v to <vscale x 2 x i32>895; CHECK-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %red = call i32 @llvm.vector.reduce.add.nxv2i32(<vscale x 2 x i32> %e)896; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret i32 %red897;898; SIZE-LABEL: 'vwreduce_uadd_nxv2i16'899; SIZE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %e = zext <vscale x 2 x i16> %v to <vscale x 2 x i32>900; SIZE-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %red = call i32 @llvm.vector.reduce.add.nxv2i32(<vscale x 2 x i32> %e)901; SIZE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret i32 %red902;903  %e = zext <vscale x 2 x i16> %v to <vscale x 2 x i32>904  %red = call i32 @llvm.vector.reduce.add.nxv2i32(<vscale x 2 x i32> %e)905  ret i32 %red906}907 908define signext i32 @vreduce_umax_nxv2i32(<vscale x 2 x i32> %v) {909; CHECK-LABEL: 'vreduce_umax_nxv2i32'910; CHECK-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %red = call i32 @llvm.vector.reduce.umax.nxv2i32(<vscale x 2 x i32> %v)911; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret i32 %red912;913; SIZE-LABEL: 'vreduce_umax_nxv2i32'914; SIZE-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %red = call i32 @llvm.vector.reduce.umax.nxv2i32(<vscale x 2 x i32> %v)915; SIZE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret i32 %red916;917  %red = call i32 @llvm.vector.reduce.umax.nxv2i32(<vscale x 2 x i32> %v)918  ret i32 %red919}920 921define signext i32 @vreduce_smax_nxv2i32(<vscale x 2 x i32> %v) {922; CHECK-LABEL: 'vreduce_smax_nxv2i32'923; CHECK-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %red = call i32 @llvm.vector.reduce.smax.nxv2i32(<vscale x 2 x i32> %v)924; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret i32 %red925;926; SIZE-LABEL: 'vreduce_smax_nxv2i32'927; SIZE-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %red = call i32 @llvm.vector.reduce.smax.nxv2i32(<vscale x 2 x i32> %v)928; SIZE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret i32 %red929;930  %red = call i32 @llvm.vector.reduce.smax.nxv2i32(<vscale x 2 x i32> %v)931  ret i32 %red932}933 934define signext i32 @vreduce_umin_nxv2i32(<vscale x 2 x i32> %v) {935; CHECK-LABEL: 'vreduce_umin_nxv2i32'936; CHECK-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %red = call i32 @llvm.vector.reduce.umin.nxv2i32(<vscale x 2 x i32> %v)937; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret i32 %red938;939; SIZE-LABEL: 'vreduce_umin_nxv2i32'940; SIZE-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %red = call i32 @llvm.vector.reduce.umin.nxv2i32(<vscale x 2 x i32> %v)941; SIZE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret i32 %red942;943  %red = call i32 @llvm.vector.reduce.umin.nxv2i32(<vscale x 2 x i32> %v)944  ret i32 %red945}946 947define signext i32 @vreduce_smin_nxv2i32(<vscale x 2 x i32> %v) {948; CHECK-LABEL: 'vreduce_smin_nxv2i32'949; CHECK-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %red = call i32 @llvm.vector.reduce.smin.nxv2i32(<vscale x 2 x i32> %v)950; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret i32 %red951;952; SIZE-LABEL: 'vreduce_smin_nxv2i32'953; SIZE-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %red = call i32 @llvm.vector.reduce.smin.nxv2i32(<vscale x 2 x i32> %v)954; SIZE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret i32 %red955;956  %red = call i32 @llvm.vector.reduce.smin.nxv2i32(<vscale x 2 x i32> %v)957  ret i32 %red958}959 960define signext i32 @vreduce_and_nxv2i32(<vscale x 2 x i32> %v) {961; CHECK-LABEL: 'vreduce_and_nxv2i32'962; CHECK-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %red = call i32 @llvm.vector.reduce.and.nxv2i32(<vscale x 2 x i32> %v)963; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret i32 %red964;965; SIZE-LABEL: 'vreduce_and_nxv2i32'966; SIZE-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %red = call i32 @llvm.vector.reduce.and.nxv2i32(<vscale x 2 x i32> %v)967; SIZE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret i32 %red968;969  %red = call i32 @llvm.vector.reduce.and.nxv2i32(<vscale x 2 x i32> %v)970  ret i32 %red971}972 973define signext i32 @vreduce_or_nxv2i32(<vscale x 2 x i32> %v) {974; CHECK-LABEL: 'vreduce_or_nxv2i32'975; CHECK-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %red = call i32 @llvm.vector.reduce.or.nxv2i32(<vscale x 2 x i32> %v)976; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret i32 %red977;978; SIZE-LABEL: 'vreduce_or_nxv2i32'979; SIZE-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %red = call i32 @llvm.vector.reduce.or.nxv2i32(<vscale x 2 x i32> %v)980; SIZE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret i32 %red981;982  %red = call i32 @llvm.vector.reduce.or.nxv2i32(<vscale x 2 x i32> %v)983  ret i32 %red984}985 986define signext i32 @vreduce_xor_nxv2i32(<vscale x 2 x i32> %v) {987; CHECK-LABEL: 'vreduce_xor_nxv2i32'988; CHECK-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %red = call i32 @llvm.vector.reduce.xor.nxv2i32(<vscale x 2 x i32> %v)989; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret i32 %red990;991; SIZE-LABEL: 'vreduce_xor_nxv2i32'992; SIZE-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %red = call i32 @llvm.vector.reduce.xor.nxv2i32(<vscale x 2 x i32> %v)993; SIZE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret i32 %red994;995  %red = call i32 @llvm.vector.reduce.xor.nxv2i32(<vscale x 2 x i32> %v)996  ret i32 %red997}998 999define signext i32 @vreduce_add_nxv4i32(<vscale x 4 x i32> %v) {1000; CHECK-LABEL: 'vreduce_add_nxv4i32'1001; CHECK-NEXT:  Cost Model: Found an estimated cost of 5 for instruction: %red = call i32 @llvm.vector.reduce.add.nxv4i32(<vscale x 4 x i32> %v)1002; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret i32 %red1003;1004; SIZE-LABEL: 'vreduce_add_nxv4i32'1005; SIZE-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %red = call i32 @llvm.vector.reduce.add.nxv4i32(<vscale x 4 x i32> %v)1006; SIZE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret i32 %red1007;1008  %red = call i32 @llvm.vector.reduce.add.nxv4i32(<vscale x 4 x i32> %v)1009  ret i32 %red1010}1011 1012define signext i32 @vwreduce_add_nxv4i16(<vscale x 4 x i16> %v) {1013; CHECK-LABEL: 'vwreduce_add_nxv4i16'1014; CHECK-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %e = sext <vscale x 4 x i16> %v to <vscale x 4 x i32>1015; CHECK-NEXT:  Cost Model: Found an estimated cost of 5 for instruction: %red = call i32 @llvm.vector.reduce.add.nxv4i32(<vscale x 4 x i32> %e)1016; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret i32 %red1017;1018; SIZE-LABEL: 'vwreduce_add_nxv4i16'1019; SIZE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %e = sext <vscale x 4 x i16> %v to <vscale x 4 x i32>1020; SIZE-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %red = call i32 @llvm.vector.reduce.add.nxv4i32(<vscale x 4 x i32> %e)1021; SIZE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret i32 %red1022;1023  %e = sext <vscale x 4 x i16> %v to <vscale x 4 x i32>1024  %red = call i32 @llvm.vector.reduce.add.nxv4i32(<vscale x 4 x i32> %e)1025  ret i32 %red1026}1027 1028define signext i32 @vwreduce_uadd_nxv4i16(<vscale x 4 x i16> %v) {1029; CHECK-LABEL: 'vwreduce_uadd_nxv4i16'1030; CHECK-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %e = zext <vscale x 4 x i16> %v to <vscale x 4 x i32>1031; CHECK-NEXT:  Cost Model: Found an estimated cost of 5 for instruction: %red = call i32 @llvm.vector.reduce.add.nxv4i32(<vscale x 4 x i32> %e)1032; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret i32 %red1033;1034; SIZE-LABEL: 'vwreduce_uadd_nxv4i16'1035; SIZE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %e = zext <vscale x 4 x i16> %v to <vscale x 4 x i32>1036; SIZE-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %red = call i32 @llvm.vector.reduce.add.nxv4i32(<vscale x 4 x i32> %e)1037; SIZE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret i32 %red1038;1039  %e = zext <vscale x 4 x i16> %v to <vscale x 4 x i32>1040  %red = call i32 @llvm.vector.reduce.add.nxv4i32(<vscale x 4 x i32> %e)1041  ret i32 %red1042}1043 1044define signext i32 @vreduce_umax_nxv4i32(<vscale x 4 x i32> %v) {1045; CHECK-LABEL: 'vreduce_umax_nxv4i32'1046; CHECK-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %red = call i32 @llvm.vector.reduce.umax.nxv4i32(<vscale x 4 x i32> %v)1047; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret i32 %red1048;1049; SIZE-LABEL: 'vreduce_umax_nxv4i32'1050; SIZE-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %red = call i32 @llvm.vector.reduce.umax.nxv4i32(<vscale x 4 x i32> %v)1051; SIZE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret i32 %red1052;1053  %red = call i32 @llvm.vector.reduce.umax.nxv4i32(<vscale x 4 x i32> %v)1054  ret i32 %red1055}1056 1057define signext i32 @vreduce_smax_nxv4i32(<vscale x 4 x i32> %v) {1058; CHECK-LABEL: 'vreduce_smax_nxv4i32'1059; CHECK-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %red = call i32 @llvm.vector.reduce.smax.nxv4i32(<vscale x 4 x i32> %v)1060; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret i32 %red1061;1062; SIZE-LABEL: 'vreduce_smax_nxv4i32'1063; SIZE-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %red = call i32 @llvm.vector.reduce.smax.nxv4i32(<vscale x 4 x i32> %v)1064; SIZE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret i32 %red1065;1066  %red = call i32 @llvm.vector.reduce.smax.nxv4i32(<vscale x 4 x i32> %v)1067  ret i32 %red1068}1069 1070define signext i32 @vreduce_umin_nxv4i32(<vscale x 4 x i32> %v) {1071; CHECK-LABEL: 'vreduce_umin_nxv4i32'1072; CHECK-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %red = call i32 @llvm.vector.reduce.umin.nxv4i32(<vscale x 4 x i32> %v)1073; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret i32 %red1074;1075; SIZE-LABEL: 'vreduce_umin_nxv4i32'1076; SIZE-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %red = call i32 @llvm.vector.reduce.umin.nxv4i32(<vscale x 4 x i32> %v)1077; SIZE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret i32 %red1078;1079  %red = call i32 @llvm.vector.reduce.umin.nxv4i32(<vscale x 4 x i32> %v)1080  ret i32 %red1081}1082 1083define signext i32 @vreduce_smin_nxv4i32(<vscale x 4 x i32> %v) {1084; CHECK-LABEL: 'vreduce_smin_nxv4i32'1085; CHECK-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %red = call i32 @llvm.vector.reduce.smin.nxv4i32(<vscale x 4 x i32> %v)1086; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret i32 %red1087;1088; SIZE-LABEL: 'vreduce_smin_nxv4i32'1089; SIZE-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %red = call i32 @llvm.vector.reduce.smin.nxv4i32(<vscale x 4 x i32> %v)1090; SIZE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret i32 %red1091;1092  %red = call i32 @llvm.vector.reduce.smin.nxv4i32(<vscale x 4 x i32> %v)1093  ret i32 %red1094}1095 1096define signext i32 @vreduce_and_nxv4i32(<vscale x 4 x i32> %v) {1097; CHECK-LABEL: 'vreduce_and_nxv4i32'1098; CHECK-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %red = call i32 @llvm.vector.reduce.and.nxv4i32(<vscale x 4 x i32> %v)1099; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret i32 %red1100;1101; SIZE-LABEL: 'vreduce_and_nxv4i32'1102; SIZE-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %red = call i32 @llvm.vector.reduce.and.nxv4i32(<vscale x 4 x i32> %v)1103; SIZE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret i32 %red1104;1105  %red = call i32 @llvm.vector.reduce.and.nxv4i32(<vscale x 4 x i32> %v)1106  ret i32 %red1107}1108 1109define signext i32 @vreduce_or_nxv4i32(<vscale x 4 x i32> %v) {1110; CHECK-LABEL: 'vreduce_or_nxv4i32'1111; CHECK-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %red = call i32 @llvm.vector.reduce.or.nxv4i32(<vscale x 4 x i32> %v)1112; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret i32 %red1113;1114; SIZE-LABEL: 'vreduce_or_nxv4i32'1115; SIZE-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %red = call i32 @llvm.vector.reduce.or.nxv4i32(<vscale x 4 x i32> %v)1116; SIZE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret i32 %red1117;1118  %red = call i32 @llvm.vector.reduce.or.nxv4i32(<vscale x 4 x i32> %v)1119  ret i32 %red1120}1121 1122define signext i32 @vreduce_xor_nxv4i32(<vscale x 4 x i32> %v) {1123; CHECK-LABEL: 'vreduce_xor_nxv4i32'1124; CHECK-NEXT:  Cost Model: Found an estimated cost of 5 for instruction: %red = call i32 @llvm.vector.reduce.xor.nxv4i32(<vscale x 4 x i32> %v)1125; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret i32 %red1126;1127; SIZE-LABEL: 'vreduce_xor_nxv4i32'1128; SIZE-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %red = call i32 @llvm.vector.reduce.xor.nxv4i32(<vscale x 4 x i32> %v)1129; SIZE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret i32 %red1130;1131  %red = call i32 @llvm.vector.reduce.xor.nxv4i32(<vscale x 4 x i32> %v)1132  ret i32 %red1133}1134 1135define i64 @vreduce_add_nxv1i64(<vscale x 1 x i64> %v) {1136; CHECK-LABEL: 'vreduce_add_nxv1i64'1137; CHECK-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %red = call i64 @llvm.vector.reduce.add.nxv1i64(<vscale x 1 x i64> %v)1138; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret i64 %red1139;1140; SIZE-LABEL: 'vreduce_add_nxv1i64'1141; SIZE-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %red = call i64 @llvm.vector.reduce.add.nxv1i64(<vscale x 1 x i64> %v)1142; SIZE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret i64 %red1143;1144  %red = call i64 @llvm.vector.reduce.add.nxv1i64(<vscale x 1 x i64> %v)1145  ret i64 %red1146}1147 1148define i64 @vwreduce_add_nxv1i32(<vscale x 1 x i32> %v) {1149; CHECK-LABEL: 'vwreduce_add_nxv1i32'1150; CHECK-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %e = sext <vscale x 1 x i32> %v to <vscale x 1 x i64>1151; CHECK-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %red = call i64 @llvm.vector.reduce.add.nxv1i64(<vscale x 1 x i64> %e)1152; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret i64 %red1153;1154; SIZE-LABEL: 'vwreduce_add_nxv1i32'1155; SIZE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %e = sext <vscale x 1 x i32> %v to <vscale x 1 x i64>1156; SIZE-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %red = call i64 @llvm.vector.reduce.add.nxv1i64(<vscale x 1 x i64> %e)1157; SIZE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret i64 %red1158;1159  %e = sext <vscale x 1 x i32> %v to <vscale x 1 x i64>1160  %red = call i64 @llvm.vector.reduce.add.nxv1i64(<vscale x 1 x i64> %e)1161  ret i64 %red1162}1163 1164define i64 @vwreduce_uadd_nxv1i32(<vscale x 1 x i32> %v) {1165; CHECK-LABEL: 'vwreduce_uadd_nxv1i32'1166; CHECK-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %e = zext <vscale x 1 x i32> %v to <vscale x 1 x i64>1167; CHECK-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %red = call i64 @llvm.vector.reduce.add.nxv1i64(<vscale x 1 x i64> %e)1168; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret i64 %red1169;1170; SIZE-LABEL: 'vwreduce_uadd_nxv1i32'1171; SIZE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %e = zext <vscale x 1 x i32> %v to <vscale x 1 x i64>1172; SIZE-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %red = call i64 @llvm.vector.reduce.add.nxv1i64(<vscale x 1 x i64> %e)1173; SIZE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret i64 %red1174;1175  %e = zext <vscale x 1 x i32> %v to <vscale x 1 x i64>1176  %red = call i64 @llvm.vector.reduce.add.nxv1i64(<vscale x 1 x i64> %e)1177  ret i64 %red1178}1179 1180define i64 @vreduce_umax_nxv1i64(<vscale x 1 x i64> %v) {1181; CHECK-LABEL: 'vreduce_umax_nxv1i64'1182; CHECK-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %red = call i64 @llvm.vector.reduce.umax.nxv1i64(<vscale x 1 x i64> %v)1183; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret i64 %red1184;1185; SIZE-LABEL: 'vreduce_umax_nxv1i64'1186; SIZE-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %red = call i64 @llvm.vector.reduce.umax.nxv1i64(<vscale x 1 x i64> %v)1187; SIZE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret i64 %red1188;1189  %red = call i64 @llvm.vector.reduce.umax.nxv1i64(<vscale x 1 x i64> %v)1190  ret i64 %red1191}1192 1193define i64 @vreduce_smax_nxv1i64(<vscale x 1 x i64> %v) {1194; CHECK-LABEL: 'vreduce_smax_nxv1i64'1195; CHECK-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %red = call i64 @llvm.vector.reduce.smax.nxv1i64(<vscale x 1 x i64> %v)1196; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret i64 %red1197;1198; SIZE-LABEL: 'vreduce_smax_nxv1i64'1199; SIZE-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %red = call i64 @llvm.vector.reduce.smax.nxv1i64(<vscale x 1 x i64> %v)1200; SIZE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret i64 %red1201;1202  %red = call i64 @llvm.vector.reduce.smax.nxv1i64(<vscale x 1 x i64> %v)1203  ret i64 %red1204}1205 1206define i64 @vreduce_umin_nxv1i64(<vscale x 1 x i64> %v) {1207; CHECK-LABEL: 'vreduce_umin_nxv1i64'1208; CHECK-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %red = call i64 @llvm.vector.reduce.umin.nxv1i64(<vscale x 1 x i64> %v)1209; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret i64 %red1210;1211; SIZE-LABEL: 'vreduce_umin_nxv1i64'1212; SIZE-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %red = call i64 @llvm.vector.reduce.umin.nxv1i64(<vscale x 1 x i64> %v)1213; SIZE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret i64 %red1214;1215  %red = call i64 @llvm.vector.reduce.umin.nxv1i64(<vscale x 1 x i64> %v)1216  ret i64 %red1217}1218 1219define i64 @vreduce_smin_nxv1i64(<vscale x 1 x i64> %v) {1220; CHECK-LABEL: 'vreduce_smin_nxv1i64'1221; CHECK-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %red = call i64 @llvm.vector.reduce.smin.nxv1i64(<vscale x 1 x i64> %v)1222; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret i64 %red1223;1224; SIZE-LABEL: 'vreduce_smin_nxv1i64'1225; SIZE-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %red = call i64 @llvm.vector.reduce.smin.nxv1i64(<vscale x 1 x i64> %v)1226; SIZE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret i64 %red1227;1228  %red = call i64 @llvm.vector.reduce.smin.nxv1i64(<vscale x 1 x i64> %v)1229  ret i64 %red1230}1231 1232define i64 @vreduce_and_nxv1i64(<vscale x 1 x i64> %v) {1233; CHECK-LABEL: 'vreduce_and_nxv1i64'1234; CHECK-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %red = call i64 @llvm.vector.reduce.and.nxv1i64(<vscale x 1 x i64> %v)1235; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret i64 %red1236;1237; SIZE-LABEL: 'vreduce_and_nxv1i64'1238; SIZE-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %red = call i64 @llvm.vector.reduce.and.nxv1i64(<vscale x 1 x i64> %v)1239; SIZE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret i64 %red1240;1241  %red = call i64 @llvm.vector.reduce.and.nxv1i64(<vscale x 1 x i64> %v)1242  ret i64 %red1243}1244 1245define i64 @vreduce_or_nxv1i64(<vscale x 1 x i64> %v) {1246; CHECK-LABEL: 'vreduce_or_nxv1i64'1247; CHECK-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %red = call i64 @llvm.vector.reduce.or.nxv1i64(<vscale x 1 x i64> %v)1248; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret i64 %red1249;1250; SIZE-LABEL: 'vreduce_or_nxv1i64'1251; SIZE-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %red = call i64 @llvm.vector.reduce.or.nxv1i64(<vscale x 1 x i64> %v)1252; SIZE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret i64 %red1253;1254  %red = call i64 @llvm.vector.reduce.or.nxv1i64(<vscale x 1 x i64> %v)1255  ret i64 %red1256}1257 1258define i64 @vreduce_xor_nxv1i64(<vscale x 1 x i64> %v) {1259; CHECK-LABEL: 'vreduce_xor_nxv1i64'1260; CHECK-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %red = call i64 @llvm.vector.reduce.xor.nxv1i64(<vscale x 1 x i64> %v)1261; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret i64 %red1262;1263; SIZE-LABEL: 'vreduce_xor_nxv1i64'1264; SIZE-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %red = call i64 @llvm.vector.reduce.xor.nxv1i64(<vscale x 1 x i64> %v)1265; SIZE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret i64 %red1266;1267  %red = call i64 @llvm.vector.reduce.xor.nxv1i64(<vscale x 1 x i64> %v)1268  ret i64 %red1269}1270 1271define i64 @vreduce_add_nxv2i64(<vscale x 2 x i64> %v) {1272; CHECK-LABEL: 'vreduce_add_nxv2i64'1273; CHECK-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %red = call i64 @llvm.vector.reduce.add.nxv2i64(<vscale x 2 x i64> %v)1274; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret i64 %red1275;1276; SIZE-LABEL: 'vreduce_add_nxv2i64'1277; SIZE-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %red = call i64 @llvm.vector.reduce.add.nxv2i64(<vscale x 2 x i64> %v)1278; SIZE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret i64 %red1279;1280  %red = call i64 @llvm.vector.reduce.add.nxv2i64(<vscale x 2 x i64> %v)1281  ret i64 %red1282}1283 1284define i64 @vwreduce_add_nxv2i32(<vscale x 2 x i32> %v) {1285; CHECK-LABEL: 'vwreduce_add_nxv2i32'1286; CHECK-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %e = sext <vscale x 2 x i32> %v to <vscale x 2 x i64>1287; CHECK-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %red = call i64 @llvm.vector.reduce.add.nxv2i64(<vscale x 2 x i64> %e)1288; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret i64 %red1289;1290; SIZE-LABEL: 'vwreduce_add_nxv2i32'1291; SIZE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %e = sext <vscale x 2 x i32> %v to <vscale x 2 x i64>1292; SIZE-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %red = call i64 @llvm.vector.reduce.add.nxv2i64(<vscale x 2 x i64> %e)1293; SIZE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret i64 %red1294;1295  %e = sext <vscale x 2 x i32> %v to <vscale x 2 x i64>1296  %red = call i64 @llvm.vector.reduce.add.nxv2i64(<vscale x 2 x i64> %e)1297  ret i64 %red1298}1299 1300define i64 @vwreduce_uadd_nxv2i32(<vscale x 2 x i32> %v) {1301; CHECK-LABEL: 'vwreduce_uadd_nxv2i32'1302; CHECK-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %e = zext <vscale x 2 x i32> %v to <vscale x 2 x i64>1303; CHECK-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %red = call i64 @llvm.vector.reduce.add.nxv2i64(<vscale x 2 x i64> %e)1304; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret i64 %red1305;1306; SIZE-LABEL: 'vwreduce_uadd_nxv2i32'1307; SIZE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %e = zext <vscale x 2 x i32> %v to <vscale x 2 x i64>1308; SIZE-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %red = call i64 @llvm.vector.reduce.add.nxv2i64(<vscale x 2 x i64> %e)1309; SIZE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret i64 %red1310;1311  %e = zext <vscale x 2 x i32> %v to <vscale x 2 x i64>1312  %red = call i64 @llvm.vector.reduce.add.nxv2i64(<vscale x 2 x i64> %e)1313  ret i64 %red1314}1315 1316define i64 @vreduce_umax_nxv2i64(<vscale x 2 x i64> %v) {1317; CHECK-LABEL: 'vreduce_umax_nxv2i64'1318; CHECK-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %red = call i64 @llvm.vector.reduce.umax.nxv2i64(<vscale x 2 x i64> %v)1319; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret i64 %red1320;1321; SIZE-LABEL: 'vreduce_umax_nxv2i64'1322; SIZE-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %red = call i64 @llvm.vector.reduce.umax.nxv2i64(<vscale x 2 x i64> %v)1323; SIZE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret i64 %red1324;1325  %red = call i64 @llvm.vector.reduce.umax.nxv2i64(<vscale x 2 x i64> %v)1326  ret i64 %red1327}1328 1329define i64 @vreduce_smax_nxv2i64(<vscale x 2 x i64> %v) {1330; CHECK-LABEL: 'vreduce_smax_nxv2i64'1331; CHECK-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %red = call i64 @llvm.vector.reduce.smax.nxv2i64(<vscale x 2 x i64> %v)1332; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret i64 %red1333;1334; SIZE-LABEL: 'vreduce_smax_nxv2i64'1335; SIZE-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %red = call i64 @llvm.vector.reduce.smax.nxv2i64(<vscale x 2 x i64> %v)1336; SIZE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret i64 %red1337;1338  %red = call i64 @llvm.vector.reduce.smax.nxv2i64(<vscale x 2 x i64> %v)1339  ret i64 %red1340}1341 1342define i64 @vreduce_umin_nxv2i64(<vscale x 2 x i64> %v) {1343; CHECK-LABEL: 'vreduce_umin_nxv2i64'1344; CHECK-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %red = call i64 @llvm.vector.reduce.umin.nxv2i64(<vscale x 2 x i64> %v)1345; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret i64 %red1346;1347; SIZE-LABEL: 'vreduce_umin_nxv2i64'1348; SIZE-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %red = call i64 @llvm.vector.reduce.umin.nxv2i64(<vscale x 2 x i64> %v)1349; SIZE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret i64 %red1350;1351  %red = call i64 @llvm.vector.reduce.umin.nxv2i64(<vscale x 2 x i64> %v)1352  ret i64 %red1353}1354 1355define i64 @vreduce_smin_nxv2i64(<vscale x 2 x i64> %v) {1356; CHECK-LABEL: 'vreduce_smin_nxv2i64'1357; CHECK-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %red = call i64 @llvm.vector.reduce.smin.nxv2i64(<vscale x 2 x i64> %v)1358; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret i64 %red1359;1360; SIZE-LABEL: 'vreduce_smin_nxv2i64'1361; SIZE-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %red = call i64 @llvm.vector.reduce.smin.nxv2i64(<vscale x 2 x i64> %v)1362; SIZE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret i64 %red1363;1364  %red = call i64 @llvm.vector.reduce.smin.nxv2i64(<vscale x 2 x i64> %v)1365  ret i64 %red1366}1367 1368define i64 @vreduce_and_nxv2i64(<vscale x 2 x i64> %v) {1369; CHECK-LABEL: 'vreduce_and_nxv2i64'1370; CHECK-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %red = call i64 @llvm.vector.reduce.and.nxv2i64(<vscale x 2 x i64> %v)1371; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret i64 %red1372;1373; SIZE-LABEL: 'vreduce_and_nxv2i64'1374; SIZE-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %red = call i64 @llvm.vector.reduce.and.nxv2i64(<vscale x 2 x i64> %v)1375; SIZE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret i64 %red1376;1377  %red = call i64 @llvm.vector.reduce.and.nxv2i64(<vscale x 2 x i64> %v)1378  ret i64 %red1379}1380 1381define i64 @vreduce_or_nxv2i64(<vscale x 2 x i64> %v) {1382; CHECK-LABEL: 'vreduce_or_nxv2i64'1383; CHECK-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %red = call i64 @llvm.vector.reduce.or.nxv2i64(<vscale x 2 x i64> %v)1384; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret i64 %red1385;1386; SIZE-LABEL: 'vreduce_or_nxv2i64'1387; SIZE-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %red = call i64 @llvm.vector.reduce.or.nxv2i64(<vscale x 2 x i64> %v)1388; SIZE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret i64 %red1389;1390  %red = call i64 @llvm.vector.reduce.or.nxv2i64(<vscale x 2 x i64> %v)1391  ret i64 %red1392}1393 1394define i64 @vreduce_xor_nxv2i64(<vscale x 2 x i64> %v) {1395; CHECK-LABEL: 'vreduce_xor_nxv2i64'1396; CHECK-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %red = call i64 @llvm.vector.reduce.xor.nxv2i64(<vscale x 2 x i64> %v)1397; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret i64 %red1398;1399; SIZE-LABEL: 'vreduce_xor_nxv2i64'1400; SIZE-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %red = call i64 @llvm.vector.reduce.xor.nxv2i64(<vscale x 2 x i64> %v)1401; SIZE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret i64 %red1402;1403  %red = call i64 @llvm.vector.reduce.xor.nxv2i64(<vscale x 2 x i64> %v)1404  ret i64 %red1405}1406 1407define i64 @vreduce_add_nxv4i64(<vscale x 4 x i64> %v) {1408; CHECK-LABEL: 'vreduce_add_nxv4i64'1409; CHECK-NEXT:  Cost Model: Found an estimated cost of 5 for instruction: %red = call i64 @llvm.vector.reduce.add.nxv4i64(<vscale x 4 x i64> %v)1410; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret i64 %red1411;1412; SIZE-LABEL: 'vreduce_add_nxv4i64'1413; SIZE-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %red = call i64 @llvm.vector.reduce.add.nxv4i64(<vscale x 4 x i64> %v)1414; SIZE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret i64 %red1415;1416  %red = call i64 @llvm.vector.reduce.add.nxv4i64(<vscale x 4 x i64> %v)1417  ret i64 %red1418}1419 1420define i64 @vwreduce_add_nxv4i32(<vscale x 4 x i32> %v) {1421; CHECK-LABEL: 'vwreduce_add_nxv4i32'1422; CHECK-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %e = sext <vscale x 4 x i32> %v to <vscale x 4 x i64>1423; CHECK-NEXT:  Cost Model: Found an estimated cost of 5 for instruction: %red = call i64 @llvm.vector.reduce.add.nxv4i64(<vscale x 4 x i64> %e)1424; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret i64 %red1425;1426; SIZE-LABEL: 'vwreduce_add_nxv4i32'1427; SIZE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %e = sext <vscale x 4 x i32> %v to <vscale x 4 x i64>1428; SIZE-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %red = call i64 @llvm.vector.reduce.add.nxv4i64(<vscale x 4 x i64> %e)1429; SIZE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret i64 %red1430;1431  %e = sext <vscale x 4 x i32> %v to <vscale x 4 x i64>1432  %red = call i64 @llvm.vector.reduce.add.nxv4i64(<vscale x 4 x i64> %e)1433  ret i64 %red1434}1435 1436define i64 @vwreduce_uadd_nxv4i32(<vscale x 4 x i32> %v) {1437; CHECK-LABEL: 'vwreduce_uadd_nxv4i32'1438; CHECK-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %e = zext <vscale x 4 x i32> %v to <vscale x 4 x i64>1439; CHECK-NEXT:  Cost Model: Found an estimated cost of 5 for instruction: %red = call i64 @llvm.vector.reduce.add.nxv4i64(<vscale x 4 x i64> %e)1440; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret i64 %red1441;1442; SIZE-LABEL: 'vwreduce_uadd_nxv4i32'1443; SIZE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %e = zext <vscale x 4 x i32> %v to <vscale x 4 x i64>1444; SIZE-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %red = call i64 @llvm.vector.reduce.add.nxv4i64(<vscale x 4 x i64> %e)1445; SIZE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret i64 %red1446;1447  %e = zext <vscale x 4 x i32> %v to <vscale x 4 x i64>1448  %red = call i64 @llvm.vector.reduce.add.nxv4i64(<vscale x 4 x i64> %e)1449  ret i64 %red1450}1451 1452define i64 @vreduce_umax_nxv4i64(<vscale x 4 x i64> %v) {1453; CHECK-LABEL: 'vreduce_umax_nxv4i64'1454; CHECK-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %red = call i64 @llvm.vector.reduce.umax.nxv4i64(<vscale x 4 x i64> %v)1455; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret i64 %red1456;1457; SIZE-LABEL: 'vreduce_umax_nxv4i64'1458; SIZE-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %red = call i64 @llvm.vector.reduce.umax.nxv4i64(<vscale x 4 x i64> %v)1459; SIZE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret i64 %red1460;1461  %red = call i64 @llvm.vector.reduce.umax.nxv4i64(<vscale x 4 x i64> %v)1462  ret i64 %red1463}1464 1465define i64 @vreduce_smax_nxv4i64(<vscale x 4 x i64> %v) {1466; CHECK-LABEL: 'vreduce_smax_nxv4i64'1467; CHECK-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %red = call i64 @llvm.vector.reduce.smax.nxv4i64(<vscale x 4 x i64> %v)1468; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret i64 %red1469;1470; SIZE-LABEL: 'vreduce_smax_nxv4i64'1471; SIZE-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %red = call i64 @llvm.vector.reduce.smax.nxv4i64(<vscale x 4 x i64> %v)1472; SIZE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret i64 %red1473;1474  %red = call i64 @llvm.vector.reduce.smax.nxv4i64(<vscale x 4 x i64> %v)1475  ret i64 %red1476}1477 1478define i64 @vreduce_umin_nxv4i64(<vscale x 4 x i64> %v) {1479; CHECK-LABEL: 'vreduce_umin_nxv4i64'1480; CHECK-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %red = call i64 @llvm.vector.reduce.umin.nxv4i64(<vscale x 4 x i64> %v)1481; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret i64 %red1482;1483; SIZE-LABEL: 'vreduce_umin_nxv4i64'1484; SIZE-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %red = call i64 @llvm.vector.reduce.umin.nxv4i64(<vscale x 4 x i64> %v)1485; SIZE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret i64 %red1486;1487  %red = call i64 @llvm.vector.reduce.umin.nxv4i64(<vscale x 4 x i64> %v)1488  ret i64 %red1489}1490 1491define i64 @vreduce_smin_nxv4i64(<vscale x 4 x i64> %v) {1492; CHECK-LABEL: 'vreduce_smin_nxv4i64'1493; CHECK-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %red = call i64 @llvm.vector.reduce.smin.nxv4i64(<vscale x 4 x i64> %v)1494; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret i64 %red1495;1496; SIZE-LABEL: 'vreduce_smin_nxv4i64'1497; SIZE-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %red = call i64 @llvm.vector.reduce.smin.nxv4i64(<vscale x 4 x i64> %v)1498; SIZE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret i64 %red1499;1500  %red = call i64 @llvm.vector.reduce.smin.nxv4i64(<vscale x 4 x i64> %v)1501  ret i64 %red1502}1503 1504define i64 @vreduce_and_nxv4i64(<vscale x 4 x i64> %v) {1505; CHECK-LABEL: 'vreduce_and_nxv4i64'1506; CHECK-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %red = call i64 @llvm.vector.reduce.and.nxv4i64(<vscale x 4 x i64> %v)1507; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret i64 %red1508;1509; SIZE-LABEL: 'vreduce_and_nxv4i64'1510; SIZE-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %red = call i64 @llvm.vector.reduce.and.nxv4i64(<vscale x 4 x i64> %v)1511; SIZE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret i64 %red1512;1513  %red = call i64 @llvm.vector.reduce.and.nxv4i64(<vscale x 4 x i64> %v)1514  ret i64 %red1515}1516 1517define i64 @vreduce_or_nxv4i64(<vscale x 4 x i64> %v) {1518; CHECK-LABEL: 'vreduce_or_nxv4i64'1519; CHECK-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %red = call i64 @llvm.vector.reduce.or.nxv4i64(<vscale x 4 x i64> %v)1520; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret i64 %red1521;1522; SIZE-LABEL: 'vreduce_or_nxv4i64'1523; SIZE-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %red = call i64 @llvm.vector.reduce.or.nxv4i64(<vscale x 4 x i64> %v)1524; SIZE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret i64 %red1525;1526  %red = call i64 @llvm.vector.reduce.or.nxv4i64(<vscale x 4 x i64> %v)1527  ret i64 %red1528}1529 1530define i64 @vreduce_xor_nxv4i64(<vscale x 4 x i64> %v) {1531; CHECK-LABEL: 'vreduce_xor_nxv4i64'1532; CHECK-NEXT:  Cost Model: Found an estimated cost of 5 for instruction: %red = call i64 @llvm.vector.reduce.xor.nxv4i64(<vscale x 4 x i64> %v)1533; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret i64 %red1534;1535; SIZE-LABEL: 'vreduce_xor_nxv4i64'1536; SIZE-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %red = call i64 @llvm.vector.reduce.xor.nxv4i64(<vscale x 4 x i64> %v)1537; SIZE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret i64 %red1538;1539  %red = call i64 @llvm.vector.reduce.xor.nxv4i64(<vscale x 4 x i64> %v)1540  ret i64 %red1541}1542