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