528 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 42; RUN: opt %s -S -riscv-codegenprepare -mtriple=riscv64 -mattr=+v | FileCheck %s3 4define float @reduce_fadd(ptr %f) {5; CHECK-LABEL: define float @reduce_fadd(6; CHECK-SAME: ptr [[F:%.*]]) #[[ATTR2:[0-9]+]] {7; CHECK-NEXT: entry:8; CHECK-NEXT: [[VSCALE:%.*]] = tail call i64 @llvm.vscale.i64()9; CHECK-NEXT: [[VECSIZE:%.*]] = shl nuw nsw i64 [[VSCALE]], 210; CHECK-NEXT: br label [[VECTOR_BODY:%.*]]11; CHECK: vector.body:12; CHECK-NEXT: [[INDEX:%.*]] = phi i64 [ 0, [[ENTRY:%.*]] ], [ [[INDEX_NEXT:%.*]], [[VECTOR_BODY]] ]13; CHECK-NEXT: [[TMP0:%.*]] = phi <vscale x 4 x float> [ insertelement (<vscale x 4 x float> poison, float 0.000000e+00, i64 0), [[ENTRY]] ], [ [[TMP2:%.*]], [[VECTOR_BODY]] ]14; CHECK-NEXT: [[GEP:%.*]] = getelementptr inbounds float, ptr [[F]], i64 [[INDEX]]15; CHECK-NEXT: [[WIDE_LOAD:%.*]] = load <vscale x 4 x float>, ptr [[GEP]], align 416; CHECK-NEXT: [[TMP1:%.*]] = extractelement <vscale x 4 x float> [[TMP0]], i64 017; CHECK-NEXT: [[ACC:%.*]] = tail call float @llvm.vector.reduce.fadd.nxv4f32(float [[TMP1]], <vscale x 4 x float> [[WIDE_LOAD]])18; CHECK-NEXT: [[INDEX_NEXT]] = add nuw i64 [[INDEX]], [[VECSIZE]]19; CHECK-NEXT: [[DONE:%.*]] = icmp eq i64 [[INDEX_NEXT]], 102420; CHECK-NEXT: [[TMP2]] = insertelement <vscale x 4 x float> poison, float [[ACC]], i64 021; CHECK-NEXT: br i1 [[DONE]], label [[EXIT:%.*]], label [[VECTOR_BODY]]22; CHECK: exit:23; CHECK-NEXT: ret float [[ACC]]24;25 26entry:27 %vscale = tail call i64 @llvm.vscale.i64()28 %vecsize = shl nuw nsw i64 %vscale, 229 br label %vector.body30 31vector.body:32 %index = phi i64 [ 0, %entry ], [ %index.next, %vector.body ]33 %vec.phi = phi float [ 0.000000e+00, %entry ], [ %acc, %vector.body ]34 %gep = getelementptr inbounds float, ptr %f, i64 %index35 %wide.load = load <vscale x 4 x float>, ptr %gep, align 436 %acc = tail call float @llvm.vector.reduce.fadd.nxv4f32(float %vec.phi, <vscale x 4 x float> %wide.load)37 %index.next = add nuw i64 %index, %vecsize38 %done = icmp eq i64 %index.next, 102439 br i1 %done, label %exit, label %vector.body40 41exit:42 ret float %acc43}44 45define i32 @vp_reduce_add(ptr %a) {46; CHECK-LABEL: define i32 @vp_reduce_add(47; CHECK-SAME: ptr [[A:%.*]]) #[[ATTR2]] {48; CHECK-NEXT: entry:49; CHECK-NEXT: br label [[VECTOR_BODY:%.*]]50; CHECK: vector.body:51; CHECK-NEXT: [[TRIP_COUNT:%.*]] = phi i64 [ 1024, [[ENTRY:%.*]] ], [ [[REMAINING_TRIP_COUNT:%.*]], [[VECTOR_BODY]] ]52; CHECK-NEXT: [[SCALAR_IND:%.*]] = phi i64 [ 0, [[ENTRY]] ], [ [[NEXT_IND:%.*]], [[VECTOR_BODY]] ]53; CHECK-NEXT: [[TMP0:%.*]] = phi <vscale x 4 x i32> [ insertelement (<vscale x 4 x i32> poison, i32 0, i64 0), [[ENTRY]] ], [ [[TMP2:%.*]], [[VECTOR_BODY]] ]54; CHECK-NEXT: [[EVL:%.*]] = tail call i32 @llvm.experimental.get.vector.length.i64(i64 [[TRIP_COUNT]], i32 4, i1 true)55; CHECK-NEXT: [[EVL2:%.*]] = zext i32 [[EVL]] to i6456; CHECK-NEXT: [[ARRAYIDX6:%.*]] = getelementptr inbounds i32, ptr [[A]], i64 [[SCALAR_IND]]57; CHECK-NEXT: [[WIDE_LOAD:%.*]] = tail call <vscale x 4 x i32> @llvm.vp.load.nxv4i32.p0(ptr [[ARRAYIDX6]], <vscale x 4 x i1> splat (i1 true), i32 [[EVL]])58; CHECK-NEXT: [[TMP1:%.*]] = extractelement <vscale x 4 x i32> [[TMP0]], i64 059; CHECK-NEXT: [[RED:%.*]] = tail call i32 @llvm.vp.reduce.add.nxv4i32(i32 [[TMP1]], <vscale x 4 x i32> [[WIDE_LOAD]], <vscale x 4 x i1> splat (i1 true), i32 [[EVL]])60; CHECK-NEXT: [[REMAINING_TRIP_COUNT]] = sub nuw i64 [[TRIP_COUNT]], [[EVL2]]61; CHECK-NEXT: [[NEXT_IND]] = add i64 [[SCALAR_IND]], [[EVL2]]62; CHECK-NEXT: [[M:%.*]] = icmp eq i64 [[REMAINING_TRIP_COUNT]], 063; CHECK-NEXT: [[TMP2]] = insertelement <vscale x 4 x i32> poison, i32 [[RED]], i64 064; CHECK-NEXT: br i1 [[M]], label [[FOR_COND_CLEANUP:%.*]], label [[VECTOR_BODY]]65; CHECK: for.cond.cleanup:66; CHECK-NEXT: ret i32 [[RED]]67;68entry:69 br label %vector.body70 71vector.body: ; preds = %vector.body, %entry72 %trip.count = phi i64 [ 1024, %entry ], [ %remaining.trip.count, %vector.body ]73 %scalar.ind = phi i64 [ 0, %entry ], [ %next.ind, %vector.body ]74 %red.phi = phi i32 [ 0, %entry ], [ %red, %vector.body ]75 %evl = tail call i32 @llvm.experimental.get.vector.length.i64(i64 %trip.count, i32 4, i1 true)76 %evl2 = zext i32 %evl to i6477 %arrayidx6 = getelementptr inbounds i32, ptr %a, i64 %scalar.ind78 %wide.load = tail call <vscale x 4 x i32> @llvm.vp.load.nxv4i32.p0(ptr %arrayidx6, <vscale x 4 x i1> splat (i1 true), i32 %evl)79 %red = tail call i32 @llvm.vp.reduce.add.nxv4i32(i32 %red.phi, <vscale x 4 x i32> %wide.load, <vscale x 4 x i1> splat (i1 true), i32 %evl)80 %remaining.trip.count = sub nuw i64 %trip.count, %evl281 %next.ind = add i64 %scalar.ind, %evl282 %m = icmp eq i64 %remaining.trip.count, 083 br i1 %m, label %for.cond.cleanup, label %vector.body84 85for.cond.cleanup: ; preds = %vector.body86 ret i32 %red87}88 89define i32 @vp_reduce_and(ptr %a) {90; CHECK-LABEL: define i32 @vp_reduce_and(91; CHECK-SAME: ptr [[A:%.*]]) #[[ATTR2]] {92; CHECK-NEXT: entry:93; CHECK-NEXT: br label [[VECTOR_BODY:%.*]]94; CHECK: vector.body:95; CHECK-NEXT: [[TRIP_COUNT:%.*]] = phi i64 [ 1024, [[ENTRY:%.*]] ], [ [[REMAINING_TRIP_COUNT:%.*]], [[VECTOR_BODY]] ]96; CHECK-NEXT: [[SCALAR_IND:%.*]] = phi i64 [ 0, [[ENTRY]] ], [ [[NEXT_IND:%.*]], [[VECTOR_BODY]] ]97; CHECK-NEXT: [[TMP0:%.*]] = phi <vscale x 4 x i32> [ insertelement (<vscale x 4 x i32> poison, i32 -2147483648, i64 0), [[ENTRY]] ], [ [[TMP2:%.*]], [[VECTOR_BODY]] ]98; CHECK-NEXT: [[EVL:%.*]] = tail call i32 @llvm.experimental.get.vector.length.i64(i64 [[TRIP_COUNT]], i32 4, i1 true)99; CHECK-NEXT: [[EVL2:%.*]] = zext i32 [[EVL]] to i64100; CHECK-NEXT: [[ARRAYIDX6:%.*]] = getelementptr inbounds i32, ptr [[A]], i64 [[SCALAR_IND]]101; CHECK-NEXT: [[WIDE_LOAD:%.*]] = tail call <vscale x 4 x i32> @llvm.vp.load.nxv4i32.p0(ptr [[ARRAYIDX6]], <vscale x 4 x i1> splat (i1 true), i32 [[EVL]])102; CHECK-NEXT: [[TMP1:%.*]] = extractelement <vscale x 4 x i32> [[TMP0]], i64 0103; CHECK-NEXT: [[RED:%.*]] = tail call i32 @llvm.vp.reduce.and.nxv4i32(i32 [[TMP1]], <vscale x 4 x i32> [[WIDE_LOAD]], <vscale x 4 x i1> splat (i1 true), i32 [[EVL]])104; CHECK-NEXT: [[REMAINING_TRIP_COUNT]] = sub nuw i64 [[TRIP_COUNT]], [[EVL2]]105; CHECK-NEXT: [[NEXT_IND]] = add i64 [[SCALAR_IND]], [[EVL2]]106; CHECK-NEXT: [[M:%.*]] = icmp eq i64 [[REMAINING_TRIP_COUNT]], 0107; CHECK-NEXT: [[TMP2]] = insertelement <vscale x 4 x i32> poison, i32 [[RED]], i64 0108; CHECK-NEXT: br i1 [[M]], label [[FOR_COND_CLEANUP:%.*]], label [[VECTOR_BODY]]109; CHECK: for.cond.cleanup:110; CHECK-NEXT: ret i32 [[RED]]111;112entry:113 br label %vector.body114 115vector.body: ; preds = %vector.body, %entry116 %trip.count = phi i64 [ 1024, %entry ], [ %remaining.trip.count, %vector.body ]117 %scalar.ind = phi i64 [ 0, %entry ], [ %next.ind, %vector.body ]118 %red.phi = phi i32 [ -2147483648, %entry ], [ %red, %vector.body ]119 %evl = tail call i32 @llvm.experimental.get.vector.length.i64(i64 %trip.count, i32 4, i1 true)120 %evl2 = zext i32 %evl to i64121 %arrayidx6 = getelementptr inbounds i32, ptr %a, i64 %scalar.ind122 %wide.load = tail call <vscale x 4 x i32> @llvm.vp.load.nxv4i32.p0(ptr %arrayidx6, <vscale x 4 x i1> splat (i1 true), i32 %evl)123 %red = tail call i32 @llvm.vp.reduce.and.nxv4i32(i32 %red.phi, <vscale x 4 x i32> %wide.load, <vscale x 4 x i1> splat (i1 true), i32 %evl)124 %remaining.trip.count = sub nuw i64 %trip.count, %evl2125 %next.ind = add i64 %scalar.ind, %evl2126 %m = icmp eq i64 %remaining.trip.count, 0127 br i1 %m, label %for.cond.cleanup, label %vector.body128 129for.cond.cleanup: ; preds = %vector.body130 ret i32 %red131}132 133define i32 @vp_reduce_or(ptr %a) {134; CHECK-LABEL: define i32 @vp_reduce_or(135; CHECK-SAME: ptr [[A:%.*]]) #[[ATTR2]] {136; CHECK-NEXT: entry:137; CHECK-NEXT: br label [[VECTOR_BODY:%.*]]138; CHECK: vector.body:139; CHECK-NEXT: [[TRIP_COUNT:%.*]] = phi i64 [ 1024, [[ENTRY:%.*]] ], [ [[REMAINING_TRIP_COUNT:%.*]], [[VECTOR_BODY]] ]140; CHECK-NEXT: [[SCALAR_IND:%.*]] = phi i64 [ 0, [[ENTRY]] ], [ [[NEXT_IND:%.*]], [[VECTOR_BODY]] ]141; CHECK-NEXT: [[TMP0:%.*]] = phi <vscale x 4 x i32> [ insertelement (<vscale x 4 x i32> poison, i32 0, i64 0), [[ENTRY]] ], [ [[TMP2:%.*]], [[VECTOR_BODY]] ]142; CHECK-NEXT: [[EVL:%.*]] = tail call i32 @llvm.experimental.get.vector.length.i64(i64 [[TRIP_COUNT]], i32 4, i1 true)143; CHECK-NEXT: [[EVL2:%.*]] = zext i32 [[EVL]] to i64144; CHECK-NEXT: [[ARRAYIDX6:%.*]] = getelementptr inbounds i32, ptr [[A]], i64 [[SCALAR_IND]]145; CHECK-NEXT: [[WIDE_LOAD:%.*]] = tail call <vscale x 4 x i32> @llvm.vp.load.nxv4i32.p0(ptr [[ARRAYIDX6]], <vscale x 4 x i1> splat (i1 true), i32 [[EVL]])146; CHECK-NEXT: [[TMP1:%.*]] = extractelement <vscale x 4 x i32> [[TMP0]], i64 0147; CHECK-NEXT: [[RED:%.*]] = tail call i32 @llvm.vp.reduce.or.nxv4i32(i32 [[TMP1]], <vscale x 4 x i32> [[WIDE_LOAD]], <vscale x 4 x i1> splat (i1 true), i32 [[EVL]])148; CHECK-NEXT: [[REMAINING_TRIP_COUNT]] = sub nuw i64 [[TRIP_COUNT]], [[EVL2]]149; CHECK-NEXT: [[NEXT_IND]] = add i64 [[SCALAR_IND]], [[EVL2]]150; CHECK-NEXT: [[M:%.*]] = icmp eq i64 [[REMAINING_TRIP_COUNT]], 0151; CHECK-NEXT: [[TMP2]] = insertelement <vscale x 4 x i32> poison, i32 [[RED]], i64 0152; CHECK-NEXT: br i1 [[M]], label [[FOR_COND_CLEANUP:%.*]], label [[VECTOR_BODY]]153; CHECK: for.cond.cleanup:154; CHECK-NEXT: ret i32 [[RED]]155;156entry:157 br label %vector.body158 159vector.body: ; preds = %vector.body, %entry160 %trip.count = phi i64 [ 1024, %entry ], [ %remaining.trip.count, %vector.body ]161 %scalar.ind = phi i64 [ 0, %entry ], [ %next.ind, %vector.body ]162 %red.phi = phi i32 [ 0, %entry ], [ %red, %vector.body ]163 %evl = tail call i32 @llvm.experimental.get.vector.length.i64(i64 %trip.count, i32 4, i1 true)164 %evl2 = zext i32 %evl to i64165 %arrayidx6 = getelementptr inbounds i32, ptr %a, i64 %scalar.ind166 %wide.load = tail call <vscale x 4 x i32> @llvm.vp.load.nxv4i32.p0(ptr %arrayidx6, <vscale x 4 x i1> splat (i1 true), i32 %evl)167 %red = tail call i32 @llvm.vp.reduce.or.nxv4i32(i32 %red.phi, <vscale x 4 x i32> %wide.load, <vscale x 4 x i1> splat (i1 true), i32 %evl)168 %remaining.trip.count = sub nuw i64 %trip.count, %evl2169 %next.ind = add i64 %scalar.ind, %evl2170 %m = icmp eq i64 %remaining.trip.count, 0171 br i1 %m, label %for.cond.cleanup, label %vector.body172 173for.cond.cleanup: ; preds = %vector.body174 ret i32 %red175}176 177define i32 @vp_reduce_xor(ptr %a) {178; CHECK-LABEL: define i32 @vp_reduce_xor(179; CHECK-SAME: ptr [[A:%.*]]) #[[ATTR2]] {180; CHECK-NEXT: entry:181; CHECK-NEXT: br label [[VECTOR_BODY:%.*]]182; CHECK: vector.body:183; CHECK-NEXT: [[TRIP_COUNT:%.*]] = phi i64 [ 1024, [[ENTRY:%.*]] ], [ [[REMAINING_TRIP_COUNT:%.*]], [[VECTOR_BODY]] ]184; CHECK-NEXT: [[SCALAR_IND:%.*]] = phi i64 [ 0, [[ENTRY]] ], [ [[NEXT_IND:%.*]], [[VECTOR_BODY]] ]185; CHECK-NEXT: [[TMP0:%.*]] = phi <vscale x 4 x i32> [ insertelement (<vscale x 4 x i32> poison, i32 0, i64 0), [[ENTRY]] ], [ [[TMP2:%.*]], [[VECTOR_BODY]] ]186; CHECK-NEXT: [[EVL:%.*]] = tail call i32 @llvm.experimental.get.vector.length.i64(i64 [[TRIP_COUNT]], i32 4, i1 true)187; CHECK-NEXT: [[EVL2:%.*]] = zext i32 [[EVL]] to i64188; CHECK-NEXT: [[ARRAYIDX6:%.*]] = getelementptr inbounds i32, ptr [[A]], i64 [[SCALAR_IND]]189; CHECK-NEXT: [[WIDE_LOAD:%.*]] = tail call <vscale x 4 x i32> @llvm.vp.load.nxv4i32.p0(ptr [[ARRAYIDX6]], <vscale x 4 x i1> splat (i1 true), i32 [[EVL]])190; CHECK-NEXT: [[TMP1:%.*]] = extractelement <vscale x 4 x i32> [[TMP0]], i64 0191; CHECK-NEXT: [[RED:%.*]] = tail call i32 @llvm.vp.reduce.xor.nxv4i32(i32 [[TMP1]], <vscale x 4 x i32> [[WIDE_LOAD]], <vscale x 4 x i1> splat (i1 true), i32 [[EVL]])192; CHECK-NEXT: [[REMAINING_TRIP_COUNT]] = sub nuw i64 [[TRIP_COUNT]], [[EVL2]]193; CHECK-NEXT: [[NEXT_IND]] = add i64 [[SCALAR_IND]], [[EVL2]]194; CHECK-NEXT: [[M:%.*]] = icmp eq i64 [[REMAINING_TRIP_COUNT]], 0195; CHECK-NEXT: [[TMP2]] = insertelement <vscale x 4 x i32> poison, i32 [[RED]], i64 0196; CHECK-NEXT: br i1 [[M]], label [[FOR_COND_CLEANUP:%.*]], label [[VECTOR_BODY]]197; CHECK: for.cond.cleanup:198; CHECK-NEXT: ret i32 [[RED]]199;200entry:201 br label %vector.body202 203vector.body: ; preds = %vector.body, %entry204 %trip.count = phi i64 [ 1024, %entry ], [ %remaining.trip.count, %vector.body ]205 %scalar.ind = phi i64 [ 0, %entry ], [ %next.ind, %vector.body ]206 %red.phi = phi i32 [ 0, %entry ], [ %red, %vector.body ]207 %evl = tail call i32 @llvm.experimental.get.vector.length.i64(i64 %trip.count, i32 4, i1 true)208 %evl2 = zext i32 %evl to i64209 %arrayidx6 = getelementptr inbounds i32, ptr %a, i64 %scalar.ind210 %wide.load = tail call <vscale x 4 x i32> @llvm.vp.load.nxv4i32.p0(ptr %arrayidx6, <vscale x 4 x i1> splat (i1 true), i32 %evl)211 %red = tail call i32 @llvm.vp.reduce.xor.nxv4i32(i32 %red.phi, <vscale x 4 x i32> %wide.load, <vscale x 4 x i1> splat (i1 true), i32 %evl)212 %remaining.trip.count = sub nuw i64 %trip.count, %evl2213 %next.ind = add i64 %scalar.ind, %evl2214 %m = icmp eq i64 %remaining.trip.count, 0215 br i1 %m, label %for.cond.cleanup, label %vector.body216 217for.cond.cleanup: ; preds = %vector.body218 ret i32 %red219}220 221define i32 @vp_reduce_smax(ptr %a) {222; CHECK-LABEL: define i32 @vp_reduce_smax(223; CHECK-SAME: ptr [[A:%.*]]) #[[ATTR2]] {224; CHECK-NEXT: entry:225; CHECK-NEXT: br label [[VECTOR_BODY:%.*]]226; CHECK: vector.body:227; CHECK-NEXT: [[TRIP_COUNT:%.*]] = phi i64 [ 1024, [[ENTRY:%.*]] ], [ [[REMAINING_TRIP_COUNT:%.*]], [[VECTOR_BODY]] ]228; CHECK-NEXT: [[SCALAR_IND:%.*]] = phi i64 [ 0, [[ENTRY]] ], [ [[NEXT_IND:%.*]], [[VECTOR_BODY]] ]229; CHECK-NEXT: [[TMP0:%.*]] = phi <vscale x 4 x i32> [ insertelement (<vscale x 4 x i32> poison, i32 -2147483648, i64 0), [[ENTRY]] ], [ [[TMP2:%.*]], [[VECTOR_BODY]] ]230; CHECK-NEXT: [[EVL:%.*]] = tail call i32 @llvm.experimental.get.vector.length.i64(i64 [[TRIP_COUNT]], i32 4, i1 true)231; CHECK-NEXT: [[EVL2:%.*]] = zext i32 [[EVL]] to i64232; CHECK-NEXT: [[ARRAYIDX6:%.*]] = getelementptr inbounds i32, ptr [[A]], i64 [[SCALAR_IND]]233; CHECK-NEXT: [[WIDE_LOAD:%.*]] = tail call <vscale x 4 x i32> @llvm.vp.load.nxv4i32.p0(ptr [[ARRAYIDX6]], <vscale x 4 x i1> splat (i1 true), i32 [[EVL]])234; CHECK-NEXT: [[TMP1:%.*]] = extractelement <vscale x 4 x i32> [[TMP0]], i64 0235; CHECK-NEXT: [[RED:%.*]] = tail call i32 @llvm.vp.reduce.smax.nxv4i32(i32 [[TMP1]], <vscale x 4 x i32> [[WIDE_LOAD]], <vscale x 4 x i1> splat (i1 true), i32 [[EVL]])236; CHECK-NEXT: [[REMAINING_TRIP_COUNT]] = sub nuw i64 [[TRIP_COUNT]], [[EVL2]]237; CHECK-NEXT: [[NEXT_IND]] = add i64 [[SCALAR_IND]], [[EVL2]]238; CHECK-NEXT: [[M:%.*]] = icmp eq i64 [[REMAINING_TRIP_COUNT]], 0239; CHECK-NEXT: [[TMP2]] = insertelement <vscale x 4 x i32> poison, i32 [[RED]], i64 0240; CHECK-NEXT: br i1 [[M]], label [[FOR_COND_CLEANUP:%.*]], label [[VECTOR_BODY]]241; CHECK: for.cond.cleanup:242; CHECK-NEXT: ret i32 [[RED]]243;244entry:245 br label %vector.body246 247vector.body: ; preds = %vector.body, %entry248 %trip.count = phi i64 [ 1024, %entry ], [ %remaining.trip.count, %vector.body ]249 %scalar.ind = phi i64 [ 0, %entry ], [ %next.ind, %vector.body ]250 %red.phi = phi i32 [ -2147483648, %entry ], [ %red, %vector.body ]251 %evl = tail call i32 @llvm.experimental.get.vector.length.i64(i64 %trip.count, i32 4, i1 true)252 %evl2 = zext i32 %evl to i64253 %arrayidx6 = getelementptr inbounds i32, ptr %a, i64 %scalar.ind254 %wide.load = tail call <vscale x 4 x i32> @llvm.vp.load.nxv4i32.p0(ptr %arrayidx6, <vscale x 4 x i1> splat (i1 true), i32 %evl)255 %red = tail call i32 @llvm.vp.reduce.smax.nxv4i32(i32 %red.phi, <vscale x 4 x i32> %wide.load, <vscale x 4 x i1> splat (i1 true), i32 %evl)256 %remaining.trip.count = sub nuw i64 %trip.count, %evl2257 %next.ind = add i64 %scalar.ind, %evl2258 %m = icmp eq i64 %remaining.trip.count, 0259 br i1 %m, label %for.cond.cleanup, label %vector.body260 261for.cond.cleanup: ; preds = %vector.body262 ret i32 %red263}264 265define i32 @vp_reduce_smin(ptr %a) {266; CHECK-LABEL: define i32 @vp_reduce_smin(267; CHECK-SAME: ptr [[A:%.*]]) #[[ATTR2]] {268; CHECK-NEXT: entry:269; CHECK-NEXT: br label [[VECTOR_BODY:%.*]]270; CHECK: vector.body:271; CHECK-NEXT: [[TRIP_COUNT:%.*]] = phi i64 [ 1024, [[ENTRY:%.*]] ], [ [[REMAINING_TRIP_COUNT:%.*]], [[VECTOR_BODY]] ]272; CHECK-NEXT: [[SCALAR_IND:%.*]] = phi i64 [ 0, [[ENTRY]] ], [ [[NEXT_IND:%.*]], [[VECTOR_BODY]] ]273; CHECK-NEXT: [[TMP0:%.*]] = phi <vscale x 4 x i32> [ insertelement (<vscale x 4 x i32> poison, i32 2147483647, i64 0), [[ENTRY]] ], [ [[TMP2:%.*]], [[VECTOR_BODY]] ]274; CHECK-NEXT: [[EVL:%.*]] = tail call i32 @llvm.experimental.get.vector.length.i64(i64 [[TRIP_COUNT]], i32 4, i1 true)275; CHECK-NEXT: [[EVL2:%.*]] = zext i32 [[EVL]] to i64276; CHECK-NEXT: [[ARRAYIDX6:%.*]] = getelementptr inbounds i32, ptr [[A]], i64 [[SCALAR_IND]]277; CHECK-NEXT: [[WIDE_LOAD:%.*]] = tail call <vscale x 4 x i32> @llvm.vp.load.nxv4i32.p0(ptr [[ARRAYIDX6]], <vscale x 4 x i1> splat (i1 true), i32 [[EVL]])278; CHECK-NEXT: [[TMP1:%.*]] = extractelement <vscale x 4 x i32> [[TMP0]], i64 0279; CHECK-NEXT: [[RED:%.*]] = tail call i32 @llvm.vp.reduce.smin.nxv4i32(i32 [[TMP1]], <vscale x 4 x i32> [[WIDE_LOAD]], <vscale x 4 x i1> splat (i1 true), i32 [[EVL]])280; CHECK-NEXT: [[REMAINING_TRIP_COUNT]] = sub nuw i64 [[TRIP_COUNT]], [[EVL2]]281; CHECK-NEXT: [[NEXT_IND]] = add i64 [[SCALAR_IND]], [[EVL2]]282; CHECK-NEXT: [[M:%.*]] = icmp eq i64 [[REMAINING_TRIP_COUNT]], 0283; CHECK-NEXT: [[TMP2]] = insertelement <vscale x 4 x i32> poison, i32 [[RED]], i64 0284; CHECK-NEXT: br i1 [[M]], label [[FOR_COND_CLEANUP:%.*]], label [[VECTOR_BODY]]285; CHECK: for.cond.cleanup:286; CHECK-NEXT: ret i32 [[RED]]287;288entry:289 br label %vector.body290 291vector.body: ; preds = %vector.body, %entry292 %trip.count = phi i64 [ 1024, %entry ], [ %remaining.trip.count, %vector.body ]293 %scalar.ind = phi i64 [ 0, %entry ], [ %next.ind, %vector.body ]294 %red.phi = phi i32 [ 2147483647, %entry ], [ %red, %vector.body ]295 %evl = tail call i32 @llvm.experimental.get.vector.length.i64(i64 %trip.count, i32 4, i1 true)296 %evl2 = zext i32 %evl to i64297 %arrayidx6 = getelementptr inbounds i32, ptr %a, i64 %scalar.ind298 %wide.load = tail call <vscale x 4 x i32> @llvm.vp.load.nxv4i32.p0(ptr %arrayidx6, <vscale x 4 x i1> splat (i1 true), i32 %evl)299 %red = tail call i32 @llvm.vp.reduce.smin.nxv4i32(i32 %red.phi, <vscale x 4 x i32> %wide.load, <vscale x 4 x i1> splat (i1 true), i32 %evl)300 %remaining.trip.count = sub nuw i64 %trip.count, %evl2301 %next.ind = add i64 %scalar.ind, %evl2302 %m = icmp eq i64 %remaining.trip.count, 0303 br i1 %m, label %for.cond.cleanup, label %vector.body304 305for.cond.cleanup: ; preds = %vector.body306 ret i32 %red307}308 309define i32 @vp_reduce_umax(ptr %a) {310; CHECK-LABEL: define i32 @vp_reduce_umax(311; CHECK-SAME: ptr [[A:%.*]]) #[[ATTR2]] {312; CHECK-NEXT: entry:313; CHECK-NEXT: br label [[VECTOR_BODY:%.*]]314; CHECK: vector.body:315; CHECK-NEXT: [[TRIP_COUNT:%.*]] = phi i64 [ 1024, [[ENTRY:%.*]] ], [ [[REMAINING_TRIP_COUNT:%.*]], [[VECTOR_BODY]] ]316; CHECK-NEXT: [[SCALAR_IND:%.*]] = phi i64 [ 0, [[ENTRY]] ], [ [[NEXT_IND:%.*]], [[VECTOR_BODY]] ]317; CHECK-NEXT: [[TMP0:%.*]] = phi <vscale x 4 x i32> [ insertelement (<vscale x 4 x i32> poison, i32 0, i64 0), [[ENTRY]] ], [ [[TMP2:%.*]], [[VECTOR_BODY]] ]318; CHECK-NEXT: [[EVL:%.*]] = tail call i32 @llvm.experimental.get.vector.length.i64(i64 [[TRIP_COUNT]], i32 4, i1 true)319; CHECK-NEXT: [[EVL2:%.*]] = zext i32 [[EVL]] to i64320; CHECK-NEXT: [[ARRAYIDX6:%.*]] = getelementptr inbounds i32, ptr [[A]], i64 [[SCALAR_IND]]321; CHECK-NEXT: [[WIDE_LOAD:%.*]] = tail call <vscale x 4 x i32> @llvm.vp.load.nxv4i32.p0(ptr [[ARRAYIDX6]], <vscale x 4 x i1> splat (i1 true), i32 [[EVL]])322; CHECK-NEXT: [[TMP1:%.*]] = extractelement <vscale x 4 x i32> [[TMP0]], i64 0323; CHECK-NEXT: [[RED:%.*]] = tail call i32 @llvm.vp.reduce.umax.nxv4i32(i32 [[TMP1]], <vscale x 4 x i32> [[WIDE_LOAD]], <vscale x 4 x i1> splat (i1 true), i32 [[EVL]])324; CHECK-NEXT: [[REMAINING_TRIP_COUNT]] = sub nuw i64 [[TRIP_COUNT]], [[EVL2]]325; CHECK-NEXT: [[NEXT_IND]] = add i64 [[SCALAR_IND]], [[EVL2]]326; CHECK-NEXT: [[M:%.*]] = icmp eq i64 [[REMAINING_TRIP_COUNT]], 0327; CHECK-NEXT: [[TMP2]] = insertelement <vscale x 4 x i32> poison, i32 [[RED]], i64 0328; CHECK-NEXT: br i1 [[M]], label [[FOR_COND_CLEANUP:%.*]], label [[VECTOR_BODY]]329; CHECK: for.cond.cleanup:330; CHECK-NEXT: ret i32 [[RED]]331;332entry:333 br label %vector.body334 335vector.body: ; preds = %vector.body, %entry336 %trip.count = phi i64 [ 1024, %entry ], [ %remaining.trip.count, %vector.body ]337 %scalar.ind = phi i64 [ 0, %entry ], [ %next.ind, %vector.body ]338 %red.phi = phi i32 [ 0, %entry ], [ %red, %vector.body ]339 %evl = tail call i32 @llvm.experimental.get.vector.length.i64(i64 %trip.count, i32 4, i1 true)340 %evl2 = zext i32 %evl to i64341 %arrayidx6 = getelementptr inbounds i32, ptr %a, i64 %scalar.ind342 %wide.load = tail call <vscale x 4 x i32> @llvm.vp.load.nxv4i32.p0(ptr %arrayidx6, <vscale x 4 x i1> splat (i1 true), i32 %evl)343 %red = tail call i32 @llvm.vp.reduce.umax.nxv4i32(i32 %red.phi, <vscale x 4 x i32> %wide.load, <vscale x 4 x i1> splat (i1 true), i32 %evl)344 %remaining.trip.count = sub nuw i64 %trip.count, %evl2345 %next.ind = add i64 %scalar.ind, %evl2346 %m = icmp eq i64 %remaining.trip.count, 0347 br i1 %m, label %for.cond.cleanup, label %vector.body348 349for.cond.cleanup: ; preds = %vector.body350 ret i32 %red351}352 353define i32 @vp_reduce_umin(ptr %a) {354; CHECK-LABEL: define i32 @vp_reduce_umin(355; CHECK-SAME: ptr [[A:%.*]]) #[[ATTR2]] {356; CHECK-NEXT: entry:357; CHECK-NEXT: br label [[VECTOR_BODY:%.*]]358; CHECK: vector.body:359; CHECK-NEXT: [[TRIP_COUNT:%.*]] = phi i64 [ 1024, [[ENTRY:%.*]] ], [ [[REMAINING_TRIP_COUNT:%.*]], [[VECTOR_BODY]] ]360; CHECK-NEXT: [[SCALAR_IND:%.*]] = phi i64 [ 0, [[ENTRY]] ], [ [[NEXT_IND:%.*]], [[VECTOR_BODY]] ]361; CHECK-NEXT: [[TMP0:%.*]] = phi <vscale x 4 x i32> [ insertelement (<vscale x 4 x i32> poison, i32 -2147483648, i64 0), [[ENTRY]] ], [ [[TMP2:%.*]], [[VECTOR_BODY]] ]362; CHECK-NEXT: [[EVL:%.*]] = tail call i32 @llvm.experimental.get.vector.length.i64(i64 [[TRIP_COUNT]], i32 4, i1 true)363; CHECK-NEXT: [[EVL2:%.*]] = zext i32 [[EVL]] to i64364; CHECK-NEXT: [[ARRAYIDX6:%.*]] = getelementptr inbounds i32, ptr [[A]], i64 [[SCALAR_IND]]365; CHECK-NEXT: [[WIDE_LOAD:%.*]] = tail call <vscale x 4 x i32> @llvm.vp.load.nxv4i32.p0(ptr [[ARRAYIDX6]], <vscale x 4 x i1> splat (i1 true), i32 [[EVL]])366; CHECK-NEXT: [[TMP1:%.*]] = extractelement <vscale x 4 x i32> [[TMP0]], i64 0367; CHECK-NEXT: [[RED:%.*]] = tail call i32 @llvm.vp.reduce.umin.nxv4i32(i32 [[TMP1]], <vscale x 4 x i32> [[WIDE_LOAD]], <vscale x 4 x i1> splat (i1 true), i32 [[EVL]])368; CHECK-NEXT: [[REMAINING_TRIP_COUNT]] = sub nuw i64 [[TRIP_COUNT]], [[EVL2]]369; CHECK-NEXT: [[NEXT_IND]] = add i64 [[SCALAR_IND]], [[EVL2]]370; CHECK-NEXT: [[M:%.*]] = icmp eq i64 [[REMAINING_TRIP_COUNT]], 0371; CHECK-NEXT: [[TMP2]] = insertelement <vscale x 4 x i32> poison, i32 [[RED]], i64 0372; CHECK-NEXT: br i1 [[M]], label [[FOR_COND_CLEANUP:%.*]], label [[VECTOR_BODY]]373; CHECK: for.cond.cleanup:374; CHECK-NEXT: ret i32 [[RED]]375;376entry:377 br label %vector.body378 379vector.body: ; preds = %vector.body, %entry380 %trip.count = phi i64 [ 1024, %entry ], [ %remaining.trip.count, %vector.body ]381 %scalar.ind = phi i64 [ 0, %entry ], [ %next.ind, %vector.body ]382 %red.phi = phi i32 [ -2147483648, %entry ], [ %red, %vector.body ]383 %evl = tail call i32 @llvm.experimental.get.vector.length.i64(i64 %trip.count, i32 4, i1 true)384 %evl2 = zext i32 %evl to i64385 %arrayidx6 = getelementptr inbounds i32, ptr %a, i64 %scalar.ind386 %wide.load = tail call <vscale x 4 x i32> @llvm.vp.load.nxv4i32.p0(ptr %arrayidx6, <vscale x 4 x i1> splat (i1 true), i32 %evl)387 %red = tail call i32 @llvm.vp.reduce.umin.nxv4i32(i32 %red.phi, <vscale x 4 x i32> %wide.load, <vscale x 4 x i1> splat (i1 true), i32 %evl)388 %remaining.trip.count = sub nuw i64 %trip.count, %evl2389 %next.ind = add i64 %scalar.ind, %evl2390 %m = icmp eq i64 %remaining.trip.count, 0391 br i1 %m, label %for.cond.cleanup, label %vector.body392 393for.cond.cleanup: ; preds = %vector.body394 ret i32 %red395}396 397define float @vp_reduce_fadd(ptr %a) {398; CHECK-LABEL: define float @vp_reduce_fadd(399; CHECK-SAME: ptr [[A:%.*]]) #[[ATTR2]] {400; CHECK-NEXT: entry:401; CHECK-NEXT: br label [[VECTOR_BODY:%.*]]402; CHECK: vector.body:403; CHECK-NEXT: [[TRIP_COUNT:%.*]] = phi i64 [ 1024, [[ENTRY:%.*]] ], [ [[REMAINING_TRIP_COUNT:%.*]], [[VECTOR_BODY]] ]404; CHECK-NEXT: [[SCALAR_IND:%.*]] = phi i64 [ 0, [[ENTRY]] ], [ [[NEXT_IND:%.*]], [[VECTOR_BODY]] ]405; CHECK-NEXT: [[TMP0:%.*]] = phi <vscale x 4 x float> [ insertelement (<vscale x 4 x float> poison, float 0.000000e+00, i64 0), [[ENTRY]] ], [ [[TMP2:%.*]], [[VECTOR_BODY]] ]406; CHECK-NEXT: [[EVL:%.*]] = tail call i32 @llvm.experimental.get.vector.length.i64(i64 [[TRIP_COUNT]], i32 4, i1 true)407; CHECK-NEXT: [[EVL2:%.*]] = zext i32 [[EVL]] to i64408; CHECK-NEXT: [[ARRAYIDX6:%.*]] = getelementptr inbounds float, ptr [[A]], i64 [[SCALAR_IND]]409; CHECK-NEXT: [[WIDE_LOAD:%.*]] = tail call <vscale x 4 x float> @llvm.vp.load.nxv4f32.p0(ptr [[ARRAYIDX6]], <vscale x 4 x i1> splat (i1 true), i32 [[EVL]])410; CHECK-NEXT: [[TMP1:%.*]] = extractelement <vscale x 4 x float> [[TMP0]], i64 0411; CHECK-NEXT: [[RED:%.*]] = tail call float @llvm.vp.reduce.fadd.nxv4f32(float [[TMP1]], <vscale x 4 x float> [[WIDE_LOAD]], <vscale x 4 x i1> splat (i1 true), i32 [[EVL]])412; CHECK-NEXT: [[REMAINING_TRIP_COUNT]] = sub nuw i64 [[TRIP_COUNT]], [[EVL2]]413; CHECK-NEXT: [[NEXT_IND]] = add i64 [[SCALAR_IND]], [[EVL2]]414; CHECK-NEXT: [[M:%.*]] = icmp eq i64 [[REMAINING_TRIP_COUNT]], 0415; CHECK-NEXT: [[TMP2]] = insertelement <vscale x 4 x float> poison, float [[RED]], i64 0416; CHECK-NEXT: br i1 [[M]], label [[FOR_COND_CLEANUP:%.*]], label [[VECTOR_BODY]]417; CHECK: for.cond.cleanup:418; CHECK-NEXT: ret float [[RED]]419;420entry:421 br label %vector.body422 423vector.body: ; preds = %vector.body, %entry424 %trip.count = phi i64 [ 1024, %entry ], [ %remaining.trip.count, %vector.body ]425 %scalar.ind = phi i64 [ 0, %entry ], [ %next.ind, %vector.body ]426 %red.phi = phi float [ 0.000000e+00, %entry ], [ %red, %vector.body ]427 %evl = tail call i32 @llvm.experimental.get.vector.length.i64(i64 %trip.count, i32 4, i1 true)428 %evl2 = zext i32 %evl to i64429 %arrayidx6 = getelementptr inbounds float, ptr %a, i64 %scalar.ind430 %wide.load = tail call <vscale x 4 x float> @llvm.vp.load.nxv4f32.p0(ptr %arrayidx6, <vscale x 4 x i1> splat (i1 true), i32 %evl)431 %red = tail call float @llvm.vp.reduce.fadd.nxv4f32(float %red.phi, <vscale x 4 x float> %wide.load, <vscale x 4 x i1> splat (i1 true), i32 %evl)432 %remaining.trip.count = sub nuw i64 %trip.count, %evl2433 %next.ind = add i64 %scalar.ind, %evl2434 %m = icmp eq i64 %remaining.trip.count, 0435 br i1 %m, label %for.cond.cleanup, label %vector.body436 437for.cond.cleanup: ; preds = %vector.body438 ret float %red439}440 441define float @vp_reduce_fmax(ptr %a) {442; CHECK-LABEL: define float @vp_reduce_fmax(443; CHECK-SAME: ptr [[A:%.*]]) #[[ATTR2]] {444; CHECK-NEXT: entry:445; CHECK-NEXT: br label [[VECTOR_BODY:%.*]]446; CHECK: vector.body:447; CHECK-NEXT: [[TRIP_COUNT:%.*]] = phi i64 [ 1024, [[ENTRY:%.*]] ], [ [[REMAINING_TRIP_COUNT:%.*]], [[VECTOR_BODY]] ]448; CHECK-NEXT: [[SCALAR_IND:%.*]] = phi i64 [ 0, [[ENTRY]] ], [ [[NEXT_IND:%.*]], [[VECTOR_BODY]] ]449; CHECK-NEXT: [[TMP0:%.*]] = phi <vscale x 4 x float> [ insertelement (<vscale x 4 x float> poison, float 0.000000e+00, i64 0), [[ENTRY]] ], [ [[TMP2:%.*]], [[VECTOR_BODY]] ]450; CHECK-NEXT: [[EVL:%.*]] = tail call i32 @llvm.experimental.get.vector.length.i64(i64 [[TRIP_COUNT]], i32 4, i1 true)451; CHECK-NEXT: [[EVL2:%.*]] = zext i32 [[EVL]] to i64452; CHECK-NEXT: [[ARRAYIDX6:%.*]] = getelementptr inbounds float, ptr [[A]], i64 [[SCALAR_IND]]453; CHECK-NEXT: [[WIDE_LOAD:%.*]] = tail call <vscale x 4 x float> @llvm.vp.load.nxv4f32.p0(ptr [[ARRAYIDX6]], <vscale x 4 x i1> splat (i1 true), i32 [[EVL]])454; CHECK-NEXT: [[TMP1:%.*]] = extractelement <vscale x 4 x float> [[TMP0]], i64 0455; CHECK-NEXT: [[RED:%.*]] = tail call float @llvm.vp.reduce.fmax.nxv4f32(float [[TMP1]], <vscale x 4 x float> [[WIDE_LOAD]], <vscale x 4 x i1> splat (i1 true), i32 [[EVL]])456; CHECK-NEXT: [[REMAINING_TRIP_COUNT]] = sub nuw i64 [[TRIP_COUNT]], [[EVL2]]457; CHECK-NEXT: [[NEXT_IND]] = add i64 [[SCALAR_IND]], [[EVL2]]458; CHECK-NEXT: [[M:%.*]] = icmp eq i64 [[REMAINING_TRIP_COUNT]], 0459; CHECK-NEXT: [[TMP2]] = insertelement <vscale x 4 x float> poison, float [[RED]], i64 0460; CHECK-NEXT: br i1 [[M]], label [[FOR_COND_CLEANUP:%.*]], label [[VECTOR_BODY]]461; CHECK: for.cond.cleanup:462; CHECK-NEXT: ret float [[RED]]463;464entry:465 br label %vector.body466 467vector.body: ; preds = %vector.body, %entry468 %trip.count = phi i64 [ 1024, %entry ], [ %remaining.trip.count, %vector.body ]469 %scalar.ind = phi i64 [ 0, %entry ], [ %next.ind, %vector.body ]470 %red.phi = phi float [ 0.000000e+00, %entry ], [ %red, %vector.body ]471 %evl = tail call i32 @llvm.experimental.get.vector.length.i64(i64 %trip.count, i32 4, i1 true)472 %evl2 = zext i32 %evl to i64473 %arrayidx6 = getelementptr inbounds float, ptr %a, i64 %scalar.ind474 %wide.load = tail call <vscale x 4 x float> @llvm.vp.load.nxv4f32.p0(ptr %arrayidx6, <vscale x 4 x i1> splat (i1 true), i32 %evl)475 %red = tail call float @llvm.vp.reduce.fmax.nxv4f32(float %red.phi, <vscale x 4 x float> %wide.load, <vscale x 4 x i1> splat (i1 true), i32 %evl)476 %remaining.trip.count = sub nuw i64 %trip.count, %evl2477 %next.ind = add i64 %scalar.ind, %evl2478 %m = icmp eq i64 %remaining.trip.count, 0479 br i1 %m, label %for.cond.cleanup, label %vector.body480 481for.cond.cleanup: ; preds = %vector.body482 ret float %red483}484 485define float @vp_reduce_fmin(ptr %a) {486; CHECK-LABEL: define float @vp_reduce_fmin(487; CHECK-SAME: ptr [[A:%.*]]) #[[ATTR2]] {488; CHECK-NEXT: entry:489; CHECK-NEXT: br label [[VECTOR_BODY:%.*]]490; CHECK: vector.body:491; CHECK-NEXT: [[TRIP_COUNT:%.*]] = phi i64 [ 1024, [[ENTRY:%.*]] ], [ [[REMAINING_TRIP_COUNT:%.*]], [[VECTOR_BODY]] ]492; CHECK-NEXT: [[SCALAR_IND:%.*]] = phi i64 [ 0, [[ENTRY]] ], [ [[NEXT_IND:%.*]], [[VECTOR_BODY]] ]493; CHECK-NEXT: [[TMP0:%.*]] = phi <vscale x 4 x float> [ insertelement (<vscale x 4 x float> poison, float 0.000000e+00, i64 0), [[ENTRY]] ], [ [[TMP2:%.*]], [[VECTOR_BODY]] ]494; CHECK-NEXT: [[EVL:%.*]] = tail call i32 @llvm.experimental.get.vector.length.i64(i64 [[TRIP_COUNT]], i32 4, i1 true)495; CHECK-NEXT: [[EVL2:%.*]] = zext i32 [[EVL]] to i64496; CHECK-NEXT: [[ARRAYIDX6:%.*]] = getelementptr inbounds float, ptr [[A]], i64 [[SCALAR_IND]]497; CHECK-NEXT: [[WIDE_LOAD:%.*]] = tail call <vscale x 4 x float> @llvm.vp.load.nxv4f32.p0(ptr [[ARRAYIDX6]], <vscale x 4 x i1> splat (i1 true), i32 [[EVL]])498; CHECK-NEXT: [[TMP1:%.*]] = extractelement <vscale x 4 x float> [[TMP0]], i64 0499; CHECK-NEXT: [[RED:%.*]] = tail call float @llvm.vp.reduce.fmin.nxv4f32(float [[TMP1]], <vscale x 4 x float> [[WIDE_LOAD]], <vscale x 4 x i1> splat (i1 true), i32 [[EVL]])500; CHECK-NEXT: [[REMAINING_TRIP_COUNT]] = sub nuw i64 [[TRIP_COUNT]], [[EVL2]]501; CHECK-NEXT: [[NEXT_IND]] = add i64 [[SCALAR_IND]], [[EVL2]]502; CHECK-NEXT: [[M:%.*]] = icmp eq i64 [[REMAINING_TRIP_COUNT]], 0503; CHECK-NEXT: [[TMP2]] = insertelement <vscale x 4 x float> poison, float [[RED]], i64 0504; CHECK-NEXT: br i1 [[M]], label [[FOR_COND_CLEANUP:%.*]], label [[VECTOR_BODY]]505; CHECK: for.cond.cleanup:506; CHECK-NEXT: ret float [[RED]]507;508entry:509 br label %vector.body510 511vector.body: ; preds = %vector.body, %entry512 %trip.count = phi i64 [ 1024, %entry ], [ %remaining.trip.count, %vector.body ]513 %scalar.ind = phi i64 [ 0, %entry ], [ %next.ind, %vector.body ]514 %red.phi = phi float [ 0.000000e+00, %entry ], [ %red, %vector.body ]515 %evl = tail call i32 @llvm.experimental.get.vector.length.i64(i64 %trip.count, i32 4, i1 true)516 %evl2 = zext i32 %evl to i64517 %arrayidx6 = getelementptr inbounds float, ptr %a, i64 %scalar.ind518 %wide.load = tail call <vscale x 4 x float> @llvm.vp.load.nxv4f32.p0(ptr %arrayidx6, <vscale x 4 x i1> splat (i1 true), i32 %evl)519 %red = tail call float @llvm.vp.reduce.fmin.nxv4f32(float %red.phi, <vscale x 4 x float> %wide.load, <vscale x 4 x i1> splat (i1 true), i32 %evl)520 %remaining.trip.count = sub nuw i64 %trip.count, %evl2521 %next.ind = add i64 %scalar.ind, %evl2522 %m = icmp eq i64 %remaining.trip.count, 0523 br i1 %m, label %for.cond.cleanup, label %vector.body524 525for.cond.cleanup: ; preds = %vector.body526 ret float %red527}528