diff --git a/clang/include/clang/Basic/riscv_vector.td b/clang/include/clang/Basic/riscv_vector.td --- a/clang/include/clang/Basic/riscv_vector.td +++ b/clang/include/clang/Basic/riscv_vector.td @@ -371,10 +371,18 @@ defm "" : RVVOutOp0BuiltinSet; } + multiclass RVVFloatingReductionBuiltinRoundingMode { + defm "" : RVVOutOp0BuiltinSet; + } multiclass RVVFloatingWidenReductionBuiltin { defm "" : RVVOutOp0BuiltinSet; } + multiclass RVVFloatingWidenReductionBuiltinRoundingMode { + defm "" : RVVOutOp0BuiltinSet; + } } multiclass RVVIntReductionBuiltinSet @@ -2484,12 +2492,65 @@ // 15.3. Vector Single-Width Floating-Point Reduction Instructions defm vfredmax : RVVFloatingReductionBuiltin; defm vfredmin : RVVFloatingReductionBuiltin; -defm vfredusum : RVVFloatingReductionBuiltin; -defm vfredosum : RVVFloatingReductionBuiltin; +let ManualCodegen = [{ + { + // LLVM intrinsic + // Unmasked: (passthru, op0, op1, round_mode, vl) + // Masked: (passthru, vector_in, vector_in/scalar_in, mask, frm, vl, policy) + + SmallVector Operands; + bool HasMaskedOff = !( + (IsMasked && (PolicyAttrs & RVV_VTA) && (PolicyAttrs & RVV_VMA)) || + (!IsMasked && PolicyAttrs & RVV_VTA)); + bool HasRoundModeOp = IsMasked ? + (HasMaskedOff ? Ops.size() == 6 : Ops.size() == 5) : + (HasMaskedOff ? Ops.size() == 5 : Ops.size() == 4); + + unsigned Offset = IsMasked ? + (HasMaskedOff ? 2 : 1) : (HasMaskedOff ? 1 : 0); + + if (!HasMaskedOff) + Operands.push_back(llvm::PoisonValue::get(ResultType)); + else + Operands.push_back(Ops[IsMasked ? 1 : 0]); -// 15.4. Vector Widening Floating-Point Reduction Instructions -defm vfwredusum : RVVFloatingWidenReductionBuiltin; -defm vfwredosum : RVVFloatingWidenReductionBuiltin; + Operands.push_back(Ops[Offset]); // op0 + Operands.push_back(Ops[Offset + 1]); // op1 + + if (IsMasked) + Operands.push_back(Ops[0]); // mask + + if (HasRoundModeOp) { + Operands.push_back(Ops[Offset + 2]); // frm + Operands.push_back(Ops[Offset + 3]); // vl + } else { + Operands.push_back(ConstantInt::get(Ops[Offset + 2]->getType(), 7)); // frm + Operands.push_back(Ops[Offset + 2]); // vl + } + + IntrinsicTypes = {ResultType, Ops[Offset]->getType(), + Ops.back()->getType()}; + llvm::Function *F = CGM.getIntrinsic(ID, IntrinsicTypes); + return Builder.CreateCall(F, Operands, ""); + } +}] in { + let HasFRMRoundModeOp = 1 in { + // 15.3. Vector Single-Width Floating-Point Reduction Instructions + defm vfredusum : RVVFloatingReductionBuiltinRoundingMode; + defm vfredosum : RVVFloatingReductionBuiltinRoundingMode; + + // 15.4. Vector Widening Floating-Point Reduction Instructions + defm vfwredusum : RVVFloatingWidenReductionBuiltinRoundingMode; + defm vfwredosum : RVVFloatingWidenReductionBuiltinRoundingMode; + } + // 15.3. Vector Single-Width Floating-Point Reduction Instructions + defm vfredusum : RVVFloatingReductionBuiltin; + defm vfredosum : RVVFloatingReductionBuiltin; + + // 15.4. Vector Widening Floating-Point Reduction Instructions + defm vfwredusum : RVVFloatingWidenReductionBuiltin; + defm vfwredosum : RVVFloatingWidenReductionBuiltin; +} } // 16. Vector Mask Instructions diff --git a/clang/test/CodeGen/RISCV/rvv-intrinsics-autogenerated/non-policy/non-overloaded/vfredosum.c b/clang/test/CodeGen/RISCV/rvv-intrinsics-autogenerated/non-policy/non-overloaded/vfredosum.c --- a/clang/test/CodeGen/RISCV/rvv-intrinsics-autogenerated/non-policy/non-overloaded/vfredosum.c +++ b/clang/test/CodeGen/RISCV/rvv-intrinsics-autogenerated/non-policy/non-overloaded/vfredosum.c @@ -10,7 +10,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfredosum_vs_f16mf4_f16m1 // CHECK-RV64-SAME: ( [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0:[0-9]+]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.nxv4f16.nxv1f16.i64( poison, [[VECTOR]], [[SCALAR]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.nxv4f16.nxv1f16.i64( poison, [[VECTOR]], [[SCALAR]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat16m1_t test_vfredosum_vs_f16mf4_f16m1(vfloat16mf4_t vector, vfloat16m1_t scalar, size_t vl) { @@ -20,7 +20,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfredosum_vs_f16mf2_f16m1 // CHECK-RV64-SAME: ( [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.nxv4f16.nxv2f16.i64( poison, [[VECTOR]], [[SCALAR]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.nxv4f16.nxv2f16.i64( poison, [[VECTOR]], [[SCALAR]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat16m1_t test_vfredosum_vs_f16mf2_f16m1(vfloat16mf2_t vector, vfloat16m1_t scalar, size_t vl) { @@ -30,7 +30,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfredosum_vs_f16m1_f16m1 // CHECK-RV64-SAME: ( [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.nxv4f16.nxv4f16.i64( poison, [[VECTOR]], [[SCALAR]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.nxv4f16.nxv4f16.i64( poison, [[VECTOR]], [[SCALAR]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat16m1_t test_vfredosum_vs_f16m1_f16m1(vfloat16m1_t vector, vfloat16m1_t scalar, size_t vl) { @@ -40,7 +40,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfredosum_vs_f16m2_f16m1 // CHECK-RV64-SAME: ( [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.nxv4f16.nxv8f16.i64( poison, [[VECTOR]], [[SCALAR]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.nxv4f16.nxv8f16.i64( poison, [[VECTOR]], [[SCALAR]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat16m1_t test_vfredosum_vs_f16m2_f16m1(vfloat16m2_t vector, vfloat16m1_t scalar, size_t vl) { @@ -50,7 +50,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfredosum_vs_f16m4_f16m1 // CHECK-RV64-SAME: ( [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.nxv4f16.nxv16f16.i64( poison, [[VECTOR]], [[SCALAR]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.nxv4f16.nxv16f16.i64( poison, [[VECTOR]], [[SCALAR]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat16m1_t test_vfredosum_vs_f16m4_f16m1(vfloat16m4_t vector, vfloat16m1_t scalar, size_t vl) { @@ -60,7 +60,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfredosum_vs_f16m8_f16m1 // CHECK-RV64-SAME: ( [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.nxv4f16.nxv32f16.i64( poison, [[VECTOR]], [[SCALAR]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.nxv4f16.nxv32f16.i64( poison, [[VECTOR]], [[SCALAR]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat16m1_t test_vfredosum_vs_f16m8_f16m1(vfloat16m8_t vector, vfloat16m1_t scalar, size_t vl) { @@ -70,7 +70,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfredosum_vs_f32mf2_f32m1 // CHECK-RV64-SAME: ( [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.nxv2f32.nxv1f32.i64( poison, [[VECTOR]], [[SCALAR]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.nxv2f32.nxv1f32.i64( poison, [[VECTOR]], [[SCALAR]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat32m1_t test_vfredosum_vs_f32mf2_f32m1(vfloat32mf2_t vector, vfloat32m1_t scalar, size_t vl) { @@ -80,7 +80,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfredosum_vs_f32m1_f32m1 // CHECK-RV64-SAME: ( [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.nxv2f32.nxv2f32.i64( poison, [[VECTOR]], [[SCALAR]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.nxv2f32.nxv2f32.i64( poison, [[VECTOR]], [[SCALAR]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat32m1_t test_vfredosum_vs_f32m1_f32m1(vfloat32m1_t vector, vfloat32m1_t scalar, size_t vl) { @@ -90,7 +90,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfredosum_vs_f32m2_f32m1 // CHECK-RV64-SAME: ( [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.nxv2f32.nxv4f32.i64( poison, [[VECTOR]], [[SCALAR]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.nxv2f32.nxv4f32.i64( poison, [[VECTOR]], [[SCALAR]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat32m1_t test_vfredosum_vs_f32m2_f32m1(vfloat32m2_t vector, vfloat32m1_t scalar, size_t vl) { @@ -100,7 +100,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfredosum_vs_f32m4_f32m1 // CHECK-RV64-SAME: ( [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.nxv2f32.nxv8f32.i64( poison, [[VECTOR]], [[SCALAR]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.nxv2f32.nxv8f32.i64( poison, [[VECTOR]], [[SCALAR]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat32m1_t test_vfredosum_vs_f32m4_f32m1(vfloat32m4_t vector, vfloat32m1_t scalar, size_t vl) { @@ -110,7 +110,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfredosum_vs_f32m8_f32m1 // CHECK-RV64-SAME: ( [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.nxv2f32.nxv16f32.i64( poison, [[VECTOR]], [[SCALAR]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.nxv2f32.nxv16f32.i64( poison, [[VECTOR]], [[SCALAR]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat32m1_t test_vfredosum_vs_f32m8_f32m1(vfloat32m8_t vector, vfloat32m1_t scalar, size_t vl) { @@ -120,7 +120,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfredosum_vs_f64m1_f64m1 // CHECK-RV64-SAME: ( [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.nxv1f64.nxv1f64.i64( poison, [[VECTOR]], [[SCALAR]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.nxv1f64.nxv1f64.i64( poison, [[VECTOR]], [[SCALAR]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat64m1_t test_vfredosum_vs_f64m1_f64m1(vfloat64m1_t vector, vfloat64m1_t scalar, size_t vl) { @@ -130,7 +130,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfredosum_vs_f64m2_f64m1 // CHECK-RV64-SAME: ( [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.nxv1f64.nxv2f64.i64( poison, [[VECTOR]], [[SCALAR]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.nxv1f64.nxv2f64.i64( poison, [[VECTOR]], [[SCALAR]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat64m1_t test_vfredosum_vs_f64m2_f64m1(vfloat64m2_t vector, vfloat64m1_t scalar, size_t vl) { @@ -140,7 +140,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfredosum_vs_f64m4_f64m1 // CHECK-RV64-SAME: ( [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.nxv1f64.nxv4f64.i64( poison, [[VECTOR]], [[SCALAR]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.nxv1f64.nxv4f64.i64( poison, [[VECTOR]], [[SCALAR]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat64m1_t test_vfredosum_vs_f64m4_f64m1(vfloat64m4_t vector, vfloat64m1_t scalar, size_t vl) { @@ -150,7 +150,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfredosum_vs_f64m8_f64m1 // CHECK-RV64-SAME: ( [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.nxv1f64.nxv8f64.i64( poison, [[VECTOR]], [[SCALAR]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.nxv1f64.nxv8f64.i64( poison, [[VECTOR]], [[SCALAR]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat64m1_t test_vfredosum_vs_f64m8_f64m1(vfloat64m8_t vector, vfloat64m1_t scalar, size_t vl) { @@ -160,7 +160,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfredosum_vs_f16mf4_f16m1_m // CHECK-RV64-SAME: ( [[MASK:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.mask.nxv4f16.nxv1f16.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.mask.nxv4f16.nxv1f16.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat16m1_t test_vfredosum_vs_f16mf4_f16m1_m(vbool64_t mask, vfloat16mf4_t vector, vfloat16m1_t scalar, size_t vl) { @@ -170,7 +170,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfredosum_vs_f16mf2_f16m1_m // CHECK-RV64-SAME: ( [[MASK:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.mask.nxv4f16.nxv2f16.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.mask.nxv4f16.nxv2f16.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat16m1_t test_vfredosum_vs_f16mf2_f16m1_m(vbool32_t mask, vfloat16mf2_t vector, vfloat16m1_t scalar, size_t vl) { @@ -180,7 +180,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfredosum_vs_f16m1_f16m1_m // CHECK-RV64-SAME: ( [[MASK:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.mask.nxv4f16.nxv4f16.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.mask.nxv4f16.nxv4f16.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat16m1_t test_vfredosum_vs_f16m1_f16m1_m(vbool16_t mask, vfloat16m1_t vector, vfloat16m1_t scalar, size_t vl) { @@ -190,7 +190,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfredosum_vs_f16m2_f16m1_m // CHECK-RV64-SAME: ( [[MASK:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.mask.nxv4f16.nxv8f16.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.mask.nxv4f16.nxv8f16.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat16m1_t test_vfredosum_vs_f16m2_f16m1_m(vbool8_t mask, vfloat16m2_t vector, vfloat16m1_t scalar, size_t vl) { @@ -200,7 +200,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfredosum_vs_f16m4_f16m1_m // CHECK-RV64-SAME: ( [[MASK:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.mask.nxv4f16.nxv16f16.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.mask.nxv4f16.nxv16f16.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat16m1_t test_vfredosum_vs_f16m4_f16m1_m(vbool4_t mask, vfloat16m4_t vector, vfloat16m1_t scalar, size_t vl) { @@ -210,7 +210,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfredosum_vs_f16m8_f16m1_m // CHECK-RV64-SAME: ( [[MASK:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.mask.nxv4f16.nxv32f16.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.mask.nxv4f16.nxv32f16.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat16m1_t test_vfredosum_vs_f16m8_f16m1_m(vbool2_t mask, vfloat16m8_t vector, vfloat16m1_t scalar, size_t vl) { @@ -220,7 +220,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfredosum_vs_f32mf2_f32m1_m // CHECK-RV64-SAME: ( [[MASK:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.mask.nxv2f32.nxv1f32.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.mask.nxv2f32.nxv1f32.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat32m1_t test_vfredosum_vs_f32mf2_f32m1_m(vbool64_t mask, vfloat32mf2_t vector, vfloat32m1_t scalar, size_t vl) { @@ -230,7 +230,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfredosum_vs_f32m1_f32m1_m // CHECK-RV64-SAME: ( [[MASK:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.mask.nxv2f32.nxv2f32.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.mask.nxv2f32.nxv2f32.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat32m1_t test_vfredosum_vs_f32m1_f32m1_m(vbool32_t mask, vfloat32m1_t vector, vfloat32m1_t scalar, size_t vl) { @@ -240,7 +240,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfredosum_vs_f32m2_f32m1_m // CHECK-RV64-SAME: ( [[MASK:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.mask.nxv2f32.nxv4f32.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.mask.nxv2f32.nxv4f32.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat32m1_t test_vfredosum_vs_f32m2_f32m1_m(vbool16_t mask, vfloat32m2_t vector, vfloat32m1_t scalar, size_t vl) { @@ -250,7 +250,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfredosum_vs_f32m4_f32m1_m // CHECK-RV64-SAME: ( [[MASK:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.mask.nxv2f32.nxv8f32.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.mask.nxv2f32.nxv8f32.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat32m1_t test_vfredosum_vs_f32m4_f32m1_m(vbool8_t mask, vfloat32m4_t vector, vfloat32m1_t scalar, size_t vl) { @@ -260,7 +260,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfredosum_vs_f32m8_f32m1_m // CHECK-RV64-SAME: ( [[MASK:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.mask.nxv2f32.nxv16f32.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.mask.nxv2f32.nxv16f32.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat32m1_t test_vfredosum_vs_f32m8_f32m1_m(vbool4_t mask, vfloat32m8_t vector, vfloat32m1_t scalar, size_t vl) { @@ -270,7 +270,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfredosum_vs_f64m1_f64m1_m // CHECK-RV64-SAME: ( [[MASK:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.mask.nxv1f64.nxv1f64.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.mask.nxv1f64.nxv1f64.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat64m1_t test_vfredosum_vs_f64m1_f64m1_m(vbool64_t mask, vfloat64m1_t vector, vfloat64m1_t scalar, size_t vl) { @@ -280,7 +280,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfredosum_vs_f64m2_f64m1_m // CHECK-RV64-SAME: ( [[MASK:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.mask.nxv1f64.nxv2f64.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.mask.nxv1f64.nxv2f64.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat64m1_t test_vfredosum_vs_f64m2_f64m1_m(vbool32_t mask, vfloat64m2_t vector, vfloat64m1_t scalar, size_t vl) { @@ -290,7 +290,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfredosum_vs_f64m4_f64m1_m // CHECK-RV64-SAME: ( [[MASK:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.mask.nxv1f64.nxv4f64.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.mask.nxv1f64.nxv4f64.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat64m1_t test_vfredosum_vs_f64m4_f64m1_m(vbool16_t mask, vfloat64m4_t vector, vfloat64m1_t scalar, size_t vl) { @@ -300,10 +300,310 @@ // CHECK-RV64-LABEL: define dso_local @test_vfredosum_vs_f64m8_f64m1_m // CHECK-RV64-SAME: ( [[MASK:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.mask.nxv1f64.nxv8f64.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.mask.nxv1f64.nxv8f64.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat64m1_t test_vfredosum_vs_f64m8_f64m1_m(vbool8_t mask, vfloat64m8_t vector, vfloat64m1_t scalar, size_t vl) { return __riscv_vfredosum_vs_f64m8_f64m1_m(mask, vector, scalar, vl); } +// CHECK-RV64-LABEL: define dso_local @test_vfredosum_vs_f16mf4_f16m1_rm +// CHECK-RV64-SAME: ( [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.nxv4f16.nxv1f16.i64( poison, [[VECTOR]], [[SCALAR]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat16m1_t test_vfredosum_vs_f16mf4_f16m1_rm(vfloat16mf4_t vector, vfloat16m1_t scalar, size_t vl) { + return __riscv_vfredosum_vs_f16mf4_f16m1_rm(vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfredosum_vs_f16mf2_f16m1_rm +// CHECK-RV64-SAME: ( [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.nxv4f16.nxv2f16.i64( poison, [[VECTOR]], [[SCALAR]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat16m1_t test_vfredosum_vs_f16mf2_f16m1_rm(vfloat16mf2_t vector, vfloat16m1_t scalar, size_t vl) { + return __riscv_vfredosum_vs_f16mf2_f16m1_rm(vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfredosum_vs_f16m1_f16m1_rm +// CHECK-RV64-SAME: ( [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.nxv4f16.nxv4f16.i64( poison, [[VECTOR]], [[SCALAR]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat16m1_t test_vfredosum_vs_f16m1_f16m1_rm(vfloat16m1_t vector, vfloat16m1_t scalar, size_t vl) { + return __riscv_vfredosum_vs_f16m1_f16m1_rm(vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfredosum_vs_f16m2_f16m1_rm +// CHECK-RV64-SAME: ( [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.nxv4f16.nxv8f16.i64( poison, [[VECTOR]], [[SCALAR]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat16m1_t test_vfredosum_vs_f16m2_f16m1_rm(vfloat16m2_t vector, vfloat16m1_t scalar, size_t vl) { + return __riscv_vfredosum_vs_f16m2_f16m1_rm(vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfredosum_vs_f16m4_f16m1_rm +// CHECK-RV64-SAME: ( [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.nxv4f16.nxv16f16.i64( poison, [[VECTOR]], [[SCALAR]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat16m1_t test_vfredosum_vs_f16m4_f16m1_rm(vfloat16m4_t vector, vfloat16m1_t scalar, size_t vl) { + return __riscv_vfredosum_vs_f16m4_f16m1_rm(vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfredosum_vs_f16m8_f16m1_rm +// CHECK-RV64-SAME: ( [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.nxv4f16.nxv32f16.i64( poison, [[VECTOR]], [[SCALAR]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat16m1_t test_vfredosum_vs_f16m8_f16m1_rm(vfloat16m8_t vector, vfloat16m1_t scalar, size_t vl) { + return __riscv_vfredosum_vs_f16m8_f16m1_rm(vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfredosum_vs_f32mf2_f32m1_rm +// CHECK-RV64-SAME: ( [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.nxv2f32.nxv1f32.i64( poison, [[VECTOR]], [[SCALAR]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat32m1_t test_vfredosum_vs_f32mf2_f32m1_rm(vfloat32mf2_t vector, vfloat32m1_t scalar, size_t vl) { + return __riscv_vfredosum_vs_f32mf2_f32m1_rm(vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfredosum_vs_f32m1_f32m1_rm +// CHECK-RV64-SAME: ( [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.nxv2f32.nxv2f32.i64( poison, [[VECTOR]], [[SCALAR]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat32m1_t test_vfredosum_vs_f32m1_f32m1_rm(vfloat32m1_t vector, vfloat32m1_t scalar, size_t vl) { + return __riscv_vfredosum_vs_f32m1_f32m1_rm(vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfredosum_vs_f32m2_f32m1_rm +// CHECK-RV64-SAME: ( [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.nxv2f32.nxv4f32.i64( poison, [[VECTOR]], [[SCALAR]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat32m1_t test_vfredosum_vs_f32m2_f32m1_rm(vfloat32m2_t vector, vfloat32m1_t scalar, size_t vl) { + return __riscv_vfredosum_vs_f32m2_f32m1_rm(vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfredosum_vs_f32m4_f32m1_rm +// CHECK-RV64-SAME: ( [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.nxv2f32.nxv8f32.i64( poison, [[VECTOR]], [[SCALAR]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat32m1_t test_vfredosum_vs_f32m4_f32m1_rm(vfloat32m4_t vector, vfloat32m1_t scalar, size_t vl) { + return __riscv_vfredosum_vs_f32m4_f32m1_rm(vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfredosum_vs_f32m8_f32m1_rm +// CHECK-RV64-SAME: ( [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.nxv2f32.nxv16f32.i64( poison, [[VECTOR]], [[SCALAR]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat32m1_t test_vfredosum_vs_f32m8_f32m1_rm(vfloat32m8_t vector, vfloat32m1_t scalar, size_t vl) { + return __riscv_vfredosum_vs_f32m8_f32m1_rm(vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfredosum_vs_f64m1_f64m1_rm +// CHECK-RV64-SAME: ( [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.nxv1f64.nxv1f64.i64( poison, [[VECTOR]], [[SCALAR]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat64m1_t test_vfredosum_vs_f64m1_f64m1_rm(vfloat64m1_t vector, vfloat64m1_t scalar, size_t vl) { + return __riscv_vfredosum_vs_f64m1_f64m1_rm(vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfredosum_vs_f64m2_f64m1_rm +// CHECK-RV64-SAME: ( [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.nxv1f64.nxv2f64.i64( poison, [[VECTOR]], [[SCALAR]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat64m1_t test_vfredosum_vs_f64m2_f64m1_rm(vfloat64m2_t vector, vfloat64m1_t scalar, size_t vl) { + return __riscv_vfredosum_vs_f64m2_f64m1_rm(vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfredosum_vs_f64m4_f64m1_rm +// CHECK-RV64-SAME: ( [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.nxv1f64.nxv4f64.i64( poison, [[VECTOR]], [[SCALAR]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat64m1_t test_vfredosum_vs_f64m4_f64m1_rm(vfloat64m4_t vector, vfloat64m1_t scalar, size_t vl) { + return __riscv_vfredosum_vs_f64m4_f64m1_rm(vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfredosum_vs_f64m8_f64m1_rm +// CHECK-RV64-SAME: ( [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.nxv1f64.nxv8f64.i64( poison, [[VECTOR]], [[SCALAR]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat64m1_t test_vfredosum_vs_f64m8_f64m1_rm(vfloat64m8_t vector, vfloat64m1_t scalar, size_t vl) { + return __riscv_vfredosum_vs_f64m8_f64m1_rm(vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfredosum_vs_f16mf4_f16m1_rm_m +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.mask.nxv4f16.nxv1f16.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat16m1_t test_vfredosum_vs_f16mf4_f16m1_rm_m(vbool64_t mask, vfloat16mf4_t vector, vfloat16m1_t scalar, size_t vl) { + return __riscv_vfredosum_vs_f16mf4_f16m1_rm_m(mask, vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfredosum_vs_f16mf2_f16m1_rm_m +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.mask.nxv4f16.nxv2f16.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat16m1_t test_vfredosum_vs_f16mf2_f16m1_rm_m(vbool32_t mask, vfloat16mf2_t vector, vfloat16m1_t scalar, size_t vl) { + return __riscv_vfredosum_vs_f16mf2_f16m1_rm_m(mask, vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfredosum_vs_f16m1_f16m1_rm_m +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.mask.nxv4f16.nxv4f16.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat16m1_t test_vfredosum_vs_f16m1_f16m1_rm_m(vbool16_t mask, vfloat16m1_t vector, vfloat16m1_t scalar, size_t vl) { + return __riscv_vfredosum_vs_f16m1_f16m1_rm_m(mask, vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfredosum_vs_f16m2_f16m1_rm_m +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.mask.nxv4f16.nxv8f16.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat16m1_t test_vfredosum_vs_f16m2_f16m1_rm_m(vbool8_t mask, vfloat16m2_t vector, vfloat16m1_t scalar, size_t vl) { + return __riscv_vfredosum_vs_f16m2_f16m1_rm_m(mask, vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfredosum_vs_f16m4_f16m1_rm_m +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.mask.nxv4f16.nxv16f16.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat16m1_t test_vfredosum_vs_f16m4_f16m1_rm_m(vbool4_t mask, vfloat16m4_t vector, vfloat16m1_t scalar, size_t vl) { + return __riscv_vfredosum_vs_f16m4_f16m1_rm_m(mask, vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfredosum_vs_f16m8_f16m1_rm_m +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.mask.nxv4f16.nxv32f16.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat16m1_t test_vfredosum_vs_f16m8_f16m1_rm_m(vbool2_t mask, vfloat16m8_t vector, vfloat16m1_t scalar, size_t vl) { + return __riscv_vfredosum_vs_f16m8_f16m1_rm_m(mask, vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfredosum_vs_f32mf2_f32m1_rm_m +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.mask.nxv2f32.nxv1f32.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat32m1_t test_vfredosum_vs_f32mf2_f32m1_rm_m(vbool64_t mask, vfloat32mf2_t vector, vfloat32m1_t scalar, size_t vl) { + return __riscv_vfredosum_vs_f32mf2_f32m1_rm_m(mask, vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfredosum_vs_f32m1_f32m1_rm_m +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.mask.nxv2f32.nxv2f32.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat32m1_t test_vfredosum_vs_f32m1_f32m1_rm_m(vbool32_t mask, vfloat32m1_t vector, vfloat32m1_t scalar, size_t vl) { + return __riscv_vfredosum_vs_f32m1_f32m1_rm_m(mask, vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfredosum_vs_f32m2_f32m1_rm_m +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.mask.nxv2f32.nxv4f32.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat32m1_t test_vfredosum_vs_f32m2_f32m1_rm_m(vbool16_t mask, vfloat32m2_t vector, vfloat32m1_t scalar, size_t vl) { + return __riscv_vfredosum_vs_f32m2_f32m1_rm_m(mask, vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfredosum_vs_f32m4_f32m1_rm_m +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.mask.nxv2f32.nxv8f32.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat32m1_t test_vfredosum_vs_f32m4_f32m1_rm_m(vbool8_t mask, vfloat32m4_t vector, vfloat32m1_t scalar, size_t vl) { + return __riscv_vfredosum_vs_f32m4_f32m1_rm_m(mask, vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfredosum_vs_f32m8_f32m1_rm_m +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.mask.nxv2f32.nxv16f32.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat32m1_t test_vfredosum_vs_f32m8_f32m1_rm_m(vbool4_t mask, vfloat32m8_t vector, vfloat32m1_t scalar, size_t vl) { + return __riscv_vfredosum_vs_f32m8_f32m1_rm_m(mask, vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfredosum_vs_f64m1_f64m1_rm_m +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.mask.nxv1f64.nxv1f64.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat64m1_t test_vfredosum_vs_f64m1_f64m1_rm_m(vbool64_t mask, vfloat64m1_t vector, vfloat64m1_t scalar, size_t vl) { + return __riscv_vfredosum_vs_f64m1_f64m1_rm_m(mask, vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfredosum_vs_f64m2_f64m1_rm_m +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.mask.nxv1f64.nxv2f64.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat64m1_t test_vfredosum_vs_f64m2_f64m1_rm_m(vbool32_t mask, vfloat64m2_t vector, vfloat64m1_t scalar, size_t vl) { + return __riscv_vfredosum_vs_f64m2_f64m1_rm_m(mask, vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfredosum_vs_f64m4_f64m1_rm_m +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.mask.nxv1f64.nxv4f64.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat64m1_t test_vfredosum_vs_f64m4_f64m1_rm_m(vbool16_t mask, vfloat64m4_t vector, vfloat64m1_t scalar, size_t vl) { + return __riscv_vfredosum_vs_f64m4_f64m1_rm_m(mask, vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfredosum_vs_f64m8_f64m1_rm_m +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.mask.nxv1f64.nxv8f64.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat64m1_t test_vfredosum_vs_f64m8_f64m1_rm_m(vbool8_t mask, vfloat64m8_t vector, vfloat64m1_t scalar, size_t vl) { + return __riscv_vfredosum_vs_f64m8_f64m1_rm_m(mask, vector, scalar, __RISCV_FRM_RNE, vl); +} + diff --git a/clang/test/CodeGen/RISCV/rvv-intrinsics-autogenerated/non-policy/non-overloaded/vfredusum.c b/clang/test/CodeGen/RISCV/rvv-intrinsics-autogenerated/non-policy/non-overloaded/vfredusum.c --- a/clang/test/CodeGen/RISCV/rvv-intrinsics-autogenerated/non-policy/non-overloaded/vfredusum.c +++ b/clang/test/CodeGen/RISCV/rvv-intrinsics-autogenerated/non-policy/non-overloaded/vfredusum.c @@ -10,7 +10,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfredusum_vs_f16mf4_f16m1 // CHECK-RV64-SAME: ( [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0:[0-9]+]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.nxv4f16.nxv1f16.i64( poison, [[VECTOR]], [[SCALAR]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.nxv4f16.nxv1f16.i64( poison, [[VECTOR]], [[SCALAR]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat16m1_t test_vfredusum_vs_f16mf4_f16m1(vfloat16mf4_t vector, vfloat16m1_t scalar, size_t vl) { @@ -20,7 +20,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfredusum_vs_f16mf2_f16m1 // CHECK-RV64-SAME: ( [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.nxv4f16.nxv2f16.i64( poison, [[VECTOR]], [[SCALAR]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.nxv4f16.nxv2f16.i64( poison, [[VECTOR]], [[SCALAR]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat16m1_t test_vfredusum_vs_f16mf2_f16m1(vfloat16mf2_t vector, vfloat16m1_t scalar, size_t vl) { @@ -30,7 +30,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfredusum_vs_f16m1_f16m1 // CHECK-RV64-SAME: ( [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.nxv4f16.nxv4f16.i64( poison, [[VECTOR]], [[SCALAR]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.nxv4f16.nxv4f16.i64( poison, [[VECTOR]], [[SCALAR]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat16m1_t test_vfredusum_vs_f16m1_f16m1(vfloat16m1_t vector, vfloat16m1_t scalar, size_t vl) { @@ -40,7 +40,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfredusum_vs_f16m2_f16m1 // CHECK-RV64-SAME: ( [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.nxv4f16.nxv8f16.i64( poison, [[VECTOR]], [[SCALAR]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.nxv4f16.nxv8f16.i64( poison, [[VECTOR]], [[SCALAR]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat16m1_t test_vfredusum_vs_f16m2_f16m1(vfloat16m2_t vector, vfloat16m1_t scalar, size_t vl) { @@ -50,7 +50,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfredusum_vs_f16m4_f16m1 // CHECK-RV64-SAME: ( [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.nxv4f16.nxv16f16.i64( poison, [[VECTOR]], [[SCALAR]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.nxv4f16.nxv16f16.i64( poison, [[VECTOR]], [[SCALAR]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat16m1_t test_vfredusum_vs_f16m4_f16m1(vfloat16m4_t vector, vfloat16m1_t scalar, size_t vl) { @@ -60,7 +60,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfredusum_vs_f16m8_f16m1 // CHECK-RV64-SAME: ( [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.nxv4f16.nxv32f16.i64( poison, [[VECTOR]], [[SCALAR]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.nxv4f16.nxv32f16.i64( poison, [[VECTOR]], [[SCALAR]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat16m1_t test_vfredusum_vs_f16m8_f16m1(vfloat16m8_t vector, vfloat16m1_t scalar, size_t vl) { @@ -70,7 +70,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfredusum_vs_f32mf2_f32m1 // CHECK-RV64-SAME: ( [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.nxv2f32.nxv1f32.i64( poison, [[VECTOR]], [[SCALAR]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.nxv2f32.nxv1f32.i64( poison, [[VECTOR]], [[SCALAR]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat32m1_t test_vfredusum_vs_f32mf2_f32m1(vfloat32mf2_t vector, vfloat32m1_t scalar, size_t vl) { @@ -80,7 +80,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfredusum_vs_f32m1_f32m1 // CHECK-RV64-SAME: ( [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.nxv2f32.nxv2f32.i64( poison, [[VECTOR]], [[SCALAR]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.nxv2f32.nxv2f32.i64( poison, [[VECTOR]], [[SCALAR]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat32m1_t test_vfredusum_vs_f32m1_f32m1(vfloat32m1_t vector, vfloat32m1_t scalar, size_t vl) { @@ -90,7 +90,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfredusum_vs_f32m2_f32m1 // CHECK-RV64-SAME: ( [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.nxv2f32.nxv4f32.i64( poison, [[VECTOR]], [[SCALAR]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.nxv2f32.nxv4f32.i64( poison, [[VECTOR]], [[SCALAR]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat32m1_t test_vfredusum_vs_f32m2_f32m1(vfloat32m2_t vector, vfloat32m1_t scalar, size_t vl) { @@ -100,7 +100,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfredusum_vs_f32m4_f32m1 // CHECK-RV64-SAME: ( [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.nxv2f32.nxv8f32.i64( poison, [[VECTOR]], [[SCALAR]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.nxv2f32.nxv8f32.i64( poison, [[VECTOR]], [[SCALAR]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat32m1_t test_vfredusum_vs_f32m4_f32m1(vfloat32m4_t vector, vfloat32m1_t scalar, size_t vl) { @@ -110,7 +110,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfredusum_vs_f32m8_f32m1 // CHECK-RV64-SAME: ( [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.nxv2f32.nxv16f32.i64( poison, [[VECTOR]], [[SCALAR]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.nxv2f32.nxv16f32.i64( poison, [[VECTOR]], [[SCALAR]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat32m1_t test_vfredusum_vs_f32m8_f32m1(vfloat32m8_t vector, vfloat32m1_t scalar, size_t vl) { @@ -120,7 +120,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfredusum_vs_f64m1_f64m1 // CHECK-RV64-SAME: ( [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.nxv1f64.nxv1f64.i64( poison, [[VECTOR]], [[SCALAR]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.nxv1f64.nxv1f64.i64( poison, [[VECTOR]], [[SCALAR]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat64m1_t test_vfredusum_vs_f64m1_f64m1(vfloat64m1_t vector, vfloat64m1_t scalar, size_t vl) { @@ -130,7 +130,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfredusum_vs_f64m2_f64m1 // CHECK-RV64-SAME: ( [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.nxv1f64.nxv2f64.i64( poison, [[VECTOR]], [[SCALAR]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.nxv1f64.nxv2f64.i64( poison, [[VECTOR]], [[SCALAR]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat64m1_t test_vfredusum_vs_f64m2_f64m1(vfloat64m2_t vector, vfloat64m1_t scalar, size_t vl) { @@ -140,7 +140,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfredusum_vs_f64m4_f64m1 // CHECK-RV64-SAME: ( [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.nxv1f64.nxv4f64.i64( poison, [[VECTOR]], [[SCALAR]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.nxv1f64.nxv4f64.i64( poison, [[VECTOR]], [[SCALAR]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat64m1_t test_vfredusum_vs_f64m4_f64m1(vfloat64m4_t vector, vfloat64m1_t scalar, size_t vl) { @@ -150,7 +150,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfredusum_vs_f64m8_f64m1 // CHECK-RV64-SAME: ( [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.nxv1f64.nxv8f64.i64( poison, [[VECTOR]], [[SCALAR]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.nxv1f64.nxv8f64.i64( poison, [[VECTOR]], [[SCALAR]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat64m1_t test_vfredusum_vs_f64m8_f64m1(vfloat64m8_t vector, vfloat64m1_t scalar, size_t vl) { @@ -160,7 +160,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfredusum_vs_f16mf4_f16m1_m // CHECK-RV64-SAME: ( [[MASK:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.mask.nxv4f16.nxv1f16.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.mask.nxv4f16.nxv1f16.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat16m1_t test_vfredusum_vs_f16mf4_f16m1_m(vbool64_t mask, vfloat16mf4_t vector, vfloat16m1_t scalar, size_t vl) { @@ -170,7 +170,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfredusum_vs_f16mf2_f16m1_m // CHECK-RV64-SAME: ( [[MASK:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.mask.nxv4f16.nxv2f16.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.mask.nxv4f16.nxv2f16.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat16m1_t test_vfredusum_vs_f16mf2_f16m1_m(vbool32_t mask, vfloat16mf2_t vector, vfloat16m1_t scalar, size_t vl) { @@ -180,7 +180,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfredusum_vs_f16m1_f16m1_m // CHECK-RV64-SAME: ( [[MASK:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.mask.nxv4f16.nxv4f16.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.mask.nxv4f16.nxv4f16.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat16m1_t test_vfredusum_vs_f16m1_f16m1_m(vbool16_t mask, vfloat16m1_t vector, vfloat16m1_t scalar, size_t vl) { @@ -190,7 +190,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfredusum_vs_f16m2_f16m1_m // CHECK-RV64-SAME: ( [[MASK:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.mask.nxv4f16.nxv8f16.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.mask.nxv4f16.nxv8f16.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat16m1_t test_vfredusum_vs_f16m2_f16m1_m(vbool8_t mask, vfloat16m2_t vector, vfloat16m1_t scalar, size_t vl) { @@ -200,7 +200,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfredusum_vs_f16m4_f16m1_m // CHECK-RV64-SAME: ( [[MASK:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.mask.nxv4f16.nxv16f16.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.mask.nxv4f16.nxv16f16.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat16m1_t test_vfredusum_vs_f16m4_f16m1_m(vbool4_t mask, vfloat16m4_t vector, vfloat16m1_t scalar, size_t vl) { @@ -210,7 +210,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfredusum_vs_f16m8_f16m1_m // CHECK-RV64-SAME: ( [[MASK:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.mask.nxv4f16.nxv32f16.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.mask.nxv4f16.nxv32f16.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat16m1_t test_vfredusum_vs_f16m8_f16m1_m(vbool2_t mask, vfloat16m8_t vector, vfloat16m1_t scalar, size_t vl) { @@ -220,7 +220,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfredusum_vs_f32mf2_f32m1_m // CHECK-RV64-SAME: ( [[MASK:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.mask.nxv2f32.nxv1f32.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.mask.nxv2f32.nxv1f32.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat32m1_t test_vfredusum_vs_f32mf2_f32m1_m(vbool64_t mask, vfloat32mf2_t vector, vfloat32m1_t scalar, size_t vl) { @@ -230,7 +230,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfredusum_vs_f32m1_f32m1_m // CHECK-RV64-SAME: ( [[MASK:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.mask.nxv2f32.nxv2f32.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.mask.nxv2f32.nxv2f32.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat32m1_t test_vfredusum_vs_f32m1_f32m1_m(vbool32_t mask, vfloat32m1_t vector, vfloat32m1_t scalar, size_t vl) { @@ -240,7 +240,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfredusum_vs_f32m2_f32m1_m // CHECK-RV64-SAME: ( [[MASK:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.mask.nxv2f32.nxv4f32.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.mask.nxv2f32.nxv4f32.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat32m1_t test_vfredusum_vs_f32m2_f32m1_m(vbool16_t mask, vfloat32m2_t vector, vfloat32m1_t scalar, size_t vl) { @@ -250,7 +250,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfredusum_vs_f32m4_f32m1_m // CHECK-RV64-SAME: ( [[MASK:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.mask.nxv2f32.nxv8f32.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.mask.nxv2f32.nxv8f32.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat32m1_t test_vfredusum_vs_f32m4_f32m1_m(vbool8_t mask, vfloat32m4_t vector, vfloat32m1_t scalar, size_t vl) { @@ -260,7 +260,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfredusum_vs_f32m8_f32m1_m // CHECK-RV64-SAME: ( [[MASK:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.mask.nxv2f32.nxv16f32.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.mask.nxv2f32.nxv16f32.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat32m1_t test_vfredusum_vs_f32m8_f32m1_m(vbool4_t mask, vfloat32m8_t vector, vfloat32m1_t scalar, size_t vl) { @@ -270,7 +270,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfredusum_vs_f64m1_f64m1_m // CHECK-RV64-SAME: ( [[MASK:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.mask.nxv1f64.nxv1f64.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.mask.nxv1f64.nxv1f64.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat64m1_t test_vfredusum_vs_f64m1_f64m1_m(vbool64_t mask, vfloat64m1_t vector, vfloat64m1_t scalar, size_t vl) { @@ -280,7 +280,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfredusum_vs_f64m2_f64m1_m // CHECK-RV64-SAME: ( [[MASK:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.mask.nxv1f64.nxv2f64.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.mask.nxv1f64.nxv2f64.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat64m1_t test_vfredusum_vs_f64m2_f64m1_m(vbool32_t mask, vfloat64m2_t vector, vfloat64m1_t scalar, size_t vl) { @@ -290,7 +290,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfredusum_vs_f64m4_f64m1_m // CHECK-RV64-SAME: ( [[MASK:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.mask.nxv1f64.nxv4f64.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.mask.nxv1f64.nxv4f64.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat64m1_t test_vfredusum_vs_f64m4_f64m1_m(vbool16_t mask, vfloat64m4_t vector, vfloat64m1_t scalar, size_t vl) { @@ -300,10 +300,310 @@ // CHECK-RV64-LABEL: define dso_local @test_vfredusum_vs_f64m8_f64m1_m // CHECK-RV64-SAME: ( [[MASK:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.mask.nxv1f64.nxv8f64.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.mask.nxv1f64.nxv8f64.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat64m1_t test_vfredusum_vs_f64m8_f64m1_m(vbool8_t mask, vfloat64m8_t vector, vfloat64m1_t scalar, size_t vl) { return __riscv_vfredusum_vs_f64m8_f64m1_m(mask, vector, scalar, vl); } +// CHECK-RV64-LABEL: define dso_local @test_vfredusum_vs_f16mf4_f16m1_rm +// CHECK-RV64-SAME: ( [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.nxv4f16.nxv1f16.i64( poison, [[VECTOR]], [[SCALAR]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat16m1_t test_vfredusum_vs_f16mf4_f16m1_rm(vfloat16mf4_t vector, vfloat16m1_t scalar, size_t vl) { + return __riscv_vfredusum_vs_f16mf4_f16m1_rm(vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfredusum_vs_f16mf2_f16m1_rm +// CHECK-RV64-SAME: ( [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.nxv4f16.nxv2f16.i64( poison, [[VECTOR]], [[SCALAR]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat16m1_t test_vfredusum_vs_f16mf2_f16m1_rm(vfloat16mf2_t vector, vfloat16m1_t scalar, size_t vl) { + return __riscv_vfredusum_vs_f16mf2_f16m1_rm(vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfredusum_vs_f16m1_f16m1_rm +// CHECK-RV64-SAME: ( [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.nxv4f16.nxv4f16.i64( poison, [[VECTOR]], [[SCALAR]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat16m1_t test_vfredusum_vs_f16m1_f16m1_rm(vfloat16m1_t vector, vfloat16m1_t scalar, size_t vl) { + return __riscv_vfredusum_vs_f16m1_f16m1_rm(vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfredusum_vs_f16m2_f16m1_rm +// CHECK-RV64-SAME: ( [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.nxv4f16.nxv8f16.i64( poison, [[VECTOR]], [[SCALAR]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat16m1_t test_vfredusum_vs_f16m2_f16m1_rm(vfloat16m2_t vector, vfloat16m1_t scalar, size_t vl) { + return __riscv_vfredusum_vs_f16m2_f16m1_rm(vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfredusum_vs_f16m4_f16m1_rm +// CHECK-RV64-SAME: ( [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.nxv4f16.nxv16f16.i64( poison, [[VECTOR]], [[SCALAR]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat16m1_t test_vfredusum_vs_f16m4_f16m1_rm(vfloat16m4_t vector, vfloat16m1_t scalar, size_t vl) { + return __riscv_vfredusum_vs_f16m4_f16m1_rm(vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfredusum_vs_f16m8_f16m1_rm +// CHECK-RV64-SAME: ( [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.nxv4f16.nxv32f16.i64( poison, [[VECTOR]], [[SCALAR]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat16m1_t test_vfredusum_vs_f16m8_f16m1_rm(vfloat16m8_t vector, vfloat16m1_t scalar, size_t vl) { + return __riscv_vfredusum_vs_f16m8_f16m1_rm(vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfredusum_vs_f32mf2_f32m1_rm +// CHECK-RV64-SAME: ( [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.nxv2f32.nxv1f32.i64( poison, [[VECTOR]], [[SCALAR]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat32m1_t test_vfredusum_vs_f32mf2_f32m1_rm(vfloat32mf2_t vector, vfloat32m1_t scalar, size_t vl) { + return __riscv_vfredusum_vs_f32mf2_f32m1_rm(vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfredusum_vs_f32m1_f32m1_rm +// CHECK-RV64-SAME: ( [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.nxv2f32.nxv2f32.i64( poison, [[VECTOR]], [[SCALAR]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat32m1_t test_vfredusum_vs_f32m1_f32m1_rm(vfloat32m1_t vector, vfloat32m1_t scalar, size_t vl) { + return __riscv_vfredusum_vs_f32m1_f32m1_rm(vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfredusum_vs_f32m2_f32m1_rm +// CHECK-RV64-SAME: ( [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.nxv2f32.nxv4f32.i64( poison, [[VECTOR]], [[SCALAR]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat32m1_t test_vfredusum_vs_f32m2_f32m1_rm(vfloat32m2_t vector, vfloat32m1_t scalar, size_t vl) { + return __riscv_vfredusum_vs_f32m2_f32m1_rm(vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfredusum_vs_f32m4_f32m1_rm +// CHECK-RV64-SAME: ( [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.nxv2f32.nxv8f32.i64( poison, [[VECTOR]], [[SCALAR]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat32m1_t test_vfredusum_vs_f32m4_f32m1_rm(vfloat32m4_t vector, vfloat32m1_t scalar, size_t vl) { + return __riscv_vfredusum_vs_f32m4_f32m1_rm(vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfredusum_vs_f32m8_f32m1_rm +// CHECK-RV64-SAME: ( [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.nxv2f32.nxv16f32.i64( poison, [[VECTOR]], [[SCALAR]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat32m1_t test_vfredusum_vs_f32m8_f32m1_rm(vfloat32m8_t vector, vfloat32m1_t scalar, size_t vl) { + return __riscv_vfredusum_vs_f32m8_f32m1_rm(vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfredusum_vs_f64m1_f64m1_rm +// CHECK-RV64-SAME: ( [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.nxv1f64.nxv1f64.i64( poison, [[VECTOR]], [[SCALAR]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat64m1_t test_vfredusum_vs_f64m1_f64m1_rm(vfloat64m1_t vector, vfloat64m1_t scalar, size_t vl) { + return __riscv_vfredusum_vs_f64m1_f64m1_rm(vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfredusum_vs_f64m2_f64m1_rm +// CHECK-RV64-SAME: ( [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.nxv1f64.nxv2f64.i64( poison, [[VECTOR]], [[SCALAR]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat64m1_t test_vfredusum_vs_f64m2_f64m1_rm(vfloat64m2_t vector, vfloat64m1_t scalar, size_t vl) { + return __riscv_vfredusum_vs_f64m2_f64m1_rm(vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfredusum_vs_f64m4_f64m1_rm +// CHECK-RV64-SAME: ( [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.nxv1f64.nxv4f64.i64( poison, [[VECTOR]], [[SCALAR]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat64m1_t test_vfredusum_vs_f64m4_f64m1_rm(vfloat64m4_t vector, vfloat64m1_t scalar, size_t vl) { + return __riscv_vfredusum_vs_f64m4_f64m1_rm(vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfredusum_vs_f64m8_f64m1_rm +// CHECK-RV64-SAME: ( [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.nxv1f64.nxv8f64.i64( poison, [[VECTOR]], [[SCALAR]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat64m1_t test_vfredusum_vs_f64m8_f64m1_rm(vfloat64m8_t vector, vfloat64m1_t scalar, size_t vl) { + return __riscv_vfredusum_vs_f64m8_f64m1_rm(vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfredusum_vs_f16mf4_f16m1_rm_m +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.mask.nxv4f16.nxv1f16.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat16m1_t test_vfredusum_vs_f16mf4_f16m1_rm_m(vbool64_t mask, vfloat16mf4_t vector, vfloat16m1_t scalar, size_t vl) { + return __riscv_vfredusum_vs_f16mf4_f16m1_rm_m(mask, vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfredusum_vs_f16mf2_f16m1_rm_m +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.mask.nxv4f16.nxv2f16.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat16m1_t test_vfredusum_vs_f16mf2_f16m1_rm_m(vbool32_t mask, vfloat16mf2_t vector, vfloat16m1_t scalar, size_t vl) { + return __riscv_vfredusum_vs_f16mf2_f16m1_rm_m(mask, vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfredusum_vs_f16m1_f16m1_rm_m +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.mask.nxv4f16.nxv4f16.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat16m1_t test_vfredusum_vs_f16m1_f16m1_rm_m(vbool16_t mask, vfloat16m1_t vector, vfloat16m1_t scalar, size_t vl) { + return __riscv_vfredusum_vs_f16m1_f16m1_rm_m(mask, vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfredusum_vs_f16m2_f16m1_rm_m +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.mask.nxv4f16.nxv8f16.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat16m1_t test_vfredusum_vs_f16m2_f16m1_rm_m(vbool8_t mask, vfloat16m2_t vector, vfloat16m1_t scalar, size_t vl) { + return __riscv_vfredusum_vs_f16m2_f16m1_rm_m(mask, vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfredusum_vs_f16m4_f16m1_rm_m +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.mask.nxv4f16.nxv16f16.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat16m1_t test_vfredusum_vs_f16m4_f16m1_rm_m(vbool4_t mask, vfloat16m4_t vector, vfloat16m1_t scalar, size_t vl) { + return __riscv_vfredusum_vs_f16m4_f16m1_rm_m(mask, vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfredusum_vs_f16m8_f16m1_rm_m +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.mask.nxv4f16.nxv32f16.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat16m1_t test_vfredusum_vs_f16m8_f16m1_rm_m(vbool2_t mask, vfloat16m8_t vector, vfloat16m1_t scalar, size_t vl) { + return __riscv_vfredusum_vs_f16m8_f16m1_rm_m(mask, vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfredusum_vs_f32mf2_f32m1_rm_m +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.mask.nxv2f32.nxv1f32.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat32m1_t test_vfredusum_vs_f32mf2_f32m1_rm_m(vbool64_t mask, vfloat32mf2_t vector, vfloat32m1_t scalar, size_t vl) { + return __riscv_vfredusum_vs_f32mf2_f32m1_rm_m(mask, vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfredusum_vs_f32m1_f32m1_rm_m +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.mask.nxv2f32.nxv2f32.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat32m1_t test_vfredusum_vs_f32m1_f32m1_rm_m(vbool32_t mask, vfloat32m1_t vector, vfloat32m1_t scalar, size_t vl) { + return __riscv_vfredusum_vs_f32m1_f32m1_rm_m(mask, vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfredusum_vs_f32m2_f32m1_rm_m +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.mask.nxv2f32.nxv4f32.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat32m1_t test_vfredusum_vs_f32m2_f32m1_rm_m(vbool16_t mask, vfloat32m2_t vector, vfloat32m1_t scalar, size_t vl) { + return __riscv_vfredusum_vs_f32m2_f32m1_rm_m(mask, vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfredusum_vs_f32m4_f32m1_rm_m +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.mask.nxv2f32.nxv8f32.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat32m1_t test_vfredusum_vs_f32m4_f32m1_rm_m(vbool8_t mask, vfloat32m4_t vector, vfloat32m1_t scalar, size_t vl) { + return __riscv_vfredusum_vs_f32m4_f32m1_rm_m(mask, vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfredusum_vs_f32m8_f32m1_rm_m +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.mask.nxv2f32.nxv16f32.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat32m1_t test_vfredusum_vs_f32m8_f32m1_rm_m(vbool4_t mask, vfloat32m8_t vector, vfloat32m1_t scalar, size_t vl) { + return __riscv_vfredusum_vs_f32m8_f32m1_rm_m(mask, vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfredusum_vs_f64m1_f64m1_rm_m +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.mask.nxv1f64.nxv1f64.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat64m1_t test_vfredusum_vs_f64m1_f64m1_rm_m(vbool64_t mask, vfloat64m1_t vector, vfloat64m1_t scalar, size_t vl) { + return __riscv_vfredusum_vs_f64m1_f64m1_rm_m(mask, vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfredusum_vs_f64m2_f64m1_rm_m +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.mask.nxv1f64.nxv2f64.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat64m1_t test_vfredusum_vs_f64m2_f64m1_rm_m(vbool32_t mask, vfloat64m2_t vector, vfloat64m1_t scalar, size_t vl) { + return __riscv_vfredusum_vs_f64m2_f64m1_rm_m(mask, vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfredusum_vs_f64m4_f64m1_rm_m +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.mask.nxv1f64.nxv4f64.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat64m1_t test_vfredusum_vs_f64m4_f64m1_rm_m(vbool16_t mask, vfloat64m4_t vector, vfloat64m1_t scalar, size_t vl) { + return __riscv_vfredusum_vs_f64m4_f64m1_rm_m(mask, vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfredusum_vs_f64m8_f64m1_rm_m +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.mask.nxv1f64.nxv8f64.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat64m1_t test_vfredusum_vs_f64m8_f64m1_rm_m(vbool8_t mask, vfloat64m8_t vector, vfloat64m1_t scalar, size_t vl) { + return __riscv_vfredusum_vs_f64m8_f64m1_rm_m(mask, vector, scalar, __RISCV_FRM_RNE, vl); +} + diff --git a/clang/test/CodeGen/RISCV/rvv-intrinsics-autogenerated/non-policy/non-overloaded/vfwredosum.c b/clang/test/CodeGen/RISCV/rvv-intrinsics-autogenerated/non-policy/non-overloaded/vfwredosum.c --- a/clang/test/CodeGen/RISCV/rvv-intrinsics-autogenerated/non-policy/non-overloaded/vfwredosum.c +++ b/clang/test/CodeGen/RISCV/rvv-intrinsics-autogenerated/non-policy/non-overloaded/vfwredosum.c @@ -10,7 +10,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfwredosum_vs_f16mf4_f32m1 // CHECK-RV64-SAME: ( [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0:[0-9]+]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredosum.nxv2f32.nxv1f16.i64( poison, [[VECTOR]], [[SCALAR]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredosum.nxv2f32.nxv1f16.i64( poison, [[VECTOR]], [[SCALAR]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat32m1_t test_vfwredosum_vs_f16mf4_f32m1(vfloat16mf4_t vector, vfloat32m1_t scalar, size_t vl) { @@ -20,7 +20,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfwredosum_vs_f16mf2_f32m1 // CHECK-RV64-SAME: ( [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredosum.nxv2f32.nxv2f16.i64( poison, [[VECTOR]], [[SCALAR]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredosum.nxv2f32.nxv2f16.i64( poison, [[VECTOR]], [[SCALAR]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat32m1_t test_vfwredosum_vs_f16mf2_f32m1(vfloat16mf2_t vector, vfloat32m1_t scalar, size_t vl) { @@ -30,7 +30,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfwredosum_vs_f16m1_f32m1 // CHECK-RV64-SAME: ( [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredosum.nxv2f32.nxv4f16.i64( poison, [[VECTOR]], [[SCALAR]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredosum.nxv2f32.nxv4f16.i64( poison, [[VECTOR]], [[SCALAR]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat32m1_t test_vfwredosum_vs_f16m1_f32m1(vfloat16m1_t vector, vfloat32m1_t scalar, size_t vl) { @@ -40,7 +40,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfwredosum_vs_f16m2_f32m1 // CHECK-RV64-SAME: ( [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredosum.nxv2f32.nxv8f16.i64( poison, [[VECTOR]], [[SCALAR]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredosum.nxv2f32.nxv8f16.i64( poison, [[VECTOR]], [[SCALAR]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat32m1_t test_vfwredosum_vs_f16m2_f32m1(vfloat16m2_t vector, vfloat32m1_t scalar, size_t vl) { @@ -50,7 +50,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfwredosum_vs_f16m4_f32m1 // CHECK-RV64-SAME: ( [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredosum.nxv2f32.nxv16f16.i64( poison, [[VECTOR]], [[SCALAR]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredosum.nxv2f32.nxv16f16.i64( poison, [[VECTOR]], [[SCALAR]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat32m1_t test_vfwredosum_vs_f16m4_f32m1(vfloat16m4_t vector, vfloat32m1_t scalar, size_t vl) { @@ -60,7 +60,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfwredosum_vs_f16m8_f32m1 // CHECK-RV64-SAME: ( [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredosum.nxv2f32.nxv32f16.i64( poison, [[VECTOR]], [[SCALAR]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredosum.nxv2f32.nxv32f16.i64( poison, [[VECTOR]], [[SCALAR]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat32m1_t test_vfwredosum_vs_f16m8_f32m1(vfloat16m8_t vector, vfloat32m1_t scalar, size_t vl) { @@ -70,7 +70,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfwredosum_vs_f32mf2_f64m1 // CHECK-RV64-SAME: ( [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredosum.nxv1f64.nxv1f32.i64( poison, [[VECTOR]], [[SCALAR]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredosum.nxv1f64.nxv1f32.i64( poison, [[VECTOR]], [[SCALAR]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat64m1_t test_vfwredosum_vs_f32mf2_f64m1(vfloat32mf2_t vector, vfloat64m1_t scalar, size_t vl) { @@ -80,7 +80,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfwredosum_vs_f32m1_f64m1 // CHECK-RV64-SAME: ( [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredosum.nxv1f64.nxv2f32.i64( poison, [[VECTOR]], [[SCALAR]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredosum.nxv1f64.nxv2f32.i64( poison, [[VECTOR]], [[SCALAR]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat64m1_t test_vfwredosum_vs_f32m1_f64m1(vfloat32m1_t vector, vfloat64m1_t scalar, size_t vl) { @@ -90,7 +90,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfwredosum_vs_f32m2_f64m1 // CHECK-RV64-SAME: ( [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredosum.nxv1f64.nxv4f32.i64( poison, [[VECTOR]], [[SCALAR]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredosum.nxv1f64.nxv4f32.i64( poison, [[VECTOR]], [[SCALAR]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat64m1_t test_vfwredosum_vs_f32m2_f64m1(vfloat32m2_t vector, vfloat64m1_t scalar, size_t vl) { @@ -100,7 +100,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfwredosum_vs_f32m4_f64m1 // CHECK-RV64-SAME: ( [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredosum.nxv1f64.nxv8f32.i64( poison, [[VECTOR]], [[SCALAR]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredosum.nxv1f64.nxv8f32.i64( poison, [[VECTOR]], [[SCALAR]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat64m1_t test_vfwredosum_vs_f32m4_f64m1(vfloat32m4_t vector, vfloat64m1_t scalar, size_t vl) { @@ -110,7 +110,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfwredosum_vs_f32m8_f64m1 // CHECK-RV64-SAME: ( [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredosum.nxv1f64.nxv16f32.i64( poison, [[VECTOR]], [[SCALAR]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredosum.nxv1f64.nxv16f32.i64( poison, [[VECTOR]], [[SCALAR]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat64m1_t test_vfwredosum_vs_f32m8_f64m1(vfloat32m8_t vector, vfloat64m1_t scalar, size_t vl) { @@ -120,7 +120,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfwredosum_vs_f16mf4_f32m1_m // CHECK-RV64-SAME: ( [[MASK:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredosum.mask.nxv2f32.nxv1f16.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredosum.mask.nxv2f32.nxv1f16.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat32m1_t test_vfwredosum_vs_f16mf4_f32m1_m(vbool64_t mask, vfloat16mf4_t vector, vfloat32m1_t scalar, size_t vl) { @@ -130,7 +130,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfwredosum_vs_f16mf2_f32m1_m // CHECK-RV64-SAME: ( [[MASK:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredosum.mask.nxv2f32.nxv2f16.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredosum.mask.nxv2f32.nxv2f16.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat32m1_t test_vfwredosum_vs_f16mf2_f32m1_m(vbool32_t mask, vfloat16mf2_t vector, vfloat32m1_t scalar, size_t vl) { @@ -140,7 +140,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfwredosum_vs_f16m1_f32m1_m // CHECK-RV64-SAME: ( [[MASK:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredosum.mask.nxv2f32.nxv4f16.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredosum.mask.nxv2f32.nxv4f16.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat32m1_t test_vfwredosum_vs_f16m1_f32m1_m(vbool16_t mask, vfloat16m1_t vector, vfloat32m1_t scalar, size_t vl) { @@ -150,7 +150,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfwredosum_vs_f16m2_f32m1_m // CHECK-RV64-SAME: ( [[MASK:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredosum.mask.nxv2f32.nxv8f16.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredosum.mask.nxv2f32.nxv8f16.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat32m1_t test_vfwredosum_vs_f16m2_f32m1_m(vbool8_t mask, vfloat16m2_t vector, vfloat32m1_t scalar, size_t vl) { @@ -160,7 +160,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfwredosum_vs_f16m4_f32m1_m // CHECK-RV64-SAME: ( [[MASK:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredosum.mask.nxv2f32.nxv16f16.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredosum.mask.nxv2f32.nxv16f16.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat32m1_t test_vfwredosum_vs_f16m4_f32m1_m(vbool4_t mask, vfloat16m4_t vector, vfloat32m1_t scalar, size_t vl) { @@ -170,7 +170,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfwredosum_vs_f16m8_f32m1_m // CHECK-RV64-SAME: ( [[MASK:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredosum.mask.nxv2f32.nxv32f16.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredosum.mask.nxv2f32.nxv32f16.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat32m1_t test_vfwredosum_vs_f16m8_f32m1_m(vbool2_t mask, vfloat16m8_t vector, vfloat32m1_t scalar, size_t vl) { @@ -180,7 +180,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfwredosum_vs_f32mf2_f64m1_m // CHECK-RV64-SAME: ( [[MASK:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredosum.mask.nxv1f64.nxv1f32.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredosum.mask.nxv1f64.nxv1f32.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat64m1_t test_vfwredosum_vs_f32mf2_f64m1_m(vbool64_t mask, vfloat32mf2_t vector, vfloat64m1_t scalar, size_t vl) { @@ -190,7 +190,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfwredosum_vs_f32m1_f64m1_m // CHECK-RV64-SAME: ( [[MASK:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredosum.mask.nxv1f64.nxv2f32.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredosum.mask.nxv1f64.nxv2f32.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat64m1_t test_vfwredosum_vs_f32m1_f64m1_m(vbool32_t mask, vfloat32m1_t vector, vfloat64m1_t scalar, size_t vl) { @@ -200,7 +200,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfwredosum_vs_f32m2_f64m1_m // CHECK-RV64-SAME: ( [[MASK:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredosum.mask.nxv1f64.nxv4f32.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredosum.mask.nxv1f64.nxv4f32.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat64m1_t test_vfwredosum_vs_f32m2_f64m1_m(vbool16_t mask, vfloat32m2_t vector, vfloat64m1_t scalar, size_t vl) { @@ -210,7 +210,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfwredosum_vs_f32m4_f64m1_m // CHECK-RV64-SAME: ( [[MASK:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredosum.mask.nxv1f64.nxv8f32.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredosum.mask.nxv1f64.nxv8f32.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat64m1_t test_vfwredosum_vs_f32m4_f64m1_m(vbool8_t mask, vfloat32m4_t vector, vfloat64m1_t scalar, size_t vl) { @@ -220,10 +220,230 @@ // CHECK-RV64-LABEL: define dso_local @test_vfwredosum_vs_f32m8_f64m1_m // CHECK-RV64-SAME: ( [[MASK:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredosum.mask.nxv1f64.nxv16f32.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredosum.mask.nxv1f64.nxv16f32.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat64m1_t test_vfwredosum_vs_f32m8_f64m1_m(vbool4_t mask, vfloat32m8_t vector, vfloat64m1_t scalar, size_t vl) { return __riscv_vfwredosum_vs_f32m8_f64m1_m(mask, vector, scalar, vl); } +// CHECK-RV64-LABEL: define dso_local @test_vfwredosum_vs_f16mf4_f32m1_rm +// CHECK-RV64-SAME: ( [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredosum.nxv2f32.nxv1f16.i64( poison, [[VECTOR]], [[SCALAR]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat32m1_t test_vfwredosum_vs_f16mf4_f32m1_rm(vfloat16mf4_t vector, vfloat32m1_t scalar, size_t vl) { + return __riscv_vfwredosum_vs_f16mf4_f32m1_rm(vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfwredosum_vs_f16mf2_f32m1_rm +// CHECK-RV64-SAME: ( [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredosum.nxv2f32.nxv2f16.i64( poison, [[VECTOR]], [[SCALAR]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat32m1_t test_vfwredosum_vs_f16mf2_f32m1_rm(vfloat16mf2_t vector, vfloat32m1_t scalar, size_t vl) { + return __riscv_vfwredosum_vs_f16mf2_f32m1_rm(vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfwredosum_vs_f16m1_f32m1_rm +// CHECK-RV64-SAME: ( [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredosum.nxv2f32.nxv4f16.i64( poison, [[VECTOR]], [[SCALAR]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat32m1_t test_vfwredosum_vs_f16m1_f32m1_rm(vfloat16m1_t vector, vfloat32m1_t scalar, size_t vl) { + return __riscv_vfwredosum_vs_f16m1_f32m1_rm(vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfwredosum_vs_f16m2_f32m1_rm +// CHECK-RV64-SAME: ( [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredosum.nxv2f32.nxv8f16.i64( poison, [[VECTOR]], [[SCALAR]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat32m1_t test_vfwredosum_vs_f16m2_f32m1_rm(vfloat16m2_t vector, vfloat32m1_t scalar, size_t vl) { + return __riscv_vfwredosum_vs_f16m2_f32m1_rm(vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfwredosum_vs_f16m4_f32m1_rm +// CHECK-RV64-SAME: ( [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredosum.nxv2f32.nxv16f16.i64( poison, [[VECTOR]], [[SCALAR]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat32m1_t test_vfwredosum_vs_f16m4_f32m1_rm(vfloat16m4_t vector, vfloat32m1_t scalar, size_t vl) { + return __riscv_vfwredosum_vs_f16m4_f32m1_rm(vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfwredosum_vs_f16m8_f32m1_rm +// CHECK-RV64-SAME: ( [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredosum.nxv2f32.nxv32f16.i64( poison, [[VECTOR]], [[SCALAR]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat32m1_t test_vfwredosum_vs_f16m8_f32m1_rm(vfloat16m8_t vector, vfloat32m1_t scalar, size_t vl) { + return __riscv_vfwredosum_vs_f16m8_f32m1_rm(vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfwredosum_vs_f32mf2_f64m1_rm +// CHECK-RV64-SAME: ( [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredosum.nxv1f64.nxv1f32.i64( poison, [[VECTOR]], [[SCALAR]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat64m1_t test_vfwredosum_vs_f32mf2_f64m1_rm(vfloat32mf2_t vector, vfloat64m1_t scalar, size_t vl) { + return __riscv_vfwredosum_vs_f32mf2_f64m1_rm(vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfwredosum_vs_f32m1_f64m1_rm +// CHECK-RV64-SAME: ( [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredosum.nxv1f64.nxv2f32.i64( poison, [[VECTOR]], [[SCALAR]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat64m1_t test_vfwredosum_vs_f32m1_f64m1_rm(vfloat32m1_t vector, vfloat64m1_t scalar, size_t vl) { + return __riscv_vfwredosum_vs_f32m1_f64m1_rm(vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfwredosum_vs_f32m2_f64m1_rm +// CHECK-RV64-SAME: ( [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredosum.nxv1f64.nxv4f32.i64( poison, [[VECTOR]], [[SCALAR]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat64m1_t test_vfwredosum_vs_f32m2_f64m1_rm(vfloat32m2_t vector, vfloat64m1_t scalar, size_t vl) { + return __riscv_vfwredosum_vs_f32m2_f64m1_rm(vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfwredosum_vs_f32m4_f64m1_rm +// CHECK-RV64-SAME: ( [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredosum.nxv1f64.nxv8f32.i64( poison, [[VECTOR]], [[SCALAR]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat64m1_t test_vfwredosum_vs_f32m4_f64m1_rm(vfloat32m4_t vector, vfloat64m1_t scalar, size_t vl) { + return __riscv_vfwredosum_vs_f32m4_f64m1_rm(vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfwredosum_vs_f32m8_f64m1_rm +// CHECK-RV64-SAME: ( [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredosum.nxv1f64.nxv16f32.i64( poison, [[VECTOR]], [[SCALAR]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat64m1_t test_vfwredosum_vs_f32m8_f64m1_rm(vfloat32m8_t vector, vfloat64m1_t scalar, size_t vl) { + return __riscv_vfwredosum_vs_f32m8_f64m1_rm(vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfwredosum_vs_f16mf4_f32m1_rm_m +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredosum.mask.nxv2f32.nxv1f16.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat32m1_t test_vfwredosum_vs_f16mf4_f32m1_rm_m(vbool64_t mask, vfloat16mf4_t vector, vfloat32m1_t scalar, size_t vl) { + return __riscv_vfwredosum_vs_f16mf4_f32m1_rm_m(mask, vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfwredosum_vs_f16mf2_f32m1_rm_m +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredosum.mask.nxv2f32.nxv2f16.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat32m1_t test_vfwredosum_vs_f16mf2_f32m1_rm_m(vbool32_t mask, vfloat16mf2_t vector, vfloat32m1_t scalar, size_t vl) { + return __riscv_vfwredosum_vs_f16mf2_f32m1_rm_m(mask, vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfwredosum_vs_f16m1_f32m1_rm_m +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredosum.mask.nxv2f32.nxv4f16.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat32m1_t test_vfwredosum_vs_f16m1_f32m1_rm_m(vbool16_t mask, vfloat16m1_t vector, vfloat32m1_t scalar, size_t vl) { + return __riscv_vfwredosum_vs_f16m1_f32m1_rm_m(mask, vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfwredosum_vs_f16m2_f32m1_rm_m +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredosum.mask.nxv2f32.nxv8f16.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat32m1_t test_vfwredosum_vs_f16m2_f32m1_rm_m(vbool8_t mask, vfloat16m2_t vector, vfloat32m1_t scalar, size_t vl) { + return __riscv_vfwredosum_vs_f16m2_f32m1_rm_m(mask, vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfwredosum_vs_f16m4_f32m1_rm_m +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredosum.mask.nxv2f32.nxv16f16.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat32m1_t test_vfwredosum_vs_f16m4_f32m1_rm_m(vbool4_t mask, vfloat16m4_t vector, vfloat32m1_t scalar, size_t vl) { + return __riscv_vfwredosum_vs_f16m4_f32m1_rm_m(mask, vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfwredosum_vs_f16m8_f32m1_rm_m +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredosum.mask.nxv2f32.nxv32f16.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat32m1_t test_vfwredosum_vs_f16m8_f32m1_rm_m(vbool2_t mask, vfloat16m8_t vector, vfloat32m1_t scalar, size_t vl) { + return __riscv_vfwredosum_vs_f16m8_f32m1_rm_m(mask, vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfwredosum_vs_f32mf2_f64m1_rm_m +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredosum.mask.nxv1f64.nxv1f32.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat64m1_t test_vfwredosum_vs_f32mf2_f64m1_rm_m(vbool64_t mask, vfloat32mf2_t vector, vfloat64m1_t scalar, size_t vl) { + return __riscv_vfwredosum_vs_f32mf2_f64m1_rm_m(mask, vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfwredosum_vs_f32m1_f64m1_rm_m +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredosum.mask.nxv1f64.nxv2f32.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat64m1_t test_vfwredosum_vs_f32m1_f64m1_rm_m(vbool32_t mask, vfloat32m1_t vector, vfloat64m1_t scalar, size_t vl) { + return __riscv_vfwredosum_vs_f32m1_f64m1_rm_m(mask, vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfwredosum_vs_f32m2_f64m1_rm_m +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredosum.mask.nxv1f64.nxv4f32.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat64m1_t test_vfwredosum_vs_f32m2_f64m1_rm_m(vbool16_t mask, vfloat32m2_t vector, vfloat64m1_t scalar, size_t vl) { + return __riscv_vfwredosum_vs_f32m2_f64m1_rm_m(mask, vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfwredosum_vs_f32m4_f64m1_rm_m +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredosum.mask.nxv1f64.nxv8f32.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat64m1_t test_vfwredosum_vs_f32m4_f64m1_rm_m(vbool8_t mask, vfloat32m4_t vector, vfloat64m1_t scalar, size_t vl) { + return __riscv_vfwredosum_vs_f32m4_f64m1_rm_m(mask, vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfwredosum_vs_f32m8_f64m1_rm_m +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredosum.mask.nxv1f64.nxv16f32.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat64m1_t test_vfwredosum_vs_f32m8_f64m1_rm_m(vbool4_t mask, vfloat32m8_t vector, vfloat64m1_t scalar, size_t vl) { + return __riscv_vfwredosum_vs_f32m8_f64m1_rm_m(mask, vector, scalar, __RISCV_FRM_RNE, vl); +} + diff --git a/clang/test/CodeGen/RISCV/rvv-intrinsics-autogenerated/non-policy/non-overloaded/vfwredusum.c b/clang/test/CodeGen/RISCV/rvv-intrinsics-autogenerated/non-policy/non-overloaded/vfwredusum.c --- a/clang/test/CodeGen/RISCV/rvv-intrinsics-autogenerated/non-policy/non-overloaded/vfwredusum.c +++ b/clang/test/CodeGen/RISCV/rvv-intrinsics-autogenerated/non-policy/non-overloaded/vfwredusum.c @@ -10,7 +10,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfwredusum_vs_f16mf4_f32m1 // CHECK-RV64-SAME: ( [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0:[0-9]+]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredusum.nxv2f32.nxv1f16.i64( poison, [[VECTOR]], [[SCALAR]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredusum.nxv2f32.nxv1f16.i64( poison, [[VECTOR]], [[SCALAR]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat32m1_t test_vfwredusum_vs_f16mf4_f32m1(vfloat16mf4_t vector, vfloat32m1_t scalar, size_t vl) { @@ -20,7 +20,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfwredusum_vs_f16mf2_f32m1 // CHECK-RV64-SAME: ( [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredusum.nxv2f32.nxv2f16.i64( poison, [[VECTOR]], [[SCALAR]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredusum.nxv2f32.nxv2f16.i64( poison, [[VECTOR]], [[SCALAR]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat32m1_t test_vfwredusum_vs_f16mf2_f32m1(vfloat16mf2_t vector, vfloat32m1_t scalar, size_t vl) { @@ -30,7 +30,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfwredusum_vs_f16m1_f32m1 // CHECK-RV64-SAME: ( [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredusum.nxv2f32.nxv4f16.i64( poison, [[VECTOR]], [[SCALAR]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredusum.nxv2f32.nxv4f16.i64( poison, [[VECTOR]], [[SCALAR]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat32m1_t test_vfwredusum_vs_f16m1_f32m1(vfloat16m1_t vector, vfloat32m1_t scalar, size_t vl) { @@ -40,7 +40,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfwredusum_vs_f16m2_f32m1 // CHECK-RV64-SAME: ( [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredusum.nxv2f32.nxv8f16.i64( poison, [[VECTOR]], [[SCALAR]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredusum.nxv2f32.nxv8f16.i64( poison, [[VECTOR]], [[SCALAR]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat32m1_t test_vfwredusum_vs_f16m2_f32m1(vfloat16m2_t vector, vfloat32m1_t scalar, size_t vl) { @@ -50,7 +50,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfwredusum_vs_f16m4_f32m1 // CHECK-RV64-SAME: ( [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredusum.nxv2f32.nxv16f16.i64( poison, [[VECTOR]], [[SCALAR]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredusum.nxv2f32.nxv16f16.i64( poison, [[VECTOR]], [[SCALAR]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat32m1_t test_vfwredusum_vs_f16m4_f32m1(vfloat16m4_t vector, vfloat32m1_t scalar, size_t vl) { @@ -60,7 +60,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfwredusum_vs_f16m8_f32m1 // CHECK-RV64-SAME: ( [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredusum.nxv2f32.nxv32f16.i64( poison, [[VECTOR]], [[SCALAR]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredusum.nxv2f32.nxv32f16.i64( poison, [[VECTOR]], [[SCALAR]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat32m1_t test_vfwredusum_vs_f16m8_f32m1(vfloat16m8_t vector, vfloat32m1_t scalar, size_t vl) { @@ -70,7 +70,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfwredusum_vs_f32mf2_f64m1 // CHECK-RV64-SAME: ( [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredusum.nxv1f64.nxv1f32.i64( poison, [[VECTOR]], [[SCALAR]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredusum.nxv1f64.nxv1f32.i64( poison, [[VECTOR]], [[SCALAR]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat64m1_t test_vfwredusum_vs_f32mf2_f64m1(vfloat32mf2_t vector, vfloat64m1_t scalar, size_t vl) { @@ -80,7 +80,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfwredusum_vs_f32m1_f64m1 // CHECK-RV64-SAME: ( [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredusum.nxv1f64.nxv2f32.i64( poison, [[VECTOR]], [[SCALAR]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredusum.nxv1f64.nxv2f32.i64( poison, [[VECTOR]], [[SCALAR]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat64m1_t test_vfwredusum_vs_f32m1_f64m1(vfloat32m1_t vector, vfloat64m1_t scalar, size_t vl) { @@ -90,7 +90,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfwredusum_vs_f32m2_f64m1 // CHECK-RV64-SAME: ( [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredusum.nxv1f64.nxv4f32.i64( poison, [[VECTOR]], [[SCALAR]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredusum.nxv1f64.nxv4f32.i64( poison, [[VECTOR]], [[SCALAR]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat64m1_t test_vfwredusum_vs_f32m2_f64m1(vfloat32m2_t vector, vfloat64m1_t scalar, size_t vl) { @@ -100,7 +100,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfwredusum_vs_f32m4_f64m1 // CHECK-RV64-SAME: ( [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredusum.nxv1f64.nxv8f32.i64( poison, [[VECTOR]], [[SCALAR]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredusum.nxv1f64.nxv8f32.i64( poison, [[VECTOR]], [[SCALAR]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat64m1_t test_vfwredusum_vs_f32m4_f64m1(vfloat32m4_t vector, vfloat64m1_t scalar, size_t vl) { @@ -110,7 +110,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfwredusum_vs_f32m8_f64m1 // CHECK-RV64-SAME: ( [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredusum.nxv1f64.nxv16f32.i64( poison, [[VECTOR]], [[SCALAR]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredusum.nxv1f64.nxv16f32.i64( poison, [[VECTOR]], [[SCALAR]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat64m1_t test_vfwredusum_vs_f32m8_f64m1(vfloat32m8_t vector, vfloat64m1_t scalar, size_t vl) { @@ -120,7 +120,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfwredusum_vs_f16mf4_f32m1_m // CHECK-RV64-SAME: ( [[MASK:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredusum.mask.nxv2f32.nxv1f16.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredusum.mask.nxv2f32.nxv1f16.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat32m1_t test_vfwredusum_vs_f16mf4_f32m1_m(vbool64_t mask, vfloat16mf4_t vector, vfloat32m1_t scalar, size_t vl) { @@ -130,7 +130,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfwredusum_vs_f16mf2_f32m1_m // CHECK-RV64-SAME: ( [[MASK:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredusum.mask.nxv2f32.nxv2f16.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredusum.mask.nxv2f32.nxv2f16.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat32m1_t test_vfwredusum_vs_f16mf2_f32m1_m(vbool32_t mask, vfloat16mf2_t vector, vfloat32m1_t scalar, size_t vl) { @@ -140,7 +140,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfwredusum_vs_f16m1_f32m1_m // CHECK-RV64-SAME: ( [[MASK:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredusum.mask.nxv2f32.nxv4f16.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredusum.mask.nxv2f32.nxv4f16.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat32m1_t test_vfwredusum_vs_f16m1_f32m1_m(vbool16_t mask, vfloat16m1_t vector, vfloat32m1_t scalar, size_t vl) { @@ -150,7 +150,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfwredusum_vs_f16m2_f32m1_m // CHECK-RV64-SAME: ( [[MASK:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredusum.mask.nxv2f32.nxv8f16.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredusum.mask.nxv2f32.nxv8f16.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat32m1_t test_vfwredusum_vs_f16m2_f32m1_m(vbool8_t mask, vfloat16m2_t vector, vfloat32m1_t scalar, size_t vl) { @@ -160,7 +160,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfwredusum_vs_f16m4_f32m1_m // CHECK-RV64-SAME: ( [[MASK:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredusum.mask.nxv2f32.nxv16f16.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredusum.mask.nxv2f32.nxv16f16.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat32m1_t test_vfwredusum_vs_f16m4_f32m1_m(vbool4_t mask, vfloat16m4_t vector, vfloat32m1_t scalar, size_t vl) { @@ -170,7 +170,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfwredusum_vs_f16m8_f32m1_m // CHECK-RV64-SAME: ( [[MASK:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredusum.mask.nxv2f32.nxv32f16.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredusum.mask.nxv2f32.nxv32f16.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat32m1_t test_vfwredusum_vs_f16m8_f32m1_m(vbool2_t mask, vfloat16m8_t vector, vfloat32m1_t scalar, size_t vl) { @@ -180,7 +180,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfwredusum_vs_f32mf2_f64m1_m // CHECK-RV64-SAME: ( [[MASK:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredusum.mask.nxv1f64.nxv1f32.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredusum.mask.nxv1f64.nxv1f32.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat64m1_t test_vfwredusum_vs_f32mf2_f64m1_m(vbool64_t mask, vfloat32mf2_t vector, vfloat64m1_t scalar, size_t vl) { @@ -190,7 +190,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfwredusum_vs_f32m1_f64m1_m // CHECK-RV64-SAME: ( [[MASK:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredusum.mask.nxv1f64.nxv2f32.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredusum.mask.nxv1f64.nxv2f32.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat64m1_t test_vfwredusum_vs_f32m1_f64m1_m(vbool32_t mask, vfloat32m1_t vector, vfloat64m1_t scalar, size_t vl) { @@ -200,7 +200,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfwredusum_vs_f32m2_f64m1_m // CHECK-RV64-SAME: ( [[MASK:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredusum.mask.nxv1f64.nxv4f32.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredusum.mask.nxv1f64.nxv4f32.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat64m1_t test_vfwredusum_vs_f32m2_f64m1_m(vbool16_t mask, vfloat32m2_t vector, vfloat64m1_t scalar, size_t vl) { @@ -210,7 +210,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfwredusum_vs_f32m4_f64m1_m // CHECK-RV64-SAME: ( [[MASK:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredusum.mask.nxv1f64.nxv8f32.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredusum.mask.nxv1f64.nxv8f32.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat64m1_t test_vfwredusum_vs_f32m4_f64m1_m(vbool8_t mask, vfloat32m4_t vector, vfloat64m1_t scalar, size_t vl) { @@ -220,10 +220,230 @@ // CHECK-RV64-LABEL: define dso_local @test_vfwredusum_vs_f32m8_f64m1_m // CHECK-RV64-SAME: ( [[MASK:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredusum.mask.nxv1f64.nxv16f32.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredusum.mask.nxv1f64.nxv16f32.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat64m1_t test_vfwredusum_vs_f32m8_f64m1_m(vbool4_t mask, vfloat32m8_t vector, vfloat64m1_t scalar, size_t vl) { return __riscv_vfwredusum_vs_f32m8_f64m1_m(mask, vector, scalar, vl); } +// CHECK-RV64-LABEL: define dso_local @test_vfwredusum_vs_f16mf4_f32m1_rm +// CHECK-RV64-SAME: ( [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredusum.nxv2f32.nxv1f16.i64( poison, [[VECTOR]], [[SCALAR]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat32m1_t test_vfwredusum_vs_f16mf4_f32m1_rm(vfloat16mf4_t vector, vfloat32m1_t scalar, size_t vl) { + return __riscv_vfwredusum_vs_f16mf4_f32m1_rm(vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfwredusum_vs_f16mf2_f32m1_rm +// CHECK-RV64-SAME: ( [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredusum.nxv2f32.nxv2f16.i64( poison, [[VECTOR]], [[SCALAR]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat32m1_t test_vfwredusum_vs_f16mf2_f32m1_rm(vfloat16mf2_t vector, vfloat32m1_t scalar, size_t vl) { + return __riscv_vfwredusum_vs_f16mf2_f32m1_rm(vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfwredusum_vs_f16m1_f32m1_rm +// CHECK-RV64-SAME: ( [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredusum.nxv2f32.nxv4f16.i64( poison, [[VECTOR]], [[SCALAR]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat32m1_t test_vfwredusum_vs_f16m1_f32m1_rm(vfloat16m1_t vector, vfloat32m1_t scalar, size_t vl) { + return __riscv_vfwredusum_vs_f16m1_f32m1_rm(vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfwredusum_vs_f16m2_f32m1_rm +// CHECK-RV64-SAME: ( [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredusum.nxv2f32.nxv8f16.i64( poison, [[VECTOR]], [[SCALAR]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat32m1_t test_vfwredusum_vs_f16m2_f32m1_rm(vfloat16m2_t vector, vfloat32m1_t scalar, size_t vl) { + return __riscv_vfwredusum_vs_f16m2_f32m1_rm(vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfwredusum_vs_f16m4_f32m1_rm +// CHECK-RV64-SAME: ( [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredusum.nxv2f32.nxv16f16.i64( poison, [[VECTOR]], [[SCALAR]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat32m1_t test_vfwredusum_vs_f16m4_f32m1_rm(vfloat16m4_t vector, vfloat32m1_t scalar, size_t vl) { + return __riscv_vfwredusum_vs_f16m4_f32m1_rm(vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfwredusum_vs_f16m8_f32m1_rm +// CHECK-RV64-SAME: ( [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredusum.nxv2f32.nxv32f16.i64( poison, [[VECTOR]], [[SCALAR]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat32m1_t test_vfwredusum_vs_f16m8_f32m1_rm(vfloat16m8_t vector, vfloat32m1_t scalar, size_t vl) { + return __riscv_vfwredusum_vs_f16m8_f32m1_rm(vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfwredusum_vs_f32mf2_f64m1_rm +// CHECK-RV64-SAME: ( [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredusum.nxv1f64.nxv1f32.i64( poison, [[VECTOR]], [[SCALAR]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat64m1_t test_vfwredusum_vs_f32mf2_f64m1_rm(vfloat32mf2_t vector, vfloat64m1_t scalar, size_t vl) { + return __riscv_vfwredusum_vs_f32mf2_f64m1_rm(vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfwredusum_vs_f32m1_f64m1_rm +// CHECK-RV64-SAME: ( [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredusum.nxv1f64.nxv2f32.i64( poison, [[VECTOR]], [[SCALAR]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat64m1_t test_vfwredusum_vs_f32m1_f64m1_rm(vfloat32m1_t vector, vfloat64m1_t scalar, size_t vl) { + return __riscv_vfwredusum_vs_f32m1_f64m1_rm(vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfwredusum_vs_f32m2_f64m1_rm +// CHECK-RV64-SAME: ( [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredusum.nxv1f64.nxv4f32.i64( poison, [[VECTOR]], [[SCALAR]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat64m1_t test_vfwredusum_vs_f32m2_f64m1_rm(vfloat32m2_t vector, vfloat64m1_t scalar, size_t vl) { + return __riscv_vfwredusum_vs_f32m2_f64m1_rm(vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfwredusum_vs_f32m4_f64m1_rm +// CHECK-RV64-SAME: ( [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredusum.nxv1f64.nxv8f32.i64( poison, [[VECTOR]], [[SCALAR]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat64m1_t test_vfwredusum_vs_f32m4_f64m1_rm(vfloat32m4_t vector, vfloat64m1_t scalar, size_t vl) { + return __riscv_vfwredusum_vs_f32m4_f64m1_rm(vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfwredusum_vs_f32m8_f64m1_rm +// CHECK-RV64-SAME: ( [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredusum.nxv1f64.nxv16f32.i64( poison, [[VECTOR]], [[SCALAR]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat64m1_t test_vfwredusum_vs_f32m8_f64m1_rm(vfloat32m8_t vector, vfloat64m1_t scalar, size_t vl) { + return __riscv_vfwredusum_vs_f32m8_f64m1_rm(vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfwredusum_vs_f16mf4_f32m1_rm_m +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredusum.mask.nxv2f32.nxv1f16.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat32m1_t test_vfwredusum_vs_f16mf4_f32m1_rm_m(vbool64_t mask, vfloat16mf4_t vector, vfloat32m1_t scalar, size_t vl) { + return __riscv_vfwredusum_vs_f16mf4_f32m1_rm_m(mask, vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfwredusum_vs_f16mf2_f32m1_rm_m +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredusum.mask.nxv2f32.nxv2f16.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat32m1_t test_vfwredusum_vs_f16mf2_f32m1_rm_m(vbool32_t mask, vfloat16mf2_t vector, vfloat32m1_t scalar, size_t vl) { + return __riscv_vfwredusum_vs_f16mf2_f32m1_rm_m(mask, vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfwredusum_vs_f16m1_f32m1_rm_m +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredusum.mask.nxv2f32.nxv4f16.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat32m1_t test_vfwredusum_vs_f16m1_f32m1_rm_m(vbool16_t mask, vfloat16m1_t vector, vfloat32m1_t scalar, size_t vl) { + return __riscv_vfwredusum_vs_f16m1_f32m1_rm_m(mask, vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfwredusum_vs_f16m2_f32m1_rm_m +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredusum.mask.nxv2f32.nxv8f16.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat32m1_t test_vfwredusum_vs_f16m2_f32m1_rm_m(vbool8_t mask, vfloat16m2_t vector, vfloat32m1_t scalar, size_t vl) { + return __riscv_vfwredusum_vs_f16m2_f32m1_rm_m(mask, vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfwredusum_vs_f16m4_f32m1_rm_m +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredusum.mask.nxv2f32.nxv16f16.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat32m1_t test_vfwredusum_vs_f16m4_f32m1_rm_m(vbool4_t mask, vfloat16m4_t vector, vfloat32m1_t scalar, size_t vl) { + return __riscv_vfwredusum_vs_f16m4_f32m1_rm_m(mask, vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfwredusum_vs_f16m8_f32m1_rm_m +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredusum.mask.nxv2f32.nxv32f16.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat32m1_t test_vfwredusum_vs_f16m8_f32m1_rm_m(vbool2_t mask, vfloat16m8_t vector, vfloat32m1_t scalar, size_t vl) { + return __riscv_vfwredusum_vs_f16m8_f32m1_rm_m(mask, vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfwredusum_vs_f32mf2_f64m1_rm_m +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredusum.mask.nxv1f64.nxv1f32.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat64m1_t test_vfwredusum_vs_f32mf2_f64m1_rm_m(vbool64_t mask, vfloat32mf2_t vector, vfloat64m1_t scalar, size_t vl) { + return __riscv_vfwredusum_vs_f32mf2_f64m1_rm_m(mask, vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfwredusum_vs_f32m1_f64m1_rm_m +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredusum.mask.nxv1f64.nxv2f32.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat64m1_t test_vfwredusum_vs_f32m1_f64m1_rm_m(vbool32_t mask, vfloat32m1_t vector, vfloat64m1_t scalar, size_t vl) { + return __riscv_vfwredusum_vs_f32m1_f64m1_rm_m(mask, vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfwredusum_vs_f32m2_f64m1_rm_m +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredusum.mask.nxv1f64.nxv4f32.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat64m1_t test_vfwredusum_vs_f32m2_f64m1_rm_m(vbool16_t mask, vfloat32m2_t vector, vfloat64m1_t scalar, size_t vl) { + return __riscv_vfwredusum_vs_f32m2_f64m1_rm_m(mask, vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfwredusum_vs_f32m4_f64m1_rm_m +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredusum.mask.nxv1f64.nxv8f32.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat64m1_t test_vfwredusum_vs_f32m4_f64m1_rm_m(vbool8_t mask, vfloat32m4_t vector, vfloat64m1_t scalar, size_t vl) { + return __riscv_vfwredusum_vs_f32m4_f64m1_rm_m(mask, vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfwredusum_vs_f32m8_f64m1_rm_m +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredusum.mask.nxv1f64.nxv16f32.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat64m1_t test_vfwredusum_vs_f32m8_f64m1_rm_m(vbool4_t mask, vfloat32m8_t vector, vfloat64m1_t scalar, size_t vl) { + return __riscv_vfwredusum_vs_f32m8_f64m1_rm_m(mask, vector, scalar, __RISCV_FRM_RNE, vl); +} + diff --git a/clang/test/CodeGen/RISCV/rvv-intrinsics-autogenerated/non-policy/overloaded/vfredosum.c b/clang/test/CodeGen/RISCV/rvv-intrinsics-autogenerated/non-policy/overloaded/vfredosum.c --- a/clang/test/CodeGen/RISCV/rvv-intrinsics-autogenerated/non-policy/overloaded/vfredosum.c +++ b/clang/test/CodeGen/RISCV/rvv-intrinsics-autogenerated/non-policy/overloaded/vfredosum.c @@ -10,7 +10,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfredosum_vs_f16mf4_f16m1 // CHECK-RV64-SAME: ( [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0:[0-9]+]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.nxv4f16.nxv1f16.i64( poison, [[VECTOR]], [[SCALAR]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.nxv4f16.nxv1f16.i64( poison, [[VECTOR]], [[SCALAR]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat16m1_t test_vfredosum_vs_f16mf4_f16m1(vfloat16mf4_t vector, vfloat16m1_t scalar, size_t vl) { @@ -20,7 +20,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfredosum_vs_f16mf2_f16m1 // CHECK-RV64-SAME: ( [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.nxv4f16.nxv2f16.i64( poison, [[VECTOR]], [[SCALAR]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.nxv4f16.nxv2f16.i64( poison, [[VECTOR]], [[SCALAR]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat16m1_t test_vfredosum_vs_f16mf2_f16m1(vfloat16mf2_t vector, vfloat16m1_t scalar, size_t vl) { @@ -30,7 +30,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfredosum_vs_f16m1_f16m1 // CHECK-RV64-SAME: ( [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.nxv4f16.nxv4f16.i64( poison, [[VECTOR]], [[SCALAR]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.nxv4f16.nxv4f16.i64( poison, [[VECTOR]], [[SCALAR]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat16m1_t test_vfredosum_vs_f16m1_f16m1(vfloat16m1_t vector, vfloat16m1_t scalar, size_t vl) { @@ -40,7 +40,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfredosum_vs_f16m2_f16m1 // CHECK-RV64-SAME: ( [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.nxv4f16.nxv8f16.i64( poison, [[VECTOR]], [[SCALAR]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.nxv4f16.nxv8f16.i64( poison, [[VECTOR]], [[SCALAR]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat16m1_t test_vfredosum_vs_f16m2_f16m1(vfloat16m2_t vector, vfloat16m1_t scalar, size_t vl) { @@ -50,7 +50,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfredosum_vs_f16m4_f16m1 // CHECK-RV64-SAME: ( [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.nxv4f16.nxv16f16.i64( poison, [[VECTOR]], [[SCALAR]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.nxv4f16.nxv16f16.i64( poison, [[VECTOR]], [[SCALAR]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat16m1_t test_vfredosum_vs_f16m4_f16m1(vfloat16m4_t vector, vfloat16m1_t scalar, size_t vl) { @@ -60,7 +60,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfredosum_vs_f16m8_f16m1 // CHECK-RV64-SAME: ( [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.nxv4f16.nxv32f16.i64( poison, [[VECTOR]], [[SCALAR]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.nxv4f16.nxv32f16.i64( poison, [[VECTOR]], [[SCALAR]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat16m1_t test_vfredosum_vs_f16m8_f16m1(vfloat16m8_t vector, vfloat16m1_t scalar, size_t vl) { @@ -70,7 +70,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfredosum_vs_f32mf2_f32m1 // CHECK-RV64-SAME: ( [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.nxv2f32.nxv1f32.i64( poison, [[VECTOR]], [[SCALAR]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.nxv2f32.nxv1f32.i64( poison, [[VECTOR]], [[SCALAR]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat32m1_t test_vfredosum_vs_f32mf2_f32m1(vfloat32mf2_t vector, vfloat32m1_t scalar, size_t vl) { @@ -80,7 +80,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfredosum_vs_f32m1_f32m1 // CHECK-RV64-SAME: ( [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.nxv2f32.nxv2f32.i64( poison, [[VECTOR]], [[SCALAR]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.nxv2f32.nxv2f32.i64( poison, [[VECTOR]], [[SCALAR]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat32m1_t test_vfredosum_vs_f32m1_f32m1(vfloat32m1_t vector, vfloat32m1_t scalar, size_t vl) { @@ -90,7 +90,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfredosum_vs_f32m2_f32m1 // CHECK-RV64-SAME: ( [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.nxv2f32.nxv4f32.i64( poison, [[VECTOR]], [[SCALAR]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.nxv2f32.nxv4f32.i64( poison, [[VECTOR]], [[SCALAR]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat32m1_t test_vfredosum_vs_f32m2_f32m1(vfloat32m2_t vector, vfloat32m1_t scalar, size_t vl) { @@ -100,7 +100,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfredosum_vs_f32m4_f32m1 // CHECK-RV64-SAME: ( [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.nxv2f32.nxv8f32.i64( poison, [[VECTOR]], [[SCALAR]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.nxv2f32.nxv8f32.i64( poison, [[VECTOR]], [[SCALAR]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat32m1_t test_vfredosum_vs_f32m4_f32m1(vfloat32m4_t vector, vfloat32m1_t scalar, size_t vl) { @@ -110,7 +110,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfredosum_vs_f32m8_f32m1 // CHECK-RV64-SAME: ( [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.nxv2f32.nxv16f32.i64( poison, [[VECTOR]], [[SCALAR]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.nxv2f32.nxv16f32.i64( poison, [[VECTOR]], [[SCALAR]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat32m1_t test_vfredosum_vs_f32m8_f32m1(vfloat32m8_t vector, vfloat32m1_t scalar, size_t vl) { @@ -120,7 +120,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfredosum_vs_f64m1_f64m1 // CHECK-RV64-SAME: ( [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.nxv1f64.nxv1f64.i64( poison, [[VECTOR]], [[SCALAR]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.nxv1f64.nxv1f64.i64( poison, [[VECTOR]], [[SCALAR]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat64m1_t test_vfredosum_vs_f64m1_f64m1(vfloat64m1_t vector, vfloat64m1_t scalar, size_t vl) { @@ -130,7 +130,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfredosum_vs_f64m2_f64m1 // CHECK-RV64-SAME: ( [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.nxv1f64.nxv2f64.i64( poison, [[VECTOR]], [[SCALAR]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.nxv1f64.nxv2f64.i64( poison, [[VECTOR]], [[SCALAR]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat64m1_t test_vfredosum_vs_f64m2_f64m1(vfloat64m2_t vector, vfloat64m1_t scalar, size_t vl) { @@ -140,7 +140,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfredosum_vs_f64m4_f64m1 // CHECK-RV64-SAME: ( [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.nxv1f64.nxv4f64.i64( poison, [[VECTOR]], [[SCALAR]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.nxv1f64.nxv4f64.i64( poison, [[VECTOR]], [[SCALAR]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat64m1_t test_vfredosum_vs_f64m4_f64m1(vfloat64m4_t vector, vfloat64m1_t scalar, size_t vl) { @@ -150,7 +150,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfredosum_vs_f64m8_f64m1 // CHECK-RV64-SAME: ( [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.nxv1f64.nxv8f64.i64( poison, [[VECTOR]], [[SCALAR]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.nxv1f64.nxv8f64.i64( poison, [[VECTOR]], [[SCALAR]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat64m1_t test_vfredosum_vs_f64m8_f64m1(vfloat64m8_t vector, vfloat64m1_t scalar, size_t vl) { @@ -160,7 +160,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfredosum_vs_f16mf4_f16m1_m // CHECK-RV64-SAME: ( [[MASK:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.mask.nxv4f16.nxv1f16.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.mask.nxv4f16.nxv1f16.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat16m1_t test_vfredosum_vs_f16mf4_f16m1_m(vbool64_t mask, vfloat16mf4_t vector, vfloat16m1_t scalar, size_t vl) { @@ -170,7 +170,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfredosum_vs_f16mf2_f16m1_m // CHECK-RV64-SAME: ( [[MASK:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.mask.nxv4f16.nxv2f16.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.mask.nxv4f16.nxv2f16.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat16m1_t test_vfredosum_vs_f16mf2_f16m1_m(vbool32_t mask, vfloat16mf2_t vector, vfloat16m1_t scalar, size_t vl) { @@ -180,7 +180,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfredosum_vs_f16m1_f16m1_m // CHECK-RV64-SAME: ( [[MASK:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.mask.nxv4f16.nxv4f16.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.mask.nxv4f16.nxv4f16.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat16m1_t test_vfredosum_vs_f16m1_f16m1_m(vbool16_t mask, vfloat16m1_t vector, vfloat16m1_t scalar, size_t vl) { @@ -190,7 +190,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfredosum_vs_f16m2_f16m1_m // CHECK-RV64-SAME: ( [[MASK:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.mask.nxv4f16.nxv8f16.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.mask.nxv4f16.nxv8f16.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat16m1_t test_vfredosum_vs_f16m2_f16m1_m(vbool8_t mask, vfloat16m2_t vector, vfloat16m1_t scalar, size_t vl) { @@ -200,7 +200,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfredosum_vs_f16m4_f16m1_m // CHECK-RV64-SAME: ( [[MASK:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.mask.nxv4f16.nxv16f16.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.mask.nxv4f16.nxv16f16.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat16m1_t test_vfredosum_vs_f16m4_f16m1_m(vbool4_t mask, vfloat16m4_t vector, vfloat16m1_t scalar, size_t vl) { @@ -210,7 +210,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfredosum_vs_f16m8_f16m1_m // CHECK-RV64-SAME: ( [[MASK:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.mask.nxv4f16.nxv32f16.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.mask.nxv4f16.nxv32f16.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat16m1_t test_vfredosum_vs_f16m8_f16m1_m(vbool2_t mask, vfloat16m8_t vector, vfloat16m1_t scalar, size_t vl) { @@ -220,7 +220,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfredosum_vs_f32mf2_f32m1_m // CHECK-RV64-SAME: ( [[MASK:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.mask.nxv2f32.nxv1f32.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.mask.nxv2f32.nxv1f32.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat32m1_t test_vfredosum_vs_f32mf2_f32m1_m(vbool64_t mask, vfloat32mf2_t vector, vfloat32m1_t scalar, size_t vl) { @@ -230,7 +230,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfredosum_vs_f32m1_f32m1_m // CHECK-RV64-SAME: ( [[MASK:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.mask.nxv2f32.nxv2f32.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.mask.nxv2f32.nxv2f32.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat32m1_t test_vfredosum_vs_f32m1_f32m1_m(vbool32_t mask, vfloat32m1_t vector, vfloat32m1_t scalar, size_t vl) { @@ -240,7 +240,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfredosum_vs_f32m2_f32m1_m // CHECK-RV64-SAME: ( [[MASK:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.mask.nxv2f32.nxv4f32.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.mask.nxv2f32.nxv4f32.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat32m1_t test_vfredosum_vs_f32m2_f32m1_m(vbool16_t mask, vfloat32m2_t vector, vfloat32m1_t scalar, size_t vl) { @@ -250,7 +250,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfredosum_vs_f32m4_f32m1_m // CHECK-RV64-SAME: ( [[MASK:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.mask.nxv2f32.nxv8f32.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.mask.nxv2f32.nxv8f32.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat32m1_t test_vfredosum_vs_f32m4_f32m1_m(vbool8_t mask, vfloat32m4_t vector, vfloat32m1_t scalar, size_t vl) { @@ -260,7 +260,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfredosum_vs_f32m8_f32m1_m // CHECK-RV64-SAME: ( [[MASK:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.mask.nxv2f32.nxv16f32.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.mask.nxv2f32.nxv16f32.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat32m1_t test_vfredosum_vs_f32m8_f32m1_m(vbool4_t mask, vfloat32m8_t vector, vfloat32m1_t scalar, size_t vl) { @@ -270,7 +270,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfredosum_vs_f64m1_f64m1_m // CHECK-RV64-SAME: ( [[MASK:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.mask.nxv1f64.nxv1f64.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.mask.nxv1f64.nxv1f64.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat64m1_t test_vfredosum_vs_f64m1_f64m1_m(vbool64_t mask, vfloat64m1_t vector, vfloat64m1_t scalar, size_t vl) { @@ -280,7 +280,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfredosum_vs_f64m2_f64m1_m // CHECK-RV64-SAME: ( [[MASK:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.mask.nxv1f64.nxv2f64.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.mask.nxv1f64.nxv2f64.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat64m1_t test_vfredosum_vs_f64m2_f64m1_m(vbool32_t mask, vfloat64m2_t vector, vfloat64m1_t scalar, size_t vl) { @@ -290,7 +290,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfredosum_vs_f64m4_f64m1_m // CHECK-RV64-SAME: ( [[MASK:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.mask.nxv1f64.nxv4f64.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.mask.nxv1f64.nxv4f64.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat64m1_t test_vfredosum_vs_f64m4_f64m1_m(vbool16_t mask, vfloat64m4_t vector, vfloat64m1_t scalar, size_t vl) { @@ -300,10 +300,310 @@ // CHECK-RV64-LABEL: define dso_local @test_vfredosum_vs_f64m8_f64m1_m // CHECK-RV64-SAME: ( [[MASK:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.mask.nxv1f64.nxv8f64.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.mask.nxv1f64.nxv8f64.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat64m1_t test_vfredosum_vs_f64m8_f64m1_m(vbool8_t mask, vfloat64m8_t vector, vfloat64m1_t scalar, size_t vl) { return __riscv_vfredosum(mask, vector, scalar, vl); } +// CHECK-RV64-LABEL: define dso_local @test_vfredosum_vs_f16mf4_f16m1_rm +// CHECK-RV64-SAME: ( [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.nxv4f16.nxv1f16.i64( poison, [[VECTOR]], [[SCALAR]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat16m1_t test_vfredosum_vs_f16mf4_f16m1_rm(vfloat16mf4_t vector, vfloat16m1_t scalar, size_t vl) { + return __riscv_vfredosum(vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfredosum_vs_f16mf2_f16m1_rm +// CHECK-RV64-SAME: ( [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.nxv4f16.nxv2f16.i64( poison, [[VECTOR]], [[SCALAR]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat16m1_t test_vfredosum_vs_f16mf2_f16m1_rm(vfloat16mf2_t vector, vfloat16m1_t scalar, size_t vl) { + return __riscv_vfredosum(vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfredosum_vs_f16m1_f16m1_rm +// CHECK-RV64-SAME: ( [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.nxv4f16.nxv4f16.i64( poison, [[VECTOR]], [[SCALAR]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat16m1_t test_vfredosum_vs_f16m1_f16m1_rm(vfloat16m1_t vector, vfloat16m1_t scalar, size_t vl) { + return __riscv_vfredosum(vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfredosum_vs_f16m2_f16m1_rm +// CHECK-RV64-SAME: ( [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.nxv4f16.nxv8f16.i64( poison, [[VECTOR]], [[SCALAR]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat16m1_t test_vfredosum_vs_f16m2_f16m1_rm(vfloat16m2_t vector, vfloat16m1_t scalar, size_t vl) { + return __riscv_vfredosum(vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfredosum_vs_f16m4_f16m1_rm +// CHECK-RV64-SAME: ( [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.nxv4f16.nxv16f16.i64( poison, [[VECTOR]], [[SCALAR]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat16m1_t test_vfredosum_vs_f16m4_f16m1_rm(vfloat16m4_t vector, vfloat16m1_t scalar, size_t vl) { + return __riscv_vfredosum(vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfredosum_vs_f16m8_f16m1_rm +// CHECK-RV64-SAME: ( [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.nxv4f16.nxv32f16.i64( poison, [[VECTOR]], [[SCALAR]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat16m1_t test_vfredosum_vs_f16m8_f16m1_rm(vfloat16m8_t vector, vfloat16m1_t scalar, size_t vl) { + return __riscv_vfredosum(vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfredosum_vs_f32mf2_f32m1_rm +// CHECK-RV64-SAME: ( [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.nxv2f32.nxv1f32.i64( poison, [[VECTOR]], [[SCALAR]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat32m1_t test_vfredosum_vs_f32mf2_f32m1_rm(vfloat32mf2_t vector, vfloat32m1_t scalar, size_t vl) { + return __riscv_vfredosum(vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfredosum_vs_f32m1_f32m1_rm +// CHECK-RV64-SAME: ( [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.nxv2f32.nxv2f32.i64( poison, [[VECTOR]], [[SCALAR]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat32m1_t test_vfredosum_vs_f32m1_f32m1_rm(vfloat32m1_t vector, vfloat32m1_t scalar, size_t vl) { + return __riscv_vfredosum(vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfredosum_vs_f32m2_f32m1_rm +// CHECK-RV64-SAME: ( [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.nxv2f32.nxv4f32.i64( poison, [[VECTOR]], [[SCALAR]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat32m1_t test_vfredosum_vs_f32m2_f32m1_rm(vfloat32m2_t vector, vfloat32m1_t scalar, size_t vl) { + return __riscv_vfredosum(vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfredosum_vs_f32m4_f32m1_rm +// CHECK-RV64-SAME: ( [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.nxv2f32.nxv8f32.i64( poison, [[VECTOR]], [[SCALAR]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat32m1_t test_vfredosum_vs_f32m4_f32m1_rm(vfloat32m4_t vector, vfloat32m1_t scalar, size_t vl) { + return __riscv_vfredosum(vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfredosum_vs_f32m8_f32m1_rm +// CHECK-RV64-SAME: ( [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.nxv2f32.nxv16f32.i64( poison, [[VECTOR]], [[SCALAR]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat32m1_t test_vfredosum_vs_f32m8_f32m1_rm(vfloat32m8_t vector, vfloat32m1_t scalar, size_t vl) { + return __riscv_vfredosum(vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfredosum_vs_f64m1_f64m1_rm +// CHECK-RV64-SAME: ( [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.nxv1f64.nxv1f64.i64( poison, [[VECTOR]], [[SCALAR]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat64m1_t test_vfredosum_vs_f64m1_f64m1_rm(vfloat64m1_t vector, vfloat64m1_t scalar, size_t vl) { + return __riscv_vfredosum(vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfredosum_vs_f64m2_f64m1_rm +// CHECK-RV64-SAME: ( [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.nxv1f64.nxv2f64.i64( poison, [[VECTOR]], [[SCALAR]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat64m1_t test_vfredosum_vs_f64m2_f64m1_rm(vfloat64m2_t vector, vfloat64m1_t scalar, size_t vl) { + return __riscv_vfredosum(vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfredosum_vs_f64m4_f64m1_rm +// CHECK-RV64-SAME: ( [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.nxv1f64.nxv4f64.i64( poison, [[VECTOR]], [[SCALAR]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat64m1_t test_vfredosum_vs_f64m4_f64m1_rm(vfloat64m4_t vector, vfloat64m1_t scalar, size_t vl) { + return __riscv_vfredosum(vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfredosum_vs_f64m8_f64m1_rm +// CHECK-RV64-SAME: ( [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.nxv1f64.nxv8f64.i64( poison, [[VECTOR]], [[SCALAR]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat64m1_t test_vfredosum_vs_f64m8_f64m1_rm(vfloat64m8_t vector, vfloat64m1_t scalar, size_t vl) { + return __riscv_vfredosum(vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfredosum_vs_f16mf4_f16m1_rm_m +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.mask.nxv4f16.nxv1f16.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat16m1_t test_vfredosum_vs_f16mf4_f16m1_rm_m(vbool64_t mask, vfloat16mf4_t vector, vfloat16m1_t scalar, size_t vl) { + return __riscv_vfredosum(mask, vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfredosum_vs_f16mf2_f16m1_rm_m +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.mask.nxv4f16.nxv2f16.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat16m1_t test_vfredosum_vs_f16mf2_f16m1_rm_m(vbool32_t mask, vfloat16mf2_t vector, vfloat16m1_t scalar, size_t vl) { + return __riscv_vfredosum(mask, vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfredosum_vs_f16m1_f16m1_rm_m +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.mask.nxv4f16.nxv4f16.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat16m1_t test_vfredosum_vs_f16m1_f16m1_rm_m(vbool16_t mask, vfloat16m1_t vector, vfloat16m1_t scalar, size_t vl) { + return __riscv_vfredosum(mask, vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfredosum_vs_f16m2_f16m1_rm_m +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.mask.nxv4f16.nxv8f16.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat16m1_t test_vfredosum_vs_f16m2_f16m1_rm_m(vbool8_t mask, vfloat16m2_t vector, vfloat16m1_t scalar, size_t vl) { + return __riscv_vfredosum(mask, vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfredosum_vs_f16m4_f16m1_rm_m +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.mask.nxv4f16.nxv16f16.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat16m1_t test_vfredosum_vs_f16m4_f16m1_rm_m(vbool4_t mask, vfloat16m4_t vector, vfloat16m1_t scalar, size_t vl) { + return __riscv_vfredosum(mask, vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfredosum_vs_f16m8_f16m1_rm_m +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.mask.nxv4f16.nxv32f16.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat16m1_t test_vfredosum_vs_f16m8_f16m1_rm_m(vbool2_t mask, vfloat16m8_t vector, vfloat16m1_t scalar, size_t vl) { + return __riscv_vfredosum(mask, vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfredosum_vs_f32mf2_f32m1_rm_m +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.mask.nxv2f32.nxv1f32.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat32m1_t test_vfredosum_vs_f32mf2_f32m1_rm_m(vbool64_t mask, vfloat32mf2_t vector, vfloat32m1_t scalar, size_t vl) { + return __riscv_vfredosum(mask, vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfredosum_vs_f32m1_f32m1_rm_m +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.mask.nxv2f32.nxv2f32.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat32m1_t test_vfredosum_vs_f32m1_f32m1_rm_m(vbool32_t mask, vfloat32m1_t vector, vfloat32m1_t scalar, size_t vl) { + return __riscv_vfredosum(mask, vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfredosum_vs_f32m2_f32m1_rm_m +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.mask.nxv2f32.nxv4f32.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat32m1_t test_vfredosum_vs_f32m2_f32m1_rm_m(vbool16_t mask, vfloat32m2_t vector, vfloat32m1_t scalar, size_t vl) { + return __riscv_vfredosum(mask, vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfredosum_vs_f32m4_f32m1_rm_m +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.mask.nxv2f32.nxv8f32.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat32m1_t test_vfredosum_vs_f32m4_f32m1_rm_m(vbool8_t mask, vfloat32m4_t vector, vfloat32m1_t scalar, size_t vl) { + return __riscv_vfredosum(mask, vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfredosum_vs_f32m8_f32m1_rm_m +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.mask.nxv2f32.nxv16f32.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat32m1_t test_vfredosum_vs_f32m8_f32m1_rm_m(vbool4_t mask, vfloat32m8_t vector, vfloat32m1_t scalar, size_t vl) { + return __riscv_vfredosum(mask, vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfredosum_vs_f64m1_f64m1_rm_m +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.mask.nxv1f64.nxv1f64.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat64m1_t test_vfredosum_vs_f64m1_f64m1_rm_m(vbool64_t mask, vfloat64m1_t vector, vfloat64m1_t scalar, size_t vl) { + return __riscv_vfredosum(mask, vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfredosum_vs_f64m2_f64m1_rm_m +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.mask.nxv1f64.nxv2f64.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat64m1_t test_vfredosum_vs_f64m2_f64m1_rm_m(vbool32_t mask, vfloat64m2_t vector, vfloat64m1_t scalar, size_t vl) { + return __riscv_vfredosum(mask, vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfredosum_vs_f64m4_f64m1_rm_m +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.mask.nxv1f64.nxv4f64.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat64m1_t test_vfredosum_vs_f64m4_f64m1_rm_m(vbool16_t mask, vfloat64m4_t vector, vfloat64m1_t scalar, size_t vl) { + return __riscv_vfredosum(mask, vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfredosum_vs_f64m8_f64m1_rm_m +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.mask.nxv1f64.nxv8f64.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat64m1_t test_vfredosum_vs_f64m8_f64m1_rm_m(vbool8_t mask, vfloat64m8_t vector, vfloat64m1_t scalar, size_t vl) { + return __riscv_vfredosum(mask, vector, scalar, __RISCV_FRM_RNE, vl); +} + diff --git a/clang/test/CodeGen/RISCV/rvv-intrinsics-autogenerated/non-policy/overloaded/vfredusum.c b/clang/test/CodeGen/RISCV/rvv-intrinsics-autogenerated/non-policy/overloaded/vfredusum.c --- a/clang/test/CodeGen/RISCV/rvv-intrinsics-autogenerated/non-policy/overloaded/vfredusum.c +++ b/clang/test/CodeGen/RISCV/rvv-intrinsics-autogenerated/non-policy/overloaded/vfredusum.c @@ -10,7 +10,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfredusum_vs_f16mf4_f16m1 // CHECK-RV64-SAME: ( [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0:[0-9]+]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.nxv4f16.nxv1f16.i64( poison, [[VECTOR]], [[SCALAR]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.nxv4f16.nxv1f16.i64( poison, [[VECTOR]], [[SCALAR]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat16m1_t test_vfredusum_vs_f16mf4_f16m1(vfloat16mf4_t vector, vfloat16m1_t scalar, size_t vl) { @@ -20,7 +20,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfredusum_vs_f16mf2_f16m1 // CHECK-RV64-SAME: ( [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.nxv4f16.nxv2f16.i64( poison, [[VECTOR]], [[SCALAR]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.nxv4f16.nxv2f16.i64( poison, [[VECTOR]], [[SCALAR]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat16m1_t test_vfredusum_vs_f16mf2_f16m1(vfloat16mf2_t vector, vfloat16m1_t scalar, size_t vl) { @@ -30,7 +30,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfredusum_vs_f16m1_f16m1 // CHECK-RV64-SAME: ( [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.nxv4f16.nxv4f16.i64( poison, [[VECTOR]], [[SCALAR]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.nxv4f16.nxv4f16.i64( poison, [[VECTOR]], [[SCALAR]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat16m1_t test_vfredusum_vs_f16m1_f16m1(vfloat16m1_t vector, vfloat16m1_t scalar, size_t vl) { @@ -40,7 +40,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfredusum_vs_f16m2_f16m1 // CHECK-RV64-SAME: ( [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.nxv4f16.nxv8f16.i64( poison, [[VECTOR]], [[SCALAR]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.nxv4f16.nxv8f16.i64( poison, [[VECTOR]], [[SCALAR]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat16m1_t test_vfredusum_vs_f16m2_f16m1(vfloat16m2_t vector, vfloat16m1_t scalar, size_t vl) { @@ -50,7 +50,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfredusum_vs_f16m4_f16m1 // CHECK-RV64-SAME: ( [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.nxv4f16.nxv16f16.i64( poison, [[VECTOR]], [[SCALAR]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.nxv4f16.nxv16f16.i64( poison, [[VECTOR]], [[SCALAR]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat16m1_t test_vfredusum_vs_f16m4_f16m1(vfloat16m4_t vector, vfloat16m1_t scalar, size_t vl) { @@ -60,7 +60,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfredusum_vs_f16m8_f16m1 // CHECK-RV64-SAME: ( [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.nxv4f16.nxv32f16.i64( poison, [[VECTOR]], [[SCALAR]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.nxv4f16.nxv32f16.i64( poison, [[VECTOR]], [[SCALAR]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat16m1_t test_vfredusum_vs_f16m8_f16m1(vfloat16m8_t vector, vfloat16m1_t scalar, size_t vl) { @@ -70,7 +70,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfredusum_vs_f32mf2_f32m1 // CHECK-RV64-SAME: ( [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.nxv2f32.nxv1f32.i64( poison, [[VECTOR]], [[SCALAR]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.nxv2f32.nxv1f32.i64( poison, [[VECTOR]], [[SCALAR]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat32m1_t test_vfredusum_vs_f32mf2_f32m1(vfloat32mf2_t vector, vfloat32m1_t scalar, size_t vl) { @@ -80,7 +80,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfredusum_vs_f32m1_f32m1 // CHECK-RV64-SAME: ( [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.nxv2f32.nxv2f32.i64( poison, [[VECTOR]], [[SCALAR]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.nxv2f32.nxv2f32.i64( poison, [[VECTOR]], [[SCALAR]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat32m1_t test_vfredusum_vs_f32m1_f32m1(vfloat32m1_t vector, vfloat32m1_t scalar, size_t vl) { @@ -90,7 +90,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfredusum_vs_f32m2_f32m1 // CHECK-RV64-SAME: ( [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.nxv2f32.nxv4f32.i64( poison, [[VECTOR]], [[SCALAR]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.nxv2f32.nxv4f32.i64( poison, [[VECTOR]], [[SCALAR]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat32m1_t test_vfredusum_vs_f32m2_f32m1(vfloat32m2_t vector, vfloat32m1_t scalar, size_t vl) { @@ -100,7 +100,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfredusum_vs_f32m4_f32m1 // CHECK-RV64-SAME: ( [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.nxv2f32.nxv8f32.i64( poison, [[VECTOR]], [[SCALAR]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.nxv2f32.nxv8f32.i64( poison, [[VECTOR]], [[SCALAR]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat32m1_t test_vfredusum_vs_f32m4_f32m1(vfloat32m4_t vector, vfloat32m1_t scalar, size_t vl) { @@ -110,7 +110,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfredusum_vs_f32m8_f32m1 // CHECK-RV64-SAME: ( [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.nxv2f32.nxv16f32.i64( poison, [[VECTOR]], [[SCALAR]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.nxv2f32.nxv16f32.i64( poison, [[VECTOR]], [[SCALAR]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat32m1_t test_vfredusum_vs_f32m8_f32m1(vfloat32m8_t vector, vfloat32m1_t scalar, size_t vl) { @@ -120,7 +120,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfredusum_vs_f64m1_f64m1 // CHECK-RV64-SAME: ( [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.nxv1f64.nxv1f64.i64( poison, [[VECTOR]], [[SCALAR]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.nxv1f64.nxv1f64.i64( poison, [[VECTOR]], [[SCALAR]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat64m1_t test_vfredusum_vs_f64m1_f64m1(vfloat64m1_t vector, vfloat64m1_t scalar, size_t vl) { @@ -130,7 +130,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfredusum_vs_f64m2_f64m1 // CHECK-RV64-SAME: ( [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.nxv1f64.nxv2f64.i64( poison, [[VECTOR]], [[SCALAR]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.nxv1f64.nxv2f64.i64( poison, [[VECTOR]], [[SCALAR]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat64m1_t test_vfredusum_vs_f64m2_f64m1(vfloat64m2_t vector, vfloat64m1_t scalar, size_t vl) { @@ -140,7 +140,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfredusum_vs_f64m4_f64m1 // CHECK-RV64-SAME: ( [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.nxv1f64.nxv4f64.i64( poison, [[VECTOR]], [[SCALAR]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.nxv1f64.nxv4f64.i64( poison, [[VECTOR]], [[SCALAR]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat64m1_t test_vfredusum_vs_f64m4_f64m1(vfloat64m4_t vector, vfloat64m1_t scalar, size_t vl) { @@ -150,7 +150,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfredusum_vs_f64m8_f64m1 // CHECK-RV64-SAME: ( [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.nxv1f64.nxv8f64.i64( poison, [[VECTOR]], [[SCALAR]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.nxv1f64.nxv8f64.i64( poison, [[VECTOR]], [[SCALAR]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat64m1_t test_vfredusum_vs_f64m8_f64m1(vfloat64m8_t vector, vfloat64m1_t scalar, size_t vl) { @@ -160,7 +160,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfredusum_vs_f16mf4_f16m1_m // CHECK-RV64-SAME: ( [[MASK:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.mask.nxv4f16.nxv1f16.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.mask.nxv4f16.nxv1f16.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat16m1_t test_vfredusum_vs_f16mf4_f16m1_m(vbool64_t mask, vfloat16mf4_t vector, vfloat16m1_t scalar, size_t vl) { @@ -170,7 +170,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfredusum_vs_f16mf2_f16m1_m // CHECK-RV64-SAME: ( [[MASK:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.mask.nxv4f16.nxv2f16.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.mask.nxv4f16.nxv2f16.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat16m1_t test_vfredusum_vs_f16mf2_f16m1_m(vbool32_t mask, vfloat16mf2_t vector, vfloat16m1_t scalar, size_t vl) { @@ -180,7 +180,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfredusum_vs_f16m1_f16m1_m // CHECK-RV64-SAME: ( [[MASK:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.mask.nxv4f16.nxv4f16.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.mask.nxv4f16.nxv4f16.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat16m1_t test_vfredusum_vs_f16m1_f16m1_m(vbool16_t mask, vfloat16m1_t vector, vfloat16m1_t scalar, size_t vl) { @@ -190,7 +190,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfredusum_vs_f16m2_f16m1_m // CHECK-RV64-SAME: ( [[MASK:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.mask.nxv4f16.nxv8f16.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.mask.nxv4f16.nxv8f16.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat16m1_t test_vfredusum_vs_f16m2_f16m1_m(vbool8_t mask, vfloat16m2_t vector, vfloat16m1_t scalar, size_t vl) { @@ -200,7 +200,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfredusum_vs_f16m4_f16m1_m // CHECK-RV64-SAME: ( [[MASK:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.mask.nxv4f16.nxv16f16.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.mask.nxv4f16.nxv16f16.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat16m1_t test_vfredusum_vs_f16m4_f16m1_m(vbool4_t mask, vfloat16m4_t vector, vfloat16m1_t scalar, size_t vl) { @@ -210,7 +210,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfredusum_vs_f16m8_f16m1_m // CHECK-RV64-SAME: ( [[MASK:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.mask.nxv4f16.nxv32f16.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.mask.nxv4f16.nxv32f16.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat16m1_t test_vfredusum_vs_f16m8_f16m1_m(vbool2_t mask, vfloat16m8_t vector, vfloat16m1_t scalar, size_t vl) { @@ -220,7 +220,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfredusum_vs_f32mf2_f32m1_m // CHECK-RV64-SAME: ( [[MASK:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.mask.nxv2f32.nxv1f32.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.mask.nxv2f32.nxv1f32.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat32m1_t test_vfredusum_vs_f32mf2_f32m1_m(vbool64_t mask, vfloat32mf2_t vector, vfloat32m1_t scalar, size_t vl) { @@ -230,7 +230,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfredusum_vs_f32m1_f32m1_m // CHECK-RV64-SAME: ( [[MASK:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.mask.nxv2f32.nxv2f32.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.mask.nxv2f32.nxv2f32.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat32m1_t test_vfredusum_vs_f32m1_f32m1_m(vbool32_t mask, vfloat32m1_t vector, vfloat32m1_t scalar, size_t vl) { @@ -240,7 +240,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfredusum_vs_f32m2_f32m1_m // CHECK-RV64-SAME: ( [[MASK:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.mask.nxv2f32.nxv4f32.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.mask.nxv2f32.nxv4f32.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat32m1_t test_vfredusum_vs_f32m2_f32m1_m(vbool16_t mask, vfloat32m2_t vector, vfloat32m1_t scalar, size_t vl) { @@ -250,7 +250,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfredusum_vs_f32m4_f32m1_m // CHECK-RV64-SAME: ( [[MASK:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.mask.nxv2f32.nxv8f32.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.mask.nxv2f32.nxv8f32.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat32m1_t test_vfredusum_vs_f32m4_f32m1_m(vbool8_t mask, vfloat32m4_t vector, vfloat32m1_t scalar, size_t vl) { @@ -260,7 +260,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfredusum_vs_f32m8_f32m1_m // CHECK-RV64-SAME: ( [[MASK:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.mask.nxv2f32.nxv16f32.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.mask.nxv2f32.nxv16f32.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat32m1_t test_vfredusum_vs_f32m8_f32m1_m(vbool4_t mask, vfloat32m8_t vector, vfloat32m1_t scalar, size_t vl) { @@ -270,7 +270,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfredusum_vs_f64m1_f64m1_m // CHECK-RV64-SAME: ( [[MASK:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.mask.nxv1f64.nxv1f64.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.mask.nxv1f64.nxv1f64.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat64m1_t test_vfredusum_vs_f64m1_f64m1_m(vbool64_t mask, vfloat64m1_t vector, vfloat64m1_t scalar, size_t vl) { @@ -280,7 +280,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfredusum_vs_f64m2_f64m1_m // CHECK-RV64-SAME: ( [[MASK:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.mask.nxv1f64.nxv2f64.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.mask.nxv1f64.nxv2f64.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat64m1_t test_vfredusum_vs_f64m2_f64m1_m(vbool32_t mask, vfloat64m2_t vector, vfloat64m1_t scalar, size_t vl) { @@ -290,7 +290,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfredusum_vs_f64m4_f64m1_m // CHECK-RV64-SAME: ( [[MASK:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.mask.nxv1f64.nxv4f64.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.mask.nxv1f64.nxv4f64.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat64m1_t test_vfredusum_vs_f64m4_f64m1_m(vbool16_t mask, vfloat64m4_t vector, vfloat64m1_t scalar, size_t vl) { @@ -300,10 +300,310 @@ // CHECK-RV64-LABEL: define dso_local @test_vfredusum_vs_f64m8_f64m1_m // CHECK-RV64-SAME: ( [[MASK:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.mask.nxv1f64.nxv8f64.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.mask.nxv1f64.nxv8f64.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat64m1_t test_vfredusum_vs_f64m8_f64m1_m(vbool8_t mask, vfloat64m8_t vector, vfloat64m1_t scalar, size_t vl) { return __riscv_vfredusum(mask, vector, scalar, vl); } +// CHECK-RV64-LABEL: define dso_local @test_vfredusum_vs_f16mf4_f16m1_rm +// CHECK-RV64-SAME: ( [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.nxv4f16.nxv1f16.i64( poison, [[VECTOR]], [[SCALAR]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat16m1_t test_vfredusum_vs_f16mf4_f16m1_rm(vfloat16mf4_t vector, vfloat16m1_t scalar, size_t vl) { + return __riscv_vfredusum(vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfredusum_vs_f16mf2_f16m1_rm +// CHECK-RV64-SAME: ( [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.nxv4f16.nxv2f16.i64( poison, [[VECTOR]], [[SCALAR]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat16m1_t test_vfredusum_vs_f16mf2_f16m1_rm(vfloat16mf2_t vector, vfloat16m1_t scalar, size_t vl) { + return __riscv_vfredusum(vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfredusum_vs_f16m1_f16m1_rm +// CHECK-RV64-SAME: ( [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.nxv4f16.nxv4f16.i64( poison, [[VECTOR]], [[SCALAR]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat16m1_t test_vfredusum_vs_f16m1_f16m1_rm(vfloat16m1_t vector, vfloat16m1_t scalar, size_t vl) { + return __riscv_vfredusum(vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfredusum_vs_f16m2_f16m1_rm +// CHECK-RV64-SAME: ( [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.nxv4f16.nxv8f16.i64( poison, [[VECTOR]], [[SCALAR]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat16m1_t test_vfredusum_vs_f16m2_f16m1_rm(vfloat16m2_t vector, vfloat16m1_t scalar, size_t vl) { + return __riscv_vfredusum(vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfredusum_vs_f16m4_f16m1_rm +// CHECK-RV64-SAME: ( [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.nxv4f16.nxv16f16.i64( poison, [[VECTOR]], [[SCALAR]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat16m1_t test_vfredusum_vs_f16m4_f16m1_rm(vfloat16m4_t vector, vfloat16m1_t scalar, size_t vl) { + return __riscv_vfredusum(vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfredusum_vs_f16m8_f16m1_rm +// CHECK-RV64-SAME: ( [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.nxv4f16.nxv32f16.i64( poison, [[VECTOR]], [[SCALAR]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat16m1_t test_vfredusum_vs_f16m8_f16m1_rm(vfloat16m8_t vector, vfloat16m1_t scalar, size_t vl) { + return __riscv_vfredusum(vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfredusum_vs_f32mf2_f32m1_rm +// CHECK-RV64-SAME: ( [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.nxv2f32.nxv1f32.i64( poison, [[VECTOR]], [[SCALAR]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat32m1_t test_vfredusum_vs_f32mf2_f32m1_rm(vfloat32mf2_t vector, vfloat32m1_t scalar, size_t vl) { + return __riscv_vfredusum(vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfredusum_vs_f32m1_f32m1_rm +// CHECK-RV64-SAME: ( [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.nxv2f32.nxv2f32.i64( poison, [[VECTOR]], [[SCALAR]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat32m1_t test_vfredusum_vs_f32m1_f32m1_rm(vfloat32m1_t vector, vfloat32m1_t scalar, size_t vl) { + return __riscv_vfredusum(vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfredusum_vs_f32m2_f32m1_rm +// CHECK-RV64-SAME: ( [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.nxv2f32.nxv4f32.i64( poison, [[VECTOR]], [[SCALAR]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat32m1_t test_vfredusum_vs_f32m2_f32m1_rm(vfloat32m2_t vector, vfloat32m1_t scalar, size_t vl) { + return __riscv_vfredusum(vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfredusum_vs_f32m4_f32m1_rm +// CHECK-RV64-SAME: ( [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.nxv2f32.nxv8f32.i64( poison, [[VECTOR]], [[SCALAR]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat32m1_t test_vfredusum_vs_f32m4_f32m1_rm(vfloat32m4_t vector, vfloat32m1_t scalar, size_t vl) { + return __riscv_vfredusum(vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfredusum_vs_f32m8_f32m1_rm +// CHECK-RV64-SAME: ( [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.nxv2f32.nxv16f32.i64( poison, [[VECTOR]], [[SCALAR]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat32m1_t test_vfredusum_vs_f32m8_f32m1_rm(vfloat32m8_t vector, vfloat32m1_t scalar, size_t vl) { + return __riscv_vfredusum(vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfredusum_vs_f64m1_f64m1_rm +// CHECK-RV64-SAME: ( [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.nxv1f64.nxv1f64.i64( poison, [[VECTOR]], [[SCALAR]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat64m1_t test_vfredusum_vs_f64m1_f64m1_rm(vfloat64m1_t vector, vfloat64m1_t scalar, size_t vl) { + return __riscv_vfredusum(vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfredusum_vs_f64m2_f64m1_rm +// CHECK-RV64-SAME: ( [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.nxv1f64.nxv2f64.i64( poison, [[VECTOR]], [[SCALAR]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat64m1_t test_vfredusum_vs_f64m2_f64m1_rm(vfloat64m2_t vector, vfloat64m1_t scalar, size_t vl) { + return __riscv_vfredusum(vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfredusum_vs_f64m4_f64m1_rm +// CHECK-RV64-SAME: ( [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.nxv1f64.nxv4f64.i64( poison, [[VECTOR]], [[SCALAR]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat64m1_t test_vfredusum_vs_f64m4_f64m1_rm(vfloat64m4_t vector, vfloat64m1_t scalar, size_t vl) { + return __riscv_vfredusum(vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfredusum_vs_f64m8_f64m1_rm +// CHECK-RV64-SAME: ( [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.nxv1f64.nxv8f64.i64( poison, [[VECTOR]], [[SCALAR]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat64m1_t test_vfredusum_vs_f64m8_f64m1_rm(vfloat64m8_t vector, vfloat64m1_t scalar, size_t vl) { + return __riscv_vfredusum(vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfredusum_vs_f16mf4_f16m1_rm_m +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.mask.nxv4f16.nxv1f16.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat16m1_t test_vfredusum_vs_f16mf4_f16m1_rm_m(vbool64_t mask, vfloat16mf4_t vector, vfloat16m1_t scalar, size_t vl) { + return __riscv_vfredusum(mask, vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfredusum_vs_f16mf2_f16m1_rm_m +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.mask.nxv4f16.nxv2f16.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat16m1_t test_vfredusum_vs_f16mf2_f16m1_rm_m(vbool32_t mask, vfloat16mf2_t vector, vfloat16m1_t scalar, size_t vl) { + return __riscv_vfredusum(mask, vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfredusum_vs_f16m1_f16m1_rm_m +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.mask.nxv4f16.nxv4f16.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat16m1_t test_vfredusum_vs_f16m1_f16m1_rm_m(vbool16_t mask, vfloat16m1_t vector, vfloat16m1_t scalar, size_t vl) { + return __riscv_vfredusum(mask, vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfredusum_vs_f16m2_f16m1_rm_m +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.mask.nxv4f16.nxv8f16.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat16m1_t test_vfredusum_vs_f16m2_f16m1_rm_m(vbool8_t mask, vfloat16m2_t vector, vfloat16m1_t scalar, size_t vl) { + return __riscv_vfredusum(mask, vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfredusum_vs_f16m4_f16m1_rm_m +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.mask.nxv4f16.nxv16f16.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat16m1_t test_vfredusum_vs_f16m4_f16m1_rm_m(vbool4_t mask, vfloat16m4_t vector, vfloat16m1_t scalar, size_t vl) { + return __riscv_vfredusum(mask, vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfredusum_vs_f16m8_f16m1_rm_m +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.mask.nxv4f16.nxv32f16.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat16m1_t test_vfredusum_vs_f16m8_f16m1_rm_m(vbool2_t mask, vfloat16m8_t vector, vfloat16m1_t scalar, size_t vl) { + return __riscv_vfredusum(mask, vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfredusum_vs_f32mf2_f32m1_rm_m +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.mask.nxv2f32.nxv1f32.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat32m1_t test_vfredusum_vs_f32mf2_f32m1_rm_m(vbool64_t mask, vfloat32mf2_t vector, vfloat32m1_t scalar, size_t vl) { + return __riscv_vfredusum(mask, vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfredusum_vs_f32m1_f32m1_rm_m +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.mask.nxv2f32.nxv2f32.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat32m1_t test_vfredusum_vs_f32m1_f32m1_rm_m(vbool32_t mask, vfloat32m1_t vector, vfloat32m1_t scalar, size_t vl) { + return __riscv_vfredusum(mask, vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfredusum_vs_f32m2_f32m1_rm_m +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.mask.nxv2f32.nxv4f32.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat32m1_t test_vfredusum_vs_f32m2_f32m1_rm_m(vbool16_t mask, vfloat32m2_t vector, vfloat32m1_t scalar, size_t vl) { + return __riscv_vfredusum(mask, vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfredusum_vs_f32m4_f32m1_rm_m +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.mask.nxv2f32.nxv8f32.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat32m1_t test_vfredusum_vs_f32m4_f32m1_rm_m(vbool8_t mask, vfloat32m4_t vector, vfloat32m1_t scalar, size_t vl) { + return __riscv_vfredusum(mask, vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfredusum_vs_f32m8_f32m1_rm_m +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.mask.nxv2f32.nxv16f32.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat32m1_t test_vfredusum_vs_f32m8_f32m1_rm_m(vbool4_t mask, vfloat32m8_t vector, vfloat32m1_t scalar, size_t vl) { + return __riscv_vfredusum(mask, vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfredusum_vs_f64m1_f64m1_rm_m +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.mask.nxv1f64.nxv1f64.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat64m1_t test_vfredusum_vs_f64m1_f64m1_rm_m(vbool64_t mask, vfloat64m1_t vector, vfloat64m1_t scalar, size_t vl) { + return __riscv_vfredusum(mask, vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfredusum_vs_f64m2_f64m1_rm_m +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.mask.nxv1f64.nxv2f64.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat64m1_t test_vfredusum_vs_f64m2_f64m1_rm_m(vbool32_t mask, vfloat64m2_t vector, vfloat64m1_t scalar, size_t vl) { + return __riscv_vfredusum(mask, vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfredusum_vs_f64m4_f64m1_rm_m +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.mask.nxv1f64.nxv4f64.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat64m1_t test_vfredusum_vs_f64m4_f64m1_rm_m(vbool16_t mask, vfloat64m4_t vector, vfloat64m1_t scalar, size_t vl) { + return __riscv_vfredusum(mask, vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfredusum_vs_f64m8_f64m1_rm_m +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.mask.nxv1f64.nxv8f64.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat64m1_t test_vfredusum_vs_f64m8_f64m1_rm_m(vbool8_t mask, vfloat64m8_t vector, vfloat64m1_t scalar, size_t vl) { + return __riscv_vfredusum(mask, vector, scalar, __RISCV_FRM_RNE, vl); +} + diff --git a/clang/test/CodeGen/RISCV/rvv-intrinsics-autogenerated/non-policy/overloaded/vfwredosum.c b/clang/test/CodeGen/RISCV/rvv-intrinsics-autogenerated/non-policy/overloaded/vfwredosum.c --- a/clang/test/CodeGen/RISCV/rvv-intrinsics-autogenerated/non-policy/overloaded/vfwredosum.c +++ b/clang/test/CodeGen/RISCV/rvv-intrinsics-autogenerated/non-policy/overloaded/vfwredosum.c @@ -10,7 +10,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfwredosum_vs_f16mf4_f32m1 // CHECK-RV64-SAME: ( [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0:[0-9]+]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredosum.nxv2f32.nxv1f16.i64( poison, [[VECTOR]], [[SCALAR]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredosum.nxv2f32.nxv1f16.i64( poison, [[VECTOR]], [[SCALAR]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat32m1_t test_vfwredosum_vs_f16mf4_f32m1(vfloat16mf4_t vector, vfloat32m1_t scalar, size_t vl) { @@ -20,7 +20,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfwredosum_vs_f16mf2_f32m1 // CHECK-RV64-SAME: ( [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredosum.nxv2f32.nxv2f16.i64( poison, [[VECTOR]], [[SCALAR]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredosum.nxv2f32.nxv2f16.i64( poison, [[VECTOR]], [[SCALAR]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat32m1_t test_vfwredosum_vs_f16mf2_f32m1(vfloat16mf2_t vector, vfloat32m1_t scalar, size_t vl) { @@ -30,7 +30,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfwredosum_vs_f16m1_f32m1 // CHECK-RV64-SAME: ( [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredosum.nxv2f32.nxv4f16.i64( poison, [[VECTOR]], [[SCALAR]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredosum.nxv2f32.nxv4f16.i64( poison, [[VECTOR]], [[SCALAR]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat32m1_t test_vfwredosum_vs_f16m1_f32m1(vfloat16m1_t vector, vfloat32m1_t scalar, size_t vl) { @@ -40,7 +40,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfwredosum_vs_f16m2_f32m1 // CHECK-RV64-SAME: ( [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredosum.nxv2f32.nxv8f16.i64( poison, [[VECTOR]], [[SCALAR]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredosum.nxv2f32.nxv8f16.i64( poison, [[VECTOR]], [[SCALAR]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat32m1_t test_vfwredosum_vs_f16m2_f32m1(vfloat16m2_t vector, vfloat32m1_t scalar, size_t vl) { @@ -50,7 +50,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfwredosum_vs_f16m4_f32m1 // CHECK-RV64-SAME: ( [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredosum.nxv2f32.nxv16f16.i64( poison, [[VECTOR]], [[SCALAR]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredosum.nxv2f32.nxv16f16.i64( poison, [[VECTOR]], [[SCALAR]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat32m1_t test_vfwredosum_vs_f16m4_f32m1(vfloat16m4_t vector, vfloat32m1_t scalar, size_t vl) { @@ -60,7 +60,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfwredosum_vs_f16m8_f32m1 // CHECK-RV64-SAME: ( [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredosum.nxv2f32.nxv32f16.i64( poison, [[VECTOR]], [[SCALAR]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredosum.nxv2f32.nxv32f16.i64( poison, [[VECTOR]], [[SCALAR]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat32m1_t test_vfwredosum_vs_f16m8_f32m1(vfloat16m8_t vector, vfloat32m1_t scalar, size_t vl) { @@ -70,7 +70,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfwredosum_vs_f32mf2_f64m1 // CHECK-RV64-SAME: ( [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredosum.nxv1f64.nxv1f32.i64( poison, [[VECTOR]], [[SCALAR]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredosum.nxv1f64.nxv1f32.i64( poison, [[VECTOR]], [[SCALAR]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat64m1_t test_vfwredosum_vs_f32mf2_f64m1(vfloat32mf2_t vector, vfloat64m1_t scalar, size_t vl) { @@ -80,7 +80,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfwredosum_vs_f32m1_f64m1 // CHECK-RV64-SAME: ( [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredosum.nxv1f64.nxv2f32.i64( poison, [[VECTOR]], [[SCALAR]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredosum.nxv1f64.nxv2f32.i64( poison, [[VECTOR]], [[SCALAR]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat64m1_t test_vfwredosum_vs_f32m1_f64m1(vfloat32m1_t vector, vfloat64m1_t scalar, size_t vl) { @@ -90,7 +90,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfwredosum_vs_f32m2_f64m1 // CHECK-RV64-SAME: ( [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredosum.nxv1f64.nxv4f32.i64( poison, [[VECTOR]], [[SCALAR]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredosum.nxv1f64.nxv4f32.i64( poison, [[VECTOR]], [[SCALAR]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat64m1_t test_vfwredosum_vs_f32m2_f64m1(vfloat32m2_t vector, vfloat64m1_t scalar, size_t vl) { @@ -100,7 +100,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfwredosum_vs_f32m4_f64m1 // CHECK-RV64-SAME: ( [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredosum.nxv1f64.nxv8f32.i64( poison, [[VECTOR]], [[SCALAR]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredosum.nxv1f64.nxv8f32.i64( poison, [[VECTOR]], [[SCALAR]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat64m1_t test_vfwredosum_vs_f32m4_f64m1(vfloat32m4_t vector, vfloat64m1_t scalar, size_t vl) { @@ -110,7 +110,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfwredosum_vs_f32m8_f64m1 // CHECK-RV64-SAME: ( [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredosum.nxv1f64.nxv16f32.i64( poison, [[VECTOR]], [[SCALAR]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredosum.nxv1f64.nxv16f32.i64( poison, [[VECTOR]], [[SCALAR]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat64m1_t test_vfwredosum_vs_f32m8_f64m1(vfloat32m8_t vector, vfloat64m1_t scalar, size_t vl) { @@ -120,7 +120,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfwredosum_vs_f16mf4_f32m1_m // CHECK-RV64-SAME: ( [[MASK:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredosum.mask.nxv2f32.nxv1f16.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredosum.mask.nxv2f32.nxv1f16.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat32m1_t test_vfwredosum_vs_f16mf4_f32m1_m(vbool64_t mask, vfloat16mf4_t vector, vfloat32m1_t scalar, size_t vl) { @@ -130,7 +130,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfwredosum_vs_f16mf2_f32m1_m // CHECK-RV64-SAME: ( [[MASK:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredosum.mask.nxv2f32.nxv2f16.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredosum.mask.nxv2f32.nxv2f16.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat32m1_t test_vfwredosum_vs_f16mf2_f32m1_m(vbool32_t mask, vfloat16mf2_t vector, vfloat32m1_t scalar, size_t vl) { @@ -140,7 +140,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfwredosum_vs_f16m1_f32m1_m // CHECK-RV64-SAME: ( [[MASK:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredosum.mask.nxv2f32.nxv4f16.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredosum.mask.nxv2f32.nxv4f16.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat32m1_t test_vfwredosum_vs_f16m1_f32m1_m(vbool16_t mask, vfloat16m1_t vector, vfloat32m1_t scalar, size_t vl) { @@ -150,7 +150,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfwredosum_vs_f16m2_f32m1_m // CHECK-RV64-SAME: ( [[MASK:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredosum.mask.nxv2f32.nxv8f16.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredosum.mask.nxv2f32.nxv8f16.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat32m1_t test_vfwredosum_vs_f16m2_f32m1_m(vbool8_t mask, vfloat16m2_t vector, vfloat32m1_t scalar, size_t vl) { @@ -160,7 +160,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfwredosum_vs_f16m4_f32m1_m // CHECK-RV64-SAME: ( [[MASK:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredosum.mask.nxv2f32.nxv16f16.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredosum.mask.nxv2f32.nxv16f16.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat32m1_t test_vfwredosum_vs_f16m4_f32m1_m(vbool4_t mask, vfloat16m4_t vector, vfloat32m1_t scalar, size_t vl) { @@ -170,7 +170,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfwredosum_vs_f16m8_f32m1_m // CHECK-RV64-SAME: ( [[MASK:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredosum.mask.nxv2f32.nxv32f16.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredosum.mask.nxv2f32.nxv32f16.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat32m1_t test_vfwredosum_vs_f16m8_f32m1_m(vbool2_t mask, vfloat16m8_t vector, vfloat32m1_t scalar, size_t vl) { @@ -180,7 +180,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfwredosum_vs_f32mf2_f64m1_m // CHECK-RV64-SAME: ( [[MASK:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredosum.mask.nxv1f64.nxv1f32.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredosum.mask.nxv1f64.nxv1f32.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat64m1_t test_vfwredosum_vs_f32mf2_f64m1_m(vbool64_t mask, vfloat32mf2_t vector, vfloat64m1_t scalar, size_t vl) { @@ -190,7 +190,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfwredosum_vs_f32m1_f64m1_m // CHECK-RV64-SAME: ( [[MASK:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredosum.mask.nxv1f64.nxv2f32.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredosum.mask.nxv1f64.nxv2f32.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat64m1_t test_vfwredosum_vs_f32m1_f64m1_m(vbool32_t mask, vfloat32m1_t vector, vfloat64m1_t scalar, size_t vl) { @@ -200,7 +200,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfwredosum_vs_f32m2_f64m1_m // CHECK-RV64-SAME: ( [[MASK:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredosum.mask.nxv1f64.nxv4f32.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredosum.mask.nxv1f64.nxv4f32.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat64m1_t test_vfwredosum_vs_f32m2_f64m1_m(vbool16_t mask, vfloat32m2_t vector, vfloat64m1_t scalar, size_t vl) { @@ -210,7 +210,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfwredosum_vs_f32m4_f64m1_m // CHECK-RV64-SAME: ( [[MASK:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredosum.mask.nxv1f64.nxv8f32.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredosum.mask.nxv1f64.nxv8f32.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat64m1_t test_vfwredosum_vs_f32m4_f64m1_m(vbool8_t mask, vfloat32m4_t vector, vfloat64m1_t scalar, size_t vl) { @@ -220,10 +220,230 @@ // CHECK-RV64-LABEL: define dso_local @test_vfwredosum_vs_f32m8_f64m1_m // CHECK-RV64-SAME: ( [[MASK:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredosum.mask.nxv1f64.nxv16f32.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredosum.mask.nxv1f64.nxv16f32.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat64m1_t test_vfwredosum_vs_f32m8_f64m1_m(vbool4_t mask, vfloat32m8_t vector, vfloat64m1_t scalar, size_t vl) { return __riscv_vfwredosum(mask, vector, scalar, vl); } +// CHECK-RV64-LABEL: define dso_local @test_vfwredosum_vs_f16mf4_f32m1_rm +// CHECK-RV64-SAME: ( [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredosum.nxv2f32.nxv1f16.i64( poison, [[VECTOR]], [[SCALAR]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat32m1_t test_vfwredosum_vs_f16mf4_f32m1_rm(vfloat16mf4_t vector, vfloat32m1_t scalar, size_t vl) { + return __riscv_vfwredosum(vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfwredosum_vs_f16mf2_f32m1_rm +// CHECK-RV64-SAME: ( [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredosum.nxv2f32.nxv2f16.i64( poison, [[VECTOR]], [[SCALAR]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat32m1_t test_vfwredosum_vs_f16mf2_f32m1_rm(vfloat16mf2_t vector, vfloat32m1_t scalar, size_t vl) { + return __riscv_vfwredosum(vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfwredosum_vs_f16m1_f32m1_rm +// CHECK-RV64-SAME: ( [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredosum.nxv2f32.nxv4f16.i64( poison, [[VECTOR]], [[SCALAR]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat32m1_t test_vfwredosum_vs_f16m1_f32m1_rm(vfloat16m1_t vector, vfloat32m1_t scalar, size_t vl) { + return __riscv_vfwredosum(vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfwredosum_vs_f16m2_f32m1_rm +// CHECK-RV64-SAME: ( [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredosum.nxv2f32.nxv8f16.i64( poison, [[VECTOR]], [[SCALAR]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat32m1_t test_vfwredosum_vs_f16m2_f32m1_rm(vfloat16m2_t vector, vfloat32m1_t scalar, size_t vl) { + return __riscv_vfwredosum(vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfwredosum_vs_f16m4_f32m1_rm +// CHECK-RV64-SAME: ( [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredosum.nxv2f32.nxv16f16.i64( poison, [[VECTOR]], [[SCALAR]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat32m1_t test_vfwredosum_vs_f16m4_f32m1_rm(vfloat16m4_t vector, vfloat32m1_t scalar, size_t vl) { + return __riscv_vfwredosum(vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfwredosum_vs_f16m8_f32m1_rm +// CHECK-RV64-SAME: ( [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredosum.nxv2f32.nxv32f16.i64( poison, [[VECTOR]], [[SCALAR]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat32m1_t test_vfwredosum_vs_f16m8_f32m1_rm(vfloat16m8_t vector, vfloat32m1_t scalar, size_t vl) { + return __riscv_vfwredosum(vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfwredosum_vs_f32mf2_f64m1_rm +// CHECK-RV64-SAME: ( [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredosum.nxv1f64.nxv1f32.i64( poison, [[VECTOR]], [[SCALAR]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat64m1_t test_vfwredosum_vs_f32mf2_f64m1_rm(vfloat32mf2_t vector, vfloat64m1_t scalar, size_t vl) { + return __riscv_vfwredosum(vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfwredosum_vs_f32m1_f64m1_rm +// CHECK-RV64-SAME: ( [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredosum.nxv1f64.nxv2f32.i64( poison, [[VECTOR]], [[SCALAR]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat64m1_t test_vfwredosum_vs_f32m1_f64m1_rm(vfloat32m1_t vector, vfloat64m1_t scalar, size_t vl) { + return __riscv_vfwredosum(vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfwredosum_vs_f32m2_f64m1_rm +// CHECK-RV64-SAME: ( [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredosum.nxv1f64.nxv4f32.i64( poison, [[VECTOR]], [[SCALAR]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat64m1_t test_vfwredosum_vs_f32m2_f64m1_rm(vfloat32m2_t vector, vfloat64m1_t scalar, size_t vl) { + return __riscv_vfwredosum(vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfwredosum_vs_f32m4_f64m1_rm +// CHECK-RV64-SAME: ( [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredosum.nxv1f64.nxv8f32.i64( poison, [[VECTOR]], [[SCALAR]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat64m1_t test_vfwredosum_vs_f32m4_f64m1_rm(vfloat32m4_t vector, vfloat64m1_t scalar, size_t vl) { + return __riscv_vfwredosum(vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfwredosum_vs_f32m8_f64m1_rm +// CHECK-RV64-SAME: ( [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredosum.nxv1f64.nxv16f32.i64( poison, [[VECTOR]], [[SCALAR]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat64m1_t test_vfwredosum_vs_f32m8_f64m1_rm(vfloat32m8_t vector, vfloat64m1_t scalar, size_t vl) { + return __riscv_vfwredosum(vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfwredosum_vs_f16mf4_f32m1_rm_m +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredosum.mask.nxv2f32.nxv1f16.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat32m1_t test_vfwredosum_vs_f16mf4_f32m1_rm_m(vbool64_t mask, vfloat16mf4_t vector, vfloat32m1_t scalar, size_t vl) { + return __riscv_vfwredosum(mask, vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfwredosum_vs_f16mf2_f32m1_rm_m +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredosum.mask.nxv2f32.nxv2f16.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat32m1_t test_vfwredosum_vs_f16mf2_f32m1_rm_m(vbool32_t mask, vfloat16mf2_t vector, vfloat32m1_t scalar, size_t vl) { + return __riscv_vfwredosum(mask, vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfwredosum_vs_f16m1_f32m1_rm_m +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredosum.mask.nxv2f32.nxv4f16.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat32m1_t test_vfwredosum_vs_f16m1_f32m1_rm_m(vbool16_t mask, vfloat16m1_t vector, vfloat32m1_t scalar, size_t vl) { + return __riscv_vfwredosum(mask, vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfwredosum_vs_f16m2_f32m1_rm_m +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredosum.mask.nxv2f32.nxv8f16.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat32m1_t test_vfwredosum_vs_f16m2_f32m1_rm_m(vbool8_t mask, vfloat16m2_t vector, vfloat32m1_t scalar, size_t vl) { + return __riscv_vfwredosum(mask, vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfwredosum_vs_f16m4_f32m1_rm_m +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredosum.mask.nxv2f32.nxv16f16.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat32m1_t test_vfwredosum_vs_f16m4_f32m1_rm_m(vbool4_t mask, vfloat16m4_t vector, vfloat32m1_t scalar, size_t vl) { + return __riscv_vfwredosum(mask, vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfwredosum_vs_f16m8_f32m1_rm_m +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredosum.mask.nxv2f32.nxv32f16.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat32m1_t test_vfwredosum_vs_f16m8_f32m1_rm_m(vbool2_t mask, vfloat16m8_t vector, vfloat32m1_t scalar, size_t vl) { + return __riscv_vfwredosum(mask, vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfwredosum_vs_f32mf2_f64m1_rm_m +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredosum.mask.nxv1f64.nxv1f32.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat64m1_t test_vfwredosum_vs_f32mf2_f64m1_rm_m(vbool64_t mask, vfloat32mf2_t vector, vfloat64m1_t scalar, size_t vl) { + return __riscv_vfwredosum(mask, vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfwredosum_vs_f32m1_f64m1_rm_m +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredosum.mask.nxv1f64.nxv2f32.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat64m1_t test_vfwredosum_vs_f32m1_f64m1_rm_m(vbool32_t mask, vfloat32m1_t vector, vfloat64m1_t scalar, size_t vl) { + return __riscv_vfwredosum(mask, vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfwredosum_vs_f32m2_f64m1_rm_m +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredosum.mask.nxv1f64.nxv4f32.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat64m1_t test_vfwredosum_vs_f32m2_f64m1_rm_m(vbool16_t mask, vfloat32m2_t vector, vfloat64m1_t scalar, size_t vl) { + return __riscv_vfwredosum(mask, vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfwredosum_vs_f32m4_f64m1_rm_m +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredosum.mask.nxv1f64.nxv8f32.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat64m1_t test_vfwredosum_vs_f32m4_f64m1_rm_m(vbool8_t mask, vfloat32m4_t vector, vfloat64m1_t scalar, size_t vl) { + return __riscv_vfwredosum(mask, vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfwredosum_vs_f32m8_f64m1_rm_m +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredosum.mask.nxv1f64.nxv16f32.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat64m1_t test_vfwredosum_vs_f32m8_f64m1_rm_m(vbool4_t mask, vfloat32m8_t vector, vfloat64m1_t scalar, size_t vl) { + return __riscv_vfwredosum(mask, vector, scalar, __RISCV_FRM_RNE, vl); +} + diff --git a/clang/test/CodeGen/RISCV/rvv-intrinsics-autogenerated/non-policy/overloaded/vfwredusum.c b/clang/test/CodeGen/RISCV/rvv-intrinsics-autogenerated/non-policy/overloaded/vfwredusum.c --- a/clang/test/CodeGen/RISCV/rvv-intrinsics-autogenerated/non-policy/overloaded/vfwredusum.c +++ b/clang/test/CodeGen/RISCV/rvv-intrinsics-autogenerated/non-policy/overloaded/vfwredusum.c @@ -10,7 +10,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfwredusum_vs_f16mf4_f32m1 // CHECK-RV64-SAME: ( [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0:[0-9]+]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredusum.nxv2f32.nxv1f16.i64( poison, [[VECTOR]], [[SCALAR]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredusum.nxv2f32.nxv1f16.i64( poison, [[VECTOR]], [[SCALAR]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat32m1_t test_vfwredusum_vs_f16mf4_f32m1(vfloat16mf4_t vector, vfloat32m1_t scalar, size_t vl) { @@ -20,7 +20,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfwredusum_vs_f16mf2_f32m1 // CHECK-RV64-SAME: ( [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredusum.nxv2f32.nxv2f16.i64( poison, [[VECTOR]], [[SCALAR]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredusum.nxv2f32.nxv2f16.i64( poison, [[VECTOR]], [[SCALAR]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat32m1_t test_vfwredusum_vs_f16mf2_f32m1(vfloat16mf2_t vector, vfloat32m1_t scalar, size_t vl) { @@ -30,7 +30,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfwredusum_vs_f16m1_f32m1 // CHECK-RV64-SAME: ( [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredusum.nxv2f32.nxv4f16.i64( poison, [[VECTOR]], [[SCALAR]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredusum.nxv2f32.nxv4f16.i64( poison, [[VECTOR]], [[SCALAR]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat32m1_t test_vfwredusum_vs_f16m1_f32m1(vfloat16m1_t vector, vfloat32m1_t scalar, size_t vl) { @@ -40,7 +40,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfwredusum_vs_f16m2_f32m1 // CHECK-RV64-SAME: ( [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredusum.nxv2f32.nxv8f16.i64( poison, [[VECTOR]], [[SCALAR]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredusum.nxv2f32.nxv8f16.i64( poison, [[VECTOR]], [[SCALAR]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat32m1_t test_vfwredusum_vs_f16m2_f32m1(vfloat16m2_t vector, vfloat32m1_t scalar, size_t vl) { @@ -50,7 +50,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfwredusum_vs_f16m4_f32m1 // CHECK-RV64-SAME: ( [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredusum.nxv2f32.nxv16f16.i64( poison, [[VECTOR]], [[SCALAR]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredusum.nxv2f32.nxv16f16.i64( poison, [[VECTOR]], [[SCALAR]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat32m1_t test_vfwredusum_vs_f16m4_f32m1(vfloat16m4_t vector, vfloat32m1_t scalar, size_t vl) { @@ -60,7 +60,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfwredusum_vs_f16m8_f32m1 // CHECK-RV64-SAME: ( [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredusum.nxv2f32.nxv32f16.i64( poison, [[VECTOR]], [[SCALAR]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredusum.nxv2f32.nxv32f16.i64( poison, [[VECTOR]], [[SCALAR]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat32m1_t test_vfwredusum_vs_f16m8_f32m1(vfloat16m8_t vector, vfloat32m1_t scalar, size_t vl) { @@ -70,7 +70,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfwredusum_vs_f32mf2_f64m1 // CHECK-RV64-SAME: ( [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredusum.nxv1f64.nxv1f32.i64( poison, [[VECTOR]], [[SCALAR]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredusum.nxv1f64.nxv1f32.i64( poison, [[VECTOR]], [[SCALAR]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat64m1_t test_vfwredusum_vs_f32mf2_f64m1(vfloat32mf2_t vector, vfloat64m1_t scalar, size_t vl) { @@ -80,7 +80,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfwredusum_vs_f32m1_f64m1 // CHECK-RV64-SAME: ( [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredusum.nxv1f64.nxv2f32.i64( poison, [[VECTOR]], [[SCALAR]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredusum.nxv1f64.nxv2f32.i64( poison, [[VECTOR]], [[SCALAR]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat64m1_t test_vfwredusum_vs_f32m1_f64m1(vfloat32m1_t vector, vfloat64m1_t scalar, size_t vl) { @@ -90,7 +90,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfwredusum_vs_f32m2_f64m1 // CHECK-RV64-SAME: ( [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredusum.nxv1f64.nxv4f32.i64( poison, [[VECTOR]], [[SCALAR]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredusum.nxv1f64.nxv4f32.i64( poison, [[VECTOR]], [[SCALAR]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat64m1_t test_vfwredusum_vs_f32m2_f64m1(vfloat32m2_t vector, vfloat64m1_t scalar, size_t vl) { @@ -100,7 +100,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfwredusum_vs_f32m4_f64m1 // CHECK-RV64-SAME: ( [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredusum.nxv1f64.nxv8f32.i64( poison, [[VECTOR]], [[SCALAR]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredusum.nxv1f64.nxv8f32.i64( poison, [[VECTOR]], [[SCALAR]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat64m1_t test_vfwredusum_vs_f32m4_f64m1(vfloat32m4_t vector, vfloat64m1_t scalar, size_t vl) { @@ -110,7 +110,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfwredusum_vs_f32m8_f64m1 // CHECK-RV64-SAME: ( [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredusum.nxv1f64.nxv16f32.i64( poison, [[VECTOR]], [[SCALAR]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredusum.nxv1f64.nxv16f32.i64( poison, [[VECTOR]], [[SCALAR]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat64m1_t test_vfwredusum_vs_f32m8_f64m1(vfloat32m8_t vector, vfloat64m1_t scalar, size_t vl) { @@ -120,7 +120,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfwredusum_vs_f16mf4_f32m1_m // CHECK-RV64-SAME: ( [[MASK:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredusum.mask.nxv2f32.nxv1f16.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredusum.mask.nxv2f32.nxv1f16.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat32m1_t test_vfwredusum_vs_f16mf4_f32m1_m(vbool64_t mask, vfloat16mf4_t vector, vfloat32m1_t scalar, size_t vl) { @@ -130,7 +130,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfwredusum_vs_f16mf2_f32m1_m // CHECK-RV64-SAME: ( [[MASK:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredusum.mask.nxv2f32.nxv2f16.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredusum.mask.nxv2f32.nxv2f16.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat32m1_t test_vfwredusum_vs_f16mf2_f32m1_m(vbool32_t mask, vfloat16mf2_t vector, vfloat32m1_t scalar, size_t vl) { @@ -140,7 +140,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfwredusum_vs_f16m1_f32m1_m // CHECK-RV64-SAME: ( [[MASK:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredusum.mask.nxv2f32.nxv4f16.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredusum.mask.nxv2f32.nxv4f16.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat32m1_t test_vfwredusum_vs_f16m1_f32m1_m(vbool16_t mask, vfloat16m1_t vector, vfloat32m1_t scalar, size_t vl) { @@ -150,7 +150,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfwredusum_vs_f16m2_f32m1_m // CHECK-RV64-SAME: ( [[MASK:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredusum.mask.nxv2f32.nxv8f16.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredusum.mask.nxv2f32.nxv8f16.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat32m1_t test_vfwredusum_vs_f16m2_f32m1_m(vbool8_t mask, vfloat16m2_t vector, vfloat32m1_t scalar, size_t vl) { @@ -160,7 +160,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfwredusum_vs_f16m4_f32m1_m // CHECK-RV64-SAME: ( [[MASK:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredusum.mask.nxv2f32.nxv16f16.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredusum.mask.nxv2f32.nxv16f16.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat32m1_t test_vfwredusum_vs_f16m4_f32m1_m(vbool4_t mask, vfloat16m4_t vector, vfloat32m1_t scalar, size_t vl) { @@ -170,7 +170,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfwredusum_vs_f16m8_f32m1_m // CHECK-RV64-SAME: ( [[MASK:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredusum.mask.nxv2f32.nxv32f16.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredusum.mask.nxv2f32.nxv32f16.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat32m1_t test_vfwredusum_vs_f16m8_f32m1_m(vbool2_t mask, vfloat16m8_t vector, vfloat32m1_t scalar, size_t vl) { @@ -180,7 +180,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfwredusum_vs_f32mf2_f64m1_m // CHECK-RV64-SAME: ( [[MASK:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredusum.mask.nxv1f64.nxv1f32.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredusum.mask.nxv1f64.nxv1f32.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat64m1_t test_vfwredusum_vs_f32mf2_f64m1_m(vbool64_t mask, vfloat32mf2_t vector, vfloat64m1_t scalar, size_t vl) { @@ -190,7 +190,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfwredusum_vs_f32m1_f64m1_m // CHECK-RV64-SAME: ( [[MASK:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredusum.mask.nxv1f64.nxv2f32.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredusum.mask.nxv1f64.nxv2f32.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat64m1_t test_vfwredusum_vs_f32m1_f64m1_m(vbool32_t mask, vfloat32m1_t vector, vfloat64m1_t scalar, size_t vl) { @@ -200,7 +200,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfwredusum_vs_f32m2_f64m1_m // CHECK-RV64-SAME: ( [[MASK:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredusum.mask.nxv1f64.nxv4f32.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredusum.mask.nxv1f64.nxv4f32.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat64m1_t test_vfwredusum_vs_f32m2_f64m1_m(vbool16_t mask, vfloat32m2_t vector, vfloat64m1_t scalar, size_t vl) { @@ -210,7 +210,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfwredusum_vs_f32m4_f64m1_m // CHECK-RV64-SAME: ( [[MASK:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredusum.mask.nxv1f64.nxv8f32.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredusum.mask.nxv1f64.nxv8f32.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat64m1_t test_vfwredusum_vs_f32m4_f64m1_m(vbool8_t mask, vfloat32m4_t vector, vfloat64m1_t scalar, size_t vl) { @@ -220,10 +220,230 @@ // CHECK-RV64-LABEL: define dso_local @test_vfwredusum_vs_f32m8_f64m1_m // CHECK-RV64-SAME: ( [[MASK:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredusum.mask.nxv1f64.nxv16f32.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredusum.mask.nxv1f64.nxv16f32.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat64m1_t test_vfwredusum_vs_f32m8_f64m1_m(vbool4_t mask, vfloat32m8_t vector, vfloat64m1_t scalar, size_t vl) { return __riscv_vfwredusum(mask, vector, scalar, vl); } +// CHECK-RV64-LABEL: define dso_local @test_vfwredusum_vs_f16mf4_f32m1_rm +// CHECK-RV64-SAME: ( [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredusum.nxv2f32.nxv1f16.i64( poison, [[VECTOR]], [[SCALAR]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat32m1_t test_vfwredusum_vs_f16mf4_f32m1_rm(vfloat16mf4_t vector, vfloat32m1_t scalar, size_t vl) { + return __riscv_vfwredusum(vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfwredusum_vs_f16mf2_f32m1_rm +// CHECK-RV64-SAME: ( [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredusum.nxv2f32.nxv2f16.i64( poison, [[VECTOR]], [[SCALAR]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat32m1_t test_vfwredusum_vs_f16mf2_f32m1_rm(vfloat16mf2_t vector, vfloat32m1_t scalar, size_t vl) { + return __riscv_vfwredusum(vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfwredusum_vs_f16m1_f32m1_rm +// CHECK-RV64-SAME: ( [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredusum.nxv2f32.nxv4f16.i64( poison, [[VECTOR]], [[SCALAR]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat32m1_t test_vfwredusum_vs_f16m1_f32m1_rm(vfloat16m1_t vector, vfloat32m1_t scalar, size_t vl) { + return __riscv_vfwredusum(vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfwredusum_vs_f16m2_f32m1_rm +// CHECK-RV64-SAME: ( [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredusum.nxv2f32.nxv8f16.i64( poison, [[VECTOR]], [[SCALAR]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat32m1_t test_vfwredusum_vs_f16m2_f32m1_rm(vfloat16m2_t vector, vfloat32m1_t scalar, size_t vl) { + return __riscv_vfwredusum(vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfwredusum_vs_f16m4_f32m1_rm +// CHECK-RV64-SAME: ( [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredusum.nxv2f32.nxv16f16.i64( poison, [[VECTOR]], [[SCALAR]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat32m1_t test_vfwredusum_vs_f16m4_f32m1_rm(vfloat16m4_t vector, vfloat32m1_t scalar, size_t vl) { + return __riscv_vfwredusum(vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfwredusum_vs_f16m8_f32m1_rm +// CHECK-RV64-SAME: ( [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredusum.nxv2f32.nxv32f16.i64( poison, [[VECTOR]], [[SCALAR]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat32m1_t test_vfwredusum_vs_f16m8_f32m1_rm(vfloat16m8_t vector, vfloat32m1_t scalar, size_t vl) { + return __riscv_vfwredusum(vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfwredusum_vs_f32mf2_f64m1_rm +// CHECK-RV64-SAME: ( [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredusum.nxv1f64.nxv1f32.i64( poison, [[VECTOR]], [[SCALAR]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat64m1_t test_vfwredusum_vs_f32mf2_f64m1_rm(vfloat32mf2_t vector, vfloat64m1_t scalar, size_t vl) { + return __riscv_vfwredusum(vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfwredusum_vs_f32m1_f64m1_rm +// CHECK-RV64-SAME: ( [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredusum.nxv1f64.nxv2f32.i64( poison, [[VECTOR]], [[SCALAR]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat64m1_t test_vfwredusum_vs_f32m1_f64m1_rm(vfloat32m1_t vector, vfloat64m1_t scalar, size_t vl) { + return __riscv_vfwredusum(vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfwredusum_vs_f32m2_f64m1_rm +// CHECK-RV64-SAME: ( [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredusum.nxv1f64.nxv4f32.i64( poison, [[VECTOR]], [[SCALAR]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat64m1_t test_vfwredusum_vs_f32m2_f64m1_rm(vfloat32m2_t vector, vfloat64m1_t scalar, size_t vl) { + return __riscv_vfwredusum(vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfwredusum_vs_f32m4_f64m1_rm +// CHECK-RV64-SAME: ( [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredusum.nxv1f64.nxv8f32.i64( poison, [[VECTOR]], [[SCALAR]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat64m1_t test_vfwredusum_vs_f32m4_f64m1_rm(vfloat32m4_t vector, vfloat64m1_t scalar, size_t vl) { + return __riscv_vfwredusum(vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfwredusum_vs_f32m8_f64m1_rm +// CHECK-RV64-SAME: ( [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredusum.nxv1f64.nxv16f32.i64( poison, [[VECTOR]], [[SCALAR]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat64m1_t test_vfwredusum_vs_f32m8_f64m1_rm(vfloat32m8_t vector, vfloat64m1_t scalar, size_t vl) { + return __riscv_vfwredusum(vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfwredusum_vs_f16mf4_f32m1_rm_m +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredusum.mask.nxv2f32.nxv1f16.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat32m1_t test_vfwredusum_vs_f16mf4_f32m1_rm_m(vbool64_t mask, vfloat16mf4_t vector, vfloat32m1_t scalar, size_t vl) { + return __riscv_vfwredusum(mask, vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfwredusum_vs_f16mf2_f32m1_rm_m +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredusum.mask.nxv2f32.nxv2f16.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat32m1_t test_vfwredusum_vs_f16mf2_f32m1_rm_m(vbool32_t mask, vfloat16mf2_t vector, vfloat32m1_t scalar, size_t vl) { + return __riscv_vfwredusum(mask, vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfwredusum_vs_f16m1_f32m1_rm_m +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredusum.mask.nxv2f32.nxv4f16.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat32m1_t test_vfwredusum_vs_f16m1_f32m1_rm_m(vbool16_t mask, vfloat16m1_t vector, vfloat32m1_t scalar, size_t vl) { + return __riscv_vfwredusum(mask, vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfwredusum_vs_f16m2_f32m1_rm_m +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredusum.mask.nxv2f32.nxv8f16.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat32m1_t test_vfwredusum_vs_f16m2_f32m1_rm_m(vbool8_t mask, vfloat16m2_t vector, vfloat32m1_t scalar, size_t vl) { + return __riscv_vfwredusum(mask, vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfwredusum_vs_f16m4_f32m1_rm_m +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredusum.mask.nxv2f32.nxv16f16.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat32m1_t test_vfwredusum_vs_f16m4_f32m1_rm_m(vbool4_t mask, vfloat16m4_t vector, vfloat32m1_t scalar, size_t vl) { + return __riscv_vfwredusum(mask, vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfwredusum_vs_f16m8_f32m1_rm_m +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredusum.mask.nxv2f32.nxv32f16.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat32m1_t test_vfwredusum_vs_f16m8_f32m1_rm_m(vbool2_t mask, vfloat16m8_t vector, vfloat32m1_t scalar, size_t vl) { + return __riscv_vfwredusum(mask, vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfwredusum_vs_f32mf2_f64m1_rm_m +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredusum.mask.nxv1f64.nxv1f32.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat64m1_t test_vfwredusum_vs_f32mf2_f64m1_rm_m(vbool64_t mask, vfloat32mf2_t vector, vfloat64m1_t scalar, size_t vl) { + return __riscv_vfwredusum(mask, vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfwredusum_vs_f32m1_f64m1_rm_m +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredusum.mask.nxv1f64.nxv2f32.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat64m1_t test_vfwredusum_vs_f32m1_f64m1_rm_m(vbool32_t mask, vfloat32m1_t vector, vfloat64m1_t scalar, size_t vl) { + return __riscv_vfwredusum(mask, vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfwredusum_vs_f32m2_f64m1_rm_m +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredusum.mask.nxv1f64.nxv4f32.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat64m1_t test_vfwredusum_vs_f32m2_f64m1_rm_m(vbool16_t mask, vfloat32m2_t vector, vfloat64m1_t scalar, size_t vl) { + return __riscv_vfwredusum(mask, vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfwredusum_vs_f32m4_f64m1_rm_m +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredusum.mask.nxv1f64.nxv8f32.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat64m1_t test_vfwredusum_vs_f32m4_f64m1_rm_m(vbool8_t mask, vfloat32m4_t vector, vfloat64m1_t scalar, size_t vl) { + return __riscv_vfwredusum(mask, vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfwredusum_vs_f32m8_f64m1_rm_m +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredusum.mask.nxv1f64.nxv16f32.i64( poison, [[VECTOR]], [[SCALAR]], [[MASK]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat64m1_t test_vfwredusum_vs_f32m8_f64m1_rm_m(vbool4_t mask, vfloat32m8_t vector, vfloat64m1_t scalar, size_t vl) { + return __riscv_vfwredusum(mask, vector, scalar, __RISCV_FRM_RNE, vl); +} + diff --git a/clang/test/CodeGen/RISCV/rvv-intrinsics-autogenerated/policy/non-overloaded/vfredosum.c b/clang/test/CodeGen/RISCV/rvv-intrinsics-autogenerated/policy/non-overloaded/vfredosum.c --- a/clang/test/CodeGen/RISCV/rvv-intrinsics-autogenerated/policy/non-overloaded/vfredosum.c +++ b/clang/test/CodeGen/RISCV/rvv-intrinsics-autogenerated/policy/non-overloaded/vfredosum.c @@ -10,7 +10,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfredosum_vs_f16mf4_f16m1_tu // CHECK-RV64-SAME: ( [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0:[0-9]+]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.nxv4f16.nxv1f16.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.nxv4f16.nxv1f16.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat16m1_t test_vfredosum_vs_f16mf4_f16m1_tu(vfloat16m1_t maskedoff, vfloat16mf4_t vector, vfloat16m1_t scalar, size_t vl) { @@ -20,7 +20,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfredosum_vs_f16mf2_f16m1_tu // CHECK-RV64-SAME: ( [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.nxv4f16.nxv2f16.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.nxv4f16.nxv2f16.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat16m1_t test_vfredosum_vs_f16mf2_f16m1_tu(vfloat16m1_t maskedoff, vfloat16mf2_t vector, vfloat16m1_t scalar, size_t vl) { @@ -30,7 +30,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfredosum_vs_f16m1_f16m1_tu // CHECK-RV64-SAME: ( [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.nxv4f16.nxv4f16.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.nxv4f16.nxv4f16.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat16m1_t test_vfredosum_vs_f16m1_f16m1_tu(vfloat16m1_t maskedoff, vfloat16m1_t vector, vfloat16m1_t scalar, size_t vl) { @@ -40,7 +40,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfredosum_vs_f16m2_f16m1_tu // CHECK-RV64-SAME: ( [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.nxv4f16.nxv8f16.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.nxv4f16.nxv8f16.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat16m1_t test_vfredosum_vs_f16m2_f16m1_tu(vfloat16m1_t maskedoff, vfloat16m2_t vector, vfloat16m1_t scalar, size_t vl) { @@ -50,7 +50,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfredosum_vs_f16m4_f16m1_tu // CHECK-RV64-SAME: ( [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.nxv4f16.nxv16f16.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.nxv4f16.nxv16f16.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat16m1_t test_vfredosum_vs_f16m4_f16m1_tu(vfloat16m1_t maskedoff, vfloat16m4_t vector, vfloat16m1_t scalar, size_t vl) { @@ -60,7 +60,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfredosum_vs_f16m8_f16m1_tu // CHECK-RV64-SAME: ( [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.nxv4f16.nxv32f16.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.nxv4f16.nxv32f16.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat16m1_t test_vfredosum_vs_f16m8_f16m1_tu(vfloat16m1_t maskedoff, vfloat16m8_t vector, vfloat16m1_t scalar, size_t vl) { @@ -70,7 +70,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfredosum_vs_f32mf2_f32m1_tu // CHECK-RV64-SAME: ( [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.nxv2f32.nxv1f32.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.nxv2f32.nxv1f32.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat32m1_t test_vfredosum_vs_f32mf2_f32m1_tu(vfloat32m1_t maskedoff, vfloat32mf2_t vector, vfloat32m1_t scalar, size_t vl) { @@ -80,7 +80,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfredosum_vs_f32m1_f32m1_tu // CHECK-RV64-SAME: ( [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.nxv2f32.nxv2f32.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.nxv2f32.nxv2f32.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat32m1_t test_vfredosum_vs_f32m1_f32m1_tu(vfloat32m1_t maskedoff, vfloat32m1_t vector, vfloat32m1_t scalar, size_t vl) { @@ -90,7 +90,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfredosum_vs_f32m2_f32m1_tu // CHECK-RV64-SAME: ( [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.nxv2f32.nxv4f32.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.nxv2f32.nxv4f32.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat32m1_t test_vfredosum_vs_f32m2_f32m1_tu(vfloat32m1_t maskedoff, vfloat32m2_t vector, vfloat32m1_t scalar, size_t vl) { @@ -100,7 +100,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfredosum_vs_f32m4_f32m1_tu // CHECK-RV64-SAME: ( [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.nxv2f32.nxv8f32.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.nxv2f32.nxv8f32.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat32m1_t test_vfredosum_vs_f32m4_f32m1_tu(vfloat32m1_t maskedoff, vfloat32m4_t vector, vfloat32m1_t scalar, size_t vl) { @@ -110,7 +110,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfredosum_vs_f32m8_f32m1_tu // CHECK-RV64-SAME: ( [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.nxv2f32.nxv16f32.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.nxv2f32.nxv16f32.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat32m1_t test_vfredosum_vs_f32m8_f32m1_tu(vfloat32m1_t maskedoff, vfloat32m8_t vector, vfloat32m1_t scalar, size_t vl) { @@ -120,7 +120,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfredosum_vs_f64m1_f64m1_tu // CHECK-RV64-SAME: ( [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.nxv1f64.nxv1f64.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.nxv1f64.nxv1f64.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat64m1_t test_vfredosum_vs_f64m1_f64m1_tu(vfloat64m1_t maskedoff, vfloat64m1_t vector, vfloat64m1_t scalar, size_t vl) { @@ -130,7 +130,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfredosum_vs_f64m2_f64m1_tu // CHECK-RV64-SAME: ( [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.nxv1f64.nxv2f64.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.nxv1f64.nxv2f64.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat64m1_t test_vfredosum_vs_f64m2_f64m1_tu(vfloat64m1_t maskedoff, vfloat64m2_t vector, vfloat64m1_t scalar, size_t vl) { @@ -140,7 +140,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfredosum_vs_f64m4_f64m1_tu // CHECK-RV64-SAME: ( [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.nxv1f64.nxv4f64.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.nxv1f64.nxv4f64.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat64m1_t test_vfredosum_vs_f64m4_f64m1_tu(vfloat64m1_t maskedoff, vfloat64m4_t vector, vfloat64m1_t scalar, size_t vl) { @@ -150,7 +150,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfredosum_vs_f64m8_f64m1_tu // CHECK-RV64-SAME: ( [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.nxv1f64.nxv8f64.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.nxv1f64.nxv8f64.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat64m1_t test_vfredosum_vs_f64m8_f64m1_tu(vfloat64m1_t maskedoff, vfloat64m8_t vector, vfloat64m1_t scalar, size_t vl) { @@ -160,7 +160,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfredosum_vs_f16mf4_f16m1_tum // CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.mask.nxv4f16.nxv1f16.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.mask.nxv4f16.nxv1f16.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat16m1_t test_vfredosum_vs_f16mf4_f16m1_tum(vbool64_t mask, vfloat16m1_t maskedoff, vfloat16mf4_t vector, vfloat16m1_t scalar, size_t vl) { @@ -170,7 +170,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfredosum_vs_f16mf2_f16m1_tum // CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.mask.nxv4f16.nxv2f16.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.mask.nxv4f16.nxv2f16.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat16m1_t test_vfredosum_vs_f16mf2_f16m1_tum(vbool32_t mask, vfloat16m1_t maskedoff, vfloat16mf2_t vector, vfloat16m1_t scalar, size_t vl) { @@ -180,7 +180,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfredosum_vs_f16m1_f16m1_tum // CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.mask.nxv4f16.nxv4f16.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.mask.nxv4f16.nxv4f16.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat16m1_t test_vfredosum_vs_f16m1_f16m1_tum(vbool16_t mask, vfloat16m1_t maskedoff, vfloat16m1_t vector, vfloat16m1_t scalar, size_t vl) { @@ -190,7 +190,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfredosum_vs_f16m2_f16m1_tum // CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.mask.nxv4f16.nxv8f16.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.mask.nxv4f16.nxv8f16.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat16m1_t test_vfredosum_vs_f16m2_f16m1_tum(vbool8_t mask, vfloat16m1_t maskedoff, vfloat16m2_t vector, vfloat16m1_t scalar, size_t vl) { @@ -200,7 +200,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfredosum_vs_f16m4_f16m1_tum // CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.mask.nxv4f16.nxv16f16.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.mask.nxv4f16.nxv16f16.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat16m1_t test_vfredosum_vs_f16m4_f16m1_tum(vbool4_t mask, vfloat16m1_t maskedoff, vfloat16m4_t vector, vfloat16m1_t scalar, size_t vl) { @@ -210,7 +210,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfredosum_vs_f16m8_f16m1_tum // CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.mask.nxv4f16.nxv32f16.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.mask.nxv4f16.nxv32f16.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat16m1_t test_vfredosum_vs_f16m8_f16m1_tum(vbool2_t mask, vfloat16m1_t maskedoff, vfloat16m8_t vector, vfloat16m1_t scalar, size_t vl) { @@ -220,7 +220,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfredosum_vs_f32mf2_f32m1_tum // CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.mask.nxv2f32.nxv1f32.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.mask.nxv2f32.nxv1f32.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat32m1_t test_vfredosum_vs_f32mf2_f32m1_tum(vbool64_t mask, vfloat32m1_t maskedoff, vfloat32mf2_t vector, vfloat32m1_t scalar, size_t vl) { @@ -230,7 +230,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfredosum_vs_f32m1_f32m1_tum // CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.mask.nxv2f32.nxv2f32.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.mask.nxv2f32.nxv2f32.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat32m1_t test_vfredosum_vs_f32m1_f32m1_tum(vbool32_t mask, vfloat32m1_t maskedoff, vfloat32m1_t vector, vfloat32m1_t scalar, size_t vl) { @@ -240,7 +240,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfredosum_vs_f32m2_f32m1_tum // CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.mask.nxv2f32.nxv4f32.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.mask.nxv2f32.nxv4f32.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat32m1_t test_vfredosum_vs_f32m2_f32m1_tum(vbool16_t mask, vfloat32m1_t maskedoff, vfloat32m2_t vector, vfloat32m1_t scalar, size_t vl) { @@ -250,7 +250,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfredosum_vs_f32m4_f32m1_tum // CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.mask.nxv2f32.nxv8f32.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.mask.nxv2f32.nxv8f32.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat32m1_t test_vfredosum_vs_f32m4_f32m1_tum(vbool8_t mask, vfloat32m1_t maskedoff, vfloat32m4_t vector, vfloat32m1_t scalar, size_t vl) { @@ -260,7 +260,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfredosum_vs_f32m8_f32m1_tum // CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.mask.nxv2f32.nxv16f32.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.mask.nxv2f32.nxv16f32.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat32m1_t test_vfredosum_vs_f32m8_f32m1_tum(vbool4_t mask, vfloat32m1_t maskedoff, vfloat32m8_t vector, vfloat32m1_t scalar, size_t vl) { @@ -270,7 +270,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfredosum_vs_f64m1_f64m1_tum // CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.mask.nxv1f64.nxv1f64.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.mask.nxv1f64.nxv1f64.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat64m1_t test_vfredosum_vs_f64m1_f64m1_tum(vbool64_t mask, vfloat64m1_t maskedoff, vfloat64m1_t vector, vfloat64m1_t scalar, size_t vl) { @@ -280,7 +280,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfredosum_vs_f64m2_f64m1_tum // CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.mask.nxv1f64.nxv2f64.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.mask.nxv1f64.nxv2f64.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat64m1_t test_vfredosum_vs_f64m2_f64m1_tum(vbool32_t mask, vfloat64m1_t maskedoff, vfloat64m2_t vector, vfloat64m1_t scalar, size_t vl) { @@ -290,7 +290,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfredosum_vs_f64m4_f64m1_tum // CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.mask.nxv1f64.nxv4f64.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.mask.nxv1f64.nxv4f64.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat64m1_t test_vfredosum_vs_f64m4_f64m1_tum(vbool16_t mask, vfloat64m1_t maskedoff, vfloat64m4_t vector, vfloat64m1_t scalar, size_t vl) { @@ -300,10 +300,310 @@ // CHECK-RV64-LABEL: define dso_local @test_vfredosum_vs_f64m8_f64m1_tum // CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.mask.nxv1f64.nxv8f64.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.mask.nxv1f64.nxv8f64.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat64m1_t test_vfredosum_vs_f64m8_f64m1_tum(vbool8_t mask, vfloat64m1_t maskedoff, vfloat64m8_t vector, vfloat64m1_t scalar, size_t vl) { return __riscv_vfredosum_vs_f64m8_f64m1_tum(mask, maskedoff, vector, scalar, vl); } +// CHECK-RV64-LABEL: define dso_local @test_vfredosum_vs_f16mf4_f16m1_rm_tu +// CHECK-RV64-SAME: ( [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.nxv4f16.nxv1f16.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat16m1_t test_vfredosum_vs_f16mf4_f16m1_rm_tu(vfloat16m1_t maskedoff, vfloat16mf4_t vector, vfloat16m1_t scalar, size_t vl) { + return __riscv_vfredosum_vs_f16mf4_f16m1_rm_tu(maskedoff, vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfredosum_vs_f16mf2_f16m1_rm_tu +// CHECK-RV64-SAME: ( [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.nxv4f16.nxv2f16.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat16m1_t test_vfredosum_vs_f16mf2_f16m1_rm_tu(vfloat16m1_t maskedoff, vfloat16mf2_t vector, vfloat16m1_t scalar, size_t vl) { + return __riscv_vfredosum_vs_f16mf2_f16m1_rm_tu(maskedoff, vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfredosum_vs_f16m1_f16m1_rm_tu +// CHECK-RV64-SAME: ( [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.nxv4f16.nxv4f16.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat16m1_t test_vfredosum_vs_f16m1_f16m1_rm_tu(vfloat16m1_t maskedoff, vfloat16m1_t vector, vfloat16m1_t scalar, size_t vl) { + return __riscv_vfredosum_vs_f16m1_f16m1_rm_tu(maskedoff, vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfredosum_vs_f16m2_f16m1_rm_tu +// CHECK-RV64-SAME: ( [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.nxv4f16.nxv8f16.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat16m1_t test_vfredosum_vs_f16m2_f16m1_rm_tu(vfloat16m1_t maskedoff, vfloat16m2_t vector, vfloat16m1_t scalar, size_t vl) { + return __riscv_vfredosum_vs_f16m2_f16m1_rm_tu(maskedoff, vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfredosum_vs_f16m4_f16m1_rm_tu +// CHECK-RV64-SAME: ( [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.nxv4f16.nxv16f16.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat16m1_t test_vfredosum_vs_f16m4_f16m1_rm_tu(vfloat16m1_t maskedoff, vfloat16m4_t vector, vfloat16m1_t scalar, size_t vl) { + return __riscv_vfredosum_vs_f16m4_f16m1_rm_tu(maskedoff, vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfredosum_vs_f16m8_f16m1_rm_tu +// CHECK-RV64-SAME: ( [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.nxv4f16.nxv32f16.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat16m1_t test_vfredosum_vs_f16m8_f16m1_rm_tu(vfloat16m1_t maskedoff, vfloat16m8_t vector, vfloat16m1_t scalar, size_t vl) { + return __riscv_vfredosum_vs_f16m8_f16m1_rm_tu(maskedoff, vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfredosum_vs_f32mf2_f32m1_rm_tu +// CHECK-RV64-SAME: ( [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.nxv2f32.nxv1f32.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat32m1_t test_vfredosum_vs_f32mf2_f32m1_rm_tu(vfloat32m1_t maskedoff, vfloat32mf2_t vector, vfloat32m1_t scalar, size_t vl) { + return __riscv_vfredosum_vs_f32mf2_f32m1_rm_tu(maskedoff, vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfredosum_vs_f32m1_f32m1_rm_tu +// CHECK-RV64-SAME: ( [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.nxv2f32.nxv2f32.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat32m1_t test_vfredosum_vs_f32m1_f32m1_rm_tu(vfloat32m1_t maskedoff, vfloat32m1_t vector, vfloat32m1_t scalar, size_t vl) { + return __riscv_vfredosum_vs_f32m1_f32m1_rm_tu(maskedoff, vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfredosum_vs_f32m2_f32m1_rm_tu +// CHECK-RV64-SAME: ( [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.nxv2f32.nxv4f32.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat32m1_t test_vfredosum_vs_f32m2_f32m1_rm_tu(vfloat32m1_t maskedoff, vfloat32m2_t vector, vfloat32m1_t scalar, size_t vl) { + return __riscv_vfredosum_vs_f32m2_f32m1_rm_tu(maskedoff, vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfredosum_vs_f32m4_f32m1_rm_tu +// CHECK-RV64-SAME: ( [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.nxv2f32.nxv8f32.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat32m1_t test_vfredosum_vs_f32m4_f32m1_rm_tu(vfloat32m1_t maskedoff, vfloat32m4_t vector, vfloat32m1_t scalar, size_t vl) { + return __riscv_vfredosum_vs_f32m4_f32m1_rm_tu(maskedoff, vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfredosum_vs_f32m8_f32m1_rm_tu +// CHECK-RV64-SAME: ( [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.nxv2f32.nxv16f32.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat32m1_t test_vfredosum_vs_f32m8_f32m1_rm_tu(vfloat32m1_t maskedoff, vfloat32m8_t vector, vfloat32m1_t scalar, size_t vl) { + return __riscv_vfredosum_vs_f32m8_f32m1_rm_tu(maskedoff, vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfredosum_vs_f64m1_f64m1_rm_tu +// CHECK-RV64-SAME: ( [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.nxv1f64.nxv1f64.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat64m1_t test_vfredosum_vs_f64m1_f64m1_rm_tu(vfloat64m1_t maskedoff, vfloat64m1_t vector, vfloat64m1_t scalar, size_t vl) { + return __riscv_vfredosum_vs_f64m1_f64m1_rm_tu(maskedoff, vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfredosum_vs_f64m2_f64m1_rm_tu +// CHECK-RV64-SAME: ( [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.nxv1f64.nxv2f64.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat64m1_t test_vfredosum_vs_f64m2_f64m1_rm_tu(vfloat64m1_t maskedoff, vfloat64m2_t vector, vfloat64m1_t scalar, size_t vl) { + return __riscv_vfredosum_vs_f64m2_f64m1_rm_tu(maskedoff, vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfredosum_vs_f64m4_f64m1_rm_tu +// CHECK-RV64-SAME: ( [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.nxv1f64.nxv4f64.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat64m1_t test_vfredosum_vs_f64m4_f64m1_rm_tu(vfloat64m1_t maskedoff, vfloat64m4_t vector, vfloat64m1_t scalar, size_t vl) { + return __riscv_vfredosum_vs_f64m4_f64m1_rm_tu(maskedoff, vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfredosum_vs_f64m8_f64m1_rm_tu +// CHECK-RV64-SAME: ( [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.nxv1f64.nxv8f64.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat64m1_t test_vfredosum_vs_f64m8_f64m1_rm_tu(vfloat64m1_t maskedoff, vfloat64m8_t vector, vfloat64m1_t scalar, size_t vl) { + return __riscv_vfredosum_vs_f64m8_f64m1_rm_tu(maskedoff, vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfredosum_vs_f16mf4_f16m1_rm_tum +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.mask.nxv4f16.nxv1f16.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat16m1_t test_vfredosum_vs_f16mf4_f16m1_rm_tum(vbool64_t mask, vfloat16m1_t maskedoff, vfloat16mf4_t vector, vfloat16m1_t scalar, size_t vl) { + return __riscv_vfredosum_vs_f16mf4_f16m1_rm_tum(mask, maskedoff, vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfredosum_vs_f16mf2_f16m1_rm_tum +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.mask.nxv4f16.nxv2f16.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat16m1_t test_vfredosum_vs_f16mf2_f16m1_rm_tum(vbool32_t mask, vfloat16m1_t maskedoff, vfloat16mf2_t vector, vfloat16m1_t scalar, size_t vl) { + return __riscv_vfredosum_vs_f16mf2_f16m1_rm_tum(mask, maskedoff, vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfredosum_vs_f16m1_f16m1_rm_tum +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.mask.nxv4f16.nxv4f16.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat16m1_t test_vfredosum_vs_f16m1_f16m1_rm_tum(vbool16_t mask, vfloat16m1_t maskedoff, vfloat16m1_t vector, vfloat16m1_t scalar, size_t vl) { + return __riscv_vfredosum_vs_f16m1_f16m1_rm_tum(mask, maskedoff, vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfredosum_vs_f16m2_f16m1_rm_tum +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.mask.nxv4f16.nxv8f16.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat16m1_t test_vfredosum_vs_f16m2_f16m1_rm_tum(vbool8_t mask, vfloat16m1_t maskedoff, vfloat16m2_t vector, vfloat16m1_t scalar, size_t vl) { + return __riscv_vfredosum_vs_f16m2_f16m1_rm_tum(mask, maskedoff, vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfredosum_vs_f16m4_f16m1_rm_tum +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.mask.nxv4f16.nxv16f16.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat16m1_t test_vfredosum_vs_f16m4_f16m1_rm_tum(vbool4_t mask, vfloat16m1_t maskedoff, vfloat16m4_t vector, vfloat16m1_t scalar, size_t vl) { + return __riscv_vfredosum_vs_f16m4_f16m1_rm_tum(mask, maskedoff, vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfredosum_vs_f16m8_f16m1_rm_tum +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.mask.nxv4f16.nxv32f16.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat16m1_t test_vfredosum_vs_f16m8_f16m1_rm_tum(vbool2_t mask, vfloat16m1_t maskedoff, vfloat16m8_t vector, vfloat16m1_t scalar, size_t vl) { + return __riscv_vfredosum_vs_f16m8_f16m1_rm_tum(mask, maskedoff, vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfredosum_vs_f32mf2_f32m1_rm_tum +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.mask.nxv2f32.nxv1f32.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat32m1_t test_vfredosum_vs_f32mf2_f32m1_rm_tum(vbool64_t mask, vfloat32m1_t maskedoff, vfloat32mf2_t vector, vfloat32m1_t scalar, size_t vl) { + return __riscv_vfredosum_vs_f32mf2_f32m1_rm_tum(mask, maskedoff, vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfredosum_vs_f32m1_f32m1_rm_tum +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.mask.nxv2f32.nxv2f32.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat32m1_t test_vfredosum_vs_f32m1_f32m1_rm_tum(vbool32_t mask, vfloat32m1_t maskedoff, vfloat32m1_t vector, vfloat32m1_t scalar, size_t vl) { + return __riscv_vfredosum_vs_f32m1_f32m1_rm_tum(mask, maskedoff, vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfredosum_vs_f32m2_f32m1_rm_tum +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.mask.nxv2f32.nxv4f32.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat32m1_t test_vfredosum_vs_f32m2_f32m1_rm_tum(vbool16_t mask, vfloat32m1_t maskedoff, vfloat32m2_t vector, vfloat32m1_t scalar, size_t vl) { + return __riscv_vfredosum_vs_f32m2_f32m1_rm_tum(mask, maskedoff, vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfredosum_vs_f32m4_f32m1_rm_tum +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.mask.nxv2f32.nxv8f32.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat32m1_t test_vfredosum_vs_f32m4_f32m1_rm_tum(vbool8_t mask, vfloat32m1_t maskedoff, vfloat32m4_t vector, vfloat32m1_t scalar, size_t vl) { + return __riscv_vfredosum_vs_f32m4_f32m1_rm_tum(mask, maskedoff, vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfredosum_vs_f32m8_f32m1_rm_tum +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.mask.nxv2f32.nxv16f32.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat32m1_t test_vfredosum_vs_f32m8_f32m1_rm_tum(vbool4_t mask, vfloat32m1_t maskedoff, vfloat32m8_t vector, vfloat32m1_t scalar, size_t vl) { + return __riscv_vfredosum_vs_f32m8_f32m1_rm_tum(mask, maskedoff, vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfredosum_vs_f64m1_f64m1_rm_tum +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.mask.nxv1f64.nxv1f64.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat64m1_t test_vfredosum_vs_f64m1_f64m1_rm_tum(vbool64_t mask, vfloat64m1_t maskedoff, vfloat64m1_t vector, vfloat64m1_t scalar, size_t vl) { + return __riscv_vfredosum_vs_f64m1_f64m1_rm_tum(mask, maskedoff, vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfredosum_vs_f64m2_f64m1_rm_tum +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.mask.nxv1f64.nxv2f64.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat64m1_t test_vfredosum_vs_f64m2_f64m1_rm_tum(vbool32_t mask, vfloat64m1_t maskedoff, vfloat64m2_t vector, vfloat64m1_t scalar, size_t vl) { + return __riscv_vfredosum_vs_f64m2_f64m1_rm_tum(mask, maskedoff, vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfredosum_vs_f64m4_f64m1_rm_tum +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.mask.nxv1f64.nxv4f64.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat64m1_t test_vfredosum_vs_f64m4_f64m1_rm_tum(vbool16_t mask, vfloat64m1_t maskedoff, vfloat64m4_t vector, vfloat64m1_t scalar, size_t vl) { + return __riscv_vfredosum_vs_f64m4_f64m1_rm_tum(mask, maskedoff, vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfredosum_vs_f64m8_f64m1_rm_tum +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.mask.nxv1f64.nxv8f64.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat64m1_t test_vfredosum_vs_f64m8_f64m1_rm_tum(vbool8_t mask, vfloat64m1_t maskedoff, vfloat64m8_t vector, vfloat64m1_t scalar, size_t vl) { + return __riscv_vfredosum_vs_f64m8_f64m1_rm_tum(mask, maskedoff, vector, scalar, __RISCV_FRM_RNE, vl); +} + diff --git a/clang/test/CodeGen/RISCV/rvv-intrinsics-autogenerated/policy/non-overloaded/vfredusum.c b/clang/test/CodeGen/RISCV/rvv-intrinsics-autogenerated/policy/non-overloaded/vfredusum.c --- a/clang/test/CodeGen/RISCV/rvv-intrinsics-autogenerated/policy/non-overloaded/vfredusum.c +++ b/clang/test/CodeGen/RISCV/rvv-intrinsics-autogenerated/policy/non-overloaded/vfredusum.c @@ -10,7 +10,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfredusum_vs_f16mf4_f16m1_tu // CHECK-RV64-SAME: ( [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0:[0-9]+]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.nxv4f16.nxv1f16.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.nxv4f16.nxv1f16.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat16m1_t test_vfredusum_vs_f16mf4_f16m1_tu(vfloat16m1_t maskedoff, vfloat16mf4_t vector, vfloat16m1_t scalar, size_t vl) { @@ -20,7 +20,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfredusum_vs_f16mf2_f16m1_tu // CHECK-RV64-SAME: ( [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.nxv4f16.nxv2f16.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.nxv4f16.nxv2f16.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat16m1_t test_vfredusum_vs_f16mf2_f16m1_tu(vfloat16m1_t maskedoff, vfloat16mf2_t vector, vfloat16m1_t scalar, size_t vl) { @@ -30,7 +30,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfredusum_vs_f16m1_f16m1_tu // CHECK-RV64-SAME: ( [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.nxv4f16.nxv4f16.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.nxv4f16.nxv4f16.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat16m1_t test_vfredusum_vs_f16m1_f16m1_tu(vfloat16m1_t maskedoff, vfloat16m1_t vector, vfloat16m1_t scalar, size_t vl) { @@ -40,7 +40,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfredusum_vs_f16m2_f16m1_tu // CHECK-RV64-SAME: ( [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.nxv4f16.nxv8f16.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.nxv4f16.nxv8f16.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat16m1_t test_vfredusum_vs_f16m2_f16m1_tu(vfloat16m1_t maskedoff, vfloat16m2_t vector, vfloat16m1_t scalar, size_t vl) { @@ -50,7 +50,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfredusum_vs_f16m4_f16m1_tu // CHECK-RV64-SAME: ( [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.nxv4f16.nxv16f16.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.nxv4f16.nxv16f16.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat16m1_t test_vfredusum_vs_f16m4_f16m1_tu(vfloat16m1_t maskedoff, vfloat16m4_t vector, vfloat16m1_t scalar, size_t vl) { @@ -60,7 +60,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfredusum_vs_f16m8_f16m1_tu // CHECK-RV64-SAME: ( [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.nxv4f16.nxv32f16.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.nxv4f16.nxv32f16.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat16m1_t test_vfredusum_vs_f16m8_f16m1_tu(vfloat16m1_t maskedoff, vfloat16m8_t vector, vfloat16m1_t scalar, size_t vl) { @@ -70,7 +70,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfredusum_vs_f32mf2_f32m1_tu // CHECK-RV64-SAME: ( [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.nxv2f32.nxv1f32.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.nxv2f32.nxv1f32.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat32m1_t test_vfredusum_vs_f32mf2_f32m1_tu(vfloat32m1_t maskedoff, vfloat32mf2_t vector, vfloat32m1_t scalar, size_t vl) { @@ -80,7 +80,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfredusum_vs_f32m1_f32m1_tu // CHECK-RV64-SAME: ( [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.nxv2f32.nxv2f32.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.nxv2f32.nxv2f32.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat32m1_t test_vfredusum_vs_f32m1_f32m1_tu(vfloat32m1_t maskedoff, vfloat32m1_t vector, vfloat32m1_t scalar, size_t vl) { @@ -90,7 +90,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfredusum_vs_f32m2_f32m1_tu // CHECK-RV64-SAME: ( [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.nxv2f32.nxv4f32.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.nxv2f32.nxv4f32.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat32m1_t test_vfredusum_vs_f32m2_f32m1_tu(vfloat32m1_t maskedoff, vfloat32m2_t vector, vfloat32m1_t scalar, size_t vl) { @@ -100,7 +100,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfredusum_vs_f32m4_f32m1_tu // CHECK-RV64-SAME: ( [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.nxv2f32.nxv8f32.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.nxv2f32.nxv8f32.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat32m1_t test_vfredusum_vs_f32m4_f32m1_tu(vfloat32m1_t maskedoff, vfloat32m4_t vector, vfloat32m1_t scalar, size_t vl) { @@ -110,7 +110,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfredusum_vs_f32m8_f32m1_tu // CHECK-RV64-SAME: ( [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.nxv2f32.nxv16f32.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.nxv2f32.nxv16f32.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat32m1_t test_vfredusum_vs_f32m8_f32m1_tu(vfloat32m1_t maskedoff, vfloat32m8_t vector, vfloat32m1_t scalar, size_t vl) { @@ -120,7 +120,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfredusum_vs_f64m1_f64m1_tu // CHECK-RV64-SAME: ( [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.nxv1f64.nxv1f64.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.nxv1f64.nxv1f64.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat64m1_t test_vfredusum_vs_f64m1_f64m1_tu(vfloat64m1_t maskedoff, vfloat64m1_t vector, vfloat64m1_t scalar, size_t vl) { @@ -130,7 +130,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfredusum_vs_f64m2_f64m1_tu // CHECK-RV64-SAME: ( [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.nxv1f64.nxv2f64.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.nxv1f64.nxv2f64.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat64m1_t test_vfredusum_vs_f64m2_f64m1_tu(vfloat64m1_t maskedoff, vfloat64m2_t vector, vfloat64m1_t scalar, size_t vl) { @@ -140,7 +140,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfredusum_vs_f64m4_f64m1_tu // CHECK-RV64-SAME: ( [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.nxv1f64.nxv4f64.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.nxv1f64.nxv4f64.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat64m1_t test_vfredusum_vs_f64m4_f64m1_tu(vfloat64m1_t maskedoff, vfloat64m4_t vector, vfloat64m1_t scalar, size_t vl) { @@ -150,7 +150,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfredusum_vs_f64m8_f64m1_tu // CHECK-RV64-SAME: ( [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.nxv1f64.nxv8f64.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.nxv1f64.nxv8f64.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat64m1_t test_vfredusum_vs_f64m8_f64m1_tu(vfloat64m1_t maskedoff, vfloat64m8_t vector, vfloat64m1_t scalar, size_t vl) { @@ -160,7 +160,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfredusum_vs_f16mf4_f16m1_tum // CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.mask.nxv4f16.nxv1f16.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.mask.nxv4f16.nxv1f16.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat16m1_t test_vfredusum_vs_f16mf4_f16m1_tum(vbool64_t mask, vfloat16m1_t maskedoff, vfloat16mf4_t vector, vfloat16m1_t scalar, size_t vl) { @@ -170,7 +170,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfredusum_vs_f16mf2_f16m1_tum // CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.mask.nxv4f16.nxv2f16.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.mask.nxv4f16.nxv2f16.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat16m1_t test_vfredusum_vs_f16mf2_f16m1_tum(vbool32_t mask, vfloat16m1_t maskedoff, vfloat16mf2_t vector, vfloat16m1_t scalar, size_t vl) { @@ -180,7 +180,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfredusum_vs_f16m1_f16m1_tum // CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.mask.nxv4f16.nxv4f16.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.mask.nxv4f16.nxv4f16.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat16m1_t test_vfredusum_vs_f16m1_f16m1_tum(vbool16_t mask, vfloat16m1_t maskedoff, vfloat16m1_t vector, vfloat16m1_t scalar, size_t vl) { @@ -190,7 +190,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfredusum_vs_f16m2_f16m1_tum // CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.mask.nxv4f16.nxv8f16.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.mask.nxv4f16.nxv8f16.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat16m1_t test_vfredusum_vs_f16m2_f16m1_tum(vbool8_t mask, vfloat16m1_t maskedoff, vfloat16m2_t vector, vfloat16m1_t scalar, size_t vl) { @@ -200,7 +200,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfredusum_vs_f16m4_f16m1_tum // CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.mask.nxv4f16.nxv16f16.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.mask.nxv4f16.nxv16f16.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat16m1_t test_vfredusum_vs_f16m4_f16m1_tum(vbool4_t mask, vfloat16m1_t maskedoff, vfloat16m4_t vector, vfloat16m1_t scalar, size_t vl) { @@ -210,7 +210,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfredusum_vs_f16m8_f16m1_tum // CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.mask.nxv4f16.nxv32f16.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.mask.nxv4f16.nxv32f16.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat16m1_t test_vfredusum_vs_f16m8_f16m1_tum(vbool2_t mask, vfloat16m1_t maskedoff, vfloat16m8_t vector, vfloat16m1_t scalar, size_t vl) { @@ -220,7 +220,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfredusum_vs_f32mf2_f32m1_tum // CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.mask.nxv2f32.nxv1f32.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.mask.nxv2f32.nxv1f32.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat32m1_t test_vfredusum_vs_f32mf2_f32m1_tum(vbool64_t mask, vfloat32m1_t maskedoff, vfloat32mf2_t vector, vfloat32m1_t scalar, size_t vl) { @@ -230,7 +230,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfredusum_vs_f32m1_f32m1_tum // CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.mask.nxv2f32.nxv2f32.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.mask.nxv2f32.nxv2f32.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat32m1_t test_vfredusum_vs_f32m1_f32m1_tum(vbool32_t mask, vfloat32m1_t maskedoff, vfloat32m1_t vector, vfloat32m1_t scalar, size_t vl) { @@ -240,7 +240,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfredusum_vs_f32m2_f32m1_tum // CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.mask.nxv2f32.nxv4f32.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.mask.nxv2f32.nxv4f32.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat32m1_t test_vfredusum_vs_f32m2_f32m1_tum(vbool16_t mask, vfloat32m1_t maskedoff, vfloat32m2_t vector, vfloat32m1_t scalar, size_t vl) { @@ -250,7 +250,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfredusum_vs_f32m4_f32m1_tum // CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.mask.nxv2f32.nxv8f32.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.mask.nxv2f32.nxv8f32.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat32m1_t test_vfredusum_vs_f32m4_f32m1_tum(vbool8_t mask, vfloat32m1_t maskedoff, vfloat32m4_t vector, vfloat32m1_t scalar, size_t vl) { @@ -260,7 +260,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfredusum_vs_f32m8_f32m1_tum // CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.mask.nxv2f32.nxv16f32.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.mask.nxv2f32.nxv16f32.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat32m1_t test_vfredusum_vs_f32m8_f32m1_tum(vbool4_t mask, vfloat32m1_t maskedoff, vfloat32m8_t vector, vfloat32m1_t scalar, size_t vl) { @@ -270,7 +270,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfredusum_vs_f64m1_f64m1_tum // CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.mask.nxv1f64.nxv1f64.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.mask.nxv1f64.nxv1f64.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat64m1_t test_vfredusum_vs_f64m1_f64m1_tum(vbool64_t mask, vfloat64m1_t maskedoff, vfloat64m1_t vector, vfloat64m1_t scalar, size_t vl) { @@ -280,7 +280,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfredusum_vs_f64m2_f64m1_tum // CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.mask.nxv1f64.nxv2f64.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.mask.nxv1f64.nxv2f64.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat64m1_t test_vfredusum_vs_f64m2_f64m1_tum(vbool32_t mask, vfloat64m1_t maskedoff, vfloat64m2_t vector, vfloat64m1_t scalar, size_t vl) { @@ -290,7 +290,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfredusum_vs_f64m4_f64m1_tum // CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.mask.nxv1f64.nxv4f64.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.mask.nxv1f64.nxv4f64.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat64m1_t test_vfredusum_vs_f64m4_f64m1_tum(vbool16_t mask, vfloat64m1_t maskedoff, vfloat64m4_t vector, vfloat64m1_t scalar, size_t vl) { @@ -300,10 +300,310 @@ // CHECK-RV64-LABEL: define dso_local @test_vfredusum_vs_f64m8_f64m1_tum // CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.mask.nxv1f64.nxv8f64.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.mask.nxv1f64.nxv8f64.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat64m1_t test_vfredusum_vs_f64m8_f64m1_tum(vbool8_t mask, vfloat64m1_t maskedoff, vfloat64m8_t vector, vfloat64m1_t scalar, size_t vl) { return __riscv_vfredusum_vs_f64m8_f64m1_tum(mask, maskedoff, vector, scalar, vl); } +// CHECK-RV64-LABEL: define dso_local @test_vfredusum_vs_f16mf4_f16m1_rm_tu +// CHECK-RV64-SAME: ( [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.nxv4f16.nxv1f16.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat16m1_t test_vfredusum_vs_f16mf4_f16m1_rm_tu(vfloat16m1_t maskedoff, vfloat16mf4_t vector, vfloat16m1_t scalar, size_t vl) { + return __riscv_vfredusum_vs_f16mf4_f16m1_rm_tu(maskedoff, vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfredusum_vs_f16mf2_f16m1_rm_tu +// CHECK-RV64-SAME: ( [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.nxv4f16.nxv2f16.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat16m1_t test_vfredusum_vs_f16mf2_f16m1_rm_tu(vfloat16m1_t maskedoff, vfloat16mf2_t vector, vfloat16m1_t scalar, size_t vl) { + return __riscv_vfredusum_vs_f16mf2_f16m1_rm_tu(maskedoff, vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfredusum_vs_f16m1_f16m1_rm_tu +// CHECK-RV64-SAME: ( [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.nxv4f16.nxv4f16.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat16m1_t test_vfredusum_vs_f16m1_f16m1_rm_tu(vfloat16m1_t maskedoff, vfloat16m1_t vector, vfloat16m1_t scalar, size_t vl) { + return __riscv_vfredusum_vs_f16m1_f16m1_rm_tu(maskedoff, vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfredusum_vs_f16m2_f16m1_rm_tu +// CHECK-RV64-SAME: ( [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.nxv4f16.nxv8f16.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat16m1_t test_vfredusum_vs_f16m2_f16m1_rm_tu(vfloat16m1_t maskedoff, vfloat16m2_t vector, vfloat16m1_t scalar, size_t vl) { + return __riscv_vfredusum_vs_f16m2_f16m1_rm_tu(maskedoff, vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfredusum_vs_f16m4_f16m1_rm_tu +// CHECK-RV64-SAME: ( [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.nxv4f16.nxv16f16.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat16m1_t test_vfredusum_vs_f16m4_f16m1_rm_tu(vfloat16m1_t maskedoff, vfloat16m4_t vector, vfloat16m1_t scalar, size_t vl) { + return __riscv_vfredusum_vs_f16m4_f16m1_rm_tu(maskedoff, vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfredusum_vs_f16m8_f16m1_rm_tu +// CHECK-RV64-SAME: ( [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.nxv4f16.nxv32f16.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat16m1_t test_vfredusum_vs_f16m8_f16m1_rm_tu(vfloat16m1_t maskedoff, vfloat16m8_t vector, vfloat16m1_t scalar, size_t vl) { + return __riscv_vfredusum_vs_f16m8_f16m1_rm_tu(maskedoff, vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfredusum_vs_f32mf2_f32m1_rm_tu +// CHECK-RV64-SAME: ( [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.nxv2f32.nxv1f32.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat32m1_t test_vfredusum_vs_f32mf2_f32m1_rm_tu(vfloat32m1_t maskedoff, vfloat32mf2_t vector, vfloat32m1_t scalar, size_t vl) { + return __riscv_vfredusum_vs_f32mf2_f32m1_rm_tu(maskedoff, vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfredusum_vs_f32m1_f32m1_rm_tu +// CHECK-RV64-SAME: ( [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.nxv2f32.nxv2f32.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat32m1_t test_vfredusum_vs_f32m1_f32m1_rm_tu(vfloat32m1_t maskedoff, vfloat32m1_t vector, vfloat32m1_t scalar, size_t vl) { + return __riscv_vfredusum_vs_f32m1_f32m1_rm_tu(maskedoff, vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfredusum_vs_f32m2_f32m1_rm_tu +// CHECK-RV64-SAME: ( [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.nxv2f32.nxv4f32.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat32m1_t test_vfredusum_vs_f32m2_f32m1_rm_tu(vfloat32m1_t maskedoff, vfloat32m2_t vector, vfloat32m1_t scalar, size_t vl) { + return __riscv_vfredusum_vs_f32m2_f32m1_rm_tu(maskedoff, vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfredusum_vs_f32m4_f32m1_rm_tu +// CHECK-RV64-SAME: ( [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.nxv2f32.nxv8f32.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat32m1_t test_vfredusum_vs_f32m4_f32m1_rm_tu(vfloat32m1_t maskedoff, vfloat32m4_t vector, vfloat32m1_t scalar, size_t vl) { + return __riscv_vfredusum_vs_f32m4_f32m1_rm_tu(maskedoff, vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfredusum_vs_f32m8_f32m1_rm_tu +// CHECK-RV64-SAME: ( [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.nxv2f32.nxv16f32.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat32m1_t test_vfredusum_vs_f32m8_f32m1_rm_tu(vfloat32m1_t maskedoff, vfloat32m8_t vector, vfloat32m1_t scalar, size_t vl) { + return __riscv_vfredusum_vs_f32m8_f32m1_rm_tu(maskedoff, vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfredusum_vs_f64m1_f64m1_rm_tu +// CHECK-RV64-SAME: ( [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.nxv1f64.nxv1f64.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat64m1_t test_vfredusum_vs_f64m1_f64m1_rm_tu(vfloat64m1_t maskedoff, vfloat64m1_t vector, vfloat64m1_t scalar, size_t vl) { + return __riscv_vfredusum_vs_f64m1_f64m1_rm_tu(maskedoff, vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfredusum_vs_f64m2_f64m1_rm_tu +// CHECK-RV64-SAME: ( [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.nxv1f64.nxv2f64.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat64m1_t test_vfredusum_vs_f64m2_f64m1_rm_tu(vfloat64m1_t maskedoff, vfloat64m2_t vector, vfloat64m1_t scalar, size_t vl) { + return __riscv_vfredusum_vs_f64m2_f64m1_rm_tu(maskedoff, vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfredusum_vs_f64m4_f64m1_rm_tu +// CHECK-RV64-SAME: ( [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.nxv1f64.nxv4f64.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat64m1_t test_vfredusum_vs_f64m4_f64m1_rm_tu(vfloat64m1_t maskedoff, vfloat64m4_t vector, vfloat64m1_t scalar, size_t vl) { + return __riscv_vfredusum_vs_f64m4_f64m1_rm_tu(maskedoff, vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfredusum_vs_f64m8_f64m1_rm_tu +// CHECK-RV64-SAME: ( [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.nxv1f64.nxv8f64.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat64m1_t test_vfredusum_vs_f64m8_f64m1_rm_tu(vfloat64m1_t maskedoff, vfloat64m8_t vector, vfloat64m1_t scalar, size_t vl) { + return __riscv_vfredusum_vs_f64m8_f64m1_rm_tu(maskedoff, vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfredusum_vs_f16mf4_f16m1_rm_tum +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.mask.nxv4f16.nxv1f16.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat16m1_t test_vfredusum_vs_f16mf4_f16m1_rm_tum(vbool64_t mask, vfloat16m1_t maskedoff, vfloat16mf4_t vector, vfloat16m1_t scalar, size_t vl) { + return __riscv_vfredusum_vs_f16mf4_f16m1_rm_tum(mask, maskedoff, vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfredusum_vs_f16mf2_f16m1_rm_tum +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.mask.nxv4f16.nxv2f16.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat16m1_t test_vfredusum_vs_f16mf2_f16m1_rm_tum(vbool32_t mask, vfloat16m1_t maskedoff, vfloat16mf2_t vector, vfloat16m1_t scalar, size_t vl) { + return __riscv_vfredusum_vs_f16mf2_f16m1_rm_tum(mask, maskedoff, vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfredusum_vs_f16m1_f16m1_rm_tum +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.mask.nxv4f16.nxv4f16.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat16m1_t test_vfredusum_vs_f16m1_f16m1_rm_tum(vbool16_t mask, vfloat16m1_t maskedoff, vfloat16m1_t vector, vfloat16m1_t scalar, size_t vl) { + return __riscv_vfredusum_vs_f16m1_f16m1_rm_tum(mask, maskedoff, vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfredusum_vs_f16m2_f16m1_rm_tum +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.mask.nxv4f16.nxv8f16.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat16m1_t test_vfredusum_vs_f16m2_f16m1_rm_tum(vbool8_t mask, vfloat16m1_t maskedoff, vfloat16m2_t vector, vfloat16m1_t scalar, size_t vl) { + return __riscv_vfredusum_vs_f16m2_f16m1_rm_tum(mask, maskedoff, vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfredusum_vs_f16m4_f16m1_rm_tum +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.mask.nxv4f16.nxv16f16.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat16m1_t test_vfredusum_vs_f16m4_f16m1_rm_tum(vbool4_t mask, vfloat16m1_t maskedoff, vfloat16m4_t vector, vfloat16m1_t scalar, size_t vl) { + return __riscv_vfredusum_vs_f16m4_f16m1_rm_tum(mask, maskedoff, vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfredusum_vs_f16m8_f16m1_rm_tum +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.mask.nxv4f16.nxv32f16.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat16m1_t test_vfredusum_vs_f16m8_f16m1_rm_tum(vbool2_t mask, vfloat16m1_t maskedoff, vfloat16m8_t vector, vfloat16m1_t scalar, size_t vl) { + return __riscv_vfredusum_vs_f16m8_f16m1_rm_tum(mask, maskedoff, vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfredusum_vs_f32mf2_f32m1_rm_tum +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.mask.nxv2f32.nxv1f32.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat32m1_t test_vfredusum_vs_f32mf2_f32m1_rm_tum(vbool64_t mask, vfloat32m1_t maskedoff, vfloat32mf2_t vector, vfloat32m1_t scalar, size_t vl) { + return __riscv_vfredusum_vs_f32mf2_f32m1_rm_tum(mask, maskedoff, vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfredusum_vs_f32m1_f32m1_rm_tum +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.mask.nxv2f32.nxv2f32.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat32m1_t test_vfredusum_vs_f32m1_f32m1_rm_tum(vbool32_t mask, vfloat32m1_t maskedoff, vfloat32m1_t vector, vfloat32m1_t scalar, size_t vl) { + return __riscv_vfredusum_vs_f32m1_f32m1_rm_tum(mask, maskedoff, vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfredusum_vs_f32m2_f32m1_rm_tum +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.mask.nxv2f32.nxv4f32.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat32m1_t test_vfredusum_vs_f32m2_f32m1_rm_tum(vbool16_t mask, vfloat32m1_t maskedoff, vfloat32m2_t vector, vfloat32m1_t scalar, size_t vl) { + return __riscv_vfredusum_vs_f32m2_f32m1_rm_tum(mask, maskedoff, vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfredusum_vs_f32m4_f32m1_rm_tum +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.mask.nxv2f32.nxv8f32.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat32m1_t test_vfredusum_vs_f32m4_f32m1_rm_tum(vbool8_t mask, vfloat32m1_t maskedoff, vfloat32m4_t vector, vfloat32m1_t scalar, size_t vl) { + return __riscv_vfredusum_vs_f32m4_f32m1_rm_tum(mask, maskedoff, vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfredusum_vs_f32m8_f32m1_rm_tum +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.mask.nxv2f32.nxv16f32.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat32m1_t test_vfredusum_vs_f32m8_f32m1_rm_tum(vbool4_t mask, vfloat32m1_t maskedoff, vfloat32m8_t vector, vfloat32m1_t scalar, size_t vl) { + return __riscv_vfredusum_vs_f32m8_f32m1_rm_tum(mask, maskedoff, vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfredusum_vs_f64m1_f64m1_rm_tum +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.mask.nxv1f64.nxv1f64.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat64m1_t test_vfredusum_vs_f64m1_f64m1_rm_tum(vbool64_t mask, vfloat64m1_t maskedoff, vfloat64m1_t vector, vfloat64m1_t scalar, size_t vl) { + return __riscv_vfredusum_vs_f64m1_f64m1_rm_tum(mask, maskedoff, vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfredusum_vs_f64m2_f64m1_rm_tum +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.mask.nxv1f64.nxv2f64.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat64m1_t test_vfredusum_vs_f64m2_f64m1_rm_tum(vbool32_t mask, vfloat64m1_t maskedoff, vfloat64m2_t vector, vfloat64m1_t scalar, size_t vl) { + return __riscv_vfredusum_vs_f64m2_f64m1_rm_tum(mask, maskedoff, vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfredusum_vs_f64m4_f64m1_rm_tum +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.mask.nxv1f64.nxv4f64.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat64m1_t test_vfredusum_vs_f64m4_f64m1_rm_tum(vbool16_t mask, vfloat64m1_t maskedoff, vfloat64m4_t vector, vfloat64m1_t scalar, size_t vl) { + return __riscv_vfredusum_vs_f64m4_f64m1_rm_tum(mask, maskedoff, vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfredusum_vs_f64m8_f64m1_rm_tum +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.mask.nxv1f64.nxv8f64.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat64m1_t test_vfredusum_vs_f64m8_f64m1_rm_tum(vbool8_t mask, vfloat64m1_t maskedoff, vfloat64m8_t vector, vfloat64m1_t scalar, size_t vl) { + return __riscv_vfredusum_vs_f64m8_f64m1_rm_tum(mask, maskedoff, vector, scalar, __RISCV_FRM_RNE, vl); +} + diff --git a/clang/test/CodeGen/RISCV/rvv-intrinsics-autogenerated/policy/non-overloaded/vfwredosum.c b/clang/test/CodeGen/RISCV/rvv-intrinsics-autogenerated/policy/non-overloaded/vfwredosum.c --- a/clang/test/CodeGen/RISCV/rvv-intrinsics-autogenerated/policy/non-overloaded/vfwredosum.c +++ b/clang/test/CodeGen/RISCV/rvv-intrinsics-autogenerated/policy/non-overloaded/vfwredosum.c @@ -10,7 +10,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfwredosum_vs_f16mf4_f32m1_tu // CHECK-RV64-SAME: ( [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0:[0-9]+]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredosum.nxv2f32.nxv1f16.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredosum.nxv2f32.nxv1f16.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat32m1_t test_vfwredosum_vs_f16mf4_f32m1_tu(vfloat32m1_t maskedoff, vfloat16mf4_t vector, vfloat32m1_t scalar, size_t vl) { @@ -20,7 +20,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfwredosum_vs_f16mf2_f32m1_tu // CHECK-RV64-SAME: ( [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredosum.nxv2f32.nxv2f16.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredosum.nxv2f32.nxv2f16.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat32m1_t test_vfwredosum_vs_f16mf2_f32m1_tu(vfloat32m1_t maskedoff, vfloat16mf2_t vector, vfloat32m1_t scalar, size_t vl) { @@ -30,7 +30,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfwredosum_vs_f16m1_f32m1_tu // CHECK-RV64-SAME: ( [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredosum.nxv2f32.nxv4f16.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredosum.nxv2f32.nxv4f16.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat32m1_t test_vfwredosum_vs_f16m1_f32m1_tu(vfloat32m1_t maskedoff, vfloat16m1_t vector, vfloat32m1_t scalar, size_t vl) { @@ -40,7 +40,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfwredosum_vs_f16m2_f32m1_tu // CHECK-RV64-SAME: ( [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredosum.nxv2f32.nxv8f16.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredosum.nxv2f32.nxv8f16.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat32m1_t test_vfwredosum_vs_f16m2_f32m1_tu(vfloat32m1_t maskedoff, vfloat16m2_t vector, vfloat32m1_t scalar, size_t vl) { @@ -50,7 +50,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfwredosum_vs_f16m4_f32m1_tu // CHECK-RV64-SAME: ( [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredosum.nxv2f32.nxv16f16.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredosum.nxv2f32.nxv16f16.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat32m1_t test_vfwredosum_vs_f16m4_f32m1_tu(vfloat32m1_t maskedoff, vfloat16m4_t vector, vfloat32m1_t scalar, size_t vl) { @@ -60,7 +60,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfwredosum_vs_f16m8_f32m1_tu // CHECK-RV64-SAME: ( [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredosum.nxv2f32.nxv32f16.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredosum.nxv2f32.nxv32f16.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat32m1_t test_vfwredosum_vs_f16m8_f32m1_tu(vfloat32m1_t maskedoff, vfloat16m8_t vector, vfloat32m1_t scalar, size_t vl) { @@ -70,7 +70,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfwredosum_vs_f32mf2_f64m1_tu // CHECK-RV64-SAME: ( [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredosum.nxv1f64.nxv1f32.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredosum.nxv1f64.nxv1f32.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat64m1_t test_vfwredosum_vs_f32mf2_f64m1_tu(vfloat64m1_t maskedoff, vfloat32mf2_t vector, vfloat64m1_t scalar, size_t vl) { @@ -80,7 +80,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfwredosum_vs_f32m1_f64m1_tu // CHECK-RV64-SAME: ( [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredosum.nxv1f64.nxv2f32.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredosum.nxv1f64.nxv2f32.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat64m1_t test_vfwredosum_vs_f32m1_f64m1_tu(vfloat64m1_t maskedoff, vfloat32m1_t vector, vfloat64m1_t scalar, size_t vl) { @@ -90,7 +90,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfwredosum_vs_f32m2_f64m1_tu // CHECK-RV64-SAME: ( [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredosum.nxv1f64.nxv4f32.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredosum.nxv1f64.nxv4f32.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat64m1_t test_vfwredosum_vs_f32m2_f64m1_tu(vfloat64m1_t maskedoff, vfloat32m2_t vector, vfloat64m1_t scalar, size_t vl) { @@ -100,7 +100,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfwredosum_vs_f32m4_f64m1_tu // CHECK-RV64-SAME: ( [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredosum.nxv1f64.nxv8f32.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredosum.nxv1f64.nxv8f32.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat64m1_t test_vfwredosum_vs_f32m4_f64m1_tu(vfloat64m1_t maskedoff, vfloat32m4_t vector, vfloat64m1_t scalar, size_t vl) { @@ -110,7 +110,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfwredosum_vs_f32m8_f64m1_tu // CHECK-RV64-SAME: ( [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredosum.nxv1f64.nxv16f32.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredosum.nxv1f64.nxv16f32.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat64m1_t test_vfwredosum_vs_f32m8_f64m1_tu(vfloat64m1_t maskedoff, vfloat32m8_t vector, vfloat64m1_t scalar, size_t vl) { @@ -120,7 +120,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfwredosum_vs_f16mf4_f32m1_tum // CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredosum.mask.nxv2f32.nxv1f16.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredosum.mask.nxv2f32.nxv1f16.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat32m1_t test_vfwredosum_vs_f16mf4_f32m1_tum(vbool64_t mask, vfloat32m1_t maskedoff, vfloat16mf4_t vector, vfloat32m1_t scalar, size_t vl) { @@ -130,7 +130,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfwredosum_vs_f16mf2_f32m1_tum // CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredosum.mask.nxv2f32.nxv2f16.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredosum.mask.nxv2f32.nxv2f16.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat32m1_t test_vfwredosum_vs_f16mf2_f32m1_tum(vbool32_t mask, vfloat32m1_t maskedoff, vfloat16mf2_t vector, vfloat32m1_t scalar, size_t vl) { @@ -140,7 +140,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfwredosum_vs_f16m1_f32m1_tum // CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredosum.mask.nxv2f32.nxv4f16.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredosum.mask.nxv2f32.nxv4f16.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat32m1_t test_vfwredosum_vs_f16m1_f32m1_tum(vbool16_t mask, vfloat32m1_t maskedoff, vfloat16m1_t vector, vfloat32m1_t scalar, size_t vl) { @@ -150,7 +150,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfwredosum_vs_f16m2_f32m1_tum // CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredosum.mask.nxv2f32.nxv8f16.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredosum.mask.nxv2f32.nxv8f16.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat32m1_t test_vfwredosum_vs_f16m2_f32m1_tum(vbool8_t mask, vfloat32m1_t maskedoff, vfloat16m2_t vector, vfloat32m1_t scalar, size_t vl) { @@ -160,7 +160,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfwredosum_vs_f16m4_f32m1_tum // CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredosum.mask.nxv2f32.nxv16f16.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredosum.mask.nxv2f32.nxv16f16.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat32m1_t test_vfwredosum_vs_f16m4_f32m1_tum(vbool4_t mask, vfloat32m1_t maskedoff, vfloat16m4_t vector, vfloat32m1_t scalar, size_t vl) { @@ -170,7 +170,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfwredosum_vs_f16m8_f32m1_tum // CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredosum.mask.nxv2f32.nxv32f16.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredosum.mask.nxv2f32.nxv32f16.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat32m1_t test_vfwredosum_vs_f16m8_f32m1_tum(vbool2_t mask, vfloat32m1_t maskedoff, vfloat16m8_t vector, vfloat32m1_t scalar, size_t vl) { @@ -180,7 +180,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfwredosum_vs_f32mf2_f64m1_tum // CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredosum.mask.nxv1f64.nxv1f32.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredosum.mask.nxv1f64.nxv1f32.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat64m1_t test_vfwredosum_vs_f32mf2_f64m1_tum(vbool64_t mask, vfloat64m1_t maskedoff, vfloat32mf2_t vector, vfloat64m1_t scalar, size_t vl) { @@ -190,7 +190,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfwredosum_vs_f32m1_f64m1_tum // CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredosum.mask.nxv1f64.nxv2f32.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredosum.mask.nxv1f64.nxv2f32.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat64m1_t test_vfwredosum_vs_f32m1_f64m1_tum(vbool32_t mask, vfloat64m1_t maskedoff, vfloat32m1_t vector, vfloat64m1_t scalar, size_t vl) { @@ -200,7 +200,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfwredosum_vs_f32m2_f64m1_tum // CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredosum.mask.nxv1f64.nxv4f32.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredosum.mask.nxv1f64.nxv4f32.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat64m1_t test_vfwredosum_vs_f32m2_f64m1_tum(vbool16_t mask, vfloat64m1_t maskedoff, vfloat32m2_t vector, vfloat64m1_t scalar, size_t vl) { @@ -210,7 +210,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfwredosum_vs_f32m4_f64m1_tum // CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredosum.mask.nxv1f64.nxv8f32.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredosum.mask.nxv1f64.nxv8f32.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat64m1_t test_vfwredosum_vs_f32m4_f64m1_tum(vbool8_t mask, vfloat64m1_t maskedoff, vfloat32m4_t vector, vfloat64m1_t scalar, size_t vl) { @@ -220,10 +220,230 @@ // CHECK-RV64-LABEL: define dso_local @test_vfwredosum_vs_f32m8_f64m1_tum // CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredosum.mask.nxv1f64.nxv16f32.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredosum.mask.nxv1f64.nxv16f32.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat64m1_t test_vfwredosum_vs_f32m8_f64m1_tum(vbool4_t mask, vfloat64m1_t maskedoff, vfloat32m8_t vector, vfloat64m1_t scalar, size_t vl) { return __riscv_vfwredosum_vs_f32m8_f64m1_tum(mask, maskedoff, vector, scalar, vl); } +// CHECK-RV64-LABEL: define dso_local @test_vfwredosum_vs_f16mf4_f32m1_rm_tu +// CHECK-RV64-SAME: ( [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredosum.nxv2f32.nxv1f16.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat32m1_t test_vfwredosum_vs_f16mf4_f32m1_rm_tu(vfloat32m1_t maskedoff, vfloat16mf4_t vector, vfloat32m1_t scalar, size_t vl) { + return __riscv_vfwredosum_vs_f16mf4_f32m1_rm_tu(maskedoff, vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfwredosum_vs_f16mf2_f32m1_rm_tu +// CHECK-RV64-SAME: ( [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredosum.nxv2f32.nxv2f16.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat32m1_t test_vfwredosum_vs_f16mf2_f32m1_rm_tu(vfloat32m1_t maskedoff, vfloat16mf2_t vector, vfloat32m1_t scalar, size_t vl) { + return __riscv_vfwredosum_vs_f16mf2_f32m1_rm_tu(maskedoff, vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfwredosum_vs_f16m1_f32m1_rm_tu +// CHECK-RV64-SAME: ( [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredosum.nxv2f32.nxv4f16.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat32m1_t test_vfwredosum_vs_f16m1_f32m1_rm_tu(vfloat32m1_t maskedoff, vfloat16m1_t vector, vfloat32m1_t scalar, size_t vl) { + return __riscv_vfwredosum_vs_f16m1_f32m1_rm_tu(maskedoff, vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfwredosum_vs_f16m2_f32m1_rm_tu +// CHECK-RV64-SAME: ( [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredosum.nxv2f32.nxv8f16.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat32m1_t test_vfwredosum_vs_f16m2_f32m1_rm_tu(vfloat32m1_t maskedoff, vfloat16m2_t vector, vfloat32m1_t scalar, size_t vl) { + return __riscv_vfwredosum_vs_f16m2_f32m1_rm_tu(maskedoff, vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfwredosum_vs_f16m4_f32m1_rm_tu +// CHECK-RV64-SAME: ( [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredosum.nxv2f32.nxv16f16.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat32m1_t test_vfwredosum_vs_f16m4_f32m1_rm_tu(vfloat32m1_t maskedoff, vfloat16m4_t vector, vfloat32m1_t scalar, size_t vl) { + return __riscv_vfwredosum_vs_f16m4_f32m1_rm_tu(maskedoff, vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfwredosum_vs_f16m8_f32m1_rm_tu +// CHECK-RV64-SAME: ( [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredosum.nxv2f32.nxv32f16.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat32m1_t test_vfwredosum_vs_f16m8_f32m1_rm_tu(vfloat32m1_t maskedoff, vfloat16m8_t vector, vfloat32m1_t scalar, size_t vl) { + return __riscv_vfwredosum_vs_f16m8_f32m1_rm_tu(maskedoff, vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfwredosum_vs_f32mf2_f64m1_rm_tu +// CHECK-RV64-SAME: ( [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredosum.nxv1f64.nxv1f32.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat64m1_t test_vfwredosum_vs_f32mf2_f64m1_rm_tu(vfloat64m1_t maskedoff, vfloat32mf2_t vector, vfloat64m1_t scalar, size_t vl) { + return __riscv_vfwredosum_vs_f32mf2_f64m1_rm_tu(maskedoff, vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfwredosum_vs_f32m1_f64m1_rm_tu +// CHECK-RV64-SAME: ( [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredosum.nxv1f64.nxv2f32.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat64m1_t test_vfwredosum_vs_f32m1_f64m1_rm_tu(vfloat64m1_t maskedoff, vfloat32m1_t vector, vfloat64m1_t scalar, size_t vl) { + return __riscv_vfwredosum_vs_f32m1_f64m1_rm_tu(maskedoff, vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfwredosum_vs_f32m2_f64m1_rm_tu +// CHECK-RV64-SAME: ( [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredosum.nxv1f64.nxv4f32.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat64m1_t test_vfwredosum_vs_f32m2_f64m1_rm_tu(vfloat64m1_t maskedoff, vfloat32m2_t vector, vfloat64m1_t scalar, size_t vl) { + return __riscv_vfwredosum_vs_f32m2_f64m1_rm_tu(maskedoff, vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfwredosum_vs_f32m4_f64m1_rm_tu +// CHECK-RV64-SAME: ( [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredosum.nxv1f64.nxv8f32.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat64m1_t test_vfwredosum_vs_f32m4_f64m1_rm_tu(vfloat64m1_t maskedoff, vfloat32m4_t vector, vfloat64m1_t scalar, size_t vl) { + return __riscv_vfwredosum_vs_f32m4_f64m1_rm_tu(maskedoff, vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfwredosum_vs_f32m8_f64m1_rm_tu +// CHECK-RV64-SAME: ( [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredosum.nxv1f64.nxv16f32.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat64m1_t test_vfwredosum_vs_f32m8_f64m1_rm_tu(vfloat64m1_t maskedoff, vfloat32m8_t vector, vfloat64m1_t scalar, size_t vl) { + return __riscv_vfwredosum_vs_f32m8_f64m1_rm_tu(maskedoff, vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfwredosum_vs_f16mf4_f32m1_rm_tum +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredosum.mask.nxv2f32.nxv1f16.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat32m1_t test_vfwredosum_vs_f16mf4_f32m1_rm_tum(vbool64_t mask, vfloat32m1_t maskedoff, vfloat16mf4_t vector, vfloat32m1_t scalar, size_t vl) { + return __riscv_vfwredosum_vs_f16mf4_f32m1_rm_tum(mask, maskedoff, vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfwredosum_vs_f16mf2_f32m1_rm_tum +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredosum.mask.nxv2f32.nxv2f16.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat32m1_t test_vfwredosum_vs_f16mf2_f32m1_rm_tum(vbool32_t mask, vfloat32m1_t maskedoff, vfloat16mf2_t vector, vfloat32m1_t scalar, size_t vl) { + return __riscv_vfwredosum_vs_f16mf2_f32m1_rm_tum(mask, maskedoff, vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfwredosum_vs_f16m1_f32m1_rm_tum +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredosum.mask.nxv2f32.nxv4f16.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat32m1_t test_vfwredosum_vs_f16m1_f32m1_rm_tum(vbool16_t mask, vfloat32m1_t maskedoff, vfloat16m1_t vector, vfloat32m1_t scalar, size_t vl) { + return __riscv_vfwredosum_vs_f16m1_f32m1_rm_tum(mask, maskedoff, vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfwredosum_vs_f16m2_f32m1_rm_tum +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredosum.mask.nxv2f32.nxv8f16.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat32m1_t test_vfwredosum_vs_f16m2_f32m1_rm_tum(vbool8_t mask, vfloat32m1_t maskedoff, vfloat16m2_t vector, vfloat32m1_t scalar, size_t vl) { + return __riscv_vfwredosum_vs_f16m2_f32m1_rm_tum(mask, maskedoff, vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfwredosum_vs_f16m4_f32m1_rm_tum +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredosum.mask.nxv2f32.nxv16f16.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat32m1_t test_vfwredosum_vs_f16m4_f32m1_rm_tum(vbool4_t mask, vfloat32m1_t maskedoff, vfloat16m4_t vector, vfloat32m1_t scalar, size_t vl) { + return __riscv_vfwredosum_vs_f16m4_f32m1_rm_tum(mask, maskedoff, vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfwredosum_vs_f16m8_f32m1_rm_tum +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredosum.mask.nxv2f32.nxv32f16.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat32m1_t test_vfwredosum_vs_f16m8_f32m1_rm_tum(vbool2_t mask, vfloat32m1_t maskedoff, vfloat16m8_t vector, vfloat32m1_t scalar, size_t vl) { + return __riscv_vfwredosum_vs_f16m8_f32m1_rm_tum(mask, maskedoff, vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfwredosum_vs_f32mf2_f64m1_rm_tum +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredosum.mask.nxv1f64.nxv1f32.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat64m1_t test_vfwredosum_vs_f32mf2_f64m1_rm_tum(vbool64_t mask, vfloat64m1_t maskedoff, vfloat32mf2_t vector, vfloat64m1_t scalar, size_t vl) { + return __riscv_vfwredosum_vs_f32mf2_f64m1_rm_tum(mask, maskedoff, vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfwredosum_vs_f32m1_f64m1_rm_tum +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredosum.mask.nxv1f64.nxv2f32.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat64m1_t test_vfwredosum_vs_f32m1_f64m1_rm_tum(vbool32_t mask, vfloat64m1_t maskedoff, vfloat32m1_t vector, vfloat64m1_t scalar, size_t vl) { + return __riscv_vfwredosum_vs_f32m1_f64m1_rm_tum(mask, maskedoff, vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfwredosum_vs_f32m2_f64m1_rm_tum +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredosum.mask.nxv1f64.nxv4f32.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat64m1_t test_vfwredosum_vs_f32m2_f64m1_rm_tum(vbool16_t mask, vfloat64m1_t maskedoff, vfloat32m2_t vector, vfloat64m1_t scalar, size_t vl) { + return __riscv_vfwredosum_vs_f32m2_f64m1_rm_tum(mask, maskedoff, vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfwredosum_vs_f32m4_f64m1_rm_tum +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredosum.mask.nxv1f64.nxv8f32.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat64m1_t test_vfwredosum_vs_f32m4_f64m1_rm_tum(vbool8_t mask, vfloat64m1_t maskedoff, vfloat32m4_t vector, vfloat64m1_t scalar, size_t vl) { + return __riscv_vfwredosum_vs_f32m4_f64m1_rm_tum(mask, maskedoff, vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfwredosum_vs_f32m8_f64m1_rm_tum +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredosum.mask.nxv1f64.nxv16f32.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat64m1_t test_vfwredosum_vs_f32m8_f64m1_rm_tum(vbool4_t mask, vfloat64m1_t maskedoff, vfloat32m8_t vector, vfloat64m1_t scalar, size_t vl) { + return __riscv_vfwredosum_vs_f32m8_f64m1_rm_tum(mask, maskedoff, vector, scalar, __RISCV_FRM_RNE, vl); +} + diff --git a/clang/test/CodeGen/RISCV/rvv-intrinsics-autogenerated/policy/non-overloaded/vfwredusum.c b/clang/test/CodeGen/RISCV/rvv-intrinsics-autogenerated/policy/non-overloaded/vfwredusum.c --- a/clang/test/CodeGen/RISCV/rvv-intrinsics-autogenerated/policy/non-overloaded/vfwredusum.c +++ b/clang/test/CodeGen/RISCV/rvv-intrinsics-autogenerated/policy/non-overloaded/vfwredusum.c @@ -10,7 +10,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfwredusum_vs_f16mf4_f32m1_tu // CHECK-RV64-SAME: ( [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0:[0-9]+]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredusum.nxv2f32.nxv1f16.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredusum.nxv2f32.nxv1f16.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat32m1_t test_vfwredusum_vs_f16mf4_f32m1_tu(vfloat32m1_t maskedoff, vfloat16mf4_t vector, vfloat32m1_t scalar, size_t vl) { @@ -20,7 +20,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfwredusum_vs_f16mf2_f32m1_tu // CHECK-RV64-SAME: ( [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredusum.nxv2f32.nxv2f16.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredusum.nxv2f32.nxv2f16.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat32m1_t test_vfwredusum_vs_f16mf2_f32m1_tu(vfloat32m1_t maskedoff, vfloat16mf2_t vector, vfloat32m1_t scalar, size_t vl) { @@ -30,7 +30,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfwredusum_vs_f16m1_f32m1_tu // CHECK-RV64-SAME: ( [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredusum.nxv2f32.nxv4f16.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredusum.nxv2f32.nxv4f16.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat32m1_t test_vfwredusum_vs_f16m1_f32m1_tu(vfloat32m1_t maskedoff, vfloat16m1_t vector, vfloat32m1_t scalar, size_t vl) { @@ -40,7 +40,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfwredusum_vs_f16m2_f32m1_tu // CHECK-RV64-SAME: ( [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredusum.nxv2f32.nxv8f16.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredusum.nxv2f32.nxv8f16.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat32m1_t test_vfwredusum_vs_f16m2_f32m1_tu(vfloat32m1_t maskedoff, vfloat16m2_t vector, vfloat32m1_t scalar, size_t vl) { @@ -50,7 +50,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfwredusum_vs_f16m4_f32m1_tu // CHECK-RV64-SAME: ( [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredusum.nxv2f32.nxv16f16.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredusum.nxv2f32.nxv16f16.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat32m1_t test_vfwredusum_vs_f16m4_f32m1_tu(vfloat32m1_t maskedoff, vfloat16m4_t vector, vfloat32m1_t scalar, size_t vl) { @@ -60,7 +60,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfwredusum_vs_f16m8_f32m1_tu // CHECK-RV64-SAME: ( [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredusum.nxv2f32.nxv32f16.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredusum.nxv2f32.nxv32f16.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat32m1_t test_vfwredusum_vs_f16m8_f32m1_tu(vfloat32m1_t maskedoff, vfloat16m8_t vector, vfloat32m1_t scalar, size_t vl) { @@ -70,7 +70,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfwredusum_vs_f32mf2_f64m1_tu // CHECK-RV64-SAME: ( [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredusum.nxv1f64.nxv1f32.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredusum.nxv1f64.nxv1f32.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat64m1_t test_vfwredusum_vs_f32mf2_f64m1_tu(vfloat64m1_t maskedoff, vfloat32mf2_t vector, vfloat64m1_t scalar, size_t vl) { @@ -80,7 +80,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfwredusum_vs_f32m1_f64m1_tu // CHECK-RV64-SAME: ( [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredusum.nxv1f64.nxv2f32.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredusum.nxv1f64.nxv2f32.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat64m1_t test_vfwredusum_vs_f32m1_f64m1_tu(vfloat64m1_t maskedoff, vfloat32m1_t vector, vfloat64m1_t scalar, size_t vl) { @@ -90,7 +90,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfwredusum_vs_f32m2_f64m1_tu // CHECK-RV64-SAME: ( [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredusum.nxv1f64.nxv4f32.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredusum.nxv1f64.nxv4f32.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat64m1_t test_vfwredusum_vs_f32m2_f64m1_tu(vfloat64m1_t maskedoff, vfloat32m2_t vector, vfloat64m1_t scalar, size_t vl) { @@ -100,7 +100,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfwredusum_vs_f32m4_f64m1_tu // CHECK-RV64-SAME: ( [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredusum.nxv1f64.nxv8f32.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredusum.nxv1f64.nxv8f32.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat64m1_t test_vfwredusum_vs_f32m4_f64m1_tu(vfloat64m1_t maskedoff, vfloat32m4_t vector, vfloat64m1_t scalar, size_t vl) { @@ -110,7 +110,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfwredusum_vs_f32m8_f64m1_tu // CHECK-RV64-SAME: ( [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredusum.nxv1f64.nxv16f32.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredusum.nxv1f64.nxv16f32.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat64m1_t test_vfwredusum_vs_f32m8_f64m1_tu(vfloat64m1_t maskedoff, vfloat32m8_t vector, vfloat64m1_t scalar, size_t vl) { @@ -120,7 +120,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfwredusum_vs_f16mf4_f32m1_tum // CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredusum.mask.nxv2f32.nxv1f16.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredusum.mask.nxv2f32.nxv1f16.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat32m1_t test_vfwredusum_vs_f16mf4_f32m1_tum(vbool64_t mask, vfloat32m1_t maskedoff, vfloat16mf4_t vector, vfloat32m1_t scalar, size_t vl) { @@ -130,7 +130,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfwredusum_vs_f16mf2_f32m1_tum // CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredusum.mask.nxv2f32.nxv2f16.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredusum.mask.nxv2f32.nxv2f16.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat32m1_t test_vfwredusum_vs_f16mf2_f32m1_tum(vbool32_t mask, vfloat32m1_t maskedoff, vfloat16mf2_t vector, vfloat32m1_t scalar, size_t vl) { @@ -140,7 +140,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfwredusum_vs_f16m1_f32m1_tum // CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredusum.mask.nxv2f32.nxv4f16.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredusum.mask.nxv2f32.nxv4f16.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat32m1_t test_vfwredusum_vs_f16m1_f32m1_tum(vbool16_t mask, vfloat32m1_t maskedoff, vfloat16m1_t vector, vfloat32m1_t scalar, size_t vl) { @@ -150,7 +150,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfwredusum_vs_f16m2_f32m1_tum // CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredusum.mask.nxv2f32.nxv8f16.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredusum.mask.nxv2f32.nxv8f16.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat32m1_t test_vfwredusum_vs_f16m2_f32m1_tum(vbool8_t mask, vfloat32m1_t maskedoff, vfloat16m2_t vector, vfloat32m1_t scalar, size_t vl) { @@ -160,7 +160,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfwredusum_vs_f16m4_f32m1_tum // CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredusum.mask.nxv2f32.nxv16f16.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredusum.mask.nxv2f32.nxv16f16.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat32m1_t test_vfwredusum_vs_f16m4_f32m1_tum(vbool4_t mask, vfloat32m1_t maskedoff, vfloat16m4_t vector, vfloat32m1_t scalar, size_t vl) { @@ -170,7 +170,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfwredusum_vs_f16m8_f32m1_tum // CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredusum.mask.nxv2f32.nxv32f16.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredusum.mask.nxv2f32.nxv32f16.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat32m1_t test_vfwredusum_vs_f16m8_f32m1_tum(vbool2_t mask, vfloat32m1_t maskedoff, vfloat16m8_t vector, vfloat32m1_t scalar, size_t vl) { @@ -180,7 +180,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfwredusum_vs_f32mf2_f64m1_tum // CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredusum.mask.nxv1f64.nxv1f32.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredusum.mask.nxv1f64.nxv1f32.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat64m1_t test_vfwredusum_vs_f32mf2_f64m1_tum(vbool64_t mask, vfloat64m1_t maskedoff, vfloat32mf2_t vector, vfloat64m1_t scalar, size_t vl) { @@ -190,7 +190,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfwredusum_vs_f32m1_f64m1_tum // CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredusum.mask.nxv1f64.nxv2f32.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredusum.mask.nxv1f64.nxv2f32.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat64m1_t test_vfwredusum_vs_f32m1_f64m1_tum(vbool32_t mask, vfloat64m1_t maskedoff, vfloat32m1_t vector, vfloat64m1_t scalar, size_t vl) { @@ -200,7 +200,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfwredusum_vs_f32m2_f64m1_tum // CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredusum.mask.nxv1f64.nxv4f32.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredusum.mask.nxv1f64.nxv4f32.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat64m1_t test_vfwredusum_vs_f32m2_f64m1_tum(vbool16_t mask, vfloat64m1_t maskedoff, vfloat32m2_t vector, vfloat64m1_t scalar, size_t vl) { @@ -210,7 +210,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfwredusum_vs_f32m4_f64m1_tum // CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredusum.mask.nxv1f64.nxv8f32.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredusum.mask.nxv1f64.nxv8f32.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat64m1_t test_vfwredusum_vs_f32m4_f64m1_tum(vbool8_t mask, vfloat64m1_t maskedoff, vfloat32m4_t vector, vfloat64m1_t scalar, size_t vl) { @@ -220,10 +220,230 @@ // CHECK-RV64-LABEL: define dso_local @test_vfwredusum_vs_f32m8_f64m1_tum // CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredusum.mask.nxv1f64.nxv16f32.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredusum.mask.nxv1f64.nxv16f32.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat64m1_t test_vfwredusum_vs_f32m8_f64m1_tum(vbool4_t mask, vfloat64m1_t maskedoff, vfloat32m8_t vector, vfloat64m1_t scalar, size_t vl) { return __riscv_vfwredusum_vs_f32m8_f64m1_tum(mask, maskedoff, vector, scalar, vl); } +// CHECK-RV64-LABEL: define dso_local @test_vfwredusum_vs_f16mf4_f32m1_rm_tu +// CHECK-RV64-SAME: ( [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredusum.nxv2f32.nxv1f16.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat32m1_t test_vfwredusum_vs_f16mf4_f32m1_rm_tu(vfloat32m1_t maskedoff, vfloat16mf4_t vector, vfloat32m1_t scalar, size_t vl) { + return __riscv_vfwredusum_vs_f16mf4_f32m1_rm_tu(maskedoff, vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfwredusum_vs_f16mf2_f32m1_rm_tu +// CHECK-RV64-SAME: ( [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredusum.nxv2f32.nxv2f16.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat32m1_t test_vfwredusum_vs_f16mf2_f32m1_rm_tu(vfloat32m1_t maskedoff, vfloat16mf2_t vector, vfloat32m1_t scalar, size_t vl) { + return __riscv_vfwredusum_vs_f16mf2_f32m1_rm_tu(maskedoff, vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfwredusum_vs_f16m1_f32m1_rm_tu +// CHECK-RV64-SAME: ( [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredusum.nxv2f32.nxv4f16.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat32m1_t test_vfwredusum_vs_f16m1_f32m1_rm_tu(vfloat32m1_t maskedoff, vfloat16m1_t vector, vfloat32m1_t scalar, size_t vl) { + return __riscv_vfwredusum_vs_f16m1_f32m1_rm_tu(maskedoff, vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfwredusum_vs_f16m2_f32m1_rm_tu +// CHECK-RV64-SAME: ( [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredusum.nxv2f32.nxv8f16.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat32m1_t test_vfwredusum_vs_f16m2_f32m1_rm_tu(vfloat32m1_t maskedoff, vfloat16m2_t vector, vfloat32m1_t scalar, size_t vl) { + return __riscv_vfwredusum_vs_f16m2_f32m1_rm_tu(maskedoff, vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfwredusum_vs_f16m4_f32m1_rm_tu +// CHECK-RV64-SAME: ( [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredusum.nxv2f32.nxv16f16.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat32m1_t test_vfwredusum_vs_f16m4_f32m1_rm_tu(vfloat32m1_t maskedoff, vfloat16m4_t vector, vfloat32m1_t scalar, size_t vl) { + return __riscv_vfwredusum_vs_f16m4_f32m1_rm_tu(maskedoff, vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfwredusum_vs_f16m8_f32m1_rm_tu +// CHECK-RV64-SAME: ( [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredusum.nxv2f32.nxv32f16.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat32m1_t test_vfwredusum_vs_f16m8_f32m1_rm_tu(vfloat32m1_t maskedoff, vfloat16m8_t vector, vfloat32m1_t scalar, size_t vl) { + return __riscv_vfwredusum_vs_f16m8_f32m1_rm_tu(maskedoff, vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfwredusum_vs_f32mf2_f64m1_rm_tu +// CHECK-RV64-SAME: ( [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredusum.nxv1f64.nxv1f32.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat64m1_t test_vfwredusum_vs_f32mf2_f64m1_rm_tu(vfloat64m1_t maskedoff, vfloat32mf2_t vector, vfloat64m1_t scalar, size_t vl) { + return __riscv_vfwredusum_vs_f32mf2_f64m1_rm_tu(maskedoff, vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfwredusum_vs_f32m1_f64m1_rm_tu +// CHECK-RV64-SAME: ( [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredusum.nxv1f64.nxv2f32.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat64m1_t test_vfwredusum_vs_f32m1_f64m1_rm_tu(vfloat64m1_t maskedoff, vfloat32m1_t vector, vfloat64m1_t scalar, size_t vl) { + return __riscv_vfwredusum_vs_f32m1_f64m1_rm_tu(maskedoff, vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfwredusum_vs_f32m2_f64m1_rm_tu +// CHECK-RV64-SAME: ( [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredusum.nxv1f64.nxv4f32.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat64m1_t test_vfwredusum_vs_f32m2_f64m1_rm_tu(vfloat64m1_t maskedoff, vfloat32m2_t vector, vfloat64m1_t scalar, size_t vl) { + return __riscv_vfwredusum_vs_f32m2_f64m1_rm_tu(maskedoff, vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfwredusum_vs_f32m4_f64m1_rm_tu +// CHECK-RV64-SAME: ( [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredusum.nxv1f64.nxv8f32.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat64m1_t test_vfwredusum_vs_f32m4_f64m1_rm_tu(vfloat64m1_t maskedoff, vfloat32m4_t vector, vfloat64m1_t scalar, size_t vl) { + return __riscv_vfwredusum_vs_f32m4_f64m1_rm_tu(maskedoff, vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfwredusum_vs_f32m8_f64m1_rm_tu +// CHECK-RV64-SAME: ( [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredusum.nxv1f64.nxv16f32.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat64m1_t test_vfwredusum_vs_f32m8_f64m1_rm_tu(vfloat64m1_t maskedoff, vfloat32m8_t vector, vfloat64m1_t scalar, size_t vl) { + return __riscv_vfwredusum_vs_f32m8_f64m1_rm_tu(maskedoff, vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfwredusum_vs_f16mf4_f32m1_rm_tum +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredusum.mask.nxv2f32.nxv1f16.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat32m1_t test_vfwredusum_vs_f16mf4_f32m1_rm_tum(vbool64_t mask, vfloat32m1_t maskedoff, vfloat16mf4_t vector, vfloat32m1_t scalar, size_t vl) { + return __riscv_vfwredusum_vs_f16mf4_f32m1_rm_tum(mask, maskedoff, vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfwredusum_vs_f16mf2_f32m1_rm_tum +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredusum.mask.nxv2f32.nxv2f16.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat32m1_t test_vfwredusum_vs_f16mf2_f32m1_rm_tum(vbool32_t mask, vfloat32m1_t maskedoff, vfloat16mf2_t vector, vfloat32m1_t scalar, size_t vl) { + return __riscv_vfwredusum_vs_f16mf2_f32m1_rm_tum(mask, maskedoff, vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfwredusum_vs_f16m1_f32m1_rm_tum +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredusum.mask.nxv2f32.nxv4f16.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat32m1_t test_vfwredusum_vs_f16m1_f32m1_rm_tum(vbool16_t mask, vfloat32m1_t maskedoff, vfloat16m1_t vector, vfloat32m1_t scalar, size_t vl) { + return __riscv_vfwredusum_vs_f16m1_f32m1_rm_tum(mask, maskedoff, vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfwredusum_vs_f16m2_f32m1_rm_tum +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredusum.mask.nxv2f32.nxv8f16.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat32m1_t test_vfwredusum_vs_f16m2_f32m1_rm_tum(vbool8_t mask, vfloat32m1_t maskedoff, vfloat16m2_t vector, vfloat32m1_t scalar, size_t vl) { + return __riscv_vfwredusum_vs_f16m2_f32m1_rm_tum(mask, maskedoff, vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfwredusum_vs_f16m4_f32m1_rm_tum +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredusum.mask.nxv2f32.nxv16f16.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat32m1_t test_vfwredusum_vs_f16m4_f32m1_rm_tum(vbool4_t mask, vfloat32m1_t maskedoff, vfloat16m4_t vector, vfloat32m1_t scalar, size_t vl) { + return __riscv_vfwredusum_vs_f16m4_f32m1_rm_tum(mask, maskedoff, vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfwredusum_vs_f16m8_f32m1_rm_tum +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredusum.mask.nxv2f32.nxv32f16.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat32m1_t test_vfwredusum_vs_f16m8_f32m1_rm_tum(vbool2_t mask, vfloat32m1_t maskedoff, vfloat16m8_t vector, vfloat32m1_t scalar, size_t vl) { + return __riscv_vfwredusum_vs_f16m8_f32m1_rm_tum(mask, maskedoff, vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfwredusum_vs_f32mf2_f64m1_rm_tum +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredusum.mask.nxv1f64.nxv1f32.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat64m1_t test_vfwredusum_vs_f32mf2_f64m1_rm_tum(vbool64_t mask, vfloat64m1_t maskedoff, vfloat32mf2_t vector, vfloat64m1_t scalar, size_t vl) { + return __riscv_vfwredusum_vs_f32mf2_f64m1_rm_tum(mask, maskedoff, vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfwredusum_vs_f32m1_f64m1_rm_tum +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredusum.mask.nxv1f64.nxv2f32.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat64m1_t test_vfwredusum_vs_f32m1_f64m1_rm_tum(vbool32_t mask, vfloat64m1_t maskedoff, vfloat32m1_t vector, vfloat64m1_t scalar, size_t vl) { + return __riscv_vfwredusum_vs_f32m1_f64m1_rm_tum(mask, maskedoff, vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfwredusum_vs_f32m2_f64m1_rm_tum +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredusum.mask.nxv1f64.nxv4f32.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat64m1_t test_vfwredusum_vs_f32m2_f64m1_rm_tum(vbool16_t mask, vfloat64m1_t maskedoff, vfloat32m2_t vector, vfloat64m1_t scalar, size_t vl) { + return __riscv_vfwredusum_vs_f32m2_f64m1_rm_tum(mask, maskedoff, vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfwredusum_vs_f32m4_f64m1_rm_tum +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredusum.mask.nxv1f64.nxv8f32.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat64m1_t test_vfwredusum_vs_f32m4_f64m1_rm_tum(vbool8_t mask, vfloat64m1_t maskedoff, vfloat32m4_t vector, vfloat64m1_t scalar, size_t vl) { + return __riscv_vfwredusum_vs_f32m4_f64m1_rm_tum(mask, maskedoff, vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfwredusum_vs_f32m8_f64m1_rm_tum +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredusum.mask.nxv1f64.nxv16f32.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat64m1_t test_vfwredusum_vs_f32m8_f64m1_rm_tum(vbool4_t mask, vfloat64m1_t maskedoff, vfloat32m8_t vector, vfloat64m1_t scalar, size_t vl) { + return __riscv_vfwredusum_vs_f32m8_f64m1_rm_tum(mask, maskedoff, vector, scalar, __RISCV_FRM_RNE, vl); +} + diff --git a/clang/test/CodeGen/RISCV/rvv-intrinsics-autogenerated/policy/overloaded/vfredosum.c b/clang/test/CodeGen/RISCV/rvv-intrinsics-autogenerated/policy/overloaded/vfredosum.c --- a/clang/test/CodeGen/RISCV/rvv-intrinsics-autogenerated/policy/overloaded/vfredosum.c +++ b/clang/test/CodeGen/RISCV/rvv-intrinsics-autogenerated/policy/overloaded/vfredosum.c @@ -10,7 +10,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfredosum_vs_f16mf4_f16m1_tu // CHECK-RV64-SAME: ( [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0:[0-9]+]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.nxv4f16.nxv1f16.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.nxv4f16.nxv1f16.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat16m1_t test_vfredosum_vs_f16mf4_f16m1_tu(vfloat16m1_t maskedoff, vfloat16mf4_t vector, vfloat16m1_t scalar, size_t vl) { @@ -20,7 +20,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfredosum_vs_f16mf2_f16m1_tu // CHECK-RV64-SAME: ( [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.nxv4f16.nxv2f16.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.nxv4f16.nxv2f16.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat16m1_t test_vfredosum_vs_f16mf2_f16m1_tu(vfloat16m1_t maskedoff, vfloat16mf2_t vector, vfloat16m1_t scalar, size_t vl) { @@ -30,7 +30,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfredosum_vs_f16m1_f16m1_tu // CHECK-RV64-SAME: ( [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.nxv4f16.nxv4f16.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.nxv4f16.nxv4f16.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat16m1_t test_vfredosum_vs_f16m1_f16m1_tu(vfloat16m1_t maskedoff, vfloat16m1_t vector, vfloat16m1_t scalar, size_t vl) { @@ -40,7 +40,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfredosum_vs_f16m2_f16m1_tu // CHECK-RV64-SAME: ( [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.nxv4f16.nxv8f16.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.nxv4f16.nxv8f16.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat16m1_t test_vfredosum_vs_f16m2_f16m1_tu(vfloat16m1_t maskedoff, vfloat16m2_t vector, vfloat16m1_t scalar, size_t vl) { @@ -50,7 +50,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfredosum_vs_f16m4_f16m1_tu // CHECK-RV64-SAME: ( [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.nxv4f16.nxv16f16.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.nxv4f16.nxv16f16.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat16m1_t test_vfredosum_vs_f16m4_f16m1_tu(vfloat16m1_t maskedoff, vfloat16m4_t vector, vfloat16m1_t scalar, size_t vl) { @@ -60,7 +60,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfredosum_vs_f16m8_f16m1_tu // CHECK-RV64-SAME: ( [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.nxv4f16.nxv32f16.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.nxv4f16.nxv32f16.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat16m1_t test_vfredosum_vs_f16m8_f16m1_tu(vfloat16m1_t maskedoff, vfloat16m8_t vector, vfloat16m1_t scalar, size_t vl) { @@ -70,7 +70,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfredosum_vs_f32mf2_f32m1_tu // CHECK-RV64-SAME: ( [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.nxv2f32.nxv1f32.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.nxv2f32.nxv1f32.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat32m1_t test_vfredosum_vs_f32mf2_f32m1_tu(vfloat32m1_t maskedoff, vfloat32mf2_t vector, vfloat32m1_t scalar, size_t vl) { @@ -80,7 +80,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfredosum_vs_f32m1_f32m1_tu // CHECK-RV64-SAME: ( [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.nxv2f32.nxv2f32.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.nxv2f32.nxv2f32.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat32m1_t test_vfredosum_vs_f32m1_f32m1_tu(vfloat32m1_t maskedoff, vfloat32m1_t vector, vfloat32m1_t scalar, size_t vl) { @@ -90,7 +90,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfredosum_vs_f32m2_f32m1_tu // CHECK-RV64-SAME: ( [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.nxv2f32.nxv4f32.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.nxv2f32.nxv4f32.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat32m1_t test_vfredosum_vs_f32m2_f32m1_tu(vfloat32m1_t maskedoff, vfloat32m2_t vector, vfloat32m1_t scalar, size_t vl) { @@ -100,7 +100,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfredosum_vs_f32m4_f32m1_tu // CHECK-RV64-SAME: ( [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.nxv2f32.nxv8f32.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.nxv2f32.nxv8f32.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat32m1_t test_vfredosum_vs_f32m4_f32m1_tu(vfloat32m1_t maskedoff, vfloat32m4_t vector, vfloat32m1_t scalar, size_t vl) { @@ -110,7 +110,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfredosum_vs_f32m8_f32m1_tu // CHECK-RV64-SAME: ( [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.nxv2f32.nxv16f32.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.nxv2f32.nxv16f32.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat32m1_t test_vfredosum_vs_f32m8_f32m1_tu(vfloat32m1_t maskedoff, vfloat32m8_t vector, vfloat32m1_t scalar, size_t vl) { @@ -120,7 +120,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfredosum_vs_f64m1_f64m1_tu // CHECK-RV64-SAME: ( [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.nxv1f64.nxv1f64.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.nxv1f64.nxv1f64.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat64m1_t test_vfredosum_vs_f64m1_f64m1_tu(vfloat64m1_t maskedoff, vfloat64m1_t vector, vfloat64m1_t scalar, size_t vl) { @@ -130,7 +130,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfredosum_vs_f64m2_f64m1_tu // CHECK-RV64-SAME: ( [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.nxv1f64.nxv2f64.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.nxv1f64.nxv2f64.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat64m1_t test_vfredosum_vs_f64m2_f64m1_tu(vfloat64m1_t maskedoff, vfloat64m2_t vector, vfloat64m1_t scalar, size_t vl) { @@ -140,7 +140,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfredosum_vs_f64m4_f64m1_tu // CHECK-RV64-SAME: ( [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.nxv1f64.nxv4f64.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.nxv1f64.nxv4f64.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat64m1_t test_vfredosum_vs_f64m4_f64m1_tu(vfloat64m1_t maskedoff, vfloat64m4_t vector, vfloat64m1_t scalar, size_t vl) { @@ -150,7 +150,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfredosum_vs_f64m8_f64m1_tu // CHECK-RV64-SAME: ( [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.nxv1f64.nxv8f64.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.nxv1f64.nxv8f64.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat64m1_t test_vfredosum_vs_f64m8_f64m1_tu(vfloat64m1_t maskedoff, vfloat64m8_t vector, vfloat64m1_t scalar, size_t vl) { @@ -160,7 +160,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfredosum_vs_f16mf4_f16m1_tum // CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.mask.nxv4f16.nxv1f16.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.mask.nxv4f16.nxv1f16.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat16m1_t test_vfredosum_vs_f16mf4_f16m1_tum(vbool64_t mask, vfloat16m1_t maskedoff, vfloat16mf4_t vector, vfloat16m1_t scalar, size_t vl) { @@ -170,7 +170,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfredosum_vs_f16mf2_f16m1_tum // CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.mask.nxv4f16.nxv2f16.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.mask.nxv4f16.nxv2f16.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat16m1_t test_vfredosum_vs_f16mf2_f16m1_tum(vbool32_t mask, vfloat16m1_t maskedoff, vfloat16mf2_t vector, vfloat16m1_t scalar, size_t vl) { @@ -180,7 +180,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfredosum_vs_f16m1_f16m1_tum // CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.mask.nxv4f16.nxv4f16.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.mask.nxv4f16.nxv4f16.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat16m1_t test_vfredosum_vs_f16m1_f16m1_tum(vbool16_t mask, vfloat16m1_t maskedoff, vfloat16m1_t vector, vfloat16m1_t scalar, size_t vl) { @@ -190,7 +190,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfredosum_vs_f16m2_f16m1_tum // CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.mask.nxv4f16.nxv8f16.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.mask.nxv4f16.nxv8f16.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat16m1_t test_vfredosum_vs_f16m2_f16m1_tum(vbool8_t mask, vfloat16m1_t maskedoff, vfloat16m2_t vector, vfloat16m1_t scalar, size_t vl) { @@ -200,7 +200,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfredosum_vs_f16m4_f16m1_tum // CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.mask.nxv4f16.nxv16f16.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.mask.nxv4f16.nxv16f16.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat16m1_t test_vfredosum_vs_f16m4_f16m1_tum(vbool4_t mask, vfloat16m1_t maskedoff, vfloat16m4_t vector, vfloat16m1_t scalar, size_t vl) { @@ -210,7 +210,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfredosum_vs_f16m8_f16m1_tum // CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.mask.nxv4f16.nxv32f16.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.mask.nxv4f16.nxv32f16.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat16m1_t test_vfredosum_vs_f16m8_f16m1_tum(vbool2_t mask, vfloat16m1_t maskedoff, vfloat16m8_t vector, vfloat16m1_t scalar, size_t vl) { @@ -220,7 +220,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfredosum_vs_f32mf2_f32m1_tum // CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.mask.nxv2f32.nxv1f32.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.mask.nxv2f32.nxv1f32.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat32m1_t test_vfredosum_vs_f32mf2_f32m1_tum(vbool64_t mask, vfloat32m1_t maskedoff, vfloat32mf2_t vector, vfloat32m1_t scalar, size_t vl) { @@ -230,7 +230,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfredosum_vs_f32m1_f32m1_tum // CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.mask.nxv2f32.nxv2f32.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.mask.nxv2f32.nxv2f32.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat32m1_t test_vfredosum_vs_f32m1_f32m1_tum(vbool32_t mask, vfloat32m1_t maskedoff, vfloat32m1_t vector, vfloat32m1_t scalar, size_t vl) { @@ -240,7 +240,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfredosum_vs_f32m2_f32m1_tum // CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.mask.nxv2f32.nxv4f32.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.mask.nxv2f32.nxv4f32.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat32m1_t test_vfredosum_vs_f32m2_f32m1_tum(vbool16_t mask, vfloat32m1_t maskedoff, vfloat32m2_t vector, vfloat32m1_t scalar, size_t vl) { @@ -250,7 +250,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfredosum_vs_f32m4_f32m1_tum // CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.mask.nxv2f32.nxv8f32.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.mask.nxv2f32.nxv8f32.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat32m1_t test_vfredosum_vs_f32m4_f32m1_tum(vbool8_t mask, vfloat32m1_t maskedoff, vfloat32m4_t vector, vfloat32m1_t scalar, size_t vl) { @@ -260,7 +260,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfredosum_vs_f32m8_f32m1_tum // CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.mask.nxv2f32.nxv16f32.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.mask.nxv2f32.nxv16f32.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat32m1_t test_vfredosum_vs_f32m8_f32m1_tum(vbool4_t mask, vfloat32m1_t maskedoff, vfloat32m8_t vector, vfloat32m1_t scalar, size_t vl) { @@ -270,7 +270,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfredosum_vs_f64m1_f64m1_tum // CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.mask.nxv1f64.nxv1f64.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.mask.nxv1f64.nxv1f64.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat64m1_t test_vfredosum_vs_f64m1_f64m1_tum(vbool64_t mask, vfloat64m1_t maskedoff, vfloat64m1_t vector, vfloat64m1_t scalar, size_t vl) { @@ -280,7 +280,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfredosum_vs_f64m2_f64m1_tum // CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.mask.nxv1f64.nxv2f64.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.mask.nxv1f64.nxv2f64.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat64m1_t test_vfredosum_vs_f64m2_f64m1_tum(vbool32_t mask, vfloat64m1_t maskedoff, vfloat64m2_t vector, vfloat64m1_t scalar, size_t vl) { @@ -290,7 +290,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfredosum_vs_f64m4_f64m1_tum // CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.mask.nxv1f64.nxv4f64.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.mask.nxv1f64.nxv4f64.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat64m1_t test_vfredosum_vs_f64m4_f64m1_tum(vbool16_t mask, vfloat64m1_t maskedoff, vfloat64m4_t vector, vfloat64m1_t scalar, size_t vl) { @@ -300,10 +300,310 @@ // CHECK-RV64-LABEL: define dso_local @test_vfredosum_vs_f64m8_f64m1_tum // CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.mask.nxv1f64.nxv8f64.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.mask.nxv1f64.nxv8f64.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat64m1_t test_vfredosum_vs_f64m8_f64m1_tum(vbool8_t mask, vfloat64m1_t maskedoff, vfloat64m8_t vector, vfloat64m1_t scalar, size_t vl) { return __riscv_vfredosum_tum(mask, maskedoff, vector, scalar, vl); } +// CHECK-RV64-LABEL: define dso_local @test_vfredosum_vs_f16mf4_f16m1_rm_tu +// CHECK-RV64-SAME: ( [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.nxv4f16.nxv1f16.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat16m1_t test_vfredosum_vs_f16mf4_f16m1_rm_tu(vfloat16m1_t maskedoff, vfloat16mf4_t vector, vfloat16m1_t scalar, size_t vl) { + return __riscv_vfredosum_tu(maskedoff, vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfredosum_vs_f16mf2_f16m1_rm_tu +// CHECK-RV64-SAME: ( [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.nxv4f16.nxv2f16.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat16m1_t test_vfredosum_vs_f16mf2_f16m1_rm_tu(vfloat16m1_t maskedoff, vfloat16mf2_t vector, vfloat16m1_t scalar, size_t vl) { + return __riscv_vfredosum_tu(maskedoff, vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfredosum_vs_f16m1_f16m1_rm_tu +// CHECK-RV64-SAME: ( [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.nxv4f16.nxv4f16.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat16m1_t test_vfredosum_vs_f16m1_f16m1_rm_tu(vfloat16m1_t maskedoff, vfloat16m1_t vector, vfloat16m1_t scalar, size_t vl) { + return __riscv_vfredosum_tu(maskedoff, vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfredosum_vs_f16m2_f16m1_rm_tu +// CHECK-RV64-SAME: ( [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.nxv4f16.nxv8f16.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat16m1_t test_vfredosum_vs_f16m2_f16m1_rm_tu(vfloat16m1_t maskedoff, vfloat16m2_t vector, vfloat16m1_t scalar, size_t vl) { + return __riscv_vfredosum_tu(maskedoff, vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfredosum_vs_f16m4_f16m1_rm_tu +// CHECK-RV64-SAME: ( [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.nxv4f16.nxv16f16.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat16m1_t test_vfredosum_vs_f16m4_f16m1_rm_tu(vfloat16m1_t maskedoff, vfloat16m4_t vector, vfloat16m1_t scalar, size_t vl) { + return __riscv_vfredosum_tu(maskedoff, vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfredosum_vs_f16m8_f16m1_rm_tu +// CHECK-RV64-SAME: ( [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.nxv4f16.nxv32f16.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat16m1_t test_vfredosum_vs_f16m8_f16m1_rm_tu(vfloat16m1_t maskedoff, vfloat16m8_t vector, vfloat16m1_t scalar, size_t vl) { + return __riscv_vfredosum_tu(maskedoff, vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfredosum_vs_f32mf2_f32m1_rm_tu +// CHECK-RV64-SAME: ( [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.nxv2f32.nxv1f32.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat32m1_t test_vfredosum_vs_f32mf2_f32m1_rm_tu(vfloat32m1_t maskedoff, vfloat32mf2_t vector, vfloat32m1_t scalar, size_t vl) { + return __riscv_vfredosum_tu(maskedoff, vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfredosum_vs_f32m1_f32m1_rm_tu +// CHECK-RV64-SAME: ( [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.nxv2f32.nxv2f32.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat32m1_t test_vfredosum_vs_f32m1_f32m1_rm_tu(vfloat32m1_t maskedoff, vfloat32m1_t vector, vfloat32m1_t scalar, size_t vl) { + return __riscv_vfredosum_tu(maskedoff, vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfredosum_vs_f32m2_f32m1_rm_tu +// CHECK-RV64-SAME: ( [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.nxv2f32.nxv4f32.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat32m1_t test_vfredosum_vs_f32m2_f32m1_rm_tu(vfloat32m1_t maskedoff, vfloat32m2_t vector, vfloat32m1_t scalar, size_t vl) { + return __riscv_vfredosum_tu(maskedoff, vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfredosum_vs_f32m4_f32m1_rm_tu +// CHECK-RV64-SAME: ( [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.nxv2f32.nxv8f32.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat32m1_t test_vfredosum_vs_f32m4_f32m1_rm_tu(vfloat32m1_t maskedoff, vfloat32m4_t vector, vfloat32m1_t scalar, size_t vl) { + return __riscv_vfredosum_tu(maskedoff, vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfredosum_vs_f32m8_f32m1_rm_tu +// CHECK-RV64-SAME: ( [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.nxv2f32.nxv16f32.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat32m1_t test_vfredosum_vs_f32m8_f32m1_rm_tu(vfloat32m1_t maskedoff, vfloat32m8_t vector, vfloat32m1_t scalar, size_t vl) { + return __riscv_vfredosum_tu(maskedoff, vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfredosum_vs_f64m1_f64m1_rm_tu +// CHECK-RV64-SAME: ( [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.nxv1f64.nxv1f64.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat64m1_t test_vfredosum_vs_f64m1_f64m1_rm_tu(vfloat64m1_t maskedoff, vfloat64m1_t vector, vfloat64m1_t scalar, size_t vl) { + return __riscv_vfredosum_tu(maskedoff, vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfredosum_vs_f64m2_f64m1_rm_tu +// CHECK-RV64-SAME: ( [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.nxv1f64.nxv2f64.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat64m1_t test_vfredosum_vs_f64m2_f64m1_rm_tu(vfloat64m1_t maskedoff, vfloat64m2_t vector, vfloat64m1_t scalar, size_t vl) { + return __riscv_vfredosum_tu(maskedoff, vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfredosum_vs_f64m4_f64m1_rm_tu +// CHECK-RV64-SAME: ( [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.nxv1f64.nxv4f64.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat64m1_t test_vfredosum_vs_f64m4_f64m1_rm_tu(vfloat64m1_t maskedoff, vfloat64m4_t vector, vfloat64m1_t scalar, size_t vl) { + return __riscv_vfredosum_tu(maskedoff, vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfredosum_vs_f64m8_f64m1_rm_tu +// CHECK-RV64-SAME: ( [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.nxv1f64.nxv8f64.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat64m1_t test_vfredosum_vs_f64m8_f64m1_rm_tu(vfloat64m1_t maskedoff, vfloat64m8_t vector, vfloat64m1_t scalar, size_t vl) { + return __riscv_vfredosum_tu(maskedoff, vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfredosum_vs_f16mf4_f16m1_rm_tum +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.mask.nxv4f16.nxv1f16.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat16m1_t test_vfredosum_vs_f16mf4_f16m1_rm_tum(vbool64_t mask, vfloat16m1_t maskedoff, vfloat16mf4_t vector, vfloat16m1_t scalar, size_t vl) { + return __riscv_vfredosum_tum(mask, maskedoff, vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfredosum_vs_f16mf2_f16m1_rm_tum +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.mask.nxv4f16.nxv2f16.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat16m1_t test_vfredosum_vs_f16mf2_f16m1_rm_tum(vbool32_t mask, vfloat16m1_t maskedoff, vfloat16mf2_t vector, vfloat16m1_t scalar, size_t vl) { + return __riscv_vfredosum_tum(mask, maskedoff, vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfredosum_vs_f16m1_f16m1_rm_tum +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.mask.nxv4f16.nxv4f16.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat16m1_t test_vfredosum_vs_f16m1_f16m1_rm_tum(vbool16_t mask, vfloat16m1_t maskedoff, vfloat16m1_t vector, vfloat16m1_t scalar, size_t vl) { + return __riscv_vfredosum_tum(mask, maskedoff, vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfredosum_vs_f16m2_f16m1_rm_tum +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.mask.nxv4f16.nxv8f16.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat16m1_t test_vfredosum_vs_f16m2_f16m1_rm_tum(vbool8_t mask, vfloat16m1_t maskedoff, vfloat16m2_t vector, vfloat16m1_t scalar, size_t vl) { + return __riscv_vfredosum_tum(mask, maskedoff, vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfredosum_vs_f16m4_f16m1_rm_tum +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.mask.nxv4f16.nxv16f16.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat16m1_t test_vfredosum_vs_f16m4_f16m1_rm_tum(vbool4_t mask, vfloat16m1_t maskedoff, vfloat16m4_t vector, vfloat16m1_t scalar, size_t vl) { + return __riscv_vfredosum_tum(mask, maskedoff, vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfredosum_vs_f16m8_f16m1_rm_tum +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.mask.nxv4f16.nxv32f16.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat16m1_t test_vfredosum_vs_f16m8_f16m1_rm_tum(vbool2_t mask, vfloat16m1_t maskedoff, vfloat16m8_t vector, vfloat16m1_t scalar, size_t vl) { + return __riscv_vfredosum_tum(mask, maskedoff, vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfredosum_vs_f32mf2_f32m1_rm_tum +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.mask.nxv2f32.nxv1f32.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat32m1_t test_vfredosum_vs_f32mf2_f32m1_rm_tum(vbool64_t mask, vfloat32m1_t maskedoff, vfloat32mf2_t vector, vfloat32m1_t scalar, size_t vl) { + return __riscv_vfredosum_tum(mask, maskedoff, vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfredosum_vs_f32m1_f32m1_rm_tum +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.mask.nxv2f32.nxv2f32.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat32m1_t test_vfredosum_vs_f32m1_f32m1_rm_tum(vbool32_t mask, vfloat32m1_t maskedoff, vfloat32m1_t vector, vfloat32m1_t scalar, size_t vl) { + return __riscv_vfredosum_tum(mask, maskedoff, vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfredosum_vs_f32m2_f32m1_rm_tum +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.mask.nxv2f32.nxv4f32.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat32m1_t test_vfredosum_vs_f32m2_f32m1_rm_tum(vbool16_t mask, vfloat32m1_t maskedoff, vfloat32m2_t vector, vfloat32m1_t scalar, size_t vl) { + return __riscv_vfredosum_tum(mask, maskedoff, vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfredosum_vs_f32m4_f32m1_rm_tum +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.mask.nxv2f32.nxv8f32.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat32m1_t test_vfredosum_vs_f32m4_f32m1_rm_tum(vbool8_t mask, vfloat32m1_t maskedoff, vfloat32m4_t vector, vfloat32m1_t scalar, size_t vl) { + return __riscv_vfredosum_tum(mask, maskedoff, vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfredosum_vs_f32m8_f32m1_rm_tum +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.mask.nxv2f32.nxv16f32.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat32m1_t test_vfredosum_vs_f32m8_f32m1_rm_tum(vbool4_t mask, vfloat32m1_t maskedoff, vfloat32m8_t vector, vfloat32m1_t scalar, size_t vl) { + return __riscv_vfredosum_tum(mask, maskedoff, vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfredosum_vs_f64m1_f64m1_rm_tum +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.mask.nxv1f64.nxv1f64.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat64m1_t test_vfredosum_vs_f64m1_f64m1_rm_tum(vbool64_t mask, vfloat64m1_t maskedoff, vfloat64m1_t vector, vfloat64m1_t scalar, size_t vl) { + return __riscv_vfredosum_tum(mask, maskedoff, vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfredosum_vs_f64m2_f64m1_rm_tum +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.mask.nxv1f64.nxv2f64.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat64m1_t test_vfredosum_vs_f64m2_f64m1_rm_tum(vbool32_t mask, vfloat64m1_t maskedoff, vfloat64m2_t vector, vfloat64m1_t scalar, size_t vl) { + return __riscv_vfredosum_tum(mask, maskedoff, vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfredosum_vs_f64m4_f64m1_rm_tum +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.mask.nxv1f64.nxv4f64.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat64m1_t test_vfredosum_vs_f64m4_f64m1_rm_tum(vbool16_t mask, vfloat64m1_t maskedoff, vfloat64m4_t vector, vfloat64m1_t scalar, size_t vl) { + return __riscv_vfredosum_tum(mask, maskedoff, vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfredosum_vs_f64m8_f64m1_rm_tum +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredosum.mask.nxv1f64.nxv8f64.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat64m1_t test_vfredosum_vs_f64m8_f64m1_rm_tum(vbool8_t mask, vfloat64m1_t maskedoff, vfloat64m8_t vector, vfloat64m1_t scalar, size_t vl) { + return __riscv_vfredosum_tum(mask, maskedoff, vector, scalar, __RISCV_FRM_RNE, vl); +} + diff --git a/clang/test/CodeGen/RISCV/rvv-intrinsics-autogenerated/policy/overloaded/vfredusum.c b/clang/test/CodeGen/RISCV/rvv-intrinsics-autogenerated/policy/overloaded/vfredusum.c --- a/clang/test/CodeGen/RISCV/rvv-intrinsics-autogenerated/policy/overloaded/vfredusum.c +++ b/clang/test/CodeGen/RISCV/rvv-intrinsics-autogenerated/policy/overloaded/vfredusum.c @@ -10,7 +10,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfredusum_vs_f16mf4_f16m1_tu // CHECK-RV64-SAME: ( [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0:[0-9]+]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.nxv4f16.nxv1f16.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.nxv4f16.nxv1f16.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat16m1_t test_vfredusum_vs_f16mf4_f16m1_tu(vfloat16m1_t maskedoff, vfloat16mf4_t vector, vfloat16m1_t scalar, size_t vl) { @@ -20,7 +20,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfredusum_vs_f16mf2_f16m1_tu // CHECK-RV64-SAME: ( [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.nxv4f16.nxv2f16.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.nxv4f16.nxv2f16.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat16m1_t test_vfredusum_vs_f16mf2_f16m1_tu(vfloat16m1_t maskedoff, vfloat16mf2_t vector, vfloat16m1_t scalar, size_t vl) { @@ -30,7 +30,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfredusum_vs_f16m1_f16m1_tu // CHECK-RV64-SAME: ( [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.nxv4f16.nxv4f16.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.nxv4f16.nxv4f16.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat16m1_t test_vfredusum_vs_f16m1_f16m1_tu(vfloat16m1_t maskedoff, vfloat16m1_t vector, vfloat16m1_t scalar, size_t vl) { @@ -40,7 +40,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfredusum_vs_f16m2_f16m1_tu // CHECK-RV64-SAME: ( [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.nxv4f16.nxv8f16.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.nxv4f16.nxv8f16.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat16m1_t test_vfredusum_vs_f16m2_f16m1_tu(vfloat16m1_t maskedoff, vfloat16m2_t vector, vfloat16m1_t scalar, size_t vl) { @@ -50,7 +50,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfredusum_vs_f16m4_f16m1_tu // CHECK-RV64-SAME: ( [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.nxv4f16.nxv16f16.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.nxv4f16.nxv16f16.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat16m1_t test_vfredusum_vs_f16m4_f16m1_tu(vfloat16m1_t maskedoff, vfloat16m4_t vector, vfloat16m1_t scalar, size_t vl) { @@ -60,7 +60,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfredusum_vs_f16m8_f16m1_tu // CHECK-RV64-SAME: ( [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.nxv4f16.nxv32f16.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.nxv4f16.nxv32f16.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat16m1_t test_vfredusum_vs_f16m8_f16m1_tu(vfloat16m1_t maskedoff, vfloat16m8_t vector, vfloat16m1_t scalar, size_t vl) { @@ -70,7 +70,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfredusum_vs_f32mf2_f32m1_tu // CHECK-RV64-SAME: ( [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.nxv2f32.nxv1f32.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.nxv2f32.nxv1f32.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat32m1_t test_vfredusum_vs_f32mf2_f32m1_tu(vfloat32m1_t maskedoff, vfloat32mf2_t vector, vfloat32m1_t scalar, size_t vl) { @@ -80,7 +80,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfredusum_vs_f32m1_f32m1_tu // CHECK-RV64-SAME: ( [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.nxv2f32.nxv2f32.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.nxv2f32.nxv2f32.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat32m1_t test_vfredusum_vs_f32m1_f32m1_tu(vfloat32m1_t maskedoff, vfloat32m1_t vector, vfloat32m1_t scalar, size_t vl) { @@ -90,7 +90,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfredusum_vs_f32m2_f32m1_tu // CHECK-RV64-SAME: ( [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.nxv2f32.nxv4f32.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.nxv2f32.nxv4f32.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat32m1_t test_vfredusum_vs_f32m2_f32m1_tu(vfloat32m1_t maskedoff, vfloat32m2_t vector, vfloat32m1_t scalar, size_t vl) { @@ -100,7 +100,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfredusum_vs_f32m4_f32m1_tu // CHECK-RV64-SAME: ( [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.nxv2f32.nxv8f32.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.nxv2f32.nxv8f32.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat32m1_t test_vfredusum_vs_f32m4_f32m1_tu(vfloat32m1_t maskedoff, vfloat32m4_t vector, vfloat32m1_t scalar, size_t vl) { @@ -110,7 +110,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfredusum_vs_f32m8_f32m1_tu // CHECK-RV64-SAME: ( [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.nxv2f32.nxv16f32.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.nxv2f32.nxv16f32.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat32m1_t test_vfredusum_vs_f32m8_f32m1_tu(vfloat32m1_t maskedoff, vfloat32m8_t vector, vfloat32m1_t scalar, size_t vl) { @@ -120,7 +120,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfredusum_vs_f64m1_f64m1_tu // CHECK-RV64-SAME: ( [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.nxv1f64.nxv1f64.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.nxv1f64.nxv1f64.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat64m1_t test_vfredusum_vs_f64m1_f64m1_tu(vfloat64m1_t maskedoff, vfloat64m1_t vector, vfloat64m1_t scalar, size_t vl) { @@ -130,7 +130,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfredusum_vs_f64m2_f64m1_tu // CHECK-RV64-SAME: ( [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.nxv1f64.nxv2f64.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.nxv1f64.nxv2f64.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat64m1_t test_vfredusum_vs_f64m2_f64m1_tu(vfloat64m1_t maskedoff, vfloat64m2_t vector, vfloat64m1_t scalar, size_t vl) { @@ -140,7 +140,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfredusum_vs_f64m4_f64m1_tu // CHECK-RV64-SAME: ( [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.nxv1f64.nxv4f64.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.nxv1f64.nxv4f64.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat64m1_t test_vfredusum_vs_f64m4_f64m1_tu(vfloat64m1_t maskedoff, vfloat64m4_t vector, vfloat64m1_t scalar, size_t vl) { @@ -150,7 +150,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfredusum_vs_f64m8_f64m1_tu // CHECK-RV64-SAME: ( [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.nxv1f64.nxv8f64.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.nxv1f64.nxv8f64.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat64m1_t test_vfredusum_vs_f64m8_f64m1_tu(vfloat64m1_t maskedoff, vfloat64m8_t vector, vfloat64m1_t scalar, size_t vl) { @@ -160,7 +160,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfredusum_vs_f16mf4_f16m1_tum // CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.mask.nxv4f16.nxv1f16.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.mask.nxv4f16.nxv1f16.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat16m1_t test_vfredusum_vs_f16mf4_f16m1_tum(vbool64_t mask, vfloat16m1_t maskedoff, vfloat16mf4_t vector, vfloat16m1_t scalar, size_t vl) { @@ -170,7 +170,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfredusum_vs_f16mf2_f16m1_tum // CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.mask.nxv4f16.nxv2f16.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.mask.nxv4f16.nxv2f16.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat16m1_t test_vfredusum_vs_f16mf2_f16m1_tum(vbool32_t mask, vfloat16m1_t maskedoff, vfloat16mf2_t vector, vfloat16m1_t scalar, size_t vl) { @@ -180,7 +180,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfredusum_vs_f16m1_f16m1_tum // CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.mask.nxv4f16.nxv4f16.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.mask.nxv4f16.nxv4f16.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat16m1_t test_vfredusum_vs_f16m1_f16m1_tum(vbool16_t mask, vfloat16m1_t maskedoff, vfloat16m1_t vector, vfloat16m1_t scalar, size_t vl) { @@ -190,7 +190,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfredusum_vs_f16m2_f16m1_tum // CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.mask.nxv4f16.nxv8f16.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.mask.nxv4f16.nxv8f16.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat16m1_t test_vfredusum_vs_f16m2_f16m1_tum(vbool8_t mask, vfloat16m1_t maskedoff, vfloat16m2_t vector, vfloat16m1_t scalar, size_t vl) { @@ -200,7 +200,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfredusum_vs_f16m4_f16m1_tum // CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.mask.nxv4f16.nxv16f16.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.mask.nxv4f16.nxv16f16.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat16m1_t test_vfredusum_vs_f16m4_f16m1_tum(vbool4_t mask, vfloat16m1_t maskedoff, vfloat16m4_t vector, vfloat16m1_t scalar, size_t vl) { @@ -210,7 +210,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfredusum_vs_f16m8_f16m1_tum // CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.mask.nxv4f16.nxv32f16.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.mask.nxv4f16.nxv32f16.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat16m1_t test_vfredusum_vs_f16m8_f16m1_tum(vbool2_t mask, vfloat16m1_t maskedoff, vfloat16m8_t vector, vfloat16m1_t scalar, size_t vl) { @@ -220,7 +220,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfredusum_vs_f32mf2_f32m1_tum // CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.mask.nxv2f32.nxv1f32.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.mask.nxv2f32.nxv1f32.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat32m1_t test_vfredusum_vs_f32mf2_f32m1_tum(vbool64_t mask, vfloat32m1_t maskedoff, vfloat32mf2_t vector, vfloat32m1_t scalar, size_t vl) { @@ -230,7 +230,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfredusum_vs_f32m1_f32m1_tum // CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.mask.nxv2f32.nxv2f32.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.mask.nxv2f32.nxv2f32.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat32m1_t test_vfredusum_vs_f32m1_f32m1_tum(vbool32_t mask, vfloat32m1_t maskedoff, vfloat32m1_t vector, vfloat32m1_t scalar, size_t vl) { @@ -240,7 +240,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfredusum_vs_f32m2_f32m1_tum // CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.mask.nxv2f32.nxv4f32.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.mask.nxv2f32.nxv4f32.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat32m1_t test_vfredusum_vs_f32m2_f32m1_tum(vbool16_t mask, vfloat32m1_t maskedoff, vfloat32m2_t vector, vfloat32m1_t scalar, size_t vl) { @@ -250,7 +250,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfredusum_vs_f32m4_f32m1_tum // CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.mask.nxv2f32.nxv8f32.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.mask.nxv2f32.nxv8f32.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat32m1_t test_vfredusum_vs_f32m4_f32m1_tum(vbool8_t mask, vfloat32m1_t maskedoff, vfloat32m4_t vector, vfloat32m1_t scalar, size_t vl) { @@ -260,7 +260,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfredusum_vs_f32m8_f32m1_tum // CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.mask.nxv2f32.nxv16f32.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.mask.nxv2f32.nxv16f32.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat32m1_t test_vfredusum_vs_f32m8_f32m1_tum(vbool4_t mask, vfloat32m1_t maskedoff, vfloat32m8_t vector, vfloat32m1_t scalar, size_t vl) { @@ -270,7 +270,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfredusum_vs_f64m1_f64m1_tum // CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.mask.nxv1f64.nxv1f64.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.mask.nxv1f64.nxv1f64.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat64m1_t test_vfredusum_vs_f64m1_f64m1_tum(vbool64_t mask, vfloat64m1_t maskedoff, vfloat64m1_t vector, vfloat64m1_t scalar, size_t vl) { @@ -280,7 +280,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfredusum_vs_f64m2_f64m1_tum // CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.mask.nxv1f64.nxv2f64.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.mask.nxv1f64.nxv2f64.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat64m1_t test_vfredusum_vs_f64m2_f64m1_tum(vbool32_t mask, vfloat64m1_t maskedoff, vfloat64m2_t vector, vfloat64m1_t scalar, size_t vl) { @@ -290,7 +290,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfredusum_vs_f64m4_f64m1_tum // CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.mask.nxv1f64.nxv4f64.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.mask.nxv1f64.nxv4f64.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat64m1_t test_vfredusum_vs_f64m4_f64m1_tum(vbool16_t mask, vfloat64m1_t maskedoff, vfloat64m4_t vector, vfloat64m1_t scalar, size_t vl) { @@ -300,10 +300,310 @@ // CHECK-RV64-LABEL: define dso_local @test_vfredusum_vs_f64m8_f64m1_tum // CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.mask.nxv1f64.nxv8f64.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.mask.nxv1f64.nxv8f64.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat64m1_t test_vfredusum_vs_f64m8_f64m1_tum(vbool8_t mask, vfloat64m1_t maskedoff, vfloat64m8_t vector, vfloat64m1_t scalar, size_t vl) { return __riscv_vfredusum_tum(mask, maskedoff, vector, scalar, vl); } +// CHECK-RV64-LABEL: define dso_local @test_vfredusum_vs_f16mf4_f16m1_rm_tu +// CHECK-RV64-SAME: ( [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.nxv4f16.nxv1f16.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat16m1_t test_vfredusum_vs_f16mf4_f16m1_rm_tu(vfloat16m1_t maskedoff, vfloat16mf4_t vector, vfloat16m1_t scalar, size_t vl) { + return __riscv_vfredusum_tu(maskedoff, vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfredusum_vs_f16mf2_f16m1_rm_tu +// CHECK-RV64-SAME: ( [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.nxv4f16.nxv2f16.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat16m1_t test_vfredusum_vs_f16mf2_f16m1_rm_tu(vfloat16m1_t maskedoff, vfloat16mf2_t vector, vfloat16m1_t scalar, size_t vl) { + return __riscv_vfredusum_tu(maskedoff, vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfredusum_vs_f16m1_f16m1_rm_tu +// CHECK-RV64-SAME: ( [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.nxv4f16.nxv4f16.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat16m1_t test_vfredusum_vs_f16m1_f16m1_rm_tu(vfloat16m1_t maskedoff, vfloat16m1_t vector, vfloat16m1_t scalar, size_t vl) { + return __riscv_vfredusum_tu(maskedoff, vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfredusum_vs_f16m2_f16m1_rm_tu +// CHECK-RV64-SAME: ( [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.nxv4f16.nxv8f16.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat16m1_t test_vfredusum_vs_f16m2_f16m1_rm_tu(vfloat16m1_t maskedoff, vfloat16m2_t vector, vfloat16m1_t scalar, size_t vl) { + return __riscv_vfredusum_tu(maskedoff, vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfredusum_vs_f16m4_f16m1_rm_tu +// CHECK-RV64-SAME: ( [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.nxv4f16.nxv16f16.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat16m1_t test_vfredusum_vs_f16m4_f16m1_rm_tu(vfloat16m1_t maskedoff, vfloat16m4_t vector, vfloat16m1_t scalar, size_t vl) { + return __riscv_vfredusum_tu(maskedoff, vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfredusum_vs_f16m8_f16m1_rm_tu +// CHECK-RV64-SAME: ( [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.nxv4f16.nxv32f16.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat16m1_t test_vfredusum_vs_f16m8_f16m1_rm_tu(vfloat16m1_t maskedoff, vfloat16m8_t vector, vfloat16m1_t scalar, size_t vl) { + return __riscv_vfredusum_tu(maskedoff, vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfredusum_vs_f32mf2_f32m1_rm_tu +// CHECK-RV64-SAME: ( [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.nxv2f32.nxv1f32.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat32m1_t test_vfredusum_vs_f32mf2_f32m1_rm_tu(vfloat32m1_t maskedoff, vfloat32mf2_t vector, vfloat32m1_t scalar, size_t vl) { + return __riscv_vfredusum_tu(maskedoff, vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfredusum_vs_f32m1_f32m1_rm_tu +// CHECK-RV64-SAME: ( [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.nxv2f32.nxv2f32.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat32m1_t test_vfredusum_vs_f32m1_f32m1_rm_tu(vfloat32m1_t maskedoff, vfloat32m1_t vector, vfloat32m1_t scalar, size_t vl) { + return __riscv_vfredusum_tu(maskedoff, vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfredusum_vs_f32m2_f32m1_rm_tu +// CHECK-RV64-SAME: ( [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.nxv2f32.nxv4f32.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat32m1_t test_vfredusum_vs_f32m2_f32m1_rm_tu(vfloat32m1_t maskedoff, vfloat32m2_t vector, vfloat32m1_t scalar, size_t vl) { + return __riscv_vfredusum_tu(maskedoff, vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfredusum_vs_f32m4_f32m1_rm_tu +// CHECK-RV64-SAME: ( [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.nxv2f32.nxv8f32.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat32m1_t test_vfredusum_vs_f32m4_f32m1_rm_tu(vfloat32m1_t maskedoff, vfloat32m4_t vector, vfloat32m1_t scalar, size_t vl) { + return __riscv_vfredusum_tu(maskedoff, vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfredusum_vs_f32m8_f32m1_rm_tu +// CHECK-RV64-SAME: ( [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.nxv2f32.nxv16f32.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat32m1_t test_vfredusum_vs_f32m8_f32m1_rm_tu(vfloat32m1_t maskedoff, vfloat32m8_t vector, vfloat32m1_t scalar, size_t vl) { + return __riscv_vfredusum_tu(maskedoff, vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfredusum_vs_f64m1_f64m1_rm_tu +// CHECK-RV64-SAME: ( [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.nxv1f64.nxv1f64.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat64m1_t test_vfredusum_vs_f64m1_f64m1_rm_tu(vfloat64m1_t maskedoff, vfloat64m1_t vector, vfloat64m1_t scalar, size_t vl) { + return __riscv_vfredusum_tu(maskedoff, vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfredusum_vs_f64m2_f64m1_rm_tu +// CHECK-RV64-SAME: ( [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.nxv1f64.nxv2f64.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat64m1_t test_vfredusum_vs_f64m2_f64m1_rm_tu(vfloat64m1_t maskedoff, vfloat64m2_t vector, vfloat64m1_t scalar, size_t vl) { + return __riscv_vfredusum_tu(maskedoff, vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfredusum_vs_f64m4_f64m1_rm_tu +// CHECK-RV64-SAME: ( [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.nxv1f64.nxv4f64.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat64m1_t test_vfredusum_vs_f64m4_f64m1_rm_tu(vfloat64m1_t maskedoff, vfloat64m4_t vector, vfloat64m1_t scalar, size_t vl) { + return __riscv_vfredusum_tu(maskedoff, vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfredusum_vs_f64m8_f64m1_rm_tu +// CHECK-RV64-SAME: ( [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.nxv1f64.nxv8f64.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat64m1_t test_vfredusum_vs_f64m8_f64m1_rm_tu(vfloat64m1_t maskedoff, vfloat64m8_t vector, vfloat64m1_t scalar, size_t vl) { + return __riscv_vfredusum_tu(maskedoff, vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfredusum_vs_f16mf4_f16m1_rm_tum +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.mask.nxv4f16.nxv1f16.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat16m1_t test_vfredusum_vs_f16mf4_f16m1_rm_tum(vbool64_t mask, vfloat16m1_t maskedoff, vfloat16mf4_t vector, vfloat16m1_t scalar, size_t vl) { + return __riscv_vfredusum_tum(mask, maskedoff, vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfredusum_vs_f16mf2_f16m1_rm_tum +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.mask.nxv4f16.nxv2f16.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat16m1_t test_vfredusum_vs_f16mf2_f16m1_rm_tum(vbool32_t mask, vfloat16m1_t maskedoff, vfloat16mf2_t vector, vfloat16m1_t scalar, size_t vl) { + return __riscv_vfredusum_tum(mask, maskedoff, vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfredusum_vs_f16m1_f16m1_rm_tum +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.mask.nxv4f16.nxv4f16.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat16m1_t test_vfredusum_vs_f16m1_f16m1_rm_tum(vbool16_t mask, vfloat16m1_t maskedoff, vfloat16m1_t vector, vfloat16m1_t scalar, size_t vl) { + return __riscv_vfredusum_tum(mask, maskedoff, vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfredusum_vs_f16m2_f16m1_rm_tum +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.mask.nxv4f16.nxv8f16.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat16m1_t test_vfredusum_vs_f16m2_f16m1_rm_tum(vbool8_t mask, vfloat16m1_t maskedoff, vfloat16m2_t vector, vfloat16m1_t scalar, size_t vl) { + return __riscv_vfredusum_tum(mask, maskedoff, vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfredusum_vs_f16m4_f16m1_rm_tum +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.mask.nxv4f16.nxv16f16.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat16m1_t test_vfredusum_vs_f16m4_f16m1_rm_tum(vbool4_t mask, vfloat16m1_t maskedoff, vfloat16m4_t vector, vfloat16m1_t scalar, size_t vl) { + return __riscv_vfredusum_tum(mask, maskedoff, vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfredusum_vs_f16m8_f16m1_rm_tum +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.mask.nxv4f16.nxv32f16.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat16m1_t test_vfredusum_vs_f16m8_f16m1_rm_tum(vbool2_t mask, vfloat16m1_t maskedoff, vfloat16m8_t vector, vfloat16m1_t scalar, size_t vl) { + return __riscv_vfredusum_tum(mask, maskedoff, vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfredusum_vs_f32mf2_f32m1_rm_tum +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.mask.nxv2f32.nxv1f32.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat32m1_t test_vfredusum_vs_f32mf2_f32m1_rm_tum(vbool64_t mask, vfloat32m1_t maskedoff, vfloat32mf2_t vector, vfloat32m1_t scalar, size_t vl) { + return __riscv_vfredusum_tum(mask, maskedoff, vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfredusum_vs_f32m1_f32m1_rm_tum +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.mask.nxv2f32.nxv2f32.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat32m1_t test_vfredusum_vs_f32m1_f32m1_rm_tum(vbool32_t mask, vfloat32m1_t maskedoff, vfloat32m1_t vector, vfloat32m1_t scalar, size_t vl) { + return __riscv_vfredusum_tum(mask, maskedoff, vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfredusum_vs_f32m2_f32m1_rm_tum +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.mask.nxv2f32.nxv4f32.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat32m1_t test_vfredusum_vs_f32m2_f32m1_rm_tum(vbool16_t mask, vfloat32m1_t maskedoff, vfloat32m2_t vector, vfloat32m1_t scalar, size_t vl) { + return __riscv_vfredusum_tum(mask, maskedoff, vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfredusum_vs_f32m4_f32m1_rm_tum +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.mask.nxv2f32.nxv8f32.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat32m1_t test_vfredusum_vs_f32m4_f32m1_rm_tum(vbool8_t mask, vfloat32m1_t maskedoff, vfloat32m4_t vector, vfloat32m1_t scalar, size_t vl) { + return __riscv_vfredusum_tum(mask, maskedoff, vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfredusum_vs_f32m8_f32m1_rm_tum +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.mask.nxv2f32.nxv16f32.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat32m1_t test_vfredusum_vs_f32m8_f32m1_rm_tum(vbool4_t mask, vfloat32m1_t maskedoff, vfloat32m8_t vector, vfloat32m1_t scalar, size_t vl) { + return __riscv_vfredusum_tum(mask, maskedoff, vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfredusum_vs_f64m1_f64m1_rm_tum +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.mask.nxv1f64.nxv1f64.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat64m1_t test_vfredusum_vs_f64m1_f64m1_rm_tum(vbool64_t mask, vfloat64m1_t maskedoff, vfloat64m1_t vector, vfloat64m1_t scalar, size_t vl) { + return __riscv_vfredusum_tum(mask, maskedoff, vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfredusum_vs_f64m2_f64m1_rm_tum +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.mask.nxv1f64.nxv2f64.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat64m1_t test_vfredusum_vs_f64m2_f64m1_rm_tum(vbool32_t mask, vfloat64m1_t maskedoff, vfloat64m2_t vector, vfloat64m1_t scalar, size_t vl) { + return __riscv_vfredusum_tum(mask, maskedoff, vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfredusum_vs_f64m4_f64m1_rm_tum +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.mask.nxv1f64.nxv4f64.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat64m1_t test_vfredusum_vs_f64m4_f64m1_rm_tum(vbool16_t mask, vfloat64m1_t maskedoff, vfloat64m4_t vector, vfloat64m1_t scalar, size_t vl) { + return __riscv_vfredusum_tum(mask, maskedoff, vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfredusum_vs_f64m8_f64m1_rm_tum +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfredusum.mask.nxv1f64.nxv8f64.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat64m1_t test_vfredusum_vs_f64m8_f64m1_rm_tum(vbool8_t mask, vfloat64m1_t maskedoff, vfloat64m8_t vector, vfloat64m1_t scalar, size_t vl) { + return __riscv_vfredusum_tum(mask, maskedoff, vector, scalar, __RISCV_FRM_RNE, vl); +} + diff --git a/clang/test/CodeGen/RISCV/rvv-intrinsics-autogenerated/policy/overloaded/vfwredosum.c b/clang/test/CodeGen/RISCV/rvv-intrinsics-autogenerated/policy/overloaded/vfwredosum.c --- a/clang/test/CodeGen/RISCV/rvv-intrinsics-autogenerated/policy/overloaded/vfwredosum.c +++ b/clang/test/CodeGen/RISCV/rvv-intrinsics-autogenerated/policy/overloaded/vfwredosum.c @@ -10,7 +10,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfwredosum_vs_f16mf4_f32m1_tu // CHECK-RV64-SAME: ( [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0:[0-9]+]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredosum.nxv2f32.nxv1f16.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredosum.nxv2f32.nxv1f16.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat32m1_t test_vfwredosum_vs_f16mf4_f32m1_tu(vfloat32m1_t maskedoff, vfloat16mf4_t vector, vfloat32m1_t scalar, size_t vl) { @@ -20,7 +20,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfwredosum_vs_f16mf2_f32m1_tu // CHECK-RV64-SAME: ( [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredosum.nxv2f32.nxv2f16.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredosum.nxv2f32.nxv2f16.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat32m1_t test_vfwredosum_vs_f16mf2_f32m1_tu(vfloat32m1_t maskedoff, vfloat16mf2_t vector, vfloat32m1_t scalar, size_t vl) { @@ -30,7 +30,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfwredosum_vs_f16m1_f32m1_tu // CHECK-RV64-SAME: ( [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredosum.nxv2f32.nxv4f16.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredosum.nxv2f32.nxv4f16.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat32m1_t test_vfwredosum_vs_f16m1_f32m1_tu(vfloat32m1_t maskedoff, vfloat16m1_t vector, vfloat32m1_t scalar, size_t vl) { @@ -40,7 +40,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfwredosum_vs_f16m2_f32m1_tu // CHECK-RV64-SAME: ( [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredosum.nxv2f32.nxv8f16.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredosum.nxv2f32.nxv8f16.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat32m1_t test_vfwredosum_vs_f16m2_f32m1_tu(vfloat32m1_t maskedoff, vfloat16m2_t vector, vfloat32m1_t scalar, size_t vl) { @@ -50,7 +50,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfwredosum_vs_f16m4_f32m1_tu // CHECK-RV64-SAME: ( [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredosum.nxv2f32.nxv16f16.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredosum.nxv2f32.nxv16f16.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat32m1_t test_vfwredosum_vs_f16m4_f32m1_tu(vfloat32m1_t maskedoff, vfloat16m4_t vector, vfloat32m1_t scalar, size_t vl) { @@ -60,7 +60,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfwredosum_vs_f16m8_f32m1_tu // CHECK-RV64-SAME: ( [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredosum.nxv2f32.nxv32f16.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredosum.nxv2f32.nxv32f16.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat32m1_t test_vfwredosum_vs_f16m8_f32m1_tu(vfloat32m1_t maskedoff, vfloat16m8_t vector, vfloat32m1_t scalar, size_t vl) { @@ -70,7 +70,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfwredosum_vs_f32mf2_f64m1_tu // CHECK-RV64-SAME: ( [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredosum.nxv1f64.nxv1f32.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredosum.nxv1f64.nxv1f32.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat64m1_t test_vfwredosum_vs_f32mf2_f64m1_tu(vfloat64m1_t maskedoff, vfloat32mf2_t vector, vfloat64m1_t scalar, size_t vl) { @@ -80,7 +80,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfwredosum_vs_f32m1_f64m1_tu // CHECK-RV64-SAME: ( [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredosum.nxv1f64.nxv2f32.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredosum.nxv1f64.nxv2f32.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat64m1_t test_vfwredosum_vs_f32m1_f64m1_tu(vfloat64m1_t maskedoff, vfloat32m1_t vector, vfloat64m1_t scalar, size_t vl) { @@ -90,7 +90,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfwredosum_vs_f32m2_f64m1_tu // CHECK-RV64-SAME: ( [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredosum.nxv1f64.nxv4f32.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredosum.nxv1f64.nxv4f32.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat64m1_t test_vfwredosum_vs_f32m2_f64m1_tu(vfloat64m1_t maskedoff, vfloat32m2_t vector, vfloat64m1_t scalar, size_t vl) { @@ -100,7 +100,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfwredosum_vs_f32m4_f64m1_tu // CHECK-RV64-SAME: ( [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredosum.nxv1f64.nxv8f32.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredosum.nxv1f64.nxv8f32.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat64m1_t test_vfwredosum_vs_f32m4_f64m1_tu(vfloat64m1_t maskedoff, vfloat32m4_t vector, vfloat64m1_t scalar, size_t vl) { @@ -110,7 +110,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfwredosum_vs_f32m8_f64m1_tu // CHECK-RV64-SAME: ( [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredosum.nxv1f64.nxv16f32.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredosum.nxv1f64.nxv16f32.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat64m1_t test_vfwredosum_vs_f32m8_f64m1_tu(vfloat64m1_t maskedoff, vfloat32m8_t vector, vfloat64m1_t scalar, size_t vl) { @@ -120,7 +120,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfwredosum_vs_f16mf4_f32m1_tum // CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredosum.mask.nxv2f32.nxv1f16.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredosum.mask.nxv2f32.nxv1f16.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat32m1_t test_vfwredosum_vs_f16mf4_f32m1_tum(vbool64_t mask, vfloat32m1_t maskedoff, vfloat16mf4_t vector, vfloat32m1_t scalar, size_t vl) { @@ -130,7 +130,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfwredosum_vs_f16mf2_f32m1_tum // CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredosum.mask.nxv2f32.nxv2f16.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredosum.mask.nxv2f32.nxv2f16.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat32m1_t test_vfwredosum_vs_f16mf2_f32m1_tum(vbool32_t mask, vfloat32m1_t maskedoff, vfloat16mf2_t vector, vfloat32m1_t scalar, size_t vl) { @@ -140,7 +140,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfwredosum_vs_f16m1_f32m1_tum // CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredosum.mask.nxv2f32.nxv4f16.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredosum.mask.nxv2f32.nxv4f16.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat32m1_t test_vfwredosum_vs_f16m1_f32m1_tum(vbool16_t mask, vfloat32m1_t maskedoff, vfloat16m1_t vector, vfloat32m1_t scalar, size_t vl) { @@ -150,7 +150,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfwredosum_vs_f16m2_f32m1_tum // CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredosum.mask.nxv2f32.nxv8f16.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredosum.mask.nxv2f32.nxv8f16.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat32m1_t test_vfwredosum_vs_f16m2_f32m1_tum(vbool8_t mask, vfloat32m1_t maskedoff, vfloat16m2_t vector, vfloat32m1_t scalar, size_t vl) { @@ -160,7 +160,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfwredosum_vs_f16m4_f32m1_tum // CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredosum.mask.nxv2f32.nxv16f16.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredosum.mask.nxv2f32.nxv16f16.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat32m1_t test_vfwredosum_vs_f16m4_f32m1_tum(vbool4_t mask, vfloat32m1_t maskedoff, vfloat16m4_t vector, vfloat32m1_t scalar, size_t vl) { @@ -170,7 +170,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfwredosum_vs_f16m8_f32m1_tum // CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredosum.mask.nxv2f32.nxv32f16.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredosum.mask.nxv2f32.nxv32f16.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat32m1_t test_vfwredosum_vs_f16m8_f32m1_tum(vbool2_t mask, vfloat32m1_t maskedoff, vfloat16m8_t vector, vfloat32m1_t scalar, size_t vl) { @@ -180,7 +180,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfwredosum_vs_f32mf2_f64m1_tum // CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredosum.mask.nxv1f64.nxv1f32.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredosum.mask.nxv1f64.nxv1f32.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat64m1_t test_vfwredosum_vs_f32mf2_f64m1_tum(vbool64_t mask, vfloat64m1_t maskedoff, vfloat32mf2_t vector, vfloat64m1_t scalar, size_t vl) { @@ -190,7 +190,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfwredosum_vs_f32m1_f64m1_tum // CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredosum.mask.nxv1f64.nxv2f32.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredosum.mask.nxv1f64.nxv2f32.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat64m1_t test_vfwredosum_vs_f32m1_f64m1_tum(vbool32_t mask, vfloat64m1_t maskedoff, vfloat32m1_t vector, vfloat64m1_t scalar, size_t vl) { @@ -200,7 +200,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfwredosum_vs_f32m2_f64m1_tum // CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredosum.mask.nxv1f64.nxv4f32.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredosum.mask.nxv1f64.nxv4f32.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat64m1_t test_vfwredosum_vs_f32m2_f64m1_tum(vbool16_t mask, vfloat64m1_t maskedoff, vfloat32m2_t vector, vfloat64m1_t scalar, size_t vl) { @@ -210,7 +210,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfwredosum_vs_f32m4_f64m1_tum // CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredosum.mask.nxv1f64.nxv8f32.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredosum.mask.nxv1f64.nxv8f32.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat64m1_t test_vfwredosum_vs_f32m4_f64m1_tum(vbool8_t mask, vfloat64m1_t maskedoff, vfloat32m4_t vector, vfloat64m1_t scalar, size_t vl) { @@ -220,10 +220,230 @@ // CHECK-RV64-LABEL: define dso_local @test_vfwredosum_vs_f32m8_f64m1_tum // CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredosum.mask.nxv1f64.nxv16f32.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredosum.mask.nxv1f64.nxv16f32.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat64m1_t test_vfwredosum_vs_f32m8_f64m1_tum(vbool4_t mask, vfloat64m1_t maskedoff, vfloat32m8_t vector, vfloat64m1_t scalar, size_t vl) { return __riscv_vfwredosum_tum(mask, maskedoff, vector, scalar, vl); } +// CHECK-RV64-LABEL: define dso_local @test_vfwredosum_vs_f16mf4_f32m1_rm_tu +// CHECK-RV64-SAME: ( [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredosum.nxv2f32.nxv1f16.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat32m1_t test_vfwredosum_vs_f16mf4_f32m1_rm_tu(vfloat32m1_t maskedoff, vfloat16mf4_t vector, vfloat32m1_t scalar, size_t vl) { + return __riscv_vfwredosum_tu(maskedoff, vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfwredosum_vs_f16mf2_f32m1_rm_tu +// CHECK-RV64-SAME: ( [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredosum.nxv2f32.nxv2f16.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat32m1_t test_vfwredosum_vs_f16mf2_f32m1_rm_tu(vfloat32m1_t maskedoff, vfloat16mf2_t vector, vfloat32m1_t scalar, size_t vl) { + return __riscv_vfwredosum_tu(maskedoff, vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfwredosum_vs_f16m1_f32m1_rm_tu +// CHECK-RV64-SAME: ( [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredosum.nxv2f32.nxv4f16.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat32m1_t test_vfwredosum_vs_f16m1_f32m1_rm_tu(vfloat32m1_t maskedoff, vfloat16m1_t vector, vfloat32m1_t scalar, size_t vl) { + return __riscv_vfwredosum_tu(maskedoff, vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfwredosum_vs_f16m2_f32m1_rm_tu +// CHECK-RV64-SAME: ( [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredosum.nxv2f32.nxv8f16.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat32m1_t test_vfwredosum_vs_f16m2_f32m1_rm_tu(vfloat32m1_t maskedoff, vfloat16m2_t vector, vfloat32m1_t scalar, size_t vl) { + return __riscv_vfwredosum_tu(maskedoff, vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfwredosum_vs_f16m4_f32m1_rm_tu +// CHECK-RV64-SAME: ( [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredosum.nxv2f32.nxv16f16.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat32m1_t test_vfwredosum_vs_f16m4_f32m1_rm_tu(vfloat32m1_t maskedoff, vfloat16m4_t vector, vfloat32m1_t scalar, size_t vl) { + return __riscv_vfwredosum_tu(maskedoff, vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfwredosum_vs_f16m8_f32m1_rm_tu +// CHECK-RV64-SAME: ( [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredosum.nxv2f32.nxv32f16.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat32m1_t test_vfwredosum_vs_f16m8_f32m1_rm_tu(vfloat32m1_t maskedoff, vfloat16m8_t vector, vfloat32m1_t scalar, size_t vl) { + return __riscv_vfwredosum_tu(maskedoff, vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfwredosum_vs_f32mf2_f64m1_rm_tu +// CHECK-RV64-SAME: ( [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredosum.nxv1f64.nxv1f32.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat64m1_t test_vfwredosum_vs_f32mf2_f64m1_rm_tu(vfloat64m1_t maskedoff, vfloat32mf2_t vector, vfloat64m1_t scalar, size_t vl) { + return __riscv_vfwredosum_tu(maskedoff, vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfwredosum_vs_f32m1_f64m1_rm_tu +// CHECK-RV64-SAME: ( [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredosum.nxv1f64.nxv2f32.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat64m1_t test_vfwredosum_vs_f32m1_f64m1_rm_tu(vfloat64m1_t maskedoff, vfloat32m1_t vector, vfloat64m1_t scalar, size_t vl) { + return __riscv_vfwredosum_tu(maskedoff, vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfwredosum_vs_f32m2_f64m1_rm_tu +// CHECK-RV64-SAME: ( [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredosum.nxv1f64.nxv4f32.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat64m1_t test_vfwredosum_vs_f32m2_f64m1_rm_tu(vfloat64m1_t maskedoff, vfloat32m2_t vector, vfloat64m1_t scalar, size_t vl) { + return __riscv_vfwredosum_tu(maskedoff, vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfwredosum_vs_f32m4_f64m1_rm_tu +// CHECK-RV64-SAME: ( [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredosum.nxv1f64.nxv8f32.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat64m1_t test_vfwredosum_vs_f32m4_f64m1_rm_tu(vfloat64m1_t maskedoff, vfloat32m4_t vector, vfloat64m1_t scalar, size_t vl) { + return __riscv_vfwredosum_tu(maskedoff, vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfwredosum_vs_f32m8_f64m1_rm_tu +// CHECK-RV64-SAME: ( [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredosum.nxv1f64.nxv16f32.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat64m1_t test_vfwredosum_vs_f32m8_f64m1_rm_tu(vfloat64m1_t maskedoff, vfloat32m8_t vector, vfloat64m1_t scalar, size_t vl) { + return __riscv_vfwredosum_tu(maskedoff, vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfwredosum_vs_f16mf4_f32m1_rm_tum +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredosum.mask.nxv2f32.nxv1f16.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat32m1_t test_vfwredosum_vs_f16mf4_f32m1_rm_tum(vbool64_t mask, vfloat32m1_t maskedoff, vfloat16mf4_t vector, vfloat32m1_t scalar, size_t vl) { + return __riscv_vfwredosum_tum(mask, maskedoff, vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfwredosum_vs_f16mf2_f32m1_rm_tum +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredosum.mask.nxv2f32.nxv2f16.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat32m1_t test_vfwredosum_vs_f16mf2_f32m1_rm_tum(vbool32_t mask, vfloat32m1_t maskedoff, vfloat16mf2_t vector, vfloat32m1_t scalar, size_t vl) { + return __riscv_vfwredosum_tum(mask, maskedoff, vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfwredosum_vs_f16m1_f32m1_rm_tum +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredosum.mask.nxv2f32.nxv4f16.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat32m1_t test_vfwredosum_vs_f16m1_f32m1_rm_tum(vbool16_t mask, vfloat32m1_t maskedoff, vfloat16m1_t vector, vfloat32m1_t scalar, size_t vl) { + return __riscv_vfwredosum_tum(mask, maskedoff, vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfwredosum_vs_f16m2_f32m1_rm_tum +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredosum.mask.nxv2f32.nxv8f16.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat32m1_t test_vfwredosum_vs_f16m2_f32m1_rm_tum(vbool8_t mask, vfloat32m1_t maskedoff, vfloat16m2_t vector, vfloat32m1_t scalar, size_t vl) { + return __riscv_vfwredosum_tum(mask, maskedoff, vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfwredosum_vs_f16m4_f32m1_rm_tum +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredosum.mask.nxv2f32.nxv16f16.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat32m1_t test_vfwredosum_vs_f16m4_f32m1_rm_tum(vbool4_t mask, vfloat32m1_t maskedoff, vfloat16m4_t vector, vfloat32m1_t scalar, size_t vl) { + return __riscv_vfwredosum_tum(mask, maskedoff, vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfwredosum_vs_f16m8_f32m1_rm_tum +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredosum.mask.nxv2f32.nxv32f16.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat32m1_t test_vfwredosum_vs_f16m8_f32m1_rm_tum(vbool2_t mask, vfloat32m1_t maskedoff, vfloat16m8_t vector, vfloat32m1_t scalar, size_t vl) { + return __riscv_vfwredosum_tum(mask, maskedoff, vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfwredosum_vs_f32mf2_f64m1_rm_tum +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredosum.mask.nxv1f64.nxv1f32.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat64m1_t test_vfwredosum_vs_f32mf2_f64m1_rm_tum(vbool64_t mask, vfloat64m1_t maskedoff, vfloat32mf2_t vector, vfloat64m1_t scalar, size_t vl) { + return __riscv_vfwredosum_tum(mask, maskedoff, vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfwredosum_vs_f32m1_f64m1_rm_tum +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredosum.mask.nxv1f64.nxv2f32.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat64m1_t test_vfwredosum_vs_f32m1_f64m1_rm_tum(vbool32_t mask, vfloat64m1_t maskedoff, vfloat32m1_t vector, vfloat64m1_t scalar, size_t vl) { + return __riscv_vfwredosum_tum(mask, maskedoff, vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfwredosum_vs_f32m2_f64m1_rm_tum +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredosum.mask.nxv1f64.nxv4f32.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat64m1_t test_vfwredosum_vs_f32m2_f64m1_rm_tum(vbool16_t mask, vfloat64m1_t maskedoff, vfloat32m2_t vector, vfloat64m1_t scalar, size_t vl) { + return __riscv_vfwredosum_tum(mask, maskedoff, vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfwredosum_vs_f32m4_f64m1_rm_tum +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredosum.mask.nxv1f64.nxv8f32.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat64m1_t test_vfwredosum_vs_f32m4_f64m1_rm_tum(vbool8_t mask, vfloat64m1_t maskedoff, vfloat32m4_t vector, vfloat64m1_t scalar, size_t vl) { + return __riscv_vfwredosum_tum(mask, maskedoff, vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfwredosum_vs_f32m8_f64m1_rm_tum +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredosum.mask.nxv1f64.nxv16f32.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat64m1_t test_vfwredosum_vs_f32m8_f64m1_rm_tum(vbool4_t mask, vfloat64m1_t maskedoff, vfloat32m8_t vector, vfloat64m1_t scalar, size_t vl) { + return __riscv_vfwredosum_tum(mask, maskedoff, vector, scalar, __RISCV_FRM_RNE, vl); +} + diff --git a/clang/test/CodeGen/RISCV/rvv-intrinsics-autogenerated/policy/overloaded/vfwredusum.c b/clang/test/CodeGen/RISCV/rvv-intrinsics-autogenerated/policy/overloaded/vfwredusum.c --- a/clang/test/CodeGen/RISCV/rvv-intrinsics-autogenerated/policy/overloaded/vfwredusum.c +++ b/clang/test/CodeGen/RISCV/rvv-intrinsics-autogenerated/policy/overloaded/vfwredusum.c @@ -10,7 +10,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfwredusum_vs_f16mf4_f32m1_tu // CHECK-RV64-SAME: ( [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0:[0-9]+]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredusum.nxv2f32.nxv1f16.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredusum.nxv2f32.nxv1f16.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat32m1_t test_vfwredusum_vs_f16mf4_f32m1_tu(vfloat32m1_t maskedoff, vfloat16mf4_t vector, vfloat32m1_t scalar, size_t vl) { @@ -20,7 +20,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfwredusum_vs_f16mf2_f32m1_tu // CHECK-RV64-SAME: ( [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredusum.nxv2f32.nxv2f16.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredusum.nxv2f32.nxv2f16.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat32m1_t test_vfwredusum_vs_f16mf2_f32m1_tu(vfloat32m1_t maskedoff, vfloat16mf2_t vector, vfloat32m1_t scalar, size_t vl) { @@ -30,7 +30,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfwredusum_vs_f16m1_f32m1_tu // CHECK-RV64-SAME: ( [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredusum.nxv2f32.nxv4f16.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredusum.nxv2f32.nxv4f16.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat32m1_t test_vfwredusum_vs_f16m1_f32m1_tu(vfloat32m1_t maskedoff, vfloat16m1_t vector, vfloat32m1_t scalar, size_t vl) { @@ -40,7 +40,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfwredusum_vs_f16m2_f32m1_tu // CHECK-RV64-SAME: ( [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredusum.nxv2f32.nxv8f16.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredusum.nxv2f32.nxv8f16.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat32m1_t test_vfwredusum_vs_f16m2_f32m1_tu(vfloat32m1_t maskedoff, vfloat16m2_t vector, vfloat32m1_t scalar, size_t vl) { @@ -50,7 +50,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfwredusum_vs_f16m4_f32m1_tu // CHECK-RV64-SAME: ( [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredusum.nxv2f32.nxv16f16.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredusum.nxv2f32.nxv16f16.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat32m1_t test_vfwredusum_vs_f16m4_f32m1_tu(vfloat32m1_t maskedoff, vfloat16m4_t vector, vfloat32m1_t scalar, size_t vl) { @@ -60,7 +60,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfwredusum_vs_f16m8_f32m1_tu // CHECK-RV64-SAME: ( [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredusum.nxv2f32.nxv32f16.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredusum.nxv2f32.nxv32f16.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat32m1_t test_vfwredusum_vs_f16m8_f32m1_tu(vfloat32m1_t maskedoff, vfloat16m8_t vector, vfloat32m1_t scalar, size_t vl) { @@ -70,7 +70,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfwredusum_vs_f32mf2_f64m1_tu // CHECK-RV64-SAME: ( [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredusum.nxv1f64.nxv1f32.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredusum.nxv1f64.nxv1f32.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat64m1_t test_vfwredusum_vs_f32mf2_f64m1_tu(vfloat64m1_t maskedoff, vfloat32mf2_t vector, vfloat64m1_t scalar, size_t vl) { @@ -80,7 +80,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfwredusum_vs_f32m1_f64m1_tu // CHECK-RV64-SAME: ( [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredusum.nxv1f64.nxv2f32.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredusum.nxv1f64.nxv2f32.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat64m1_t test_vfwredusum_vs_f32m1_f64m1_tu(vfloat64m1_t maskedoff, vfloat32m1_t vector, vfloat64m1_t scalar, size_t vl) { @@ -90,7 +90,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfwredusum_vs_f32m2_f64m1_tu // CHECK-RV64-SAME: ( [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredusum.nxv1f64.nxv4f32.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredusum.nxv1f64.nxv4f32.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat64m1_t test_vfwredusum_vs_f32m2_f64m1_tu(vfloat64m1_t maskedoff, vfloat32m2_t vector, vfloat64m1_t scalar, size_t vl) { @@ -100,7 +100,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfwredusum_vs_f32m4_f64m1_tu // CHECK-RV64-SAME: ( [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredusum.nxv1f64.nxv8f32.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredusum.nxv1f64.nxv8f32.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat64m1_t test_vfwredusum_vs_f32m4_f64m1_tu(vfloat64m1_t maskedoff, vfloat32m4_t vector, vfloat64m1_t scalar, size_t vl) { @@ -110,7 +110,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfwredusum_vs_f32m8_f64m1_tu // CHECK-RV64-SAME: ( [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredusum.nxv1f64.nxv16f32.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredusum.nxv1f64.nxv16f32.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat64m1_t test_vfwredusum_vs_f32m8_f64m1_tu(vfloat64m1_t maskedoff, vfloat32m8_t vector, vfloat64m1_t scalar, size_t vl) { @@ -120,7 +120,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfwredusum_vs_f16mf4_f32m1_tum // CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredusum.mask.nxv2f32.nxv1f16.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredusum.mask.nxv2f32.nxv1f16.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat32m1_t test_vfwredusum_vs_f16mf4_f32m1_tum(vbool64_t mask, vfloat32m1_t maskedoff, vfloat16mf4_t vector, vfloat32m1_t scalar, size_t vl) { @@ -130,7 +130,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfwredusum_vs_f16mf2_f32m1_tum // CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredusum.mask.nxv2f32.nxv2f16.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredusum.mask.nxv2f32.nxv2f16.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat32m1_t test_vfwredusum_vs_f16mf2_f32m1_tum(vbool32_t mask, vfloat32m1_t maskedoff, vfloat16mf2_t vector, vfloat32m1_t scalar, size_t vl) { @@ -140,7 +140,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfwredusum_vs_f16m1_f32m1_tum // CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredusum.mask.nxv2f32.nxv4f16.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredusum.mask.nxv2f32.nxv4f16.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat32m1_t test_vfwredusum_vs_f16m1_f32m1_tum(vbool16_t mask, vfloat32m1_t maskedoff, vfloat16m1_t vector, vfloat32m1_t scalar, size_t vl) { @@ -150,7 +150,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfwredusum_vs_f16m2_f32m1_tum // CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredusum.mask.nxv2f32.nxv8f16.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredusum.mask.nxv2f32.nxv8f16.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat32m1_t test_vfwredusum_vs_f16m2_f32m1_tum(vbool8_t mask, vfloat32m1_t maskedoff, vfloat16m2_t vector, vfloat32m1_t scalar, size_t vl) { @@ -160,7 +160,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfwredusum_vs_f16m4_f32m1_tum // CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredusum.mask.nxv2f32.nxv16f16.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredusum.mask.nxv2f32.nxv16f16.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat32m1_t test_vfwredusum_vs_f16m4_f32m1_tum(vbool4_t mask, vfloat32m1_t maskedoff, vfloat16m4_t vector, vfloat32m1_t scalar, size_t vl) { @@ -170,7 +170,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfwredusum_vs_f16m8_f32m1_tum // CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredusum.mask.nxv2f32.nxv32f16.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredusum.mask.nxv2f32.nxv32f16.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat32m1_t test_vfwredusum_vs_f16m8_f32m1_tum(vbool2_t mask, vfloat32m1_t maskedoff, vfloat16m8_t vector, vfloat32m1_t scalar, size_t vl) { @@ -180,7 +180,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfwredusum_vs_f32mf2_f64m1_tum // CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredusum.mask.nxv1f64.nxv1f32.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredusum.mask.nxv1f64.nxv1f32.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat64m1_t test_vfwredusum_vs_f32mf2_f64m1_tum(vbool64_t mask, vfloat64m1_t maskedoff, vfloat32mf2_t vector, vfloat64m1_t scalar, size_t vl) { @@ -190,7 +190,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfwredusum_vs_f32m1_f64m1_tum // CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredusum.mask.nxv1f64.nxv2f32.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredusum.mask.nxv1f64.nxv2f32.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat64m1_t test_vfwredusum_vs_f32m1_f64m1_tum(vbool32_t mask, vfloat64m1_t maskedoff, vfloat32m1_t vector, vfloat64m1_t scalar, size_t vl) { @@ -200,7 +200,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfwredusum_vs_f32m2_f64m1_tum // CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredusum.mask.nxv1f64.nxv4f32.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredusum.mask.nxv1f64.nxv4f32.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat64m1_t test_vfwredusum_vs_f32m2_f64m1_tum(vbool16_t mask, vfloat64m1_t maskedoff, vfloat32m2_t vector, vfloat64m1_t scalar, size_t vl) { @@ -210,7 +210,7 @@ // CHECK-RV64-LABEL: define dso_local @test_vfwredusum_vs_f32m4_f64m1_tum // CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredusum.mask.nxv1f64.nxv8f32.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredusum.mask.nxv1f64.nxv8f32.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat64m1_t test_vfwredusum_vs_f32m4_f64m1_tum(vbool8_t mask, vfloat64m1_t maskedoff, vfloat32m4_t vector, vfloat64m1_t scalar, size_t vl) { @@ -220,10 +220,230 @@ // CHECK-RV64-LABEL: define dso_local @test_vfwredusum_vs_f32m8_f64m1_tum // CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: -// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredusum.mask.nxv1f64.nxv16f32.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 [[VL]]) +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredusum.mask.nxv1f64.nxv16f32.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 7, i64 [[VL]]) // CHECK-RV64-NEXT: ret [[TMP0]] // vfloat64m1_t test_vfwredusum_vs_f32m8_f64m1_tum(vbool4_t mask, vfloat64m1_t maskedoff, vfloat32m8_t vector, vfloat64m1_t scalar, size_t vl) { return __riscv_vfwredusum_tum(mask, maskedoff, vector, scalar, vl); } +// CHECK-RV64-LABEL: define dso_local @test_vfwredusum_vs_f16mf4_f32m1_rm_tu +// CHECK-RV64-SAME: ( [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredusum.nxv2f32.nxv1f16.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat32m1_t test_vfwredusum_vs_f16mf4_f32m1_rm_tu(vfloat32m1_t maskedoff, vfloat16mf4_t vector, vfloat32m1_t scalar, size_t vl) { + return __riscv_vfwredusum_tu(maskedoff, vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfwredusum_vs_f16mf2_f32m1_rm_tu +// CHECK-RV64-SAME: ( [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredusum.nxv2f32.nxv2f16.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat32m1_t test_vfwredusum_vs_f16mf2_f32m1_rm_tu(vfloat32m1_t maskedoff, vfloat16mf2_t vector, vfloat32m1_t scalar, size_t vl) { + return __riscv_vfwredusum_tu(maskedoff, vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfwredusum_vs_f16m1_f32m1_rm_tu +// CHECK-RV64-SAME: ( [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredusum.nxv2f32.nxv4f16.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat32m1_t test_vfwredusum_vs_f16m1_f32m1_rm_tu(vfloat32m1_t maskedoff, vfloat16m1_t vector, vfloat32m1_t scalar, size_t vl) { + return __riscv_vfwredusum_tu(maskedoff, vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfwredusum_vs_f16m2_f32m1_rm_tu +// CHECK-RV64-SAME: ( [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredusum.nxv2f32.nxv8f16.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat32m1_t test_vfwredusum_vs_f16m2_f32m1_rm_tu(vfloat32m1_t maskedoff, vfloat16m2_t vector, vfloat32m1_t scalar, size_t vl) { + return __riscv_vfwredusum_tu(maskedoff, vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfwredusum_vs_f16m4_f32m1_rm_tu +// CHECK-RV64-SAME: ( [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredusum.nxv2f32.nxv16f16.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat32m1_t test_vfwredusum_vs_f16m4_f32m1_rm_tu(vfloat32m1_t maskedoff, vfloat16m4_t vector, vfloat32m1_t scalar, size_t vl) { + return __riscv_vfwredusum_tu(maskedoff, vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfwredusum_vs_f16m8_f32m1_rm_tu +// CHECK-RV64-SAME: ( [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredusum.nxv2f32.nxv32f16.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat32m1_t test_vfwredusum_vs_f16m8_f32m1_rm_tu(vfloat32m1_t maskedoff, vfloat16m8_t vector, vfloat32m1_t scalar, size_t vl) { + return __riscv_vfwredusum_tu(maskedoff, vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfwredusum_vs_f32mf2_f64m1_rm_tu +// CHECK-RV64-SAME: ( [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredusum.nxv1f64.nxv1f32.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat64m1_t test_vfwredusum_vs_f32mf2_f64m1_rm_tu(vfloat64m1_t maskedoff, vfloat32mf2_t vector, vfloat64m1_t scalar, size_t vl) { + return __riscv_vfwredusum_tu(maskedoff, vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfwredusum_vs_f32m1_f64m1_rm_tu +// CHECK-RV64-SAME: ( [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredusum.nxv1f64.nxv2f32.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat64m1_t test_vfwredusum_vs_f32m1_f64m1_rm_tu(vfloat64m1_t maskedoff, vfloat32m1_t vector, vfloat64m1_t scalar, size_t vl) { + return __riscv_vfwredusum_tu(maskedoff, vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfwredusum_vs_f32m2_f64m1_rm_tu +// CHECK-RV64-SAME: ( [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredusum.nxv1f64.nxv4f32.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat64m1_t test_vfwredusum_vs_f32m2_f64m1_rm_tu(vfloat64m1_t maskedoff, vfloat32m2_t vector, vfloat64m1_t scalar, size_t vl) { + return __riscv_vfwredusum_tu(maskedoff, vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfwredusum_vs_f32m4_f64m1_rm_tu +// CHECK-RV64-SAME: ( [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredusum.nxv1f64.nxv8f32.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat64m1_t test_vfwredusum_vs_f32m4_f64m1_rm_tu(vfloat64m1_t maskedoff, vfloat32m4_t vector, vfloat64m1_t scalar, size_t vl) { + return __riscv_vfwredusum_tu(maskedoff, vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfwredusum_vs_f32m8_f64m1_rm_tu +// CHECK-RV64-SAME: ( [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredusum.nxv1f64.nxv16f32.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat64m1_t test_vfwredusum_vs_f32m8_f64m1_rm_tu(vfloat64m1_t maskedoff, vfloat32m8_t vector, vfloat64m1_t scalar, size_t vl) { + return __riscv_vfwredusum_tu(maskedoff, vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfwredusum_vs_f16mf4_f32m1_rm_tum +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredusum.mask.nxv2f32.nxv1f16.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat32m1_t test_vfwredusum_vs_f16mf4_f32m1_rm_tum(vbool64_t mask, vfloat32m1_t maskedoff, vfloat16mf4_t vector, vfloat32m1_t scalar, size_t vl) { + return __riscv_vfwredusum_tum(mask, maskedoff, vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfwredusum_vs_f16mf2_f32m1_rm_tum +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredusum.mask.nxv2f32.nxv2f16.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat32m1_t test_vfwredusum_vs_f16mf2_f32m1_rm_tum(vbool32_t mask, vfloat32m1_t maskedoff, vfloat16mf2_t vector, vfloat32m1_t scalar, size_t vl) { + return __riscv_vfwredusum_tum(mask, maskedoff, vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfwredusum_vs_f16m1_f32m1_rm_tum +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredusum.mask.nxv2f32.nxv4f16.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat32m1_t test_vfwredusum_vs_f16m1_f32m1_rm_tum(vbool16_t mask, vfloat32m1_t maskedoff, vfloat16m1_t vector, vfloat32m1_t scalar, size_t vl) { + return __riscv_vfwredusum_tum(mask, maskedoff, vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfwredusum_vs_f16m2_f32m1_rm_tum +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredusum.mask.nxv2f32.nxv8f16.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat32m1_t test_vfwredusum_vs_f16m2_f32m1_rm_tum(vbool8_t mask, vfloat32m1_t maskedoff, vfloat16m2_t vector, vfloat32m1_t scalar, size_t vl) { + return __riscv_vfwredusum_tum(mask, maskedoff, vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfwredusum_vs_f16m4_f32m1_rm_tum +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredusum.mask.nxv2f32.nxv16f16.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat32m1_t test_vfwredusum_vs_f16m4_f32m1_rm_tum(vbool4_t mask, vfloat32m1_t maskedoff, vfloat16m4_t vector, vfloat32m1_t scalar, size_t vl) { + return __riscv_vfwredusum_tum(mask, maskedoff, vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfwredusum_vs_f16m8_f32m1_rm_tum +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredusum.mask.nxv2f32.nxv32f16.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat32m1_t test_vfwredusum_vs_f16m8_f32m1_rm_tum(vbool2_t mask, vfloat32m1_t maskedoff, vfloat16m8_t vector, vfloat32m1_t scalar, size_t vl) { + return __riscv_vfwredusum_tum(mask, maskedoff, vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfwredusum_vs_f32mf2_f64m1_rm_tum +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredusum.mask.nxv1f64.nxv1f32.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat64m1_t test_vfwredusum_vs_f32mf2_f64m1_rm_tum(vbool64_t mask, vfloat64m1_t maskedoff, vfloat32mf2_t vector, vfloat64m1_t scalar, size_t vl) { + return __riscv_vfwredusum_tum(mask, maskedoff, vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfwredusum_vs_f32m1_f64m1_rm_tum +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredusum.mask.nxv1f64.nxv2f32.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat64m1_t test_vfwredusum_vs_f32m1_f64m1_rm_tum(vbool32_t mask, vfloat64m1_t maskedoff, vfloat32m1_t vector, vfloat64m1_t scalar, size_t vl) { + return __riscv_vfwredusum_tum(mask, maskedoff, vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfwredusum_vs_f32m2_f64m1_rm_tum +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredusum.mask.nxv1f64.nxv4f32.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat64m1_t test_vfwredusum_vs_f32m2_f64m1_rm_tum(vbool16_t mask, vfloat64m1_t maskedoff, vfloat32m2_t vector, vfloat64m1_t scalar, size_t vl) { + return __riscv_vfwredusum_tum(mask, maskedoff, vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfwredusum_vs_f32m4_f64m1_rm_tum +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredusum.mask.nxv1f64.nxv8f32.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat64m1_t test_vfwredusum_vs_f32m4_f64m1_rm_tum(vbool8_t mask, vfloat64m1_t maskedoff, vfloat32m4_t vector, vfloat64m1_t scalar, size_t vl) { + return __riscv_vfwredusum_tum(mask, maskedoff, vector, scalar, __RISCV_FRM_RNE, vl); +} + +// CHECK-RV64-LABEL: define dso_local @test_vfwredusum_vs_f32m8_f64m1_rm_tum +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF:%.*]], [[VECTOR:%.*]], [[SCALAR:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call @llvm.riscv.vfwredusum.mask.nxv1f64.nxv16f32.i64( [[MASKEDOFF]], [[VECTOR]], [[SCALAR]], [[MASK]], i64 0, i64 [[VL]]) +// CHECK-RV64-NEXT: ret [[TMP0]] +// +vfloat64m1_t test_vfwredusum_vs_f32m8_f64m1_rm_tum(vbool4_t mask, vfloat64m1_t maskedoff, vfloat32m8_t vector, vfloat64m1_t scalar, size_t vl) { + return __riscv_vfwredusum_tum(mask, maskedoff, vector, scalar, __RISCV_FRM_RNE, vl); +} + diff --git a/llvm/include/llvm/IR/IntrinsicsRISCV.td b/llvm/include/llvm/IR/IntrinsicsRISCV.td --- a/llvm/include/llvm/IR/IntrinsicsRISCV.td +++ b/llvm/include/llvm/IR/IntrinsicsRISCV.td @@ -887,6 +887,28 @@ [IntrNoMem]>, RISCVVIntrinsic { let VLOperand = 4; } + // For Reduction ternary operations. + // For destination vector type is the same as first and third source vector. + // Input: (vector_in, vector_in, vector_in, frm, vl) + class RISCVReductionUnMaskedRoundingMode + : DefaultAttrsIntrinsic<[llvm_anyvector_ty], + [LLVMMatchType<0>, llvm_anyvector_ty, LLVMMatchType<0>, + llvm_anyint_ty, LLVMMatchType<2>], + [ImmArg>, IntrNoMem]>, RISCVVIntrinsic { + let VLOperand = 4; + } + // For Reduction ternary operations with mask. + // For destination vector type is the same as first and third source vector. + // The mask type come from second source vector. + // Input: (vector_in, vector_in, vector_in, mask, frm, vl) + class RISCVReductionMaskedRoundingMode + : DefaultAttrsIntrinsic<[llvm_anyvector_ty], + [LLVMMatchType<0>, llvm_anyvector_ty, LLVMMatchType<0>, + LLVMScalarOrSameVectorWidth<1, llvm_i1_ty>, llvm_anyint_ty, + LLVMMatchType<2>], + [ImmArg>, IntrNoMem]>, RISCVVIntrinsic { + let VLOperand = 5; + } // For unary operations with scalar type output without mask // Output: (scalar type) // Input: (vector_in, vl) @@ -1312,6 +1334,10 @@ def "int_riscv_" # NAME : RISCVReductionUnMasked; def "int_riscv_" # NAME # "_mask" : RISCVReductionMasked; } + multiclass RISCVReductionRoundingMode { + def "int_riscv_" # NAME : RISCVReductionUnMaskedRoundingMode; + def "int_riscv_" # NAME # "_mask" : RISCVReductionMaskedRoundingMode; + } multiclass RISCVMaskedUnarySOut { def "int_riscv_" # NAME : RISCVMaskedUnarySOutUnMasked; def "int_riscv_" # NAME # "_mask" : RISCVMaskedUnarySOutMasked; @@ -1592,13 +1618,13 @@ defm vwredsumu : RISCVReduction; defm vwredsum : RISCVReduction; - defm vfredosum : RISCVReduction; - defm vfredusum : RISCVReduction; + defm vfredosum : RISCVReductionRoundingMode; + defm vfredusum : RISCVReductionRoundingMode; defm vfredmin : RISCVReduction; defm vfredmax : RISCVReduction; - defm vfwredusum : RISCVReduction; - defm vfwredosum : RISCVReduction; + defm vfwredusum : RISCVReductionRoundingMode; + defm vfwredosum : RISCVReductionRoundingMode; def int_riscv_vmand: RISCVBinaryAAAUnMasked; def int_riscv_vmnand: RISCVBinaryAAAUnMasked; diff --git a/llvm/lib/Target/RISCV/RISCVInstrInfoVPseudos.td b/llvm/lib/Target/RISCV/RISCVInstrInfoVPseudos.td --- a/llvm/lib/Target/RISCV/RISCVInstrInfoVPseudos.td +++ b/llvm/lib/Target/RISCV/RISCVInstrInfoVPseudos.td @@ -1356,6 +1356,28 @@ let HasVecPolicyOp = 1; } +class VPseudoTernaryMaskPolicyRoundingMode : + Pseudo<(outs GetVRegNoV0.R:$rd), + (ins GetVRegNoV0.R:$merge, + Op1Class:$rs2, Op2Class:$rs1, + VMaskOp:$vm, + ixlenimm:$rm, + AVL:$vl, ixlenimm:$sew, ixlenimm:$policy), []>, + RISCVVPseudo { + let mayLoad = 0; + let mayStore = 0; + let hasSideEffects = 0; + let Constraints = !interleave([Constraint, "$rd = $merge"], ","); + let HasVLOp = 1; + let HasSEWOp = 1; + let HasVecPolicyOp = 1; + let HasRoundModeOp = 1; + let UsesVXRM = 0; +} + // Like VPseudoBinaryMask, but output can be V0. class VPseudoBinaryMOutMask { + let VLMul = MInfo.value in { + defvar mx = MInfo.MX; + let isCommutable = Commutable in + def "_" # mx # "_E" # sew + : VPseudoTernaryNoMaskWithPolicyRoundingMode; + def "_" # mx # "_E" # sew # "_MASK" + : VPseudoTernaryMaskPolicyRoundingMode; + } +} + multiclass VPseudoTernaryWithPolicy.val in { defvar WriteVFRedV_From_MX_E = !cast("WriteVFRedV_From_" # mx # "_E" # e); - defm _VS : VPseudoTernaryWithTailPolicy, + defm _VS + : VPseudoTernaryWithTailPolicyRoundingMode, Sched<[WriteVFRedV_From_MX_E, ReadVFRedV, ReadVFRedV, ReadVFRedV, ReadVMask]>; } @@ -3757,24 +3800,27 @@ } } -multiclass VPseudoVFREDO_VS { +multiclass VPseudoVFREDO_VS_RM { foreach m = MxListF in { defvar mx = m.MX; foreach e = SchedSEWSet.val in { defvar WriteVFRedOV_From_MX_E = !cast("WriteVFRedOV_From_" # mx # "_E" # e); - defm _VS : VPseudoTernaryWithTailPolicy, + defm _VS : VPseudoTernaryWithTailPolicyRoundingMode, Sched<[WriteVFRedOV_From_MX_E, ReadVFRedOV, ReadVFRedOV, ReadVFRedOV, ReadVMask]>; } } } -multiclass VPseudoVFWRED_VS { +multiclass VPseudoVFWRED_VS_RM { foreach m = MxListFWRed in { defvar mx = m.MX; foreach e = SchedSEWSet.val in { defvar WriteVFWRedV_From_MX_E = !cast("WriteVFWRedV_From_" # mx # "_E" # e); - defm _VS : VPseudoTernaryWithTailPolicy, + defm _VS + : VPseudoTernaryWithTailPolicyRoundingMode, Sched<[WriteVFWRedV_From_MX_E, ReadVFWRedV, ReadVFWRedV, ReadVFWRedV, ReadVMask]>; } @@ -4731,6 +4777,30 @@ op2_kind:$rs2, GPR:$vl, log2sew, TAIL_AGNOSTIC)>; +class VPatTernaryNoMaskTARoundingMode : + Pat<(result_type (!cast(intrinsic) + (result_type result_reg_class:$rs3), + (op1_type op1_reg_class:$rs1), + (op2_type op2_kind:$rs2), + (XLenVT timm:$round), + VLOpFrag)), + (!cast(inst#"_"#kind#"_"#vlmul.MX#"_E"#!shl(1, log2sew)) + result_reg_class:$rs3, + (op1_type op1_reg_class:$rs1), + op2_kind:$rs2, + (XLenVT timm:$round), + GPR:$vl, log2sew, TAIL_AGNOSTIC)>; + class VPatTernaryNoMaskWithPolicy; +class VPatTernaryMaskTARoundingMode : + Pat<(result_type (!cast(intrinsic#"_mask") + (result_type result_reg_class:$rs3), + (op1_type op1_reg_class:$rs1), + (op2_type op2_kind:$rs2), + (mask_type V0), + (XLenVT timm:$round), + VLOpFrag)), + (!cast(inst#"_"#kind#"_"#vlmul.MX#"_E"#!shl(1, log2sew)# "_MASK") + result_reg_class:$rs3, + (op1_type op1_reg_class:$rs1), + op2_kind:$rs2, + (mask_type V0), + (XLenVT timm:$round), + GPR:$vl, log2sew, TAIL_AGNOSTIC)>; + multiclass VPatUnaryS_M { foreach mti = AllMasks in { @@ -5864,6 +5961,26 @@ result_reg_class, op1_reg_class, op2_kind>; } +multiclass VPatTernaryTARoundingMode { + def : VPatTernaryNoMaskTARoundingMode; + def : VPatTernaryMaskTARoundingMode; +} + multiclass VPatTernaryV_VV_AAXA vtilist> { foreach vti = vtilist in @@ -6053,6 +6170,26 @@ } } +multiclass VPatReductionV_VS_RM { + foreach vti = !if(IsFloat, NoGroupFloatVectors, NoGroupIntegerVectors) in { + defvar vectorM1 = !cast(!if(IsFloat, "VF", "VI") # vti.SEW # "M1"); + let Predicates = GetVTypePredicates.Predicates in + defm : VPatTernaryTARoundingMode; + } + foreach gvti = !if(IsFloat, GroupFloatVectors, GroupIntegerVectors) in { + let Predicates = GetVTypePredicates.Predicates in + defm : VPatTernaryTARoundingMode; + } +} + multiclass VPatReductionW_VS { foreach vti = !if(IsFloat, AllFloatVectors, AllIntegerVectors) in { defvar wtiSEW = !mul(vti.SEW, 2); @@ -6069,6 +6206,22 @@ } } +multiclass VPatReductionW_VS_RM { + foreach vti = !if(IsFloat, AllFloatVectors, AllIntegerVectors) in { + defvar wtiSEW = !mul(vti.SEW, 2); + if !le(wtiSEW, 64) then { + defvar wtiM1 = !cast(!if(IsFloat, "VF", "VI") # wtiSEW # "M1"); + let Predicates = GetVTypePredicates.Predicates in + defm : VPatTernaryTARoundingMode; + } + } +} + multiclass VPatConversionVI_VF { foreach fvti = AllFloatVectors in { @@ -6833,9 +6986,10 @@ //===----------------------------------------------------------------------===// // 14.3. Vector Single-Width Floating-Point Reduction Instructions //===----------------------------------------------------------------------===// -let Uses = [FRM], mayRaiseFPException = true in { -defm PseudoVFREDOSUM : VPseudoVFREDO_VS; -defm PseudoVFREDUSUM : VPseudoVFRED_VS; +let mayRaiseFPException = true, + hasSideEffects = 0 in { +defm PseudoVFREDOSUM : VPseudoVFREDO_VS_RM; +defm PseudoVFREDUSUM : VPseudoVFRED_VS_RM; } let mayRaiseFPException = true in { defm PseudoVFREDMIN : VPseudoVFREDMINMAX_VS; @@ -6846,10 +7000,10 @@ // 14.4. Vector Widening Floating-Point Reduction Instructions //===----------------------------------------------------------------------===// let IsRVVWideningReduction = 1, - Uses = [FRM], + hasSideEffects = 0, mayRaiseFPException = true in { -defm PseudoVFWREDUSUM : VPseudoVFWRED_VS; -defm PseudoVFWREDOSUM : VPseudoVFWRED_VS; +defm PseudoVFWREDUSUM : VPseudoVFWRED_VS_RM; +defm PseudoVFWREDOSUM : VPseudoVFWRED_VS_RM; } } // Predicates = [HasVInstructionsAnyF] @@ -7482,16 +7636,16 @@ //===----------------------------------------------------------------------===// // 14.3. Vector Single-Width Floating-Point Reduction Instructions //===----------------------------------------------------------------------===// -defm : VPatReductionV_VS<"int_riscv_vfredosum", "PseudoVFREDOSUM", /*IsFloat=*/1>; -defm : VPatReductionV_VS<"int_riscv_vfredusum", "PseudoVFREDUSUM", /*IsFloat=*/1>; +defm : VPatReductionV_VS_RM<"int_riscv_vfredosum", "PseudoVFREDOSUM", /*IsFloat=*/1>; +defm : VPatReductionV_VS_RM<"int_riscv_vfredusum", "PseudoVFREDUSUM", /*IsFloat=*/1>; defm : VPatReductionV_VS<"int_riscv_vfredmin", "PseudoVFREDMIN", /*IsFloat=*/1>; defm : VPatReductionV_VS<"int_riscv_vfredmax", "PseudoVFREDMAX", /*IsFloat=*/1>; //===----------------------------------------------------------------------===// // 14.4. Vector Widening Floating-Point Reduction Instructions //===----------------------------------------------------------------------===// -defm : VPatReductionW_VS<"int_riscv_vfwredusum", "PseudoVFWREDUSUM", /*IsFloat=*/1>; -defm : VPatReductionW_VS<"int_riscv_vfwredosum", "PseudoVFWREDOSUM", /*IsFloat=*/1>; +defm : VPatReductionW_VS_RM<"int_riscv_vfwredusum", "PseudoVFWREDUSUM", /*IsFloat=*/1>; +defm : VPatReductionW_VS_RM<"int_riscv_vfwredosum", "PseudoVFWREDOSUM", /*IsFloat=*/1>; //===----------------------------------------------------------------------===// // 15. Vector Mask Instructions diff --git a/llvm/lib/Target/RISCV/RISCVInstrInfoVVLPatterns.td b/llvm/lib/Target/RISCV/RISCVInstrInfoVVLPatterns.td --- a/llvm/lib/Target/RISCV/RISCVInstrInfoVVLPatterns.td +++ b/llvm/lib/Target/RISCV/RISCVInstrInfoVVLPatterns.td @@ -1399,6 +1399,39 @@ } } +multiclass VPatReductionVL_RM { + foreach vti = !if(is_float, AllFloatVectors, AllIntegerVectors) in { + defvar vti_m1 = !cast(!if(is_float, "VF", "VI") # vti.SEW # "M1"); + let Predicates = GetVTypePredicates.Predicates in { + def: Pat<(vti_m1.Vector (vop (vti_m1.Vector VR:$merge), + (vti.Vector vti.RegClass:$rs1), VR:$rs2, + (vti.Mask true_mask), VLOpFrag, + (XLenVT timm:$policy))), + (!cast(instruction_name#"_VS_"#vti.LMul.MX#"_E"#vti.SEW) + (vti_m1.Vector VR:$merge), + (vti.Vector vti.RegClass:$rs1), + (vti_m1.Vector VR:$rs2), + // Value to indicate no rounding mode change in + // RISCVInsertReadWriteCSR + FRM_DYN, + GPR:$vl, vti.Log2SEW, (XLenVT timm:$policy))>; + + def: Pat<(vti_m1.Vector (vop (vti_m1.Vector VR:$merge), + (vti.Vector vti.RegClass:$rs1), VR:$rs2, + (vti.Mask V0), VLOpFrag, + (XLenVT timm:$policy))), + (!cast(instruction_name#"_VS_"#vti.LMul.MX#"_E"#vti.SEW#"_MASK") + (vti_m1.Vector VR:$merge), + (vti.Vector vti.RegClass:$rs1), + (vti_m1.Vector VR:$rs2), + (vti.Mask V0), + // Value to indicate no rounding mode change in + // RISCVInsertReadWriteCSR + FRM_DYN, + GPR:$vl, vti.Log2SEW, (XLenVT timm:$policy))>; + } + } +} multiclass VPatBinaryExtVL_WV_WX { foreach vtiToWti = AllWidenableIntVectors in { @@ -1474,6 +1507,41 @@ } } +multiclass VPatWidenReductionVL_RM { + foreach vtiToWti = !if(is_float, AllWidenableFloatVectors, AllWidenableIntVectors) in { + defvar vti = vtiToWti.Vti; + defvar wti = vtiToWti.Wti; + defvar wti_m1 = !cast(!if(is_float, "VF", "VI") # wti.SEW # "M1"); + let Predicates = !listconcat(GetVTypePredicates.Predicates, + GetVTypePredicates.Predicates) in { + def: Pat<(wti_m1.Vector (vop (wti_m1.Vector VR:$merge), + (wti.Vector (extop (vti.Vector vti.RegClass:$rs1))), + VR:$rs2, (vti.Mask true_mask), VLOpFrag, + (XLenVT timm:$policy))), + (!cast(instruction_name#"_VS_"#vti.LMul.MX#"_E"#vti.SEW) + (wti_m1.Vector VR:$merge), (vti.Vector vti.RegClass:$rs1), + (wti_m1.Vector VR:$rs2), + // Value to indicate no rounding mode change in + // RISCVInsertReadWriteCSR + FRM_DYN, + GPR:$vl, vti.Log2SEW, + (XLenVT timm:$policy))>; + def: Pat<(wti_m1.Vector (vop (wti_m1.Vector VR:$merge), + (wti.Vector (extop (vti.Vector vti.RegClass:$rs1))), + VR:$rs2, (vti.Mask V0), VLOpFrag, + (XLenVT timm:$policy))), + (!cast(instruction_name#"_VS_"#vti.LMul.MX#"_E"#vti.SEW#"_MASK") + (wti_m1.Vector VR:$merge), (vti.Vector vti.RegClass:$rs1), + (wti_m1.Vector VR:$rs2), (vti.Mask V0), + // Value to indicate no rounding mode change in + // RISCVInsertReadWriteCSR + FRM_DYN, + GPR:$vl, vti.Log2SEW, + (XLenVT timm:$policy))>; + } + } +} + multiclass VPatWidenReductionVL_Ext_VL { foreach vtiToWti = !if(is_float, AllWidenableFloatVectors, AllWidenableIntVectors) in { defvar vti = vtiToWti.Vti; @@ -1501,6 +1569,41 @@ } } +multiclass VPatWidenReductionVL_Ext_VL_RM { + foreach vtiToWti = !if(is_float, AllWidenableFloatVectors, AllWidenableIntVectors) in { + defvar vti = vtiToWti.Vti; + defvar wti = vtiToWti.Wti; + defvar wti_m1 = !cast(!if(is_float, "VF", "VI") # wti.SEW # "M1"); + let Predicates = !listconcat(GetVTypePredicates.Predicates, + GetVTypePredicates.Predicates) in { + def: Pat<(wti_m1.Vector (vop (wti_m1.Vector VR:$merge), + (wti.Vector (extop (vti.Vector vti.RegClass:$rs1), (vti.Mask true_mask), VLOpFrag)), + VR:$rs2, (vti.Mask true_mask), VLOpFrag, + (XLenVT timm:$policy))), + (!cast(instruction_name#"_VS_"#vti.LMul.MX#"_E"#vti.SEW) + (wti_m1.Vector VR:$merge), (vti.Vector vti.RegClass:$rs1), + (wti_m1.Vector VR:$rs2), + // Value to indicate no rounding mode change in + // RISCVInsertReadWriteCSR + FRM_DYN, + GPR:$vl, vti.Log2SEW, + (XLenVT timm:$policy))>; + def: Pat<(wti_m1.Vector (vop (wti_m1.Vector VR:$merge), + (wti.Vector (extop (vti.Vector vti.RegClass:$rs1), (vti.Mask true_mask), VLOpFrag)), + VR:$rs2, (vti.Mask V0), VLOpFrag, + (XLenVT timm:$policy))), + (!cast(instruction_name#"_VS_"#vti.LMul.MX#"_E"#vti.SEW#"_MASK") + (wti_m1.Vector VR:$merge), (vti.Vector vti.RegClass:$rs1), + (wti_m1.Vector VR:$rs2), (vti.Mask V0), + // Value to indicate no rounding mode change in + // RISCVInsertReadWriteCSR + FRM_DYN, + GPR:$vl, vti.Log2SEW, + (XLenVT timm:$policy))>; + } + } +} + multiclass VPatBinaryFPWVL_VV_VF { foreach fvtiToFWti = AllWidenableFloatVectors in { defvar vti = fvtiToFWti.Vti; @@ -2507,16 +2610,22 @@ defm : VPatWidenReductionVL_Ext_VL; // 14.3. Vector Single-Width Floating-Point Reduction Instructions -defm : VPatReductionVL; -defm : VPatReductionVL; +defm : VPatReductionVL_RM; +defm : VPatReductionVL_RM; defm : VPatReductionVL; defm : VPatReductionVL; // 14.4. Vector Widening Floating-Point Reduction Instructions -defm : VPatWidenReductionVL; -defm : VPatWidenReductionVL_Ext_VL; -defm : VPatWidenReductionVL; -defm : VPatWidenReductionVL_Ext_VL; +defm : VPatWidenReductionVL_RM; +defm : VPatWidenReductionVL_Ext_VL_RM; +defm : VPatWidenReductionVL_RM; +defm : VPatWidenReductionVL_Ext_VL_RM; // 15. Vector Mask Instructions diff --git a/llvm/test/CodeGen/RISCV/rvv/unmasked-ta.ll b/llvm/test/CodeGen/RISCV/rvv/unmasked-ta.ll --- a/llvm/test/CodeGen/RISCV/rvv/unmasked-ta.ll +++ b/llvm/test/CodeGen/RISCV/rvv/unmasked-ta.ll @@ -724,7 +724,7 @@ , , , - iXLen); + iXLen, iXLen); define @intrinsic_vfredosum_vs_nxv4f16_nxv1f16_nxv4f16( %0, %1, iXLen %2) nounwind { ; CHECK-LABEL: intrinsic_vfredosum_vs_nxv4f16_nxv1f16_nxv4f16: @@ -737,7 +737,7 @@ undef, %0, %1, - iXLen %2) + iXLen 7, iXLen %2) ret %a } @@ -746,7 +746,7 @@ , , , - iXLen); + iXLen, iXLen); define @intrinsic_vfredusum_vs_nxv4f16_nxv1f16_nxv4f16( %0, %1, iXLen %2) nounwind { ; CHECK-LABEL: intrinsic_vfredusum_vs_nxv4f16_nxv1f16_nxv4f16: @@ -759,7 +759,7 @@ undef, %0, %1, - iXLen %2) + iXLen 7, iXLen %2) ret %a } @@ -812,7 +812,7 @@ , , , - iXLen); + iXLen, iXLen); define @intrinsic_vfwredosum_vs_nxv2f32_nxv1f16_nxv2f32( %0, %1, iXLen %2) nounwind { ; CHECK-LABEL: intrinsic_vfwredosum_vs_nxv2f32_nxv1f16_nxv2f32: @@ -825,7 +825,7 @@ undef, %0, %1, - iXLen %2) + iXLen 7, iXLen %2) ret %a } @@ -833,7 +833,7 @@ , , , - iXLen); + iXLen, iXLen); define @intrinsic_vfwredusum_vs_nxv2f32_nxv1f16_nxv2f32( %0, %1, iXLen %2) nounwind { ; CHECK-LABEL: intrinsic_vfwredusum_vs_nxv2f32_nxv1f16_nxv2f32: @@ -846,7 +846,7 @@ undef, %0, %1, - iXLen %2) + iXLen 7, iXLen %2) ret %a } diff --git a/llvm/test/CodeGen/RISCV/rvv/vfredosum.ll b/llvm/test/CodeGen/RISCV/rvv/vfredosum.ll --- a/llvm/test/CodeGen/RISCV/rvv/vfredosum.ll +++ b/llvm/test/CodeGen/RISCV/rvv/vfredosum.ll @@ -7,20 +7,22 @@ , , , - iXLen); + iXLen, iXLen); define @intrinsic_vfredosum_vs_nxv4f16_nxv1f16_nxv4f16( %0, %1, %2, iXLen %3) nounwind { ; CHECK-LABEL: intrinsic_vfredosum_vs_nxv4f16_nxv1f16_nxv4f16: ; CHECK: # %bb.0: # %entry ; CHECK-NEXT: vsetvli zero, a0, e16, mf4, ta, ma +; CHECK-NEXT: fsrmi a0, 0 ; CHECK-NEXT: vfredosum.vs v8, v9, v10 +; CHECK-NEXT: fsrm a0 ; CHECK-NEXT: ret entry: %a = call @llvm.riscv.vfredosum.nxv4f16.nxv1f16( %0, %1, %2, - iXLen %3) + iXLen 0, iXLen %3) ret %a } @@ -30,13 +32,15 @@ , , , - iXLen); + iXLen, iXLen); define @intrinsic_vfredosum_mask_vs_nxv4f16_nxv1f16_nxv4f16( %0, %1, %2, %3, iXLen %4) nounwind { ; CHECK-LABEL: intrinsic_vfredosum_mask_vs_nxv4f16_nxv1f16_nxv4f16: ; CHECK: # %bb.0: # %entry ; CHECK-NEXT: vsetvli zero, a0, e16, mf4, ta, ma +; CHECK-NEXT: fsrmi a0, 0 ; CHECK-NEXT: vfredosum.vs v8, v9, v10, v0.t +; CHECK-NEXT: fsrm a0 ; CHECK-NEXT: ret entry: %a = call @llvm.riscv.vfredosum.mask.nxv4f16.nxv1f16.nxv1i1( @@ -44,7 +48,7 @@ %1, %2, %3, - iXLen %4) + iXLen 0, iXLen %4) ret %a } @@ -53,20 +57,22 @@ , , , - iXLen); + iXLen, iXLen); define @intrinsic_vfredosum_vs_nxv4f16_nxv2f16_nxv4f16( %0, %1, %2, iXLen %3) nounwind { ; CHECK-LABEL: intrinsic_vfredosum_vs_nxv4f16_nxv2f16_nxv4f16: ; CHECK: # %bb.0: # %entry ; CHECK-NEXT: vsetvli zero, a0, e16, mf2, ta, ma +; CHECK-NEXT: fsrmi a0, 0 ; CHECK-NEXT: vfredosum.vs v8, v9, v10 +; CHECK-NEXT: fsrm a0 ; CHECK-NEXT: ret entry: %a = call @llvm.riscv.vfredosum.nxv4f16.nxv2f16( %0, %1, %2, - iXLen %3) + iXLen 0, iXLen %3) ret %a } @@ -76,13 +82,15 @@ , , , - iXLen); + iXLen, iXLen); define @intrinsic_vfredosum_mask_vs_nxv4f16_nxv2f16_nxv4f16( %0, %1, %2, %3, iXLen %4) nounwind { ; CHECK-LABEL: intrinsic_vfredosum_mask_vs_nxv4f16_nxv2f16_nxv4f16: ; CHECK: # %bb.0: # %entry ; CHECK-NEXT: vsetvli zero, a0, e16, mf2, ta, ma +; CHECK-NEXT: fsrmi a0, 0 ; CHECK-NEXT: vfredosum.vs v8, v9, v10, v0.t +; CHECK-NEXT: fsrm a0 ; CHECK-NEXT: ret entry: %a = call @llvm.riscv.vfredosum.mask.nxv4f16.nxv2f16.nxv2i1( @@ -90,7 +98,7 @@ %1, %2, %3, - iXLen %4) + iXLen 0, iXLen %4) ret %a } @@ -99,20 +107,22 @@ , , , - iXLen); + iXLen, iXLen); define @intrinsic_vfredosum_vs_nxv4f16_nxv4f16_nxv4f16( %0, %1, %2, iXLen %3) nounwind { ; CHECK-LABEL: intrinsic_vfredosum_vs_nxv4f16_nxv4f16_nxv4f16: ; CHECK: # %bb.0: # %entry ; CHECK-NEXT: vsetvli zero, a0, e16, m1, ta, ma +; CHECK-NEXT: fsrmi a0, 0 ; CHECK-NEXT: vfredosum.vs v8, v9, v10 +; CHECK-NEXT: fsrm a0 ; CHECK-NEXT: ret entry: %a = call @llvm.riscv.vfredosum.nxv4f16.nxv4f16( %0, %1, %2, - iXLen %3) + iXLen 0, iXLen %3) ret %a } @@ -122,13 +132,15 @@ , , , - iXLen); + iXLen, iXLen); define @intrinsic_vfredosum_mask_vs_nxv4f16_nxv4f16_nxv4f16( %0, %1, %2, %3, iXLen %4) nounwind { ; CHECK-LABEL: intrinsic_vfredosum_mask_vs_nxv4f16_nxv4f16_nxv4f16: ; CHECK: # %bb.0: # %entry ; CHECK-NEXT: vsetvli zero, a0, e16, m1, ta, ma +; CHECK-NEXT: fsrmi a0, 0 ; CHECK-NEXT: vfredosum.vs v8, v9, v10, v0.t +; CHECK-NEXT: fsrm a0 ; CHECK-NEXT: ret entry: %a = call @llvm.riscv.vfredosum.mask.nxv4f16.nxv4f16.nxv4i1( @@ -136,7 +148,7 @@ %1, %2, %3, - iXLen %4) + iXLen 0, iXLen %4) ret %a } @@ -145,20 +157,22 @@ , , , - iXLen); + iXLen, iXLen); define @intrinsic_vfredosum_vs_nxv4f16_nxv8f16_nxv4f16( %0, %1, %2, iXLen %3) nounwind { ; CHECK-LABEL: intrinsic_vfredosum_vs_nxv4f16_nxv8f16_nxv4f16: ; CHECK: # %bb.0: # %entry ; CHECK-NEXT: vsetvli zero, a0, e16, m2, ta, ma +; CHECK-NEXT: fsrmi a0, 0 ; CHECK-NEXT: vfredosum.vs v8, v10, v9 +; CHECK-NEXT: fsrm a0 ; CHECK-NEXT: ret entry: %a = call @llvm.riscv.vfredosum.nxv4f16.nxv8f16( %0, %1, %2, - iXLen %3) + iXLen 0, iXLen %3) ret %a } @@ -168,13 +182,15 @@ , , , - iXLen); + iXLen, iXLen); define @intrinsic_vfredosum_mask_vs_nxv4f16_nxv8f16_nxv4f16( %0, %1, %2, %3, iXLen %4) nounwind { ; CHECK-LABEL: intrinsic_vfredosum_mask_vs_nxv4f16_nxv8f16_nxv4f16: ; CHECK: # %bb.0: # %entry ; CHECK-NEXT: vsetvli zero, a0, e16, m2, ta, ma +; CHECK-NEXT: fsrmi a0, 0 ; CHECK-NEXT: vfredosum.vs v8, v10, v9, v0.t +; CHECK-NEXT: fsrm a0 ; CHECK-NEXT: ret entry: %a = call @llvm.riscv.vfredosum.mask.nxv4f16.nxv8f16.nxv8i1( @@ -182,7 +198,7 @@ %1, %2, %3, - iXLen %4) + iXLen 0, iXLen %4) ret %a } @@ -191,20 +207,22 @@ , , , - iXLen); + iXLen, iXLen); define @intrinsic_vfredosum_vs_nxv4f16_nxv16f16_nxv4f16( %0, %1, %2, iXLen %3) nounwind { ; CHECK-LABEL: intrinsic_vfredosum_vs_nxv4f16_nxv16f16_nxv4f16: ; CHECK: # %bb.0: # %entry ; CHECK-NEXT: vsetvli zero, a0, e16, m4, ta, ma +; CHECK-NEXT: fsrmi a0, 0 ; CHECK-NEXT: vfredosum.vs v8, v12, v9 +; CHECK-NEXT: fsrm a0 ; CHECK-NEXT: ret entry: %a = call @llvm.riscv.vfredosum.nxv4f16.nxv16f16( %0, %1, %2, - iXLen %3) + iXLen 0, iXLen %3) ret %a } @@ -214,13 +232,15 @@ , , , - iXLen); + iXLen, iXLen); define @intrinsic_vfredosum_mask_vs_nxv4f16_nxv16f16_nxv4f16( %0, %1, %2, %3, iXLen %4) nounwind { ; CHECK-LABEL: intrinsic_vfredosum_mask_vs_nxv4f16_nxv16f16_nxv4f16: ; CHECK: # %bb.0: # %entry ; CHECK-NEXT: vsetvli zero, a0, e16, m4, ta, ma +; CHECK-NEXT: fsrmi a0, 0 ; CHECK-NEXT: vfredosum.vs v8, v12, v9, v0.t +; CHECK-NEXT: fsrm a0 ; CHECK-NEXT: ret entry: %a = call @llvm.riscv.vfredosum.mask.nxv4f16.nxv16f16.nxv16i1( @@ -228,7 +248,7 @@ %1, %2, %3, - iXLen %4) + iXLen 0, iXLen %4) ret %a } @@ -237,20 +257,22 @@ , , , - iXLen); + iXLen, iXLen); define @intrinsic_vfredosum_vs_nxv4f16_nxv32f16_nxv4f16( %0, %1, %2, iXLen %3) nounwind { ; CHECK-LABEL: intrinsic_vfredosum_vs_nxv4f16_nxv32f16_nxv4f16: ; CHECK: # %bb.0: # %entry ; CHECK-NEXT: vsetvli zero, a0, e16, m8, ta, ma +; CHECK-NEXT: fsrmi a0, 0 ; CHECK-NEXT: vfredosum.vs v8, v16, v9 +; CHECK-NEXT: fsrm a0 ; CHECK-NEXT: ret entry: %a = call @llvm.riscv.vfredosum.nxv4f16.nxv32f16( %0, %1, %2, - iXLen %3) + iXLen 0, iXLen %3) ret %a } @@ -260,13 +282,15 @@ , , , - iXLen); + iXLen, iXLen); define @intrinsic_vfredosum_mask_vs_nxv4f16_nxv32f16_nxv4f16( %0, %1, %2, %3, iXLen %4) nounwind { ; CHECK-LABEL: intrinsic_vfredosum_mask_vs_nxv4f16_nxv32f16_nxv4f16: ; CHECK: # %bb.0: # %entry ; CHECK-NEXT: vsetvli zero, a0, e16, m8, ta, ma +; CHECK-NEXT: fsrmi a0, 0 ; CHECK-NEXT: vfredosum.vs v8, v16, v9, v0.t +; CHECK-NEXT: fsrm a0 ; CHECK-NEXT: ret entry: %a = call @llvm.riscv.vfredosum.mask.nxv4f16.nxv32f16.nxv32i1( @@ -274,7 +298,7 @@ %1, %2, %3, - iXLen %4) + iXLen 0, iXLen %4) ret %a } @@ -283,20 +307,22 @@ , , , - iXLen); + iXLen, iXLen); define @intrinsic_vfredosum_vs_nxv2f32_nxv1f32_nxv2f32( %0, %1, %2, iXLen %3) nounwind { ; CHECK-LABEL: intrinsic_vfredosum_vs_nxv2f32_nxv1f32_nxv2f32: ; CHECK: # %bb.0: # %entry ; CHECK-NEXT: vsetvli zero, a0, e32, mf2, ta, ma +; CHECK-NEXT: fsrmi a0, 0 ; CHECK-NEXT: vfredosum.vs v8, v9, v10 +; CHECK-NEXT: fsrm a0 ; CHECK-NEXT: ret entry: %a = call @llvm.riscv.vfredosum.nxv2f32.nxv1f32( %0, %1, %2, - iXLen %3) + iXLen 0, iXLen %3) ret %a } @@ -306,13 +332,15 @@ , , , - iXLen); + iXLen, iXLen); define @intrinsic_vfredosum_mask_vs_nxv2f32_nxv1f32_nxv2f32( %0, %1, %2, %3, iXLen %4) nounwind { ; CHECK-LABEL: intrinsic_vfredosum_mask_vs_nxv2f32_nxv1f32_nxv2f32: ; CHECK: # %bb.0: # %entry ; CHECK-NEXT: vsetvli zero, a0, e32, mf2, ta, ma +; CHECK-NEXT: fsrmi a0, 0 ; CHECK-NEXT: vfredosum.vs v8, v9, v10, v0.t +; CHECK-NEXT: fsrm a0 ; CHECK-NEXT: ret entry: %a = call @llvm.riscv.vfredosum.mask.nxv2f32.nxv1f32.nxv1i1( @@ -320,7 +348,7 @@ %1, %2, %3, - iXLen %4) + iXLen 0, iXLen %4) ret %a } @@ -329,20 +357,22 @@ , , , - iXLen); + iXLen, iXLen); define @intrinsic_vfredosum_vs_nxv2f32_nxv2f32_nxv2f32( %0, %1, %2, iXLen %3) nounwind { ; CHECK-LABEL: intrinsic_vfredosum_vs_nxv2f32_nxv2f32_nxv2f32: ; CHECK: # %bb.0: # %entry ; CHECK-NEXT: vsetvli zero, a0, e32, m1, ta, ma +; CHECK-NEXT: fsrmi a0, 0 ; CHECK-NEXT: vfredosum.vs v8, v9, v10 +; CHECK-NEXT: fsrm a0 ; CHECK-NEXT: ret entry: %a = call @llvm.riscv.vfredosum.nxv2f32.nxv2f32( %0, %1, %2, - iXLen %3) + iXLen 0, iXLen %3) ret %a } @@ -352,13 +382,15 @@ , , , - iXLen); + iXLen, iXLen); define @intrinsic_vfredosum_mask_vs_nxv2f32_nxv2f32_nxv2f32( %0, %1, %2, %3, iXLen %4) nounwind { ; CHECK-LABEL: intrinsic_vfredosum_mask_vs_nxv2f32_nxv2f32_nxv2f32: ; CHECK: # %bb.0: # %entry ; CHECK-NEXT: vsetvli zero, a0, e32, m1, ta, ma +; CHECK-NEXT: fsrmi a0, 0 ; CHECK-NEXT: vfredosum.vs v8, v9, v10, v0.t +; CHECK-NEXT: fsrm a0 ; CHECK-NEXT: ret entry: %a = call @llvm.riscv.vfredosum.mask.nxv2f32.nxv2f32.nxv2i1( @@ -366,7 +398,7 @@ %1, %2, %3, - iXLen %4) + iXLen 0, iXLen %4) ret %a } @@ -375,20 +407,22 @@ , , , - iXLen); + iXLen, iXLen); define @intrinsic_vfredosum_vs_nxv2f32_nxv4f32_nxv2f32( %0, %1, %2, iXLen %3) nounwind { ; CHECK-LABEL: intrinsic_vfredosum_vs_nxv2f32_nxv4f32_nxv2f32: ; CHECK: # %bb.0: # %entry ; CHECK-NEXT: vsetvli zero, a0, e32, m2, ta, ma +; CHECK-NEXT: fsrmi a0, 0 ; CHECK-NEXT: vfredosum.vs v8, v10, v9 +; CHECK-NEXT: fsrm a0 ; CHECK-NEXT: ret entry: %a = call @llvm.riscv.vfredosum.nxv2f32.nxv4f32( %0, %1, %2, - iXLen %3) + iXLen 0, iXLen %3) ret %a } @@ -398,13 +432,15 @@ , , , - iXLen); + iXLen, iXLen); define @intrinsic_vfredosum_mask_vs_nxv2f32_nxv4f32_nxv2f32( %0, %1, %2, %3, iXLen %4) nounwind { ; CHECK-LABEL: intrinsic_vfredosum_mask_vs_nxv2f32_nxv4f32_nxv2f32: ; CHECK: # %bb.0: # %entry ; CHECK-NEXT: vsetvli zero, a0, e32, m2, ta, ma +; CHECK-NEXT: fsrmi a0, 0 ; CHECK-NEXT: vfredosum.vs v8, v10, v9, v0.t +; CHECK-NEXT: fsrm a0 ; CHECK-NEXT: ret entry: %a = call @llvm.riscv.vfredosum.mask.nxv2f32.nxv4f32.nxv4i1( @@ -412,7 +448,7 @@ %1, %2, %3, - iXLen %4) + iXLen 0, iXLen %4) ret %a } @@ -421,20 +457,22 @@ , , , - iXLen); + iXLen, iXLen); define @intrinsic_vfredosum_vs_nxv2f32_nxv8f32_nxv2f32( %0, %1, %2, iXLen %3) nounwind { ; CHECK-LABEL: intrinsic_vfredosum_vs_nxv2f32_nxv8f32_nxv2f32: ; CHECK: # %bb.0: # %entry ; CHECK-NEXT: vsetvli zero, a0, e32, m4, ta, ma +; CHECK-NEXT: fsrmi a0, 0 ; CHECK-NEXT: vfredosum.vs v8, v12, v9 +; CHECK-NEXT: fsrm a0 ; CHECK-NEXT: ret entry: %a = call @llvm.riscv.vfredosum.nxv2f32.nxv8f32( %0, %1, %2, - iXLen %3) + iXLen 0, iXLen %3) ret %a } @@ -444,13 +482,15 @@ , , , - iXLen); + iXLen, iXLen); define @intrinsic_vfredosum_mask_vs_nxv2f32_nxv8f32_nxv2f32( %0, %1, %2, %3, iXLen %4) nounwind { ; CHECK-LABEL: intrinsic_vfredosum_mask_vs_nxv2f32_nxv8f32_nxv2f32: ; CHECK: # %bb.0: # %entry ; CHECK-NEXT: vsetvli zero, a0, e32, m4, ta, ma +; CHECK-NEXT: fsrmi a0, 0 ; CHECK-NEXT: vfredosum.vs v8, v12, v9, v0.t +; CHECK-NEXT: fsrm a0 ; CHECK-NEXT: ret entry: %a = call @llvm.riscv.vfredosum.mask.nxv2f32.nxv8f32.nxv8i1( @@ -458,7 +498,7 @@ %1, %2, %3, - iXLen %4) + iXLen 0, iXLen %4) ret %a } @@ -467,20 +507,22 @@ , , , - iXLen); + iXLen, iXLen); define @intrinsic_vfredosum_vs_nxv2f32_nxv16f32_nxv2f32( %0, %1, %2, iXLen %3) nounwind { ; CHECK-LABEL: intrinsic_vfredosum_vs_nxv2f32_nxv16f32_nxv2f32: ; CHECK: # %bb.0: # %entry ; CHECK-NEXT: vsetvli zero, a0, e32, m8, ta, ma +; CHECK-NEXT: fsrmi a0, 0 ; CHECK-NEXT: vfredosum.vs v8, v16, v9 +; CHECK-NEXT: fsrm a0 ; CHECK-NEXT: ret entry: %a = call @llvm.riscv.vfredosum.nxv2f32.nxv16f32( %0, %1, %2, - iXLen %3) + iXLen 0, iXLen %3) ret %a } @@ -490,13 +532,15 @@ , , , - iXLen); + iXLen, iXLen); define @intrinsic_vfredosum_mask_vs_nxv2f32_nxv16f32_nxv2f32( %0, %1, %2, %3, iXLen %4) nounwind { ; CHECK-LABEL: intrinsic_vfredosum_mask_vs_nxv2f32_nxv16f32_nxv2f32: ; CHECK: # %bb.0: # %entry ; CHECK-NEXT: vsetvli zero, a0, e32, m8, ta, ma +; CHECK-NEXT: fsrmi a0, 0 ; CHECK-NEXT: vfredosum.vs v8, v16, v9, v0.t +; CHECK-NEXT: fsrm a0 ; CHECK-NEXT: ret entry: %a = call @llvm.riscv.vfredosum.mask.nxv2f32.nxv16f32.nxv16i1( @@ -504,7 +548,7 @@ %1, %2, %3, - iXLen %4) + iXLen 0, iXLen %4) ret %a } @@ -513,20 +557,22 @@ , , , - iXLen); + iXLen, iXLen); define @intrinsic_vfredosum_vs_nxv1f64_nxv1f64_nxv1f64( %0, %1, %2, iXLen %3) nounwind { ; CHECK-LABEL: intrinsic_vfredosum_vs_nxv1f64_nxv1f64_nxv1f64: ; CHECK: # %bb.0: # %entry ; CHECK-NEXT: vsetvli zero, a0, e64, m1, ta, ma +; CHECK-NEXT: fsrmi a0, 0 ; CHECK-NEXT: vfredosum.vs v8, v9, v10 +; CHECK-NEXT: fsrm a0 ; CHECK-NEXT: ret entry: %a = call @llvm.riscv.vfredosum.nxv1f64.nxv1f64( %0, %1, %2, - iXLen %3) + iXLen 0, iXLen %3) ret %a } @@ -536,13 +582,15 @@ , , , - iXLen); + iXLen, iXLen); define @intrinsic_vfredosum_mask_vs_nxv1f64_nxv1f64_nxv1f64( %0, %1, %2, %3, iXLen %4) nounwind { ; CHECK-LABEL: intrinsic_vfredosum_mask_vs_nxv1f64_nxv1f64_nxv1f64: ; CHECK: # %bb.0: # %entry ; CHECK-NEXT: vsetvli zero, a0, e64, m1, ta, ma +; CHECK-NEXT: fsrmi a0, 0 ; CHECK-NEXT: vfredosum.vs v8, v9, v10, v0.t +; CHECK-NEXT: fsrm a0 ; CHECK-NEXT: ret entry: %a = call @llvm.riscv.vfredosum.mask.nxv1f64.nxv1f64.nxv1i1( @@ -550,7 +598,7 @@ %1, %2, %3, - iXLen %4) + iXLen 0, iXLen %4) ret %a } @@ -559,20 +607,22 @@ , , , - iXLen); + iXLen, iXLen); define @intrinsic_vfredosum_vs_nxv1f64_nxv2f64_nxv1f64( %0, %1, %2, iXLen %3) nounwind { ; CHECK-LABEL: intrinsic_vfredosum_vs_nxv1f64_nxv2f64_nxv1f64: ; CHECK: # %bb.0: # %entry ; CHECK-NEXT: vsetvli zero, a0, e64, m2, ta, ma +; CHECK-NEXT: fsrmi a0, 0 ; CHECK-NEXT: vfredosum.vs v8, v10, v9 +; CHECK-NEXT: fsrm a0 ; CHECK-NEXT: ret entry: %a = call @llvm.riscv.vfredosum.nxv1f64.nxv2f64( %0, %1, %2, - iXLen %3) + iXLen 0, iXLen %3) ret %a } @@ -582,13 +632,15 @@ , , , - iXLen); + iXLen, iXLen); define @intrinsic_vfredosum_mask_vs_nxv1f64_nxv2f64_nxv1f64( %0, %1, %2, %3, iXLen %4) nounwind { ; CHECK-LABEL: intrinsic_vfredosum_mask_vs_nxv1f64_nxv2f64_nxv1f64: ; CHECK: # %bb.0: # %entry ; CHECK-NEXT: vsetvli zero, a0, e64, m2, ta, ma +; CHECK-NEXT: fsrmi a0, 0 ; CHECK-NEXT: vfredosum.vs v8, v10, v9, v0.t +; CHECK-NEXT: fsrm a0 ; CHECK-NEXT: ret entry: %a = call @llvm.riscv.vfredosum.mask.nxv1f64.nxv2f64.nxv2i1( @@ -596,7 +648,7 @@ %1, %2, %3, - iXLen %4) + iXLen 0, iXLen %4) ret %a } @@ -605,20 +657,22 @@ , , , - iXLen); + iXLen, iXLen); define @intrinsic_vfredosum_vs_nxv1f64_nxv4f64_nxv1f64( %0, %1, %2, iXLen %3) nounwind { ; CHECK-LABEL: intrinsic_vfredosum_vs_nxv1f64_nxv4f64_nxv1f64: ; CHECK: # %bb.0: # %entry ; CHECK-NEXT: vsetvli zero, a0, e64, m4, ta, ma +; CHECK-NEXT: fsrmi a0, 0 ; CHECK-NEXT: vfredosum.vs v8, v12, v9 +; CHECK-NEXT: fsrm a0 ; CHECK-NEXT: ret entry: %a = call @llvm.riscv.vfredosum.nxv1f64.nxv4f64( %0, %1, %2, - iXLen %3) + iXLen 0, iXLen %3) ret %a } @@ -628,13 +682,15 @@ , , , - iXLen); + iXLen, iXLen); define @intrinsic_vfredosum_mask_vs_nxv1f64_nxv4f64_nxv1f64( %0, %1, %2, %3, iXLen %4) nounwind { ; CHECK-LABEL: intrinsic_vfredosum_mask_vs_nxv1f64_nxv4f64_nxv1f64: ; CHECK: # %bb.0: # %entry ; CHECK-NEXT: vsetvli zero, a0, e64, m4, ta, ma +; CHECK-NEXT: fsrmi a0, 0 ; CHECK-NEXT: vfredosum.vs v8, v12, v9, v0.t +; CHECK-NEXT: fsrm a0 ; CHECK-NEXT: ret entry: %a = call @llvm.riscv.vfredosum.mask.nxv1f64.nxv4f64.nxv4i1( @@ -642,7 +698,7 @@ %1, %2, %3, - iXLen %4) + iXLen 0, iXLen %4) ret %a } @@ -651,20 +707,22 @@ , , , - iXLen); + iXLen, iXLen); define @intrinsic_vfredosum_vs_nxv1f64_nxv8f64_nxv1f64( %0, %1, %2, iXLen %3) nounwind { ; CHECK-LABEL: intrinsic_vfredosum_vs_nxv1f64_nxv8f64_nxv1f64: ; CHECK: # %bb.0: # %entry ; CHECK-NEXT: vsetvli zero, a0, e64, m8, ta, ma +; CHECK-NEXT: fsrmi a0, 0 ; CHECK-NEXT: vfredosum.vs v8, v16, v9 +; CHECK-NEXT: fsrm a0 ; CHECK-NEXT: ret entry: %a = call @llvm.riscv.vfredosum.nxv1f64.nxv8f64( %0, %1, %2, - iXLen %3) + iXLen 0, iXLen %3) ret %a } @@ -674,13 +732,15 @@ , , , - iXLen); + iXLen, iXLen); define @intrinsic_vfredosum_mask_vs_nxv1f64_nxv8f64_nxv1f64( %0, %1, %2, %3, iXLen %4) nounwind { ; CHECK-LABEL: intrinsic_vfredosum_mask_vs_nxv1f64_nxv8f64_nxv1f64: ; CHECK: # %bb.0: # %entry ; CHECK-NEXT: vsetvli zero, a0, e64, m8, ta, ma +; CHECK-NEXT: fsrmi a0, 0 ; CHECK-NEXT: vfredosum.vs v8, v16, v9, v0.t +; CHECK-NEXT: fsrm a0 ; CHECK-NEXT: ret entry: %a = call @llvm.riscv.vfredosum.mask.nxv1f64.nxv8f64.nxv8i1( @@ -688,7 +748,7 @@ %1, %2, %3, - iXLen %4) + iXLen 0, iXLen %4) ret %a } diff --git a/llvm/test/CodeGen/RISCV/rvv/vfredusum.ll b/llvm/test/CodeGen/RISCV/rvv/vfredusum.ll --- a/llvm/test/CodeGen/RISCV/rvv/vfredusum.ll +++ b/llvm/test/CodeGen/RISCV/rvv/vfredusum.ll @@ -7,20 +7,22 @@ , , , - iXLen); + iXLen, iXLen); define @intrinsic_vfredusum_vs_nxv4f16_nxv1f16_nxv4f16( %0, %1, %2, iXLen %3) nounwind { ; CHECK-LABEL: intrinsic_vfredusum_vs_nxv4f16_nxv1f16_nxv4f16: ; CHECK: # %bb.0: # %entry ; CHECK-NEXT: vsetvli zero, a0, e16, mf4, ta, ma +; CHECK-NEXT: fsrmi a0, 0 ; CHECK-NEXT: vfredusum.vs v8, v9, v10 +; CHECK-NEXT: fsrm a0 ; CHECK-NEXT: ret entry: %a = call @llvm.riscv.vfredusum.nxv4f16.nxv1f16( %0, %1, %2, - iXLen %3) + iXLen 0, iXLen %3) ret %a } @@ -30,13 +32,15 @@ , , , - iXLen); + iXLen, iXLen); define @intrinsic_vfredusum_mask_vs_nxv4f16_nxv1f16_nxv4f16( %0, %1, %2, %3, iXLen %4) nounwind { ; CHECK-LABEL: intrinsic_vfredusum_mask_vs_nxv4f16_nxv1f16_nxv4f16: ; CHECK: # %bb.0: # %entry ; CHECK-NEXT: vsetvli zero, a0, e16, mf4, ta, ma +; CHECK-NEXT: fsrmi a0, 0 ; CHECK-NEXT: vfredusum.vs v8, v9, v10, v0.t +; CHECK-NEXT: fsrm a0 ; CHECK-NEXT: ret entry: %a = call @llvm.riscv.vfredusum.mask.nxv4f16.nxv1f16.nxv1i1( @@ -44,7 +48,7 @@ %1, %2, %3, - iXLen %4) + iXLen 0, iXLen %4) ret %a } @@ -53,20 +57,22 @@ , , , - iXLen); + iXLen, iXLen); define @intrinsic_vfredusum_vs_nxv4f16_nxv2f16_nxv4f16( %0, %1, %2, iXLen %3) nounwind { ; CHECK-LABEL: intrinsic_vfredusum_vs_nxv4f16_nxv2f16_nxv4f16: ; CHECK: # %bb.0: # %entry ; CHECK-NEXT: vsetvli zero, a0, e16, mf2, ta, ma +; CHECK-NEXT: fsrmi a0, 0 ; CHECK-NEXT: vfredusum.vs v8, v9, v10 +; CHECK-NEXT: fsrm a0 ; CHECK-NEXT: ret entry: %a = call @llvm.riscv.vfredusum.nxv4f16.nxv2f16( %0, %1, %2, - iXLen %3) + iXLen 0, iXLen %3) ret %a } @@ -76,13 +82,15 @@ , , , - iXLen); + iXLen, iXLen); define @intrinsic_vfredusum_mask_vs_nxv4f16_nxv2f16_nxv4f16( %0, %1, %2, %3, iXLen %4) nounwind { ; CHECK-LABEL: intrinsic_vfredusum_mask_vs_nxv4f16_nxv2f16_nxv4f16: ; CHECK: # %bb.0: # %entry ; CHECK-NEXT: vsetvli zero, a0, e16, mf2, ta, ma +; CHECK-NEXT: fsrmi a0, 0 ; CHECK-NEXT: vfredusum.vs v8, v9, v10, v0.t +; CHECK-NEXT: fsrm a0 ; CHECK-NEXT: ret entry: %a = call @llvm.riscv.vfredusum.mask.nxv4f16.nxv2f16.nxv2i1( @@ -90,7 +98,7 @@ %1, %2, %3, - iXLen %4) + iXLen 0, iXLen %4) ret %a } @@ -99,20 +107,22 @@ , , , - iXLen); + iXLen, iXLen); define @intrinsic_vfredusum_vs_nxv4f16_nxv4f16_nxv4f16( %0, %1, %2, iXLen %3) nounwind { ; CHECK-LABEL: intrinsic_vfredusum_vs_nxv4f16_nxv4f16_nxv4f16: ; CHECK: # %bb.0: # %entry ; CHECK-NEXT: vsetvli zero, a0, e16, m1, ta, ma +; CHECK-NEXT: fsrmi a0, 0 ; CHECK-NEXT: vfredusum.vs v8, v9, v10 +; CHECK-NEXT: fsrm a0 ; CHECK-NEXT: ret entry: %a = call @llvm.riscv.vfredusum.nxv4f16.nxv4f16( %0, %1, %2, - iXLen %3) + iXLen 0, iXLen %3) ret %a } @@ -122,13 +132,15 @@ , , , - iXLen); + iXLen, iXLen); define @intrinsic_vfredusum_mask_vs_nxv4f16_nxv4f16_nxv4f16( %0, %1, %2, %3, iXLen %4) nounwind { ; CHECK-LABEL: intrinsic_vfredusum_mask_vs_nxv4f16_nxv4f16_nxv4f16: ; CHECK: # %bb.0: # %entry ; CHECK-NEXT: vsetvli zero, a0, e16, m1, ta, ma +; CHECK-NEXT: fsrmi a0, 0 ; CHECK-NEXT: vfredusum.vs v8, v9, v10, v0.t +; CHECK-NEXT: fsrm a0 ; CHECK-NEXT: ret entry: %a = call @llvm.riscv.vfredusum.mask.nxv4f16.nxv4f16.nxv4i1( @@ -136,7 +148,7 @@ %1, %2, %3, - iXLen %4) + iXLen 0, iXLen %4) ret %a } @@ -145,20 +157,22 @@ , , , - iXLen); + iXLen, iXLen); define @intrinsic_vfredusum_vs_nxv4f16_nxv8f16_nxv4f16( %0, %1, %2, iXLen %3) nounwind { ; CHECK-LABEL: intrinsic_vfredusum_vs_nxv4f16_nxv8f16_nxv4f16: ; CHECK: # %bb.0: # %entry ; CHECK-NEXT: vsetvli zero, a0, e16, m2, ta, ma +; CHECK-NEXT: fsrmi a0, 0 ; CHECK-NEXT: vfredusum.vs v8, v10, v9 +; CHECK-NEXT: fsrm a0 ; CHECK-NEXT: ret entry: %a = call @llvm.riscv.vfredusum.nxv4f16.nxv8f16( %0, %1, %2, - iXLen %3) + iXLen 0, iXLen %3) ret %a } @@ -168,13 +182,15 @@ , , , - iXLen); + iXLen, iXLen); define @intrinsic_vfredusum_mask_vs_nxv4f16_nxv8f16_nxv4f16( %0, %1, %2, %3, iXLen %4) nounwind { ; CHECK-LABEL: intrinsic_vfredusum_mask_vs_nxv4f16_nxv8f16_nxv4f16: ; CHECK: # %bb.0: # %entry ; CHECK-NEXT: vsetvli zero, a0, e16, m2, ta, ma +; CHECK-NEXT: fsrmi a0, 0 ; CHECK-NEXT: vfredusum.vs v8, v10, v9, v0.t +; CHECK-NEXT: fsrm a0 ; CHECK-NEXT: ret entry: %a = call @llvm.riscv.vfredusum.mask.nxv4f16.nxv8f16.nxv8i1( @@ -182,7 +198,7 @@ %1, %2, %3, - iXLen %4) + iXLen 0, iXLen %4) ret %a } @@ -191,20 +207,22 @@ , , , - iXLen); + iXLen, iXLen); define @intrinsic_vfredusum_vs_nxv4f16_nxv16f16_nxv4f16( %0, %1, %2, iXLen %3) nounwind { ; CHECK-LABEL: intrinsic_vfredusum_vs_nxv4f16_nxv16f16_nxv4f16: ; CHECK: # %bb.0: # %entry ; CHECK-NEXT: vsetvli zero, a0, e16, m4, ta, ma +; CHECK-NEXT: fsrmi a0, 0 ; CHECK-NEXT: vfredusum.vs v8, v12, v9 +; CHECK-NEXT: fsrm a0 ; CHECK-NEXT: ret entry: %a = call @llvm.riscv.vfredusum.nxv4f16.nxv16f16( %0, %1, %2, - iXLen %3) + iXLen 0, iXLen %3) ret %a } @@ -214,13 +232,15 @@ , , , - iXLen); + iXLen, iXLen); define @intrinsic_vfredusum_mask_vs_nxv4f16_nxv16f16_nxv4f16( %0, %1, %2, %3, iXLen %4) nounwind { ; CHECK-LABEL: intrinsic_vfredusum_mask_vs_nxv4f16_nxv16f16_nxv4f16: ; CHECK: # %bb.0: # %entry ; CHECK-NEXT: vsetvli zero, a0, e16, m4, ta, ma +; CHECK-NEXT: fsrmi a0, 0 ; CHECK-NEXT: vfredusum.vs v8, v12, v9, v0.t +; CHECK-NEXT: fsrm a0 ; CHECK-NEXT: ret entry: %a = call @llvm.riscv.vfredusum.mask.nxv4f16.nxv16f16.nxv16i1( @@ -228,7 +248,7 @@ %1, %2, %3, - iXLen %4) + iXLen 0, iXLen %4) ret %a } @@ -237,20 +257,22 @@ , , , - iXLen); + iXLen, iXLen); define @intrinsic_vfredusum_vs_nxv4f16_nxv32f16_nxv4f16( %0, %1, %2, iXLen %3) nounwind { ; CHECK-LABEL: intrinsic_vfredusum_vs_nxv4f16_nxv32f16_nxv4f16: ; CHECK: # %bb.0: # %entry ; CHECK-NEXT: vsetvli zero, a0, e16, m8, ta, ma +; CHECK-NEXT: fsrmi a0, 0 ; CHECK-NEXT: vfredusum.vs v8, v16, v9 +; CHECK-NEXT: fsrm a0 ; CHECK-NEXT: ret entry: %a = call @llvm.riscv.vfredusum.nxv4f16.nxv32f16( %0, %1, %2, - iXLen %3) + iXLen 0, iXLen %3) ret %a } @@ -260,13 +282,15 @@ , , , - iXLen); + iXLen, iXLen); define @intrinsic_vfredusum_mask_vs_nxv4f16_nxv32f16_nxv4f16( %0, %1, %2, %3, iXLen %4) nounwind { ; CHECK-LABEL: intrinsic_vfredusum_mask_vs_nxv4f16_nxv32f16_nxv4f16: ; CHECK: # %bb.0: # %entry ; CHECK-NEXT: vsetvli zero, a0, e16, m8, ta, ma +; CHECK-NEXT: fsrmi a0, 0 ; CHECK-NEXT: vfredusum.vs v8, v16, v9, v0.t +; CHECK-NEXT: fsrm a0 ; CHECK-NEXT: ret entry: %a = call @llvm.riscv.vfredusum.mask.nxv4f16.nxv32f16.nxv32i1( @@ -274,7 +298,7 @@ %1, %2, %3, - iXLen %4) + iXLen 0, iXLen %4) ret %a } @@ -283,20 +307,22 @@ , , , - iXLen); + iXLen, iXLen); define @intrinsic_vfredusum_vs_nxv2f32_nxv1f32_nxv2f32( %0, %1, %2, iXLen %3) nounwind { ; CHECK-LABEL: intrinsic_vfredusum_vs_nxv2f32_nxv1f32_nxv2f32: ; CHECK: # %bb.0: # %entry ; CHECK-NEXT: vsetvli zero, a0, e32, mf2, ta, ma +; CHECK-NEXT: fsrmi a0, 0 ; CHECK-NEXT: vfredusum.vs v8, v9, v10 +; CHECK-NEXT: fsrm a0 ; CHECK-NEXT: ret entry: %a = call @llvm.riscv.vfredusum.nxv2f32.nxv1f32( %0, %1, %2, - iXLen %3) + iXLen 0, iXLen %3) ret %a } @@ -306,13 +332,15 @@ , , , - iXLen); + iXLen, iXLen); define @intrinsic_vfredusum_mask_vs_nxv2f32_nxv1f32_nxv2f32( %0, %1, %2, %3, iXLen %4) nounwind { ; CHECK-LABEL: intrinsic_vfredusum_mask_vs_nxv2f32_nxv1f32_nxv2f32: ; CHECK: # %bb.0: # %entry ; CHECK-NEXT: vsetvli zero, a0, e32, mf2, ta, ma +; CHECK-NEXT: fsrmi a0, 0 ; CHECK-NEXT: vfredusum.vs v8, v9, v10, v0.t +; CHECK-NEXT: fsrm a0 ; CHECK-NEXT: ret entry: %a = call @llvm.riscv.vfredusum.mask.nxv2f32.nxv1f32.nxv1i1( @@ -320,7 +348,7 @@ %1, %2, %3, - iXLen %4) + iXLen 0, iXLen %4) ret %a } @@ -329,20 +357,22 @@ , , , - iXLen); + iXLen, iXLen); define @intrinsic_vfredusum_vs_nxv2f32_nxv2f32_nxv2f32( %0, %1, %2, iXLen %3) nounwind { ; CHECK-LABEL: intrinsic_vfredusum_vs_nxv2f32_nxv2f32_nxv2f32: ; CHECK: # %bb.0: # %entry ; CHECK-NEXT: vsetvli zero, a0, e32, m1, ta, ma +; CHECK-NEXT: fsrmi a0, 0 ; CHECK-NEXT: vfredusum.vs v8, v9, v10 +; CHECK-NEXT: fsrm a0 ; CHECK-NEXT: ret entry: %a = call @llvm.riscv.vfredusum.nxv2f32.nxv2f32( %0, %1, %2, - iXLen %3) + iXLen 0, iXLen %3) ret %a } @@ -352,13 +382,15 @@ , , , - iXLen); + iXLen, iXLen); define @intrinsic_vfredusum_mask_vs_nxv2f32_nxv2f32_nxv2f32( %0, %1, %2, %3, iXLen %4) nounwind { ; CHECK-LABEL: intrinsic_vfredusum_mask_vs_nxv2f32_nxv2f32_nxv2f32: ; CHECK: # %bb.0: # %entry ; CHECK-NEXT: vsetvli zero, a0, e32, m1, ta, ma +; CHECK-NEXT: fsrmi a0, 0 ; CHECK-NEXT: vfredusum.vs v8, v9, v10, v0.t +; CHECK-NEXT: fsrm a0 ; CHECK-NEXT: ret entry: %a = call @llvm.riscv.vfredusum.mask.nxv2f32.nxv2f32.nxv2i1( @@ -366,7 +398,7 @@ %1, %2, %3, - iXLen %4) + iXLen 0, iXLen %4) ret %a } @@ -375,20 +407,22 @@ , , , - iXLen); + iXLen, iXLen); define @intrinsic_vfredusum_vs_nxv2f32_nxv4f32_nxv2f32( %0, %1, %2, iXLen %3) nounwind { ; CHECK-LABEL: intrinsic_vfredusum_vs_nxv2f32_nxv4f32_nxv2f32: ; CHECK: # %bb.0: # %entry ; CHECK-NEXT: vsetvli zero, a0, e32, m2, ta, ma +; CHECK-NEXT: fsrmi a0, 0 ; CHECK-NEXT: vfredusum.vs v8, v10, v9 +; CHECK-NEXT: fsrm a0 ; CHECK-NEXT: ret entry: %a = call @llvm.riscv.vfredusum.nxv2f32.nxv4f32( %0, %1, %2, - iXLen %3) + iXLen 0, iXLen %3) ret %a } @@ -398,13 +432,15 @@ , , , - iXLen); + iXLen, iXLen); define @intrinsic_vfredusum_mask_vs_nxv2f32_nxv4f32_nxv2f32( %0, %1, %2, %3, iXLen %4) nounwind { ; CHECK-LABEL: intrinsic_vfredusum_mask_vs_nxv2f32_nxv4f32_nxv2f32: ; CHECK: # %bb.0: # %entry ; CHECK-NEXT: vsetvli zero, a0, e32, m2, ta, ma +; CHECK-NEXT: fsrmi a0, 0 ; CHECK-NEXT: vfredusum.vs v8, v10, v9, v0.t +; CHECK-NEXT: fsrm a0 ; CHECK-NEXT: ret entry: %a = call @llvm.riscv.vfredusum.mask.nxv2f32.nxv4f32.nxv4i1( @@ -412,7 +448,7 @@ %1, %2, %3, - iXLen %4) + iXLen 0, iXLen %4) ret %a } @@ -421,20 +457,22 @@ , , , - iXLen); + iXLen, iXLen); define @intrinsic_vfredusum_vs_nxv2f32_nxv8f32_nxv2f32( %0, %1, %2, iXLen %3) nounwind { ; CHECK-LABEL: intrinsic_vfredusum_vs_nxv2f32_nxv8f32_nxv2f32: ; CHECK: # %bb.0: # %entry ; CHECK-NEXT: vsetvli zero, a0, e32, m4, ta, ma +; CHECK-NEXT: fsrmi a0, 0 ; CHECK-NEXT: vfredusum.vs v8, v12, v9 +; CHECK-NEXT: fsrm a0 ; CHECK-NEXT: ret entry: %a = call @llvm.riscv.vfredusum.nxv2f32.nxv8f32( %0, %1, %2, - iXLen %3) + iXLen 0, iXLen %3) ret %a } @@ -444,13 +482,15 @@ , , , - iXLen); + iXLen, iXLen); define @intrinsic_vfredusum_mask_vs_nxv2f32_nxv8f32_nxv2f32( %0, %1, %2, %3, iXLen %4) nounwind { ; CHECK-LABEL: intrinsic_vfredusum_mask_vs_nxv2f32_nxv8f32_nxv2f32: ; CHECK: # %bb.0: # %entry ; CHECK-NEXT: vsetvli zero, a0, e32, m4, ta, ma +; CHECK-NEXT: fsrmi a0, 0 ; CHECK-NEXT: vfredusum.vs v8, v12, v9, v0.t +; CHECK-NEXT: fsrm a0 ; CHECK-NEXT: ret entry: %a = call @llvm.riscv.vfredusum.mask.nxv2f32.nxv8f32.nxv8i1( @@ -458,7 +498,7 @@ %1, %2, %3, - iXLen %4) + iXLen 0, iXLen %4) ret %a } @@ -467,20 +507,22 @@ , , , - iXLen); + iXLen, iXLen); define @intrinsic_vfredusum_vs_nxv2f32_nxv16f32_nxv2f32( %0, %1, %2, iXLen %3) nounwind { ; CHECK-LABEL: intrinsic_vfredusum_vs_nxv2f32_nxv16f32_nxv2f32: ; CHECK: # %bb.0: # %entry ; CHECK-NEXT: vsetvli zero, a0, e32, m8, ta, ma +; CHECK-NEXT: fsrmi a0, 0 ; CHECK-NEXT: vfredusum.vs v8, v16, v9 +; CHECK-NEXT: fsrm a0 ; CHECK-NEXT: ret entry: %a = call @llvm.riscv.vfredusum.nxv2f32.nxv16f32( %0, %1, %2, - iXLen %3) + iXLen 0, iXLen %3) ret %a } @@ -490,13 +532,15 @@ , , , - iXLen); + iXLen, iXLen); define @intrinsic_vfredusum_mask_vs_nxv2f32_nxv16f32_nxv2f32( %0, %1, %2, %3, iXLen %4) nounwind { ; CHECK-LABEL: intrinsic_vfredusum_mask_vs_nxv2f32_nxv16f32_nxv2f32: ; CHECK: # %bb.0: # %entry ; CHECK-NEXT: vsetvli zero, a0, e32, m8, ta, ma +; CHECK-NEXT: fsrmi a0, 0 ; CHECK-NEXT: vfredusum.vs v8, v16, v9, v0.t +; CHECK-NEXT: fsrm a0 ; CHECK-NEXT: ret entry: %a = call @llvm.riscv.vfredusum.mask.nxv2f32.nxv16f32.nxv16i1( @@ -504,7 +548,7 @@ %1, %2, %3, - iXLen %4) + iXLen 0, iXLen %4) ret %a } @@ -513,20 +557,22 @@ , , , - iXLen); + iXLen, iXLen); define @intrinsic_vfredusum_vs_nxv1f64_nxv1f64_nxv1f64( %0, %1, %2, iXLen %3) nounwind { ; CHECK-LABEL: intrinsic_vfredusum_vs_nxv1f64_nxv1f64_nxv1f64: ; CHECK: # %bb.0: # %entry ; CHECK-NEXT: vsetvli zero, a0, e64, m1, ta, ma +; CHECK-NEXT: fsrmi a0, 0 ; CHECK-NEXT: vfredusum.vs v8, v9, v10 +; CHECK-NEXT: fsrm a0 ; CHECK-NEXT: ret entry: %a = call @llvm.riscv.vfredusum.nxv1f64.nxv1f64( %0, %1, %2, - iXLen %3) + iXLen 0, iXLen %3) ret %a } @@ -536,13 +582,15 @@ , , , - iXLen); + iXLen, iXLen); define @intrinsic_vfredusum_mask_vs_nxv1f64_nxv1f64_nxv1f64( %0, %1, %2, %3, iXLen %4) nounwind { ; CHECK-LABEL: intrinsic_vfredusum_mask_vs_nxv1f64_nxv1f64_nxv1f64: ; CHECK: # %bb.0: # %entry ; CHECK-NEXT: vsetvli zero, a0, e64, m1, ta, ma +; CHECK-NEXT: fsrmi a0, 0 ; CHECK-NEXT: vfredusum.vs v8, v9, v10, v0.t +; CHECK-NEXT: fsrm a0 ; CHECK-NEXT: ret entry: %a = call @llvm.riscv.vfredusum.mask.nxv1f64.nxv1f64.nxv1i1( @@ -550,7 +598,7 @@ %1, %2, %3, - iXLen %4) + iXLen 0, iXLen %4) ret %a } @@ -559,20 +607,22 @@ , , , - iXLen); + iXLen, iXLen); define @intrinsic_vfredusum_vs_nxv1f64_nxv2f64_nxv1f64( %0, %1, %2, iXLen %3) nounwind { ; CHECK-LABEL: intrinsic_vfredusum_vs_nxv1f64_nxv2f64_nxv1f64: ; CHECK: # %bb.0: # %entry ; CHECK-NEXT: vsetvli zero, a0, e64, m2, ta, ma +; CHECK-NEXT: fsrmi a0, 0 ; CHECK-NEXT: vfredusum.vs v8, v10, v9 +; CHECK-NEXT: fsrm a0 ; CHECK-NEXT: ret entry: %a = call @llvm.riscv.vfredusum.nxv1f64.nxv2f64( %0, %1, %2, - iXLen %3) + iXLen 0, iXLen %3) ret %a } @@ -582,13 +632,15 @@ , , , - iXLen); + iXLen, iXLen); define @intrinsic_vfredusum_mask_vs_nxv1f64_nxv2f64_nxv1f64( %0, %1, %2, %3, iXLen %4) nounwind { ; CHECK-LABEL: intrinsic_vfredusum_mask_vs_nxv1f64_nxv2f64_nxv1f64: ; CHECK: # %bb.0: # %entry ; CHECK-NEXT: vsetvli zero, a0, e64, m2, ta, ma +; CHECK-NEXT: fsrmi a0, 0 ; CHECK-NEXT: vfredusum.vs v8, v10, v9, v0.t +; CHECK-NEXT: fsrm a0 ; CHECK-NEXT: ret entry: %a = call @llvm.riscv.vfredusum.mask.nxv1f64.nxv2f64.nxv2i1( @@ -596,7 +648,7 @@ %1, %2, %3, - iXLen %4) + iXLen 0, iXLen %4) ret %a } @@ -605,20 +657,22 @@ , , , - iXLen); + iXLen, iXLen); define @intrinsic_vfredusum_vs_nxv1f64_nxv4f64_nxv1f64( %0, %1, %2, iXLen %3) nounwind { ; CHECK-LABEL: intrinsic_vfredusum_vs_nxv1f64_nxv4f64_nxv1f64: ; CHECK: # %bb.0: # %entry ; CHECK-NEXT: vsetvli zero, a0, e64, m4, ta, ma +; CHECK-NEXT: fsrmi a0, 0 ; CHECK-NEXT: vfredusum.vs v8, v12, v9 +; CHECK-NEXT: fsrm a0 ; CHECK-NEXT: ret entry: %a = call @llvm.riscv.vfredusum.nxv1f64.nxv4f64( %0, %1, %2, - iXLen %3) + iXLen 0, iXLen %3) ret %a } @@ -628,13 +682,15 @@ , , , - iXLen); + iXLen, iXLen); define @intrinsic_vfredusum_mask_vs_nxv1f64_nxv4f64_nxv1f64( %0, %1, %2, %3, iXLen %4) nounwind { ; CHECK-LABEL: intrinsic_vfredusum_mask_vs_nxv1f64_nxv4f64_nxv1f64: ; CHECK: # %bb.0: # %entry ; CHECK-NEXT: vsetvli zero, a0, e64, m4, ta, ma +; CHECK-NEXT: fsrmi a0, 0 ; CHECK-NEXT: vfredusum.vs v8, v12, v9, v0.t +; CHECK-NEXT: fsrm a0 ; CHECK-NEXT: ret entry: %a = call @llvm.riscv.vfredusum.mask.nxv1f64.nxv4f64.nxv4i1( @@ -642,7 +698,7 @@ %1, %2, %3, - iXLen %4) + iXLen 0, iXLen %4) ret %a } @@ -651,20 +707,22 @@ , , , - iXLen); + iXLen, iXLen); define @intrinsic_vfredusum_vs_nxv1f64_nxv8f64_nxv1f64( %0, %1, %2, iXLen %3) nounwind { ; CHECK-LABEL: intrinsic_vfredusum_vs_nxv1f64_nxv8f64_nxv1f64: ; CHECK: # %bb.0: # %entry ; CHECK-NEXT: vsetvli zero, a0, e64, m8, ta, ma +; CHECK-NEXT: fsrmi a0, 0 ; CHECK-NEXT: vfredusum.vs v8, v16, v9 +; CHECK-NEXT: fsrm a0 ; CHECK-NEXT: ret entry: %a = call @llvm.riscv.vfredusum.nxv1f64.nxv8f64( %0, %1, %2, - iXLen %3) + iXLen 0, iXLen %3) ret %a } @@ -674,13 +732,15 @@ , , , - iXLen); + iXLen, iXLen); define @intrinsic_vfredusum_mask_vs_nxv1f64_nxv8f64_nxv1f64( %0, %1, %2, %3, iXLen %4) nounwind { ; CHECK-LABEL: intrinsic_vfredusum_mask_vs_nxv1f64_nxv8f64_nxv1f64: ; CHECK: # %bb.0: # %entry ; CHECK-NEXT: vsetvli zero, a0, e64, m8, ta, ma +; CHECK-NEXT: fsrmi a0, 0 ; CHECK-NEXT: vfredusum.vs v8, v16, v9, v0.t +; CHECK-NEXT: fsrm a0 ; CHECK-NEXT: ret entry: %a = call @llvm.riscv.vfredusum.mask.nxv1f64.nxv8f64.nxv8i1( @@ -688,7 +748,7 @@ %1, %2, %3, - iXLen %4) + iXLen 0, iXLen %4) ret %a } diff --git a/llvm/test/CodeGen/RISCV/rvv/vfwredosum.ll b/llvm/test/CodeGen/RISCV/rvv/vfwredosum.ll --- a/llvm/test/CodeGen/RISCV/rvv/vfwredosum.ll +++ b/llvm/test/CodeGen/RISCV/rvv/vfwredosum.ll @@ -7,20 +7,22 @@ , , , - iXLen); + iXLen, iXLen); define @intrinsic_vfwredosum_vs_nxv2f32_nxv1f16_nxv2f32( %0, %1, %2, iXLen %3) nounwind { ; CHECK-LABEL: intrinsic_vfwredosum_vs_nxv2f32_nxv1f16_nxv2f32: ; CHECK: # %bb.0: # %entry ; CHECK-NEXT: vsetvli zero, a0, e16, mf4, ta, ma +; CHECK-NEXT: fsrmi a0, 0 ; CHECK-NEXT: vfwredosum.vs v8, v9, v10 +; CHECK-NEXT: fsrm a0 ; CHECK-NEXT: ret entry: %a = call @llvm.riscv.vfwredosum.nxv2f32.nxv1f16( %0, %1, %2, - iXLen %3) + iXLen 0, iXLen %3) ret %a } @@ -30,13 +32,15 @@ , , , - iXLen); + iXLen, iXLen); define @intrinsic_vfwredosum_mask_vs_nxv2f32_nxv1f16_nxv2f32( %0, %1, %2, %3, iXLen %4) nounwind { ; CHECK-LABEL: intrinsic_vfwredosum_mask_vs_nxv2f32_nxv1f16_nxv2f32: ; CHECK: # %bb.0: # %entry ; CHECK-NEXT: vsetvli zero, a0, e16, mf4, ta, ma +; CHECK-NEXT: fsrmi a0, 0 ; CHECK-NEXT: vfwredosum.vs v8, v9, v10, v0.t +; CHECK-NEXT: fsrm a0 ; CHECK-NEXT: ret entry: %a = call @llvm.riscv.vfwredosum.mask.nxv2f32.nxv1f16.nxv2f32( @@ -44,7 +48,7 @@ %1, %2, %3, - iXLen %4) + iXLen 0, iXLen %4) ret %a } @@ -53,20 +57,22 @@ , , , - iXLen); + iXLen, iXLen); define @intrinsic_vfwredosum_vs_nxv2f32_nxv2f16_nxv2f32( %0, %1, %2, iXLen %3) nounwind { ; CHECK-LABEL: intrinsic_vfwredosum_vs_nxv2f32_nxv2f16_nxv2f32: ; CHECK: # %bb.0: # %entry ; CHECK-NEXT: vsetvli zero, a0, e16, mf2, ta, ma +; CHECK-NEXT: fsrmi a0, 0 ; CHECK-NEXT: vfwredosum.vs v8, v9, v10 +; CHECK-NEXT: fsrm a0 ; CHECK-NEXT: ret entry: %a = call @llvm.riscv.vfwredosum.nxv2f32.nxv2f16( %0, %1, %2, - iXLen %3) + iXLen 0, iXLen %3) ret %a } @@ -76,13 +82,15 @@ , , , - iXLen); + iXLen, iXLen); define @intrinsic_vfwredosum_mask_vs_nxv2f32_nxv2f16_nxv2f32( %0, %1, %2, %3, iXLen %4) nounwind { ; CHECK-LABEL: intrinsic_vfwredosum_mask_vs_nxv2f32_nxv2f16_nxv2f32: ; CHECK: # %bb.0: # %entry ; CHECK-NEXT: vsetvli zero, a0, e16, mf2, ta, ma +; CHECK-NEXT: fsrmi a0, 0 ; CHECK-NEXT: vfwredosum.vs v8, v9, v10, v0.t +; CHECK-NEXT: fsrm a0 ; CHECK-NEXT: ret entry: %a = call @llvm.riscv.vfwredosum.mask.nxv2f32.nxv2f16.nxv2f32( @@ -90,7 +98,7 @@ %1, %2, %3, - iXLen %4) + iXLen 0, iXLen %4) ret %a } @@ -99,20 +107,22 @@ , , , - iXLen); + iXLen, iXLen); define @intrinsic_vfwredosum_vs_nxv2f32_nxv4f16_nxv2f32( %0, %1, %2, iXLen %3) nounwind { ; CHECK-LABEL: intrinsic_vfwredosum_vs_nxv2f32_nxv4f16_nxv2f32: ; CHECK: # %bb.0: # %entry ; CHECK-NEXT: vsetvli zero, a0, e16, m1, ta, ma +; CHECK-NEXT: fsrmi a0, 0 ; CHECK-NEXT: vfwredosum.vs v8, v9, v10 +; CHECK-NEXT: fsrm a0 ; CHECK-NEXT: ret entry: %a = call @llvm.riscv.vfwredosum.nxv2f32.nxv4f16( %0, %1, %2, - iXLen %3) + iXLen 0, iXLen %3) ret %a } @@ -122,13 +132,15 @@ , , , - iXLen); + iXLen, iXLen); define @intrinsic_vfwredosum_mask_vs_nxv2f32_nxv4f16_nxv2f32( %0, %1, %2, %3, iXLen %4) nounwind { ; CHECK-LABEL: intrinsic_vfwredosum_mask_vs_nxv2f32_nxv4f16_nxv2f32: ; CHECK: # %bb.0: # %entry ; CHECK-NEXT: vsetvli zero, a0, e16, m1, ta, ma +; CHECK-NEXT: fsrmi a0, 0 ; CHECK-NEXT: vfwredosum.vs v8, v9, v10, v0.t +; CHECK-NEXT: fsrm a0 ; CHECK-NEXT: ret entry: %a = call @llvm.riscv.vfwredosum.mask.nxv2f32.nxv4f16.nxv2f32( @@ -136,7 +148,7 @@ %1, %2, %3, - iXLen %4) + iXLen 0, iXLen %4) ret %a } @@ -145,20 +157,22 @@ , , , - iXLen); + iXLen, iXLen); define @intrinsic_vfwredosum_vs_nxv2f32_nxv8f16_nxv2f32( %0, %1, %2, iXLen %3) nounwind { ; CHECK-LABEL: intrinsic_vfwredosum_vs_nxv2f32_nxv8f16_nxv2f32: ; CHECK: # %bb.0: # %entry ; CHECK-NEXT: vsetvli zero, a0, e16, m2, ta, ma +; CHECK-NEXT: fsrmi a0, 0 ; CHECK-NEXT: vfwredosum.vs v8, v10, v9 +; CHECK-NEXT: fsrm a0 ; CHECK-NEXT: ret entry: %a = call @llvm.riscv.vfwredosum.nxv2f32.nxv8f16( %0, %1, %2, - iXLen %3) + iXLen 0, iXLen %3) ret %a } @@ -168,13 +182,15 @@ , , , - iXLen); + iXLen, iXLen); define @intrinsic_vfwredosum_mask_vs_nxv2f32_nxv8f16_nxv2f32( %0, %1, %2, %3, iXLen %4) nounwind { ; CHECK-LABEL: intrinsic_vfwredosum_mask_vs_nxv2f32_nxv8f16_nxv2f32: ; CHECK: # %bb.0: # %entry ; CHECK-NEXT: vsetvli zero, a0, e16, m2, ta, ma +; CHECK-NEXT: fsrmi a0, 0 ; CHECK-NEXT: vfwredosum.vs v8, v10, v9, v0.t +; CHECK-NEXT: fsrm a0 ; CHECK-NEXT: ret entry: %a = call @llvm.riscv.vfwredosum.mask.nxv2f32.nxv8f16.nxv2f32( @@ -182,7 +198,7 @@ %1, %2, %3, - iXLen %4) + iXLen 0, iXLen %4) ret %a } @@ -191,20 +207,22 @@ , , , - iXLen); + iXLen, iXLen); define @intrinsic_vfwredosum_vs_nxv2f32_nxv16f16_nxv2f32( %0, %1, %2, iXLen %3) nounwind { ; CHECK-LABEL: intrinsic_vfwredosum_vs_nxv2f32_nxv16f16_nxv2f32: ; CHECK: # %bb.0: # %entry ; CHECK-NEXT: vsetvli zero, a0, e16, m4, ta, ma +; CHECK-NEXT: fsrmi a0, 0 ; CHECK-NEXT: vfwredosum.vs v8, v12, v9 +; CHECK-NEXT: fsrm a0 ; CHECK-NEXT: ret entry: %a = call @llvm.riscv.vfwredosum.nxv2f32.nxv16f16( %0, %1, %2, - iXLen %3) + iXLen 0, iXLen %3) ret %a } @@ -214,13 +232,15 @@ , , , - iXLen); + iXLen, iXLen); define @intrinsic_vfwredosum_mask_vs_nxv2f32_nxv16f16_nxv2f32( %0, %1, %2, %3, iXLen %4) nounwind { ; CHECK-LABEL: intrinsic_vfwredosum_mask_vs_nxv2f32_nxv16f16_nxv2f32: ; CHECK: # %bb.0: # %entry ; CHECK-NEXT: vsetvli zero, a0, e16, m4, ta, ma +; CHECK-NEXT: fsrmi a0, 0 ; CHECK-NEXT: vfwredosum.vs v8, v12, v9, v0.t +; CHECK-NEXT: fsrm a0 ; CHECK-NEXT: ret entry: %a = call @llvm.riscv.vfwredosum.mask.nxv2f32.nxv16f16.nxv2f32( @@ -228,7 +248,7 @@ %1, %2, %3, - iXLen %4) + iXLen 0, iXLen %4) ret %a } @@ -237,20 +257,22 @@ , , , - iXLen); + iXLen, iXLen); define @intrinsic_vfwredosum_vs_nxv2f32_nxv32f16_nxv2f32( %0, %1, %2, iXLen %3) nounwind { ; CHECK-LABEL: intrinsic_vfwredosum_vs_nxv2f32_nxv32f16_nxv2f32: ; CHECK: # %bb.0: # %entry ; CHECK-NEXT: vsetvli zero, a0, e16, m8, ta, ma +; CHECK-NEXT: fsrmi a0, 0 ; CHECK-NEXT: vfwredosum.vs v8, v16, v9 +; CHECK-NEXT: fsrm a0 ; CHECK-NEXT: ret entry: %a = call @llvm.riscv.vfwredosum.nxv2f32.nxv32f16( %0, %1, %2, - iXLen %3) + iXLen 0, iXLen %3) ret %a } @@ -260,13 +282,15 @@ , , , - iXLen); + iXLen, iXLen); define @intrinsic_vfwredosum_mask_vs_nxv2f32_nxv32f16_nxv2f32( %0, %1, %2, %3, iXLen %4) nounwind { ; CHECK-LABEL: intrinsic_vfwredosum_mask_vs_nxv2f32_nxv32f16_nxv2f32: ; CHECK: # %bb.0: # %entry ; CHECK-NEXT: vsetvli zero, a0, e16, m8, ta, ma +; CHECK-NEXT: fsrmi a0, 0 ; CHECK-NEXT: vfwredosum.vs v8, v16, v9, v0.t +; CHECK-NEXT: fsrm a0 ; CHECK-NEXT: ret entry: %a = call @llvm.riscv.vfwredosum.mask.nxv2f32.nxv32f16( @@ -274,7 +298,7 @@ %1, %2, %3, - iXLen %4) + iXLen 0, iXLen %4) ret %a } @@ -283,20 +307,22 @@ , , , - iXLen); + iXLen, iXLen); define @intrinsic_vfwredosum_vs_nxv1f64_nxv1f32_nxv1f64( %0, %1, %2, iXLen %3) nounwind { ; CHECK-LABEL: intrinsic_vfwredosum_vs_nxv1f64_nxv1f32_nxv1f64: ; CHECK: # %bb.0: # %entry ; CHECK-NEXT: vsetvli zero, a0, e32, mf2, ta, ma +; CHECK-NEXT: fsrmi a0, 0 ; CHECK-NEXT: vfwredosum.vs v8, v9, v10 +; CHECK-NEXT: fsrm a0 ; CHECK-NEXT: ret entry: %a = call @llvm.riscv.vfwredosum.nxv1f64.nxv1f32( %0, %1, %2, - iXLen %3) + iXLen 0, iXLen %3) ret %a } @@ -306,13 +332,15 @@ , , , - iXLen); + iXLen, iXLen); define @intrinsic_vfwredosum_mask_vs_nxv1f64_nxv1f32_nxv1f64( %0, %1, %2, %3, iXLen %4) nounwind { ; CHECK-LABEL: intrinsic_vfwredosum_mask_vs_nxv1f64_nxv1f32_nxv1f64: ; CHECK: # %bb.0: # %entry ; CHECK-NEXT: vsetvli zero, a0, e32, mf2, ta, ma +; CHECK-NEXT: fsrmi a0, 0 ; CHECK-NEXT: vfwredosum.vs v8, v9, v10, v0.t +; CHECK-NEXT: fsrm a0 ; CHECK-NEXT: ret entry: %a = call @llvm.riscv.vfwredosum.mask.nxv1f64.nxv1f32.nxv1f64( @@ -320,7 +348,7 @@ %1, %2, %3, - iXLen %4) + iXLen 0, iXLen %4) ret %a } @@ -329,20 +357,22 @@ , , , - iXLen); + iXLen, iXLen); define @intrinsic_vfwredosum_vs_nxv1f64_nxv2f32_nxv1f64( %0, %1, %2, iXLen %3) nounwind { ; CHECK-LABEL: intrinsic_vfwredosum_vs_nxv1f64_nxv2f32_nxv1f64: ; CHECK: # %bb.0: # %entry ; CHECK-NEXT: vsetvli zero, a0, e32, m1, ta, ma +; CHECK-NEXT: fsrmi a0, 0 ; CHECK-NEXT: vfwredosum.vs v8, v9, v10 +; CHECK-NEXT: fsrm a0 ; CHECK-NEXT: ret entry: %a = call @llvm.riscv.vfwredosum.nxv1f64.nxv2f32( %0, %1, %2, - iXLen %3) + iXLen 0, iXLen %3) ret %a } @@ -352,13 +382,15 @@ , , , - iXLen); + iXLen, iXLen); define @intrinsic_vfwredosum_mask_vs_nxv1f64_nxv2f32_nxv1f64( %0, %1, %2, %3, iXLen %4) nounwind { ; CHECK-LABEL: intrinsic_vfwredosum_mask_vs_nxv1f64_nxv2f32_nxv1f64: ; CHECK: # %bb.0: # %entry ; CHECK-NEXT: vsetvli zero, a0, e32, m1, ta, ma +; CHECK-NEXT: fsrmi a0, 0 ; CHECK-NEXT: vfwredosum.vs v8, v9, v10, v0.t +; CHECK-NEXT: fsrm a0 ; CHECK-NEXT: ret entry: %a = call @llvm.riscv.vfwredosum.mask.nxv1f64.nxv2f32.nxv1f64( @@ -366,7 +398,7 @@ %1, %2, %3, - iXLen %4) + iXLen 0, iXLen %4) ret %a } @@ -375,20 +407,22 @@ , , , - iXLen); + iXLen, iXLen); define @intrinsic_vfwredosum_vs_nxv1f64_nxv4f32_nxv1f64( %0, %1, %2, iXLen %3) nounwind { ; CHECK-LABEL: intrinsic_vfwredosum_vs_nxv1f64_nxv4f32_nxv1f64: ; CHECK: # %bb.0: # %entry ; CHECK-NEXT: vsetvli zero, a0, e32, m2, ta, ma +; CHECK-NEXT: fsrmi a0, 0 ; CHECK-NEXT: vfwredosum.vs v8, v10, v9 +; CHECK-NEXT: fsrm a0 ; CHECK-NEXT: ret entry: %a = call @llvm.riscv.vfwredosum.nxv1f64.nxv4f32( %0, %1, %2, - iXLen %3) + iXLen 0, iXLen %3) ret %a } @@ -398,13 +432,15 @@ , , , - iXLen); + iXLen, iXLen); define @intrinsic_vfwredosum_mask_vs_nxv1f64_nxv4f32_nxv1f64( %0, %1, %2, %3, iXLen %4) nounwind { ; CHECK-LABEL: intrinsic_vfwredosum_mask_vs_nxv1f64_nxv4f32_nxv1f64: ; CHECK: # %bb.0: # %entry ; CHECK-NEXT: vsetvli zero, a0, e32, m2, ta, ma +; CHECK-NEXT: fsrmi a0, 0 ; CHECK-NEXT: vfwredosum.vs v8, v10, v9, v0.t +; CHECK-NEXT: fsrm a0 ; CHECK-NEXT: ret entry: %a = call @llvm.riscv.vfwredosum.mask.nxv1f64.nxv4f32.nxv1f64( @@ -412,7 +448,7 @@ %1, %2, %3, - iXLen %4) + iXLen 0, iXLen %4) ret %a } @@ -421,20 +457,22 @@ , , , - iXLen); + iXLen, iXLen); define @intrinsic_vfwredosum_vs_nxv1f64_nxv8f32_nxv1f64( %0, %1, %2, iXLen %3) nounwind { ; CHECK-LABEL: intrinsic_vfwredosum_vs_nxv1f64_nxv8f32_nxv1f64: ; CHECK: # %bb.0: # %entry ; CHECK-NEXT: vsetvli zero, a0, e32, m4, ta, ma +; CHECK-NEXT: fsrmi a0, 0 ; CHECK-NEXT: vfwredosum.vs v8, v12, v9 +; CHECK-NEXT: fsrm a0 ; CHECK-NEXT: ret entry: %a = call @llvm.riscv.vfwredosum.nxv1f64.nxv8f32( %0, %1, %2, - iXLen %3) + iXLen 0, iXLen %3) ret %a } @@ -444,13 +482,15 @@ , , , - iXLen); + iXLen, iXLen); define @intrinsic_vfwredosum_mask_vs_nxv1f64_nxv8f32_nxv1f64( %0, %1, %2, %3, iXLen %4) nounwind { ; CHECK-LABEL: intrinsic_vfwredosum_mask_vs_nxv1f64_nxv8f32_nxv1f64: ; CHECK: # %bb.0: # %entry ; CHECK-NEXT: vsetvli zero, a0, e32, m4, ta, ma +; CHECK-NEXT: fsrmi a0, 0 ; CHECK-NEXT: vfwredosum.vs v8, v12, v9, v0.t +; CHECK-NEXT: fsrm a0 ; CHECK-NEXT: ret entry: %a = call @llvm.riscv.vfwredosum.mask.nxv1f64.nxv8f32.nxv1f64( @@ -458,7 +498,7 @@ %1, %2, %3, - iXLen %4) + iXLen 0, iXLen %4) ret %a } @@ -467,20 +507,22 @@ , , , - iXLen); + iXLen, iXLen); define @intrinsic_vfwredosum_vs_nxv1f64_nxv16f32_nxv1f64( %0, %1, %2, iXLen %3) nounwind { ; CHECK-LABEL: intrinsic_vfwredosum_vs_nxv1f64_nxv16f32_nxv1f64: ; CHECK: # %bb.0: # %entry ; CHECK-NEXT: vsetvli zero, a0, e32, m8, ta, ma +; CHECK-NEXT: fsrmi a0, 0 ; CHECK-NEXT: vfwredosum.vs v8, v16, v9 +; CHECK-NEXT: fsrm a0 ; CHECK-NEXT: ret entry: %a = call @llvm.riscv.vfwredosum.nxv1f64.nxv16f32( %0, %1, %2, - iXLen %3) + iXLen 0, iXLen %3) ret %a } @@ -490,13 +532,15 @@ , , , - iXLen); + iXLen, iXLen); define @intrinsic_vfwredosum_mask_vs_nxv1f64_nxv16f32_nxv1f64( %0, %1, %2, %3, iXLen %4) nounwind { ; CHECK-LABEL: intrinsic_vfwredosum_mask_vs_nxv1f64_nxv16f32_nxv1f64: ; CHECK: # %bb.0: # %entry ; CHECK-NEXT: vsetvli zero, a0, e32, m8, ta, ma +; CHECK-NEXT: fsrmi a0, 0 ; CHECK-NEXT: vfwredosum.vs v8, v16, v9, v0.t +; CHECK-NEXT: fsrm a0 ; CHECK-NEXT: ret entry: %a = call @llvm.riscv.vfwredosum.mask.nxv1f64.nxv16f32.nxv1f64( @@ -504,7 +548,7 @@ %1, %2, %3, - iXLen %4) + iXLen 0, iXLen %4) ret %a } diff --git a/llvm/test/CodeGen/RISCV/rvv/vfwredusum.ll b/llvm/test/CodeGen/RISCV/rvv/vfwredusum.ll --- a/llvm/test/CodeGen/RISCV/rvv/vfwredusum.ll +++ b/llvm/test/CodeGen/RISCV/rvv/vfwredusum.ll @@ -7,20 +7,22 @@ , , , - iXLen); + iXLen, iXLen); define @intrinsic_vfwredusum_vs_nxv2f32_nxv1f16_nxv2f32( %0, %1, %2, iXLen %3) nounwind { ; CHECK-LABEL: intrinsic_vfwredusum_vs_nxv2f32_nxv1f16_nxv2f32: ; CHECK: # %bb.0: # %entry ; CHECK-NEXT: vsetvli zero, a0, e16, mf4, ta, ma +; CHECK-NEXT: fsrmi a0, 0 ; CHECK-NEXT: vfwredusum.vs v8, v9, v10 +; CHECK-NEXT: fsrm a0 ; CHECK-NEXT: ret entry: %a = call @llvm.riscv.vfwredusum.nxv2f32.nxv1f16( %0, %1, %2, - iXLen %3) + iXLen 0, iXLen %3) ret %a } @@ -30,13 +32,15 @@ , , , - iXLen); + iXLen, iXLen); define @intrinsic_vfwredusum_mask_vs_nxv2f32_nxv1f16_nxv2f32( %0, %1, %2, %3, iXLen %4) nounwind { ; CHECK-LABEL: intrinsic_vfwredusum_mask_vs_nxv2f32_nxv1f16_nxv2f32: ; CHECK: # %bb.0: # %entry ; CHECK-NEXT: vsetvli zero, a0, e16, mf4, ta, ma +; CHECK-NEXT: fsrmi a0, 0 ; CHECK-NEXT: vfwredusum.vs v8, v9, v10, v0.t +; CHECK-NEXT: fsrm a0 ; CHECK-NEXT: ret entry: %a = call @llvm.riscv.vfwredusum.mask.nxv2f32.nxv1f16.nxv2f32( @@ -44,7 +48,7 @@ %1, %2, %3, - iXLen %4) + iXLen 0, iXLen %4) ret %a } @@ -53,20 +57,22 @@ , , , - iXLen); + iXLen, iXLen); define @intrinsic_vfwredusum_vs_nxv2f32_nxv2f16_nxv2f32( %0, %1, %2, iXLen %3) nounwind { ; CHECK-LABEL: intrinsic_vfwredusum_vs_nxv2f32_nxv2f16_nxv2f32: ; CHECK: # %bb.0: # %entry ; CHECK-NEXT: vsetvli zero, a0, e16, mf2, ta, ma +; CHECK-NEXT: fsrmi a0, 0 ; CHECK-NEXT: vfwredusum.vs v8, v9, v10 +; CHECK-NEXT: fsrm a0 ; CHECK-NEXT: ret entry: %a = call @llvm.riscv.vfwredusum.nxv2f32.nxv2f16( %0, %1, %2, - iXLen %3) + iXLen 0, iXLen %3) ret %a } @@ -76,13 +82,15 @@ , , , - iXLen); + iXLen, iXLen); define @intrinsic_vfwredusum_mask_vs_nxv2f32_nxv2f16_nxv2f32( %0, %1, %2, %3, iXLen %4) nounwind { ; CHECK-LABEL: intrinsic_vfwredusum_mask_vs_nxv2f32_nxv2f16_nxv2f32: ; CHECK: # %bb.0: # %entry ; CHECK-NEXT: vsetvli zero, a0, e16, mf2, ta, ma +; CHECK-NEXT: fsrmi a0, 0 ; CHECK-NEXT: vfwredusum.vs v8, v9, v10, v0.t +; CHECK-NEXT: fsrm a0 ; CHECK-NEXT: ret entry: %a = call @llvm.riscv.vfwredusum.mask.nxv2f32.nxv2f16.nxv2f32( @@ -90,7 +98,7 @@ %1, %2, %3, - iXLen %4) + iXLen 0, iXLen %4) ret %a } @@ -99,20 +107,22 @@ , , , - iXLen); + iXLen, iXLen); define @intrinsic_vfwredusum_vs_nxv2f32_nxv4f16_nxv2f32( %0, %1, %2, iXLen %3) nounwind { ; CHECK-LABEL: intrinsic_vfwredusum_vs_nxv2f32_nxv4f16_nxv2f32: ; CHECK: # %bb.0: # %entry ; CHECK-NEXT: vsetvli zero, a0, e16, m1, ta, ma +; CHECK-NEXT: fsrmi a0, 0 ; CHECK-NEXT: vfwredusum.vs v8, v9, v10 +; CHECK-NEXT: fsrm a0 ; CHECK-NEXT: ret entry: %a = call @llvm.riscv.vfwredusum.nxv2f32.nxv4f16( %0, %1, %2, - iXLen %3) + iXLen 0, iXLen %3) ret %a } @@ -122,13 +132,15 @@ , , , - iXLen); + iXLen, iXLen); define @intrinsic_vfwredusum_mask_vs_nxv2f32_nxv4f16_nxv2f32( %0, %1, %2, %3, iXLen %4) nounwind { ; CHECK-LABEL: intrinsic_vfwredusum_mask_vs_nxv2f32_nxv4f16_nxv2f32: ; CHECK: # %bb.0: # %entry ; CHECK-NEXT: vsetvli zero, a0, e16, m1, ta, ma +; CHECK-NEXT: fsrmi a0, 0 ; CHECK-NEXT: vfwredusum.vs v8, v9, v10, v0.t +; CHECK-NEXT: fsrm a0 ; CHECK-NEXT: ret entry: %a = call @llvm.riscv.vfwredusum.mask.nxv2f32.nxv4f16.nxv2f32( @@ -136,7 +148,7 @@ %1, %2, %3, - iXLen %4) + iXLen 0, iXLen %4) ret %a } @@ -145,20 +157,22 @@ , , , - iXLen); + iXLen, iXLen); define @intrinsic_vfwredusum_vs_nxv2f32_nxv8f16_nxv2f32( %0, %1, %2, iXLen %3) nounwind { ; CHECK-LABEL: intrinsic_vfwredusum_vs_nxv2f32_nxv8f16_nxv2f32: ; CHECK: # %bb.0: # %entry ; CHECK-NEXT: vsetvli zero, a0, e16, m2, ta, ma +; CHECK-NEXT: fsrmi a0, 0 ; CHECK-NEXT: vfwredusum.vs v8, v10, v9 +; CHECK-NEXT: fsrm a0 ; CHECK-NEXT: ret entry: %a = call @llvm.riscv.vfwredusum.nxv2f32.nxv8f16( %0, %1, %2, - iXLen %3) + iXLen 0, iXLen %3) ret %a } @@ -168,13 +182,15 @@ , , , - iXLen); + iXLen, iXLen); define @intrinsic_vfwredusum_mask_vs_nxv2f32_nxv8f16_nxv2f32( %0, %1, %2, %3, iXLen %4) nounwind { ; CHECK-LABEL: intrinsic_vfwredusum_mask_vs_nxv2f32_nxv8f16_nxv2f32: ; CHECK: # %bb.0: # %entry ; CHECK-NEXT: vsetvli zero, a0, e16, m2, ta, ma +; CHECK-NEXT: fsrmi a0, 0 ; CHECK-NEXT: vfwredusum.vs v8, v10, v9, v0.t +; CHECK-NEXT: fsrm a0 ; CHECK-NEXT: ret entry: %a = call @llvm.riscv.vfwredusum.mask.nxv2f32.nxv8f16.nxv2f32( @@ -182,7 +198,7 @@ %1, %2, %3, - iXLen %4) + iXLen 0, iXLen %4) ret %a } @@ -191,20 +207,22 @@ , , , - iXLen); + iXLen, iXLen); define @intrinsic_vfwredusum_vs_nxv2f32_nxv16f16_nxv2f32( %0, %1, %2, iXLen %3) nounwind { ; CHECK-LABEL: intrinsic_vfwredusum_vs_nxv2f32_nxv16f16_nxv2f32: ; CHECK: # %bb.0: # %entry ; CHECK-NEXT: vsetvli zero, a0, e16, m4, ta, ma +; CHECK-NEXT: fsrmi a0, 0 ; CHECK-NEXT: vfwredusum.vs v8, v12, v9 +; CHECK-NEXT: fsrm a0 ; CHECK-NEXT: ret entry: %a = call @llvm.riscv.vfwredusum.nxv2f32.nxv16f16( %0, %1, %2, - iXLen %3) + iXLen 0, iXLen %3) ret %a } @@ -214,13 +232,15 @@ , , , - iXLen); + iXLen, iXLen); define @intrinsic_vfwredusum_mask_vs_nxv2f32_nxv16f16_nxv2f32( %0, %1, %2, %3, iXLen %4) nounwind { ; CHECK-LABEL: intrinsic_vfwredusum_mask_vs_nxv2f32_nxv16f16_nxv2f32: ; CHECK: # %bb.0: # %entry ; CHECK-NEXT: vsetvli zero, a0, e16, m4, ta, ma +; CHECK-NEXT: fsrmi a0, 0 ; CHECK-NEXT: vfwredusum.vs v8, v12, v9, v0.t +; CHECK-NEXT: fsrm a0 ; CHECK-NEXT: ret entry: %a = call @llvm.riscv.vfwredusum.mask.nxv2f32.nxv16f16.nxv2f32( @@ -228,7 +248,7 @@ %1, %2, %3, - iXLen %4) + iXLen 0, iXLen %4) ret %a } @@ -237,20 +257,22 @@ , , , - iXLen); + iXLen, iXLen); define @intrinsic_vfwredusum_vs_nxv2f32_nxv32f16_nxv2f32( %0, %1, %2, iXLen %3) nounwind { ; CHECK-LABEL: intrinsic_vfwredusum_vs_nxv2f32_nxv32f16_nxv2f32: ; CHECK: # %bb.0: # %entry ; CHECK-NEXT: vsetvli zero, a0, e16, m8, ta, ma +; CHECK-NEXT: fsrmi a0, 0 ; CHECK-NEXT: vfwredusum.vs v8, v16, v9 +; CHECK-NEXT: fsrm a0 ; CHECK-NEXT: ret entry: %a = call @llvm.riscv.vfwredusum.nxv2f32.nxv32f16( %0, %1, %2, - iXLen %3) + iXLen 0, iXLen %3) ret %a } @@ -260,13 +282,15 @@ , , , - iXLen); + iXLen, iXLen); define @intrinsic_vfwredusum_mask_vs_nxv2f32_nxv32f16_nxv2f32( %0, %1, %2, %3, iXLen %4) nounwind { ; CHECK-LABEL: intrinsic_vfwredusum_mask_vs_nxv2f32_nxv32f16_nxv2f32: ; CHECK: # %bb.0: # %entry ; CHECK-NEXT: vsetvli zero, a0, e16, m8, ta, ma +; CHECK-NEXT: fsrmi a0, 0 ; CHECK-NEXT: vfwredusum.vs v8, v16, v9, v0.t +; CHECK-NEXT: fsrm a0 ; CHECK-NEXT: ret entry: %a = call @llvm.riscv.vfwredusum.mask.nxv2f32.nxv32f16( @@ -274,7 +298,7 @@ %1, %2, %3, - iXLen %4) + iXLen 0, iXLen %4) ret %a } @@ -283,20 +307,22 @@ , , , - iXLen); + iXLen, iXLen); define @intrinsic_vfwredusum_vs_nxv1f64_nxv1f32_nxv1f64( %0, %1, %2, iXLen %3) nounwind { ; CHECK-LABEL: intrinsic_vfwredusum_vs_nxv1f64_nxv1f32_nxv1f64: ; CHECK: # %bb.0: # %entry ; CHECK-NEXT: vsetvli zero, a0, e32, mf2, ta, ma +; CHECK-NEXT: fsrmi a0, 0 ; CHECK-NEXT: vfwredusum.vs v8, v9, v10 +; CHECK-NEXT: fsrm a0 ; CHECK-NEXT: ret entry: %a = call @llvm.riscv.vfwredusum.nxv1f64.nxv1f32( %0, %1, %2, - iXLen %3) + iXLen 0, iXLen %3) ret %a } @@ -306,13 +332,15 @@ , , , - iXLen); + iXLen, iXLen); define @intrinsic_vfwredusum_mask_vs_nxv1f64_nxv1f32_nxv1f64( %0, %1, %2, %3, iXLen %4) nounwind { ; CHECK-LABEL: intrinsic_vfwredusum_mask_vs_nxv1f64_nxv1f32_nxv1f64: ; CHECK: # %bb.0: # %entry ; CHECK-NEXT: vsetvli zero, a0, e32, mf2, ta, ma +; CHECK-NEXT: fsrmi a0, 0 ; CHECK-NEXT: vfwredusum.vs v8, v9, v10, v0.t +; CHECK-NEXT: fsrm a0 ; CHECK-NEXT: ret entry: %a = call @llvm.riscv.vfwredusum.mask.nxv1f64.nxv1f32.nxv1f64( @@ -320,7 +348,7 @@ %1, %2, %3, - iXLen %4) + iXLen 0, iXLen %4) ret %a } @@ -329,20 +357,22 @@ , , , - iXLen); + iXLen, iXLen); define @intrinsic_vfwredusum_vs_nxv1f64_nxv2f32_nxv1f64( %0, %1, %2, iXLen %3) nounwind { ; CHECK-LABEL: intrinsic_vfwredusum_vs_nxv1f64_nxv2f32_nxv1f64: ; CHECK: # %bb.0: # %entry ; CHECK-NEXT: vsetvli zero, a0, e32, m1, ta, ma +; CHECK-NEXT: fsrmi a0, 0 ; CHECK-NEXT: vfwredusum.vs v8, v9, v10 +; CHECK-NEXT: fsrm a0 ; CHECK-NEXT: ret entry: %a = call @llvm.riscv.vfwredusum.nxv1f64.nxv2f32( %0, %1, %2, - iXLen %3) + iXLen 0, iXLen %3) ret %a } @@ -352,13 +382,15 @@ , , , - iXLen); + iXLen, iXLen); define @intrinsic_vfwredusum_mask_vs_nxv1f64_nxv2f32_nxv1f64( %0, %1, %2, %3, iXLen %4) nounwind { ; CHECK-LABEL: intrinsic_vfwredusum_mask_vs_nxv1f64_nxv2f32_nxv1f64: ; CHECK: # %bb.0: # %entry ; CHECK-NEXT: vsetvli zero, a0, e32, m1, ta, ma +; CHECK-NEXT: fsrmi a0, 0 ; CHECK-NEXT: vfwredusum.vs v8, v9, v10, v0.t +; CHECK-NEXT: fsrm a0 ; CHECK-NEXT: ret entry: %a = call @llvm.riscv.vfwredusum.mask.nxv1f64.nxv2f32.nxv1f64( @@ -366,7 +398,7 @@ %1, %2, %3, - iXLen %4) + iXLen 0, iXLen %4) ret %a } @@ -375,20 +407,22 @@ , , , - iXLen); + iXLen, iXLen); define @intrinsic_vfwredusum_vs_nxv1f64_nxv4f32_nxv1f64( %0, %1, %2, iXLen %3) nounwind { ; CHECK-LABEL: intrinsic_vfwredusum_vs_nxv1f64_nxv4f32_nxv1f64: ; CHECK: # %bb.0: # %entry ; CHECK-NEXT: vsetvli zero, a0, e32, m2, ta, ma +; CHECK-NEXT: fsrmi a0, 0 ; CHECK-NEXT: vfwredusum.vs v8, v10, v9 +; CHECK-NEXT: fsrm a0 ; CHECK-NEXT: ret entry: %a = call @llvm.riscv.vfwredusum.nxv1f64.nxv4f32( %0, %1, %2, - iXLen %3) + iXLen 0, iXLen %3) ret %a } @@ -398,13 +432,15 @@ , , , - iXLen); + iXLen, iXLen); define @intrinsic_vfwredusum_mask_vs_nxv1f64_nxv4f32_nxv1f64( %0, %1, %2, %3, iXLen %4) nounwind { ; CHECK-LABEL: intrinsic_vfwredusum_mask_vs_nxv1f64_nxv4f32_nxv1f64: ; CHECK: # %bb.0: # %entry ; CHECK-NEXT: vsetvli zero, a0, e32, m2, ta, ma +; CHECK-NEXT: fsrmi a0, 0 ; CHECK-NEXT: vfwredusum.vs v8, v10, v9, v0.t +; CHECK-NEXT: fsrm a0 ; CHECK-NEXT: ret entry: %a = call @llvm.riscv.vfwredusum.mask.nxv1f64.nxv4f32.nxv1f64( @@ -412,7 +448,7 @@ %1, %2, %3, - iXLen %4) + iXLen 0, iXLen %4) ret %a } @@ -421,20 +457,22 @@ , , , - iXLen); + iXLen, iXLen); define @intrinsic_vfwredusum_vs_nxv1f64_nxv8f32_nxv1f64( %0, %1, %2, iXLen %3) nounwind { ; CHECK-LABEL: intrinsic_vfwredusum_vs_nxv1f64_nxv8f32_nxv1f64: ; CHECK: # %bb.0: # %entry ; CHECK-NEXT: vsetvli zero, a0, e32, m4, ta, ma +; CHECK-NEXT: fsrmi a0, 0 ; CHECK-NEXT: vfwredusum.vs v8, v12, v9 +; CHECK-NEXT: fsrm a0 ; CHECK-NEXT: ret entry: %a = call @llvm.riscv.vfwredusum.nxv1f64.nxv8f32( %0, %1, %2, - iXLen %3) + iXLen 0, iXLen %3) ret %a } @@ -444,13 +482,15 @@ , , , - iXLen); + iXLen, iXLen); define @intrinsic_vfwredusum_mask_vs_nxv1f64_nxv8f32_nxv1f64( %0, %1, %2, %3, iXLen %4) nounwind { ; CHECK-LABEL: intrinsic_vfwredusum_mask_vs_nxv1f64_nxv8f32_nxv1f64: ; CHECK: # %bb.0: # %entry ; CHECK-NEXT: vsetvli zero, a0, e32, m4, ta, ma +; CHECK-NEXT: fsrmi a0, 0 ; CHECK-NEXT: vfwredusum.vs v8, v12, v9, v0.t +; CHECK-NEXT: fsrm a0 ; CHECK-NEXT: ret entry: %a = call @llvm.riscv.vfwredusum.mask.nxv1f64.nxv8f32.nxv1f64( @@ -458,7 +498,7 @@ %1, %2, %3, - iXLen %4) + iXLen 0, iXLen %4) ret %a } @@ -467,20 +507,22 @@ , , , - iXLen); + iXLen, iXLen); define @intrinsic_vfwredusum_vs_nxv1f64_nxv16f32_nxv1f64( %0, %1, %2, iXLen %3) nounwind { ; CHECK-LABEL: intrinsic_vfwredusum_vs_nxv1f64_nxv16f32_nxv1f64: ; CHECK: # %bb.0: # %entry ; CHECK-NEXT: vsetvli zero, a0, e32, m8, ta, ma +; CHECK-NEXT: fsrmi a0, 0 ; CHECK-NEXT: vfwredusum.vs v8, v16, v9 +; CHECK-NEXT: fsrm a0 ; CHECK-NEXT: ret entry: %a = call @llvm.riscv.vfwredusum.nxv1f64.nxv16f32( %0, %1, %2, - iXLen %3) + iXLen 0, iXLen %3) ret %a } @@ -490,13 +532,15 @@ , , , - iXLen); + iXLen, iXLen); define @intrinsic_vfwredusum_mask_vs_nxv1f64_nxv16f32_nxv1f64( %0, %1, %2, %3, iXLen %4) nounwind { ; CHECK-LABEL: intrinsic_vfwredusum_mask_vs_nxv1f64_nxv16f32_nxv1f64: ; CHECK: # %bb.0: # %entry ; CHECK-NEXT: vsetvli zero, a0, e32, m8, ta, ma +; CHECK-NEXT: fsrmi a0, 0 ; CHECK-NEXT: vfwredusum.vs v8, v16, v9, v0.t +; CHECK-NEXT: fsrm a0 ; CHECK-NEXT: ret entry: %a = call @llvm.riscv.vfwredusum.mask.nxv1f64.nxv16f32.nxv1f64( @@ -504,7 +548,7 @@ %1, %2, %3, - iXLen %4) + iXLen 0, iXLen %4) ret %a }