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 @@ -1691,9 +1691,15 @@ } multiclass RVVStridedSegLoadTuple { - foreach type = ["i"] in { - defvar eew = !cond(!eq(type, "i") : "32"); - foreach nf = [2] in { + foreach type = TypeList in { + defvar eew = !cond(!eq(type, "c") : "8", + !eq(type, "s") : "16", + !eq(type, "i") : "32", + !eq(type, "l") : "64", + !eq(type, "x") : "16", + !eq(type, "f") : "32", + !eq(type, "d") : "64"); + foreach nf = NFList in { let Name = op # nf # "e" # eew # "_v_tuple", OverloadedName = op # nf # "e" # eew # "_tuple", IRName = op # nf, @@ -1701,18 +1707,23 @@ NF = nf, ManualCodegen = [{ { - assert(((IsMasked && (PolicyAttrs & RVV_VTA) && (PolicyAttrs & RVV_VMA)) || - (!IsMasked && (PolicyAttrs & RVV_VTA))) && - "FIXME: Only handling default policy (TAMA) for now"); - llvm::Type *ElementVectorType = cast(ResultType)->elements()[0]; - IntrinsicTypes = {ElementVectorType, Ops.back()->getType()}; SmallVector Operands; - Operands.append(NF, llvm::PoisonValue::get(ElementVectorType)); + bool NoPassthru = + (IsMasked && (PolicyAttrs & RVV_VTA) && (PolicyAttrs & RVV_VMA)) | + (!IsMasked && (PolicyAttrs & RVV_VTA)); + unsigned Offset = IsMasked ? NoPassthru ? 1 : 2 : NoPassthru ? 0 : 1; + + if (NoPassthru) { // Push poison into passthru + Operands.append(NF, llvm::PoisonValue::get(ElementVectorType)); + } else { // Push intrinsics operands into passthru + llvm::Value *PassthruOperand = IsMasked ? Ops[1] : Ops[0]; + for (unsigned I = 0; I < NF; ++I) + Operands.push_back(Builder.CreateExtractValue(PassthruOperand, {I})); + } - unsigned Offset = IsMasked ? 1 : 0; Operands.push_back(Ops[Offset]); // Ptr Operands.push_back(Ops[Offset + 1]); // Stride if (IsMasked) @@ -1730,8 +1741,11 @@ return Builder.CreateStore(LoadValue, ReturnValue.getValue()); } }] in { - defvar T = "(Tuple:" # nf # ")"; - def : RVVBuiltin<"v", T # "vPCet", type>; + defvar T = "(Tuple:" # nf # ")"; + def : RVVBuiltin; + if !not(IsFloat.val) then { + def : RVVBuiltin; + } } } } @@ -1886,13 +1900,13 @@ IsTuple = true in { defm : RVVUnitStridedSegLoadTuple<"vlseg">; defm : RVVUnitStridedSegLoadFFTuple<"vlseg">; + defm : RVVStridedSegLoadTuple<"vlsseg">; } // TODO: Extend for policy let UnMaskedPolicyScheme = NonePolicy, MaskedPolicyScheme = NonePolicy, IsTuple = true in { -defm : RVVStridedSegLoadTuple<"vlsseg">; defm : RVVIndexedSegLoadTuple<"vluxseg">; defm : RVVIndexedSegLoadTuple<"vloxseg">; } diff --git a/clang/test/CodeGen/RISCV/rvv-intrinsics-autogenerated/non-policy/non-overloaded/vlsseg2e32_tuple.c b/clang/test/CodeGen/RISCV/rvv-intrinsics-autogenerated/non-policy/non-overloaded/vlsseg2e32_tuple.c --- a/clang/test/CodeGen/RISCV/rvv-intrinsics-autogenerated/non-policy/non-overloaded/vlsseg2e32_tuple.c +++ b/clang/test/CodeGen/RISCV/rvv-intrinsics-autogenerated/non-policy/non-overloaded/vlsseg2e32_tuple.c @@ -4,24 +4,245 @@ // RUN: -target-feature +experimental-zvfh -disable-O0-optnone \ // RUN: -emit-llvm %s -o - | opt -S -passes=mem2reg | \ // RUN: FileCheck --check-prefix=CHECK-RV64 %s + #include -// CHECK-RV64-LABEL: define dso_local { , } @test_vlsseg2e32_v_tuple_i32m1 +// CHECK-RV64-LABEL: define dso_local { , } @test_vlsseg2e32_v_f32mf2x2 // CHECK-RV64-SAME: (ptr noundef [[BASE:%.*]], i64 noundef [[BSTRIDE:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0:[0-9]+]] { // CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call { , } @llvm.riscv.vlsseg2.nxv1f32.i64( poison, poison, ptr [[BASE]], i64 [[BSTRIDE]], i64 [[VL]]) +// CHECK-RV64-NEXT: ret { , } [[TMP0]] +// +vfloat32mf2x2_t test_vlsseg2e32_v_f32mf2x2(const float *base, ptrdiff_t bstride, size_t vl) { + return __riscv_vlsseg2e32_v_tuple_f32mf2x2(base, bstride, vl); +} + +// CHECK-RV64-LABEL: define dso_local { , } @test_vlsseg2e32_v_f32m1x2 +// CHECK-RV64-SAME: (ptr noundef [[BASE:%.*]], i64 noundef [[BSTRIDE:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call { , } @llvm.riscv.vlsseg2.nxv2f32.i64( poison, poison, ptr [[BASE]], i64 [[BSTRIDE]], i64 [[VL]]) +// CHECK-RV64-NEXT: ret { , } [[TMP0]] +// +vfloat32m1x2_t test_vlsseg2e32_v_f32m1x2(const float *base, ptrdiff_t bstride, size_t vl) { + return __riscv_vlsseg2e32_v_tuple_f32m1x2(base, bstride, vl); +} + +// CHECK-RV64-LABEL: define dso_local { , } @test_vlsseg2e32_v_f32m2x2 +// CHECK-RV64-SAME: (ptr noundef [[BASE:%.*]], i64 noundef [[BSTRIDE:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call { , } @llvm.riscv.vlsseg2.nxv4f32.i64( poison, poison, ptr [[BASE]], i64 [[BSTRIDE]], i64 [[VL]]) +// CHECK-RV64-NEXT: ret { , } [[TMP0]] +// +vfloat32m2x2_t test_vlsseg2e32_v_f32m2x2(const float *base, ptrdiff_t bstride, size_t vl) { + return __riscv_vlsseg2e32_v_tuple_f32m2x2(base, bstride, vl); +} + +// CHECK-RV64-LABEL: define dso_local { , } @test_vlsseg2e32_v_f32m4x2 +// CHECK-RV64-SAME: (ptr noundef [[BASE:%.*]], i64 noundef [[BSTRIDE:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call { , } @llvm.riscv.vlsseg2.nxv8f32.i64( poison, poison, ptr [[BASE]], i64 [[BSTRIDE]], i64 [[VL]]) +// CHECK-RV64-NEXT: ret { , } [[TMP0]] +// +vfloat32m4x2_t test_vlsseg2e32_v_f32m4x2(const float *base, ptrdiff_t bstride, size_t vl) { + return __riscv_vlsseg2e32_v_tuple_f32m4x2(base, bstride, vl); +} + +// CHECK-RV64-LABEL: define dso_local { , } @test_vlsseg2e32_v_i32mf2x2 +// CHECK-RV64-SAME: (ptr noundef [[BASE:%.*]], i64 noundef [[BSTRIDE:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call { , } @llvm.riscv.vlsseg2.nxv1i32.i64( poison, poison, ptr [[BASE]], i64 [[BSTRIDE]], i64 [[VL]]) +// CHECK-RV64-NEXT: ret { , } [[TMP0]] +// +vint32mf2x2_t test_vlsseg2e32_v_i32mf2x2(const int32_t *base, ptrdiff_t bstride, size_t vl) { + return __riscv_vlsseg2e32_v_tuple_i32mf2x2(base, bstride, vl); +} + +// CHECK-RV64-LABEL: define dso_local { , } @test_vlsseg2e32_v_i32m1x2 +// CHECK-RV64-SAME: (ptr noundef [[BASE:%.*]], i64 noundef [[BSTRIDE:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call { , } @llvm.riscv.vlsseg2.nxv2i32.i64( poison, poison, ptr [[BASE]], i64 [[BSTRIDE]], i64 [[VL]]) +// CHECK-RV64-NEXT: ret { , } [[TMP0]] +// +vint32m1x2_t test_vlsseg2e32_v_i32m1x2(const int32_t *base, ptrdiff_t bstride, size_t vl) { + return __riscv_vlsseg2e32_v_tuple_i32m1x2(base, bstride, vl); +} + +// CHECK-RV64-LABEL: define dso_local { , } @test_vlsseg2e32_v_i32m2x2 +// CHECK-RV64-SAME: (ptr noundef [[BASE:%.*]], i64 noundef [[BSTRIDE:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call { , } @llvm.riscv.vlsseg2.nxv4i32.i64( poison, poison, ptr [[BASE]], i64 [[BSTRIDE]], i64 [[VL]]) +// CHECK-RV64-NEXT: ret { , } [[TMP0]] +// +vint32m2x2_t test_vlsseg2e32_v_i32m2x2(const int32_t *base, ptrdiff_t bstride, size_t vl) { + return __riscv_vlsseg2e32_v_tuple_i32m2x2(base, bstride, vl); +} + +// CHECK-RV64-LABEL: define dso_local { , } @test_vlsseg2e32_v_i32m4x2 +// CHECK-RV64-SAME: (ptr noundef [[BASE:%.*]], i64 noundef [[BSTRIDE:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call { , } @llvm.riscv.vlsseg2.nxv8i32.i64( poison, poison, ptr [[BASE]], i64 [[BSTRIDE]], i64 [[VL]]) +// CHECK-RV64-NEXT: ret { , } [[TMP0]] +// +vint32m4x2_t test_vlsseg2e32_v_i32m4x2(const int32_t *base, ptrdiff_t bstride, size_t vl) { + return __riscv_vlsseg2e32_v_tuple_i32m4x2(base, bstride, vl); +} + +// CHECK-RV64-LABEL: define dso_local { , } @test_vlsseg2e32_v_u32mf2x2 +// CHECK-RV64-SAME: (ptr noundef [[BASE:%.*]], i64 noundef [[BSTRIDE:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call { , } @llvm.riscv.vlsseg2.nxv1i32.i64( poison, poison, ptr [[BASE]], i64 [[BSTRIDE]], i64 [[VL]]) +// CHECK-RV64-NEXT: ret { , } [[TMP0]] +// +vuint32mf2x2_t test_vlsseg2e32_v_u32mf2x2(const uint32_t *base, ptrdiff_t bstride, size_t vl) { + return __riscv_vlsseg2e32_v_tuple_u32mf2x2(base, bstride, vl); +} + +// CHECK-RV64-LABEL: define dso_local { , } @test_vlsseg2e32_v_u32m1x2 +// CHECK-RV64-SAME: (ptr noundef [[BASE:%.*]], i64 noundef [[BSTRIDE:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: // CHECK-RV64-NEXT: [[TMP0:%.*]] = call { , } @llvm.riscv.vlsseg2.nxv2i32.i64( poison, poison, ptr [[BASE]], i64 [[BSTRIDE]], i64 [[VL]]) // CHECK-RV64-NEXT: ret { , } [[TMP0]] // -vint32m1x2_t test_vlsseg2e32_v_tuple_i32m1(const int32_t *base, ptrdiff_t bstride, size_t vl) { - return __riscv_vlsseg2e32_v_tuple_i32m1(base, bstride, vl); +vuint32m1x2_t test_vlsseg2e32_v_u32m1x2(const uint32_t *base, ptrdiff_t bstride, size_t vl) { + return __riscv_vlsseg2e32_v_tuple_u32m1x2(base, bstride, vl); +} + +// CHECK-RV64-LABEL: define dso_local { , } @test_vlsseg2e32_v_u32m2x2 +// CHECK-RV64-SAME: (ptr noundef [[BASE:%.*]], i64 noundef [[BSTRIDE:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call { , } @llvm.riscv.vlsseg2.nxv4i32.i64( poison, poison, ptr [[BASE]], i64 [[BSTRIDE]], i64 [[VL]]) +// CHECK-RV64-NEXT: ret { , } [[TMP0]] +// +vuint32m2x2_t test_vlsseg2e32_v_u32m2x2(const uint32_t *base, ptrdiff_t bstride, size_t vl) { + return __riscv_vlsseg2e32_v_tuple_u32m2x2(base, bstride, vl); +} + +// CHECK-RV64-LABEL: define dso_local { , } @test_vlsseg2e32_v_u32m4x2 +// CHECK-RV64-SAME: (ptr noundef [[BASE:%.*]], i64 noundef [[BSTRIDE:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call { , } @llvm.riscv.vlsseg2.nxv8i32.i64( poison, poison, ptr [[BASE]], i64 [[BSTRIDE]], i64 [[VL]]) +// CHECK-RV64-NEXT: ret { , } [[TMP0]] +// +vuint32m4x2_t test_vlsseg2e32_v_u32m4x2(const uint32_t *base, ptrdiff_t bstride, size_t vl) { + return __riscv_vlsseg2e32_v_tuple_u32m4x2(base, bstride, vl); } -// CHECK-RV64-LABEL: define dso_local { , } @test_vlsseg2e32_v_tuple_i32m1_m +// CHECK-RV64-LABEL: define dso_local { , } @test_vlsseg2e32_v_f32mf2x2_m +// CHECK-RV64-SAME: ( [[MASK:%.*]], ptr noundef [[BASE:%.*]], i64 noundef [[BSTRIDE:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call { , } @llvm.riscv.vlsseg2.mask.nxv1f32.i64( poison, poison, ptr [[BASE]], i64 [[BSTRIDE]], [[MASK]], i64 [[VL]], i64 3) +// CHECK-RV64-NEXT: ret { , } [[TMP0]] +// +vfloat32mf2x2_t test_vlsseg2e32_v_f32mf2x2_m(vbool64_t mask, const float *base, ptrdiff_t bstride, size_t vl) { + return __riscv_vlsseg2e32_v_tuple_f32mf2x2_m(mask, base, bstride, vl); +} + +// CHECK-RV64-LABEL: define dso_local { , } @test_vlsseg2e32_v_f32m1x2_m +// CHECK-RV64-SAME: ( [[MASK:%.*]], ptr noundef [[BASE:%.*]], i64 noundef [[BSTRIDE:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call { , } @llvm.riscv.vlsseg2.mask.nxv2f32.i64( poison, poison, ptr [[BASE]], i64 [[BSTRIDE]], [[MASK]], i64 [[VL]], i64 3) +// CHECK-RV64-NEXT: ret { , } [[TMP0]] +// +vfloat32m1x2_t test_vlsseg2e32_v_f32m1x2_m(vbool32_t mask, const float *base, ptrdiff_t bstride, size_t vl) { + return __riscv_vlsseg2e32_v_tuple_f32m1x2_m(mask, base, bstride, vl); +} + +// CHECK-RV64-LABEL: define dso_local { , } @test_vlsseg2e32_v_f32m2x2_m +// CHECK-RV64-SAME: ( [[MASK:%.*]], ptr noundef [[BASE:%.*]], i64 noundef [[BSTRIDE:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call { , } @llvm.riscv.vlsseg2.mask.nxv4f32.i64( poison, poison, ptr [[BASE]], i64 [[BSTRIDE]], [[MASK]], i64 [[VL]], i64 3) +// CHECK-RV64-NEXT: ret { , } [[TMP0]] +// +vfloat32m2x2_t test_vlsseg2e32_v_f32m2x2_m(vbool16_t mask, const float *base, ptrdiff_t bstride, size_t vl) { + return __riscv_vlsseg2e32_v_tuple_f32m2x2_m(mask, base, bstride, vl); +} + +// CHECK-RV64-LABEL: define dso_local { , } @test_vlsseg2e32_v_f32m4x2_m +// CHECK-RV64-SAME: ( [[MASK:%.*]], ptr noundef [[BASE:%.*]], i64 noundef [[BSTRIDE:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call { , } @llvm.riscv.vlsseg2.mask.nxv8f32.i64( poison, poison, ptr [[BASE]], i64 [[BSTRIDE]], [[MASK]], i64 [[VL]], i64 3) +// CHECK-RV64-NEXT: ret { , } [[TMP0]] +// +vfloat32m4x2_t test_vlsseg2e32_v_f32m4x2_m(vbool8_t mask, const float *base, ptrdiff_t bstride, size_t vl) { + return __riscv_vlsseg2e32_v_tuple_f32m4x2_m(mask, base, bstride, vl); +} + +// CHECK-RV64-LABEL: define dso_local { , } @test_vlsseg2e32_v_i32mf2x2_m +// CHECK-RV64-SAME: ( [[MASK:%.*]], ptr noundef [[BASE:%.*]], i64 noundef [[BSTRIDE:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call { , } @llvm.riscv.vlsseg2.mask.nxv1i32.i64( poison, poison, ptr [[BASE]], i64 [[BSTRIDE]], [[MASK]], i64 [[VL]], i64 3) +// CHECK-RV64-NEXT: ret { , } [[TMP0]] +// +vint32mf2x2_t test_vlsseg2e32_v_i32mf2x2_m(vbool64_t mask, const int32_t *base, ptrdiff_t bstride, size_t vl) { + return __riscv_vlsseg2e32_v_tuple_i32mf2x2_m(mask, base, bstride, vl); +} + +// CHECK-RV64-LABEL: define dso_local { , } @test_vlsseg2e32_v_i32m1x2_m // CHECK-RV64-SAME: ( [[MASK:%.*]], ptr noundef [[BASE:%.*]], i64 noundef [[BSTRIDE:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: // CHECK-RV64-NEXT: [[TMP0:%.*]] = call { , } @llvm.riscv.vlsseg2.mask.nxv2i32.i64( poison, poison, ptr [[BASE]], i64 [[BSTRIDE]], [[MASK]], i64 [[VL]], i64 3) // CHECK-RV64-NEXT: ret { , } [[TMP0]] // -vint32m1x2_t test_vlsseg2e32_v_tuple_i32m1_m(vbool32_t mask, const int32_t *base, ptrdiff_t bstride, size_t vl) { - return __riscv_vlsseg2e32_v_tuple_i32m1_m(mask, base, bstride, vl); +vint32m1x2_t test_vlsseg2e32_v_i32m1x2_m(vbool32_t mask, const int32_t *base, ptrdiff_t bstride, size_t vl) { + return __riscv_vlsseg2e32_v_tuple_i32m1x2_m(mask, base, bstride, vl); +} + +// CHECK-RV64-LABEL: define dso_local { , } @test_vlsseg2e32_v_i32m2x2_m +// CHECK-RV64-SAME: ( [[MASK:%.*]], ptr noundef [[BASE:%.*]], i64 noundef [[BSTRIDE:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call { , } @llvm.riscv.vlsseg2.mask.nxv4i32.i64( poison, poison, ptr [[BASE]], i64 [[BSTRIDE]], [[MASK]], i64 [[VL]], i64 3) +// CHECK-RV64-NEXT: ret { , } [[TMP0]] +// +vint32m2x2_t test_vlsseg2e32_v_i32m2x2_m(vbool16_t mask, const int32_t *base, ptrdiff_t bstride, size_t vl) { + return __riscv_vlsseg2e32_v_tuple_i32m2x2_m(mask, base, bstride, vl); +} + +// CHECK-RV64-LABEL: define dso_local { , } @test_vlsseg2e32_v_i32m4x2_m +// CHECK-RV64-SAME: ( [[MASK:%.*]], ptr noundef [[BASE:%.*]], i64 noundef [[BSTRIDE:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call { , } @llvm.riscv.vlsseg2.mask.nxv8i32.i64( poison, poison, ptr [[BASE]], i64 [[BSTRIDE]], [[MASK]], i64 [[VL]], i64 3) +// CHECK-RV64-NEXT: ret { , } [[TMP0]] +// +vint32m4x2_t test_vlsseg2e32_v_i32m4x2_m(vbool8_t mask, const int32_t *base, ptrdiff_t bstride, size_t vl) { + return __riscv_vlsseg2e32_v_tuple_i32m4x2_m(mask, base, bstride, vl); +} + +// CHECK-RV64-LABEL: define dso_local { , } @test_vlsseg2e32_v_u32mf2x2_m +// CHECK-RV64-SAME: ( [[MASK:%.*]], ptr noundef [[BASE:%.*]], i64 noundef [[BSTRIDE:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call { , } @llvm.riscv.vlsseg2.mask.nxv1i32.i64( poison, poison, ptr [[BASE]], i64 [[BSTRIDE]], [[MASK]], i64 [[VL]], i64 3) +// CHECK-RV64-NEXT: ret { , } [[TMP0]] +// +vuint32mf2x2_t test_vlsseg2e32_v_u32mf2x2_m(vbool64_t mask, const uint32_t *base, ptrdiff_t bstride, size_t vl) { + return __riscv_vlsseg2e32_v_tuple_u32mf2x2_m(mask, base, bstride, vl); +} + +// CHECK-RV64-LABEL: define dso_local { , } @test_vlsseg2e32_v_u32m1x2_m +// CHECK-RV64-SAME: ( [[MASK:%.*]], ptr noundef [[BASE:%.*]], i64 noundef [[BSTRIDE:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call { , } @llvm.riscv.vlsseg2.mask.nxv2i32.i64( poison, poison, ptr [[BASE]], i64 [[BSTRIDE]], [[MASK]], i64 [[VL]], i64 3) +// CHECK-RV64-NEXT: ret { , } [[TMP0]] +// +vuint32m1x2_t test_vlsseg2e32_v_u32m1x2_m(vbool32_t mask, const uint32_t *base, ptrdiff_t bstride, size_t vl) { + return __riscv_vlsseg2e32_v_tuple_u32m1x2_m(mask, base, bstride, vl); +} + +// CHECK-RV64-LABEL: define dso_local { , } @test_vlsseg2e32_v_u32m2x2_m +// CHECK-RV64-SAME: ( [[MASK:%.*]], ptr noundef [[BASE:%.*]], i64 noundef [[BSTRIDE:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call { , } @llvm.riscv.vlsseg2.mask.nxv4i32.i64( poison, poison, ptr [[BASE]], i64 [[BSTRIDE]], [[MASK]], i64 [[VL]], i64 3) +// CHECK-RV64-NEXT: ret { , } [[TMP0]] +// +vuint32m2x2_t test_vlsseg2e32_v_u32m2x2_m(vbool16_t mask, const uint32_t *base, ptrdiff_t bstride, size_t vl) { + return __riscv_vlsseg2e32_v_tuple_u32m2x2_m(mask, base, bstride, vl); +} + +// CHECK-RV64-LABEL: define dso_local { , } @test_vlsseg2e32_v_u32m4x2_m +// CHECK-RV64-SAME: ( [[MASK:%.*]], ptr noundef [[BASE:%.*]], i64 noundef [[BSTRIDE:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call { , } @llvm.riscv.vlsseg2.mask.nxv8i32.i64( poison, poison, ptr [[BASE]], i64 [[BSTRIDE]], [[MASK]], i64 [[VL]], i64 3) +// CHECK-RV64-NEXT: ret { , } [[TMP0]] +// +vuint32m4x2_t test_vlsseg2e32_v_u32m4x2_m(vbool8_t mask, const uint32_t *base, ptrdiff_t bstride, size_t vl) { + return __riscv_vlsseg2e32_v_tuple_u32m4x2_m(mask, base, bstride, vl); } diff --git a/clang/test/CodeGen/RISCV/rvv-intrinsics-autogenerated/non-policy/overloaded/vlsseg2e32_tuple.c b/clang/test/CodeGen/RISCV/rvv-intrinsics-autogenerated/non-policy/overloaded/vlsseg2e32_tuple.c new file mode 100644 --- /dev/null +++ b/clang/test/CodeGen/RISCV/rvv-intrinsics-autogenerated/non-policy/overloaded/vlsseg2e32_tuple.c @@ -0,0 +1,128 @@ +// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py UTC_ARGS: --version 2 +// REQUIRES: riscv-registered-target +// RUN: %clang_cc1 -triple riscv64 -target-feature +v -target-feature +zfh \ +// RUN: -target-feature +experimental-zvfh -disable-O0-optnone \ +// RUN: -emit-llvm %s -o - | opt -S -passes=mem2reg | \ +// RUN: FileCheck --check-prefix=CHECK-RV64 %s + +#include + +// CHECK-RV64-LABEL: define dso_local { , } @test_vlsseg2e32_v_f32mf2x2_m +// CHECK-RV64-SAME: ( [[MASK:%.*]], ptr noundef [[BASE:%.*]], i64 noundef [[BSTRIDE:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0:[0-9]+]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call { , } @llvm.riscv.vlsseg2.mask.nxv1f32.i64( poison, poison, ptr [[BASE]], i64 [[BSTRIDE]], [[MASK]], i64 [[VL]], i64 3) +// CHECK-RV64-NEXT: ret { , } [[TMP0]] +// +vfloat32mf2x2_t test_vlsseg2e32_v_f32mf2x2_m(vbool64_t mask, const float *base, ptrdiff_t bstride, size_t vl) { + return __riscv_vlsseg2e32_tuple(mask, base, bstride, vl); +} + +// CHECK-RV64-LABEL: define dso_local { , } @test_vlsseg2e32_v_f32m1x2_m +// CHECK-RV64-SAME: ( [[MASK:%.*]], ptr noundef [[BASE:%.*]], i64 noundef [[BSTRIDE:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call { , } @llvm.riscv.vlsseg2.mask.nxv2f32.i64( poison, poison, ptr [[BASE]], i64 [[BSTRIDE]], [[MASK]], i64 [[VL]], i64 3) +// CHECK-RV64-NEXT: ret { , } [[TMP0]] +// +vfloat32m1x2_t test_vlsseg2e32_v_f32m1x2_m(vbool32_t mask, const float *base, ptrdiff_t bstride, size_t vl) { + return __riscv_vlsseg2e32_tuple(mask, base, bstride, vl); +} + +// CHECK-RV64-LABEL: define dso_local { , } @test_vlsseg2e32_v_f32m2x2_m +// CHECK-RV64-SAME: ( [[MASK:%.*]], ptr noundef [[BASE:%.*]], i64 noundef [[BSTRIDE:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call { , } @llvm.riscv.vlsseg2.mask.nxv4f32.i64( poison, poison, ptr [[BASE]], i64 [[BSTRIDE]], [[MASK]], i64 [[VL]], i64 3) +// CHECK-RV64-NEXT: ret { , } [[TMP0]] +// +vfloat32m2x2_t test_vlsseg2e32_v_f32m2x2_m(vbool16_t mask, const float *base, ptrdiff_t bstride, size_t vl) { + return __riscv_vlsseg2e32_tuple(mask, base, bstride, vl); +} + +// CHECK-RV64-LABEL: define dso_local { , } @test_vlsseg2e32_v_f32m4x2_m +// CHECK-RV64-SAME: ( [[MASK:%.*]], ptr noundef [[BASE:%.*]], i64 noundef [[BSTRIDE:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call { , } @llvm.riscv.vlsseg2.mask.nxv8f32.i64( poison, poison, ptr [[BASE]], i64 [[BSTRIDE]], [[MASK]], i64 [[VL]], i64 3) +// CHECK-RV64-NEXT: ret { , } [[TMP0]] +// +vfloat32m4x2_t test_vlsseg2e32_v_f32m4x2_m(vbool8_t mask, const float *base, ptrdiff_t bstride, size_t vl) { + return __riscv_vlsseg2e32_tuple(mask, base, bstride, vl); +} + +// CHECK-RV64-LABEL: define dso_local { , } @test_vlsseg2e32_v_i32mf2x2_m +// CHECK-RV64-SAME: ( [[MASK:%.*]], ptr noundef [[BASE:%.*]], i64 noundef [[BSTRIDE:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call { , } @llvm.riscv.vlsseg2.mask.nxv1i32.i64( poison, poison, ptr [[BASE]], i64 [[BSTRIDE]], [[MASK]], i64 [[VL]], i64 3) +// CHECK-RV64-NEXT: ret { , } [[TMP0]] +// +vint32mf2x2_t test_vlsseg2e32_v_i32mf2x2_m(vbool64_t mask, const int32_t *base, ptrdiff_t bstride, size_t vl) { + return __riscv_vlsseg2e32_tuple(mask, base, bstride, vl); +} + +// CHECK-RV64-LABEL: define dso_local { , } @test_vlsseg2e32_v_i32m1x2_m +// CHECK-RV64-SAME: ( [[MASK:%.*]], ptr noundef [[BASE:%.*]], i64 noundef [[BSTRIDE:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call { , } @llvm.riscv.vlsseg2.mask.nxv2i32.i64( poison, poison, ptr [[BASE]], i64 [[BSTRIDE]], [[MASK]], i64 [[VL]], i64 3) +// CHECK-RV64-NEXT: ret { , } [[TMP0]] +// +vint32m1x2_t test_vlsseg2e32_v_i32m1x2_m(vbool32_t mask, const int32_t *base, ptrdiff_t bstride, size_t vl) { + return __riscv_vlsseg2e32_tuple(mask, base, bstride, vl); +} + +// CHECK-RV64-LABEL: define dso_local { , } @test_vlsseg2e32_v_i32m2x2_m +// CHECK-RV64-SAME: ( [[MASK:%.*]], ptr noundef [[BASE:%.*]], i64 noundef [[BSTRIDE:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call { , } @llvm.riscv.vlsseg2.mask.nxv4i32.i64( poison, poison, ptr [[BASE]], i64 [[BSTRIDE]], [[MASK]], i64 [[VL]], i64 3) +// CHECK-RV64-NEXT: ret { , } [[TMP0]] +// +vint32m2x2_t test_vlsseg2e32_v_i32m2x2_m(vbool16_t mask, const int32_t *base, ptrdiff_t bstride, size_t vl) { + return __riscv_vlsseg2e32_tuple(mask, base, bstride, vl); +} + +// CHECK-RV64-LABEL: define dso_local { , } @test_vlsseg2e32_v_i32m4x2_m +// CHECK-RV64-SAME: ( [[MASK:%.*]], ptr noundef [[BASE:%.*]], i64 noundef [[BSTRIDE:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call { , } @llvm.riscv.vlsseg2.mask.nxv8i32.i64( poison, poison, ptr [[BASE]], i64 [[BSTRIDE]], [[MASK]], i64 [[VL]], i64 3) +// CHECK-RV64-NEXT: ret { , } [[TMP0]] +// +vint32m4x2_t test_vlsseg2e32_v_i32m4x2_m(vbool8_t mask, const int32_t *base, ptrdiff_t bstride, size_t vl) { + return __riscv_vlsseg2e32_tuple(mask, base, bstride, vl); +} + +// CHECK-RV64-LABEL: define dso_local { , } @test_vlsseg2e32_v_u32mf2x2_m +// CHECK-RV64-SAME: ( [[MASK:%.*]], ptr noundef [[BASE:%.*]], i64 noundef [[BSTRIDE:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call { , } @llvm.riscv.vlsseg2.mask.nxv1i32.i64( poison, poison, ptr [[BASE]], i64 [[BSTRIDE]], [[MASK]], i64 [[VL]], i64 3) +// CHECK-RV64-NEXT: ret { , } [[TMP0]] +// +vuint32mf2x2_t test_vlsseg2e32_v_u32mf2x2_m(vbool64_t mask, const uint32_t *base, ptrdiff_t bstride, size_t vl) { + return __riscv_vlsseg2e32_tuple(mask, base, bstride, vl); +} + +// CHECK-RV64-LABEL: define dso_local { , } @test_vlsseg2e32_v_u32m1x2_m +// CHECK-RV64-SAME: ( [[MASK:%.*]], ptr noundef [[BASE:%.*]], i64 noundef [[BSTRIDE:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call { , } @llvm.riscv.vlsseg2.mask.nxv2i32.i64( poison, poison, ptr [[BASE]], i64 [[BSTRIDE]], [[MASK]], i64 [[VL]], i64 3) +// CHECK-RV64-NEXT: ret { , } [[TMP0]] +// +vuint32m1x2_t test_vlsseg2e32_v_u32m1x2_m(vbool32_t mask, const uint32_t *base, ptrdiff_t bstride, size_t vl) { + return __riscv_vlsseg2e32_tuple(mask, base, bstride, vl); +} + +// CHECK-RV64-LABEL: define dso_local { , } @test_vlsseg2e32_v_u32m2x2_m +// CHECK-RV64-SAME: ( [[MASK:%.*]], ptr noundef [[BASE:%.*]], i64 noundef [[BSTRIDE:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call { , } @llvm.riscv.vlsseg2.mask.nxv4i32.i64( poison, poison, ptr [[BASE]], i64 [[BSTRIDE]], [[MASK]], i64 [[VL]], i64 3) +// CHECK-RV64-NEXT: ret { , } [[TMP0]] +// +vuint32m2x2_t test_vlsseg2e32_v_u32m2x2_m(vbool16_t mask, const uint32_t *base, ptrdiff_t bstride, size_t vl) { + return __riscv_vlsseg2e32_tuple(mask, base, bstride, vl); +} + +// CHECK-RV64-LABEL: define dso_local { , } @test_vlsseg2e32_v_u32m4x2_m +// CHECK-RV64-SAME: ( [[MASK:%.*]], ptr noundef [[BASE:%.*]], i64 noundef [[BSTRIDE:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call { , } @llvm.riscv.vlsseg2.mask.nxv8i32.i64( poison, poison, ptr [[BASE]], i64 [[BSTRIDE]], [[MASK]], i64 [[VL]], i64 3) +// CHECK-RV64-NEXT: ret { , } [[TMP0]] +// +vuint32m4x2_t test_vlsseg2e32_v_u32m4x2_m(vbool8_t mask, const uint32_t *base, ptrdiff_t bstride, size_t vl) { + return __riscv_vlsseg2e32_tuple(mask, base, bstride, vl); +} diff --git a/clang/test/CodeGen/RISCV/rvv-intrinsics-autogenerated/policy/non-overloaded/vlsseg2e32_tuple.c b/clang/test/CodeGen/RISCV/rvv-intrinsics-autogenerated/policy/non-overloaded/vlsseg2e32_tuple.c new file mode 100644 --- /dev/null +++ b/clang/test/CodeGen/RISCV/rvv-intrinsics-autogenerated/policy/non-overloaded/vlsseg2e32_tuple.c @@ -0,0 +1,681 @@ +// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py UTC_ARGS: --version 2 +// REQUIRES: riscv-registered-target +// RUN: %clang_cc1 -triple riscv64 -target-feature +v -target-feature +zfh \ +// RUN: -target-feature +experimental-zvfh -disable-O0-optnone \ +// RUN: -emit-llvm %s -o - | opt -S -passes=mem2reg | \ +// RUN: FileCheck --check-prefix=CHECK-RV64 %s + +#include + +// CHECK-RV64-LABEL: define dso_local { , } @test_vlsseg2e32_v_f32mf2x2_tu +// CHECK-RV64-SAME: ( [[MASKEDOFF_TUPLE_COERCE0:%.*]], [[MASKEDOFF_TUPLE_COERCE1:%.*]], ptr noundef [[BASE:%.*]], i64 noundef [[BSTRIDE:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0:[0-9]+]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = insertvalue { , } poison, [[MASKEDOFF_TUPLE_COERCE0]], 0 +// CHECK-RV64-NEXT: [[TMP1:%.*]] = insertvalue { , } [[TMP0]], [[MASKEDOFF_TUPLE_COERCE1]], 1 +// CHECK-RV64-NEXT: [[TMP2:%.*]] = extractvalue { , } [[TMP1]], 0 +// CHECK-RV64-NEXT: [[TMP3:%.*]] = extractvalue { , } [[TMP1]], 1 +// CHECK-RV64-NEXT: [[TMP4:%.*]] = call { , } @llvm.riscv.vlsseg2.nxv1f32.i64( [[TMP2]], [[TMP3]], ptr [[BASE]], i64 [[BSTRIDE]], i64 [[VL]]) +// CHECK-RV64-NEXT: ret { , } [[TMP4]] +// +vfloat32mf2x2_t test_vlsseg2e32_v_f32mf2x2_tu(vfloat32mf2x2_t maskedoff_tuple, const float *base, ptrdiff_t bstride, size_t vl) { + return __riscv_vlsseg2e32_v_tuple_f32mf2x2_tu(maskedoff_tuple, base, bstride, vl); +} + +// CHECK-RV64-LABEL: define dso_local { , } @test_vlsseg2e32_v_f32m1x2_tu +// CHECK-RV64-SAME: ( [[MASKEDOFF_TUPLE_COERCE0:%.*]], [[MASKEDOFF_TUPLE_COERCE1:%.*]], ptr noundef [[BASE:%.*]], i64 noundef [[BSTRIDE:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = insertvalue { , } poison, [[MASKEDOFF_TUPLE_COERCE0]], 0 +// CHECK-RV64-NEXT: [[TMP1:%.*]] = insertvalue { , } [[TMP0]], [[MASKEDOFF_TUPLE_COERCE1]], 1 +// CHECK-RV64-NEXT: [[TMP2:%.*]] = extractvalue { , } [[TMP1]], 0 +// CHECK-RV64-NEXT: [[TMP3:%.*]] = extractvalue { , } [[TMP1]], 1 +// CHECK-RV64-NEXT: [[TMP4:%.*]] = call { , } @llvm.riscv.vlsseg2.nxv2f32.i64( [[TMP2]], [[TMP3]], ptr [[BASE]], i64 [[BSTRIDE]], i64 [[VL]]) +// CHECK-RV64-NEXT: ret { , } [[TMP4]] +// +vfloat32m1x2_t test_vlsseg2e32_v_f32m1x2_tu(vfloat32m1x2_t maskedoff_tuple, const float *base, ptrdiff_t bstride, size_t vl) { + return __riscv_vlsseg2e32_v_tuple_f32m1x2_tu(maskedoff_tuple, base, bstride, vl); +} + +// CHECK-RV64-LABEL: define dso_local { , } @test_vlsseg2e32_v_f32m2x2_tu +// CHECK-RV64-SAME: ( [[MASKEDOFF_TUPLE_COERCE0:%.*]], [[MASKEDOFF_TUPLE_COERCE1:%.*]], ptr noundef [[BASE:%.*]], i64 noundef [[BSTRIDE:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = insertvalue { , } poison, [[MASKEDOFF_TUPLE_COERCE0]], 0 +// CHECK-RV64-NEXT: [[TMP1:%.*]] = insertvalue { , } [[TMP0]], [[MASKEDOFF_TUPLE_COERCE1]], 1 +// CHECK-RV64-NEXT: [[TMP2:%.*]] = extractvalue { , } [[TMP1]], 0 +// CHECK-RV64-NEXT: [[TMP3:%.*]] = extractvalue { , } [[TMP1]], 1 +// CHECK-RV64-NEXT: [[TMP4:%.*]] = call { , } @llvm.riscv.vlsseg2.nxv4f32.i64( [[TMP2]], [[TMP3]], ptr [[BASE]], i64 [[BSTRIDE]], i64 [[VL]]) +// CHECK-RV64-NEXT: ret { , } [[TMP4]] +// +vfloat32m2x2_t test_vlsseg2e32_v_f32m2x2_tu(vfloat32m2x2_t maskedoff_tuple, const float *base, ptrdiff_t bstride, size_t vl) { + return __riscv_vlsseg2e32_v_tuple_f32m2x2_tu(maskedoff_tuple, base, bstride, vl); +} + +// CHECK-RV64-LABEL: define dso_local { , } @test_vlsseg2e32_v_f32m4x2_tu +// CHECK-RV64-SAME: ( [[MASKEDOFF_TUPLE_COERCE0:%.*]], [[MASKEDOFF_TUPLE_COERCE1:%.*]], ptr noundef [[BASE:%.*]], i64 noundef [[BSTRIDE:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = insertvalue { , } poison, [[MASKEDOFF_TUPLE_COERCE0]], 0 +// CHECK-RV64-NEXT: [[TMP1:%.*]] = insertvalue { , } [[TMP0]], [[MASKEDOFF_TUPLE_COERCE1]], 1 +// CHECK-RV64-NEXT: [[TMP2:%.*]] = extractvalue { , } [[TMP1]], 0 +// CHECK-RV64-NEXT: [[TMP3:%.*]] = extractvalue { , } [[TMP1]], 1 +// CHECK-RV64-NEXT: [[TMP4:%.*]] = call { , } @llvm.riscv.vlsseg2.nxv8f32.i64( [[TMP2]], [[TMP3]], ptr [[BASE]], i64 [[BSTRIDE]], i64 [[VL]]) +// CHECK-RV64-NEXT: ret { , } [[TMP4]] +// +vfloat32m4x2_t test_vlsseg2e32_v_f32m4x2_tu(vfloat32m4x2_t maskedoff_tuple, const float *base, ptrdiff_t bstride, size_t vl) { + return __riscv_vlsseg2e32_v_tuple_f32m4x2_tu(maskedoff_tuple, base, bstride, vl); +} + +// CHECK-RV64-LABEL: define dso_local { , } @test_vlsseg2e32_v_i32mf2x2_tu +// CHECK-RV64-SAME: ( [[MASKEDOFF_TUPLE_COERCE0:%.*]], [[MASKEDOFF_TUPLE_COERCE1:%.*]], ptr noundef [[BASE:%.*]], i64 noundef [[BSTRIDE:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = insertvalue { , } poison, [[MASKEDOFF_TUPLE_COERCE0]], 0 +// CHECK-RV64-NEXT: [[TMP1:%.*]] = insertvalue { , } [[TMP0]], [[MASKEDOFF_TUPLE_COERCE1]], 1 +// CHECK-RV64-NEXT: [[TMP2:%.*]] = extractvalue { , } [[TMP1]], 0 +// CHECK-RV64-NEXT: [[TMP3:%.*]] = extractvalue { , } [[TMP1]], 1 +// CHECK-RV64-NEXT: [[TMP4:%.*]] = call { , } @llvm.riscv.vlsseg2.nxv1i32.i64( [[TMP2]], [[TMP3]], ptr [[BASE]], i64 [[BSTRIDE]], i64 [[VL]]) +// CHECK-RV64-NEXT: ret { , } [[TMP4]] +// +vint32mf2x2_t test_vlsseg2e32_v_i32mf2x2_tu(vint32mf2x2_t maskedoff_tuple, const int32_t *base, ptrdiff_t bstride, size_t vl) { + return __riscv_vlsseg2e32_v_tuple_i32mf2x2_tu(maskedoff_tuple, base, bstride, vl); +} + +// CHECK-RV64-LABEL: define dso_local { , } @test_vlsseg2e32_v_i32m1x2_tu +// CHECK-RV64-SAME: ( [[MASKEDOFF_TUPLE_COERCE0:%.*]], [[MASKEDOFF_TUPLE_COERCE1:%.*]], ptr noundef [[BASE:%.*]], i64 noundef [[BSTRIDE:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = insertvalue { , } poison, [[MASKEDOFF_TUPLE_COERCE0]], 0 +// CHECK-RV64-NEXT: [[TMP1:%.*]] = insertvalue { , } [[TMP0]], [[MASKEDOFF_TUPLE_COERCE1]], 1 +// CHECK-RV64-NEXT: [[TMP2:%.*]] = extractvalue { , } [[TMP1]], 0 +// CHECK-RV64-NEXT: [[TMP3:%.*]] = extractvalue { , } [[TMP1]], 1 +// CHECK-RV64-NEXT: [[TMP4:%.*]] = call { , } @llvm.riscv.vlsseg2.nxv2i32.i64( [[TMP2]], [[TMP3]], ptr [[BASE]], i64 [[BSTRIDE]], i64 [[VL]]) +// CHECK-RV64-NEXT: ret { , } [[TMP4]] +// +vint32m1x2_t test_vlsseg2e32_v_i32m1x2_tu(vint32m1x2_t maskedoff_tuple, const int32_t *base, ptrdiff_t bstride, size_t vl) { + return __riscv_vlsseg2e32_v_tuple_i32m1x2_tu(maskedoff_tuple, base, bstride, vl); +} + +// CHECK-RV64-LABEL: define dso_local { , } @test_vlsseg2e32_v_i32m2x2_tu +// CHECK-RV64-SAME: ( [[MASKEDOFF_TUPLE_COERCE0:%.*]], [[MASKEDOFF_TUPLE_COERCE1:%.*]], ptr noundef [[BASE:%.*]], i64 noundef [[BSTRIDE:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = insertvalue { , } poison, [[MASKEDOFF_TUPLE_COERCE0]], 0 +// CHECK-RV64-NEXT: [[TMP1:%.*]] = insertvalue { , } [[TMP0]], [[MASKEDOFF_TUPLE_COERCE1]], 1 +// CHECK-RV64-NEXT: [[TMP2:%.*]] = extractvalue { , } [[TMP1]], 0 +// CHECK-RV64-NEXT: [[TMP3:%.*]] = extractvalue { , } [[TMP1]], 1 +// CHECK-RV64-NEXT: [[TMP4:%.*]] = call { , } @llvm.riscv.vlsseg2.nxv4i32.i64( [[TMP2]], [[TMP3]], ptr [[BASE]], i64 [[BSTRIDE]], i64 [[VL]]) +// CHECK-RV64-NEXT: ret { , } [[TMP4]] +// +vint32m2x2_t test_vlsseg2e32_v_i32m2x2_tu(vint32m2x2_t maskedoff_tuple, const int32_t *base, ptrdiff_t bstride, size_t vl) { + return __riscv_vlsseg2e32_v_tuple_i32m2x2_tu(maskedoff_tuple, base, bstride, vl); +} + +// CHECK-RV64-LABEL: define dso_local { , } @test_vlsseg2e32_v_i32m4x2_tu +// CHECK-RV64-SAME: ( [[MASKEDOFF_TUPLE_COERCE0:%.*]], [[MASKEDOFF_TUPLE_COERCE1:%.*]], ptr noundef [[BASE:%.*]], i64 noundef [[BSTRIDE:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = insertvalue { , } poison, [[MASKEDOFF_TUPLE_COERCE0]], 0 +// CHECK-RV64-NEXT: [[TMP1:%.*]] = insertvalue { , } [[TMP0]], [[MASKEDOFF_TUPLE_COERCE1]], 1 +// CHECK-RV64-NEXT: [[TMP2:%.*]] = extractvalue { , } [[TMP1]], 0 +// CHECK-RV64-NEXT: [[TMP3:%.*]] = extractvalue { , } [[TMP1]], 1 +// CHECK-RV64-NEXT: [[TMP4:%.*]] = call { , } @llvm.riscv.vlsseg2.nxv8i32.i64( [[TMP2]], [[TMP3]], ptr [[BASE]], i64 [[BSTRIDE]], i64 [[VL]]) +// CHECK-RV64-NEXT: ret { , } [[TMP4]] +// +vint32m4x2_t test_vlsseg2e32_v_i32m4x2_tu(vint32m4x2_t maskedoff_tuple, const int32_t *base, ptrdiff_t bstride, size_t vl) { + return __riscv_vlsseg2e32_v_tuple_i32m4x2_tu(maskedoff_tuple, base, bstride, vl); +} + +// CHECK-RV64-LABEL: define dso_local { , } @test_vlsseg2e32_v_u32mf2x2_tu +// CHECK-RV64-SAME: ( [[MASKEDOFF_TUPLE_COERCE0:%.*]], [[MASKEDOFF_TUPLE_COERCE1:%.*]], ptr noundef [[BASE:%.*]], i64 noundef [[BSTRIDE:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = insertvalue { , } poison, [[MASKEDOFF_TUPLE_COERCE0]], 0 +// CHECK-RV64-NEXT: [[TMP1:%.*]] = insertvalue { , } [[TMP0]], [[MASKEDOFF_TUPLE_COERCE1]], 1 +// CHECK-RV64-NEXT: [[TMP2:%.*]] = extractvalue { , } [[TMP1]], 0 +// CHECK-RV64-NEXT: [[TMP3:%.*]] = extractvalue { , } [[TMP1]], 1 +// CHECK-RV64-NEXT: [[TMP4:%.*]] = call { , } @llvm.riscv.vlsseg2.nxv1i32.i64( [[TMP2]], [[TMP3]], ptr [[BASE]], i64 [[BSTRIDE]], i64 [[VL]]) +// CHECK-RV64-NEXT: ret { , } [[TMP4]] +// +vuint32mf2x2_t test_vlsseg2e32_v_u32mf2x2_tu(vuint32mf2x2_t maskedoff_tuple, const uint32_t *base, ptrdiff_t bstride, size_t vl) { + return __riscv_vlsseg2e32_v_tuple_u32mf2x2_tu(maskedoff_tuple, base, bstride, vl); +} + +// CHECK-RV64-LABEL: define dso_local { , } @test_vlsseg2e32_v_u32m1x2_tu +// CHECK-RV64-SAME: ( [[MASKEDOFF_TUPLE_COERCE0:%.*]], [[MASKEDOFF_TUPLE_COERCE1:%.*]], ptr noundef [[BASE:%.*]], i64 noundef [[BSTRIDE:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = insertvalue { , } poison, [[MASKEDOFF_TUPLE_COERCE0]], 0 +// CHECK-RV64-NEXT: [[TMP1:%.*]] = insertvalue { , } [[TMP0]], [[MASKEDOFF_TUPLE_COERCE1]], 1 +// CHECK-RV64-NEXT: [[TMP2:%.*]] = extractvalue { , } [[TMP1]], 0 +// CHECK-RV64-NEXT: [[TMP3:%.*]] = extractvalue { , } [[TMP1]], 1 +// CHECK-RV64-NEXT: [[TMP4:%.*]] = call { , } @llvm.riscv.vlsseg2.nxv2i32.i64( [[TMP2]], [[TMP3]], ptr [[BASE]], i64 [[BSTRIDE]], i64 [[VL]]) +// CHECK-RV64-NEXT: ret { , } [[TMP4]] +// +vuint32m1x2_t test_vlsseg2e32_v_u32m1x2_tu(vuint32m1x2_t maskedoff_tuple, const uint32_t *base, ptrdiff_t bstride, size_t vl) { + return __riscv_vlsseg2e32_v_tuple_u32m1x2_tu(maskedoff_tuple, base, bstride, vl); +} + +// CHECK-RV64-LABEL: define dso_local { , } @test_vlsseg2e32_v_u32m2x2_tu +// CHECK-RV64-SAME: ( [[MASKEDOFF_TUPLE_COERCE0:%.*]], [[MASKEDOFF_TUPLE_COERCE1:%.*]], ptr noundef [[BASE:%.*]], i64 noundef [[BSTRIDE:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = insertvalue { , } poison, [[MASKEDOFF_TUPLE_COERCE0]], 0 +// CHECK-RV64-NEXT: [[TMP1:%.*]] = insertvalue { , } [[TMP0]], [[MASKEDOFF_TUPLE_COERCE1]], 1 +// CHECK-RV64-NEXT: [[TMP2:%.*]] = extractvalue { , } [[TMP1]], 0 +// CHECK-RV64-NEXT: [[TMP3:%.*]] = extractvalue { , } [[TMP1]], 1 +// CHECK-RV64-NEXT: [[TMP4:%.*]] = call { , } @llvm.riscv.vlsseg2.nxv4i32.i64( [[TMP2]], [[TMP3]], ptr [[BASE]], i64 [[BSTRIDE]], i64 [[VL]]) +// CHECK-RV64-NEXT: ret { , } [[TMP4]] +// +vuint32m2x2_t test_vlsseg2e32_v_u32m2x2_tu(vuint32m2x2_t maskedoff_tuple, const uint32_t *base, ptrdiff_t bstride, size_t vl) { + return __riscv_vlsseg2e32_v_tuple_u32m2x2_tu(maskedoff_tuple, base, bstride, vl); +} + +// CHECK-RV64-LABEL: define dso_local { , } @test_vlsseg2e32_v_u32m4x2_tu +// CHECK-RV64-SAME: ( [[MASKEDOFF_TUPLE_COERCE0:%.*]], [[MASKEDOFF_TUPLE_COERCE1:%.*]], ptr noundef [[BASE:%.*]], i64 noundef [[BSTRIDE:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = insertvalue { , } poison, [[MASKEDOFF_TUPLE_COERCE0]], 0 +// CHECK-RV64-NEXT: [[TMP1:%.*]] = insertvalue { , } [[TMP0]], [[MASKEDOFF_TUPLE_COERCE1]], 1 +// CHECK-RV64-NEXT: [[TMP2:%.*]] = extractvalue { , } [[TMP1]], 0 +// CHECK-RV64-NEXT: [[TMP3:%.*]] = extractvalue { , } [[TMP1]], 1 +// CHECK-RV64-NEXT: [[TMP4:%.*]] = call { , } @llvm.riscv.vlsseg2.nxv8i32.i64( [[TMP2]], [[TMP3]], ptr [[BASE]], i64 [[BSTRIDE]], i64 [[VL]]) +// CHECK-RV64-NEXT: ret { , } [[TMP4]] +// +vuint32m4x2_t test_vlsseg2e32_v_u32m4x2_tu(vuint32m4x2_t maskedoff_tuple, const uint32_t *base, ptrdiff_t bstride, size_t vl) { + return __riscv_vlsseg2e32_v_tuple_u32m4x2_tu(maskedoff_tuple, base, bstride, vl); +} + +// CHECK-RV64-LABEL: define dso_local { , } @test_vlsseg2e32_v_f32mf2x2_tum +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF_TUPLE_COERCE0:%.*]], [[MASKEDOFF_TUPLE_COERCE1:%.*]], ptr noundef [[BASE:%.*]], i64 noundef [[BSTRIDE:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = insertvalue { , } poison, [[MASKEDOFF_TUPLE_COERCE0]], 0 +// CHECK-RV64-NEXT: [[TMP1:%.*]] = insertvalue { , } [[TMP0]], [[MASKEDOFF_TUPLE_COERCE1]], 1 +// CHECK-RV64-NEXT: [[TMP2:%.*]] = extractvalue { , } [[TMP1]], 0 +// CHECK-RV64-NEXT: [[TMP3:%.*]] = extractvalue { , } [[TMP1]], 1 +// CHECK-RV64-NEXT: [[TMP4:%.*]] = call { , } @llvm.riscv.vlsseg2.mask.nxv1f32.i64( [[TMP2]], [[TMP3]], ptr [[BASE]], i64 [[BSTRIDE]], [[MASK]], i64 [[VL]], i64 2) +// CHECK-RV64-NEXT: ret { , } [[TMP4]] +// +vfloat32mf2x2_t test_vlsseg2e32_v_f32mf2x2_tum(vbool64_t mask, vfloat32mf2x2_t maskedoff_tuple, const float *base, ptrdiff_t bstride, size_t vl) { + return __riscv_vlsseg2e32_v_tuple_f32mf2x2_tum(mask, maskedoff_tuple, base, bstride, vl); +} + +// CHECK-RV64-LABEL: define dso_local { , } @test_vlsseg2e32_v_f32m1x2_tum +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF_TUPLE_COERCE0:%.*]], [[MASKEDOFF_TUPLE_COERCE1:%.*]], ptr noundef [[BASE:%.*]], i64 noundef [[BSTRIDE:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = insertvalue { , } poison, [[MASKEDOFF_TUPLE_COERCE0]], 0 +// CHECK-RV64-NEXT: [[TMP1:%.*]] = insertvalue { , } [[TMP0]], [[MASKEDOFF_TUPLE_COERCE1]], 1 +// CHECK-RV64-NEXT: [[TMP2:%.*]] = extractvalue { , } [[TMP1]], 0 +// CHECK-RV64-NEXT: [[TMP3:%.*]] = extractvalue { , } [[TMP1]], 1 +// CHECK-RV64-NEXT: [[TMP4:%.*]] = call { , } @llvm.riscv.vlsseg2.mask.nxv2f32.i64( [[TMP2]], [[TMP3]], ptr [[BASE]], i64 [[BSTRIDE]], [[MASK]], i64 [[VL]], i64 2) +// CHECK-RV64-NEXT: ret { , } [[TMP4]] +// +vfloat32m1x2_t test_vlsseg2e32_v_f32m1x2_tum(vbool32_t mask, vfloat32m1x2_t maskedoff_tuple, const float *base, ptrdiff_t bstride, size_t vl) { + return __riscv_vlsseg2e32_v_tuple_f32m1x2_tum(mask, maskedoff_tuple, base, bstride, vl); +} + +// CHECK-RV64-LABEL: define dso_local { , } @test_vlsseg2e32_v_f32m2x2_tum +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF_TUPLE_COERCE0:%.*]], [[MASKEDOFF_TUPLE_COERCE1:%.*]], ptr noundef [[BASE:%.*]], i64 noundef [[BSTRIDE:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = insertvalue { , } poison, [[MASKEDOFF_TUPLE_COERCE0]], 0 +// CHECK-RV64-NEXT: [[TMP1:%.*]] = insertvalue { , } [[TMP0]], [[MASKEDOFF_TUPLE_COERCE1]], 1 +// CHECK-RV64-NEXT: [[TMP2:%.*]] = extractvalue { , } [[TMP1]], 0 +// CHECK-RV64-NEXT: [[TMP3:%.*]] = extractvalue { , } [[TMP1]], 1 +// CHECK-RV64-NEXT: [[TMP4:%.*]] = call { , } @llvm.riscv.vlsseg2.mask.nxv4f32.i64( [[TMP2]], [[TMP3]], ptr [[BASE]], i64 [[BSTRIDE]], [[MASK]], i64 [[VL]], i64 2) +// CHECK-RV64-NEXT: ret { , } [[TMP4]] +// +vfloat32m2x2_t test_vlsseg2e32_v_f32m2x2_tum(vbool16_t mask, vfloat32m2x2_t maskedoff_tuple, const float *base, ptrdiff_t bstride, size_t vl) { + return __riscv_vlsseg2e32_v_tuple_f32m2x2_tum(mask, maskedoff_tuple, base, bstride, vl); +} + +// CHECK-RV64-LABEL: define dso_local { , } @test_vlsseg2e32_v_f32m4x2_tum +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF_TUPLE_COERCE0:%.*]], [[MASKEDOFF_TUPLE_COERCE1:%.*]], ptr noundef [[BASE:%.*]], i64 noundef [[BSTRIDE:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = insertvalue { , } poison, [[MASKEDOFF_TUPLE_COERCE0]], 0 +// CHECK-RV64-NEXT: [[TMP1:%.*]] = insertvalue { , } [[TMP0]], [[MASKEDOFF_TUPLE_COERCE1]], 1 +// CHECK-RV64-NEXT: [[TMP2:%.*]] = extractvalue { , } [[TMP1]], 0 +// CHECK-RV64-NEXT: [[TMP3:%.*]] = extractvalue { , } [[TMP1]], 1 +// CHECK-RV64-NEXT: [[TMP4:%.*]] = call { , } @llvm.riscv.vlsseg2.mask.nxv8f32.i64( [[TMP2]], [[TMP3]], ptr [[BASE]], i64 [[BSTRIDE]], [[MASK]], i64 [[VL]], i64 2) +// CHECK-RV64-NEXT: ret { , } [[TMP4]] +// +vfloat32m4x2_t test_vlsseg2e32_v_f32m4x2_tum(vbool8_t mask, vfloat32m4x2_t maskedoff_tuple, const float *base, ptrdiff_t bstride, size_t vl) { + return __riscv_vlsseg2e32_v_tuple_f32m4x2_tum(mask, maskedoff_tuple, base, bstride, vl); +} + +// CHECK-RV64-LABEL: define dso_local { , } @test_vlsseg2e32_v_i32mf2x2_tum +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF_TUPLE_COERCE0:%.*]], [[MASKEDOFF_TUPLE_COERCE1:%.*]], ptr noundef [[BASE:%.*]], i64 noundef [[BSTRIDE:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = insertvalue { , } poison, [[MASKEDOFF_TUPLE_COERCE0]], 0 +// CHECK-RV64-NEXT: [[TMP1:%.*]] = insertvalue { , } [[TMP0]], [[MASKEDOFF_TUPLE_COERCE1]], 1 +// CHECK-RV64-NEXT: [[TMP2:%.*]] = extractvalue { , } [[TMP1]], 0 +// CHECK-RV64-NEXT: [[TMP3:%.*]] = extractvalue { , } [[TMP1]], 1 +// CHECK-RV64-NEXT: [[TMP4:%.*]] = call { , } @llvm.riscv.vlsseg2.mask.nxv1i32.i64( [[TMP2]], [[TMP3]], ptr [[BASE]], i64 [[BSTRIDE]], [[MASK]], i64 [[VL]], i64 2) +// CHECK-RV64-NEXT: ret { , } [[TMP4]] +// +vint32mf2x2_t test_vlsseg2e32_v_i32mf2x2_tum(vbool64_t mask, vint32mf2x2_t maskedoff_tuple, const int32_t *base, ptrdiff_t bstride, size_t vl) { + return __riscv_vlsseg2e32_v_tuple_i32mf2x2_tum(mask, maskedoff_tuple, base, bstride, vl); +} + +// CHECK-RV64-LABEL: define dso_local { , } @test_vlsseg2e32_v_i32m1x2_tum +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF_TUPLE_COERCE0:%.*]], [[MASKEDOFF_TUPLE_COERCE1:%.*]], ptr noundef [[BASE:%.*]], i64 noundef [[BSTRIDE:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = insertvalue { , } poison, [[MASKEDOFF_TUPLE_COERCE0]], 0 +// CHECK-RV64-NEXT: [[TMP1:%.*]] = insertvalue { , } [[TMP0]], [[MASKEDOFF_TUPLE_COERCE1]], 1 +// CHECK-RV64-NEXT: [[TMP2:%.*]] = extractvalue { , } [[TMP1]], 0 +// CHECK-RV64-NEXT: [[TMP3:%.*]] = extractvalue { , } [[TMP1]], 1 +// CHECK-RV64-NEXT: [[TMP4:%.*]] = call { , } @llvm.riscv.vlsseg2.mask.nxv2i32.i64( [[TMP2]], [[TMP3]], ptr [[BASE]], i64 [[BSTRIDE]], [[MASK]], i64 [[VL]], i64 2) +// CHECK-RV64-NEXT: ret { , } [[TMP4]] +// +vint32m1x2_t test_vlsseg2e32_v_i32m1x2_tum(vbool32_t mask, vint32m1x2_t maskedoff_tuple, const int32_t *base, ptrdiff_t bstride, size_t vl) { + return __riscv_vlsseg2e32_v_tuple_i32m1x2_tum(mask, maskedoff_tuple, base, bstride, vl); +} + +// CHECK-RV64-LABEL: define dso_local { , } @test_vlsseg2e32_v_i32m2x2_tum +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF_TUPLE_COERCE0:%.*]], [[MASKEDOFF_TUPLE_COERCE1:%.*]], ptr noundef [[BASE:%.*]], i64 noundef [[BSTRIDE:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = insertvalue { , } poison, [[MASKEDOFF_TUPLE_COERCE0]], 0 +// CHECK-RV64-NEXT: [[TMP1:%.*]] = insertvalue { , } [[TMP0]], [[MASKEDOFF_TUPLE_COERCE1]], 1 +// CHECK-RV64-NEXT: [[TMP2:%.*]] = extractvalue { , } [[TMP1]], 0 +// CHECK-RV64-NEXT: [[TMP3:%.*]] = extractvalue { , } [[TMP1]], 1 +// CHECK-RV64-NEXT: [[TMP4:%.*]] = call { , } @llvm.riscv.vlsseg2.mask.nxv4i32.i64( [[TMP2]], [[TMP3]], ptr [[BASE]], i64 [[BSTRIDE]], [[MASK]], i64 [[VL]], i64 2) +// CHECK-RV64-NEXT: ret { , } [[TMP4]] +// +vint32m2x2_t test_vlsseg2e32_v_i32m2x2_tum(vbool16_t mask, vint32m2x2_t maskedoff_tuple, const int32_t *base, ptrdiff_t bstride, size_t vl) { + return __riscv_vlsseg2e32_v_tuple_i32m2x2_tum(mask, maskedoff_tuple, base, bstride, vl); +} + +// CHECK-RV64-LABEL: define dso_local { , } @test_vlsseg2e32_v_i32m4x2_tum +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF_TUPLE_COERCE0:%.*]], [[MASKEDOFF_TUPLE_COERCE1:%.*]], ptr noundef [[BASE:%.*]], i64 noundef [[BSTRIDE:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = insertvalue { , } poison, [[MASKEDOFF_TUPLE_COERCE0]], 0 +// CHECK-RV64-NEXT: [[TMP1:%.*]] = insertvalue { , } [[TMP0]], [[MASKEDOFF_TUPLE_COERCE1]], 1 +// CHECK-RV64-NEXT: [[TMP2:%.*]] = extractvalue { , } [[TMP1]], 0 +// CHECK-RV64-NEXT: [[TMP3:%.*]] = extractvalue { , } [[TMP1]], 1 +// CHECK-RV64-NEXT: [[TMP4:%.*]] = call { , } @llvm.riscv.vlsseg2.mask.nxv8i32.i64( [[TMP2]], [[TMP3]], ptr [[BASE]], i64 [[BSTRIDE]], [[MASK]], i64 [[VL]], i64 2) +// CHECK-RV64-NEXT: ret { , } [[TMP4]] +// +vint32m4x2_t test_vlsseg2e32_v_i32m4x2_tum(vbool8_t mask, vint32m4x2_t maskedoff_tuple, const int32_t *base, ptrdiff_t bstride, size_t vl) { + return __riscv_vlsseg2e32_v_tuple_i32m4x2_tum(mask, maskedoff_tuple, base, bstride, vl); +} + +// CHECK-RV64-LABEL: define dso_local { , } @test_vlsseg2e32_v_u32mf2x2_tum +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF_TUPLE_COERCE0:%.*]], [[MASKEDOFF_TUPLE_COERCE1:%.*]], ptr noundef [[BASE:%.*]], i64 noundef [[BSTRIDE:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = insertvalue { , } poison, [[MASKEDOFF_TUPLE_COERCE0]], 0 +// CHECK-RV64-NEXT: [[TMP1:%.*]] = insertvalue { , } [[TMP0]], [[MASKEDOFF_TUPLE_COERCE1]], 1 +// CHECK-RV64-NEXT: [[TMP2:%.*]] = extractvalue { , } [[TMP1]], 0 +// CHECK-RV64-NEXT: [[TMP3:%.*]] = extractvalue { , } [[TMP1]], 1 +// CHECK-RV64-NEXT: [[TMP4:%.*]] = call { , } @llvm.riscv.vlsseg2.mask.nxv1i32.i64( [[TMP2]], [[TMP3]], ptr [[BASE]], i64 [[BSTRIDE]], [[MASK]], i64 [[VL]], i64 2) +// CHECK-RV64-NEXT: ret { , } [[TMP4]] +// +vuint32mf2x2_t test_vlsseg2e32_v_u32mf2x2_tum(vbool64_t mask, vuint32mf2x2_t maskedoff_tuple, const uint32_t *base, ptrdiff_t bstride, size_t vl) { + return __riscv_vlsseg2e32_v_tuple_u32mf2x2_tum(mask, maskedoff_tuple, base, bstride, vl); +} + +// CHECK-RV64-LABEL: define dso_local { , } @test_vlsseg2e32_v_u32m1x2_tum +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF_TUPLE_COERCE0:%.*]], [[MASKEDOFF_TUPLE_COERCE1:%.*]], ptr noundef [[BASE:%.*]], i64 noundef [[BSTRIDE:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = insertvalue { , } poison, [[MASKEDOFF_TUPLE_COERCE0]], 0 +// CHECK-RV64-NEXT: [[TMP1:%.*]] = insertvalue { , } [[TMP0]], [[MASKEDOFF_TUPLE_COERCE1]], 1 +// CHECK-RV64-NEXT: [[TMP2:%.*]] = extractvalue { , } [[TMP1]], 0 +// CHECK-RV64-NEXT: [[TMP3:%.*]] = extractvalue { , } [[TMP1]], 1 +// CHECK-RV64-NEXT: [[TMP4:%.*]] = call { , } @llvm.riscv.vlsseg2.mask.nxv2i32.i64( [[TMP2]], [[TMP3]], ptr [[BASE]], i64 [[BSTRIDE]], [[MASK]], i64 [[VL]], i64 2) +// CHECK-RV64-NEXT: ret { , } [[TMP4]] +// +vuint32m1x2_t test_vlsseg2e32_v_u32m1x2_tum(vbool32_t mask, vuint32m1x2_t maskedoff_tuple, const uint32_t *base, ptrdiff_t bstride, size_t vl) { + return __riscv_vlsseg2e32_v_tuple_u32m1x2_tum(mask, maskedoff_tuple, base, bstride, vl); +} + +// CHECK-RV64-LABEL: define dso_local { , } @test_vlsseg2e32_v_u32m2x2_tum +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF_TUPLE_COERCE0:%.*]], [[MASKEDOFF_TUPLE_COERCE1:%.*]], ptr noundef [[BASE:%.*]], i64 noundef [[BSTRIDE:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = insertvalue { , } poison, [[MASKEDOFF_TUPLE_COERCE0]], 0 +// CHECK-RV64-NEXT: [[TMP1:%.*]] = insertvalue { , } [[TMP0]], [[MASKEDOFF_TUPLE_COERCE1]], 1 +// CHECK-RV64-NEXT: [[TMP2:%.*]] = extractvalue { , } [[TMP1]], 0 +// CHECK-RV64-NEXT: [[TMP3:%.*]] = extractvalue { , } [[TMP1]], 1 +// CHECK-RV64-NEXT: [[TMP4:%.*]] = call { , } @llvm.riscv.vlsseg2.mask.nxv4i32.i64( [[TMP2]], [[TMP3]], ptr [[BASE]], i64 [[BSTRIDE]], [[MASK]], i64 [[VL]], i64 2) +// CHECK-RV64-NEXT: ret { , } [[TMP4]] +// +vuint32m2x2_t test_vlsseg2e32_v_u32m2x2_tum(vbool16_t mask, vuint32m2x2_t maskedoff_tuple, const uint32_t *base, ptrdiff_t bstride, size_t vl) { + return __riscv_vlsseg2e32_v_tuple_u32m2x2_tum(mask, maskedoff_tuple, base, bstride, vl); +} + +// CHECK-RV64-LABEL: define dso_local { , } @test_vlsseg2e32_v_u32m4x2_tum +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF_TUPLE_COERCE0:%.*]], [[MASKEDOFF_TUPLE_COERCE1:%.*]], ptr noundef [[BASE:%.*]], i64 noundef [[BSTRIDE:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = insertvalue { , } poison, [[MASKEDOFF_TUPLE_COERCE0]], 0 +// CHECK-RV64-NEXT: [[TMP1:%.*]] = insertvalue { , } [[TMP0]], [[MASKEDOFF_TUPLE_COERCE1]], 1 +// CHECK-RV64-NEXT: [[TMP2:%.*]] = extractvalue { , } [[TMP1]], 0 +// CHECK-RV64-NEXT: [[TMP3:%.*]] = extractvalue { , } [[TMP1]], 1 +// CHECK-RV64-NEXT: [[TMP4:%.*]] = call { , } @llvm.riscv.vlsseg2.mask.nxv8i32.i64( [[TMP2]], [[TMP3]], ptr [[BASE]], i64 [[BSTRIDE]], [[MASK]], i64 [[VL]], i64 2) +// CHECK-RV64-NEXT: ret { , } [[TMP4]] +// +vuint32m4x2_t test_vlsseg2e32_v_u32m4x2_tum(vbool8_t mask, vuint32m4x2_t maskedoff_tuple, const uint32_t *base, ptrdiff_t bstride, size_t vl) { + return __riscv_vlsseg2e32_v_tuple_u32m4x2_tum(mask, maskedoff_tuple, base, bstride, vl); +} + +// CHECK-RV64-LABEL: define dso_local { , } @test_vlsseg2e32_v_f32mf2x2_tumu +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF_TUPLE_COERCE0:%.*]], [[MASKEDOFF_TUPLE_COERCE1:%.*]], ptr noundef [[BASE:%.*]], i64 noundef [[BSTRIDE:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = insertvalue { , } poison, [[MASKEDOFF_TUPLE_COERCE0]], 0 +// CHECK-RV64-NEXT: [[TMP1:%.*]] = insertvalue { , } [[TMP0]], [[MASKEDOFF_TUPLE_COERCE1]], 1 +// CHECK-RV64-NEXT: [[TMP2:%.*]] = extractvalue { , } [[TMP1]], 0 +// CHECK-RV64-NEXT: [[TMP3:%.*]] = extractvalue { , } [[TMP1]], 1 +// CHECK-RV64-NEXT: [[TMP4:%.*]] = call { , } @llvm.riscv.vlsseg2.mask.nxv1f32.i64( [[TMP2]], [[TMP3]], ptr [[BASE]], i64 [[BSTRIDE]], [[MASK]], i64 [[VL]], i64 0) +// CHECK-RV64-NEXT: ret { , } [[TMP4]] +// +vfloat32mf2x2_t test_vlsseg2e32_v_f32mf2x2_tumu(vbool64_t mask, vfloat32mf2x2_t maskedoff_tuple, const float *base, ptrdiff_t bstride, size_t vl) { + return __riscv_vlsseg2e32_v_tuple_f32mf2x2_tumu(mask, maskedoff_tuple, base, bstride, vl); +} + +// CHECK-RV64-LABEL: define dso_local { , } @test_vlsseg2e32_v_f32m1x2_tumu +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF_TUPLE_COERCE0:%.*]], [[MASKEDOFF_TUPLE_COERCE1:%.*]], ptr noundef [[BASE:%.*]], i64 noundef [[BSTRIDE:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = insertvalue { , } poison, [[MASKEDOFF_TUPLE_COERCE0]], 0 +// CHECK-RV64-NEXT: [[TMP1:%.*]] = insertvalue { , } [[TMP0]], [[MASKEDOFF_TUPLE_COERCE1]], 1 +// CHECK-RV64-NEXT: [[TMP2:%.*]] = extractvalue { , } [[TMP1]], 0 +// CHECK-RV64-NEXT: [[TMP3:%.*]] = extractvalue { , } [[TMP1]], 1 +// CHECK-RV64-NEXT: [[TMP4:%.*]] = call { , } @llvm.riscv.vlsseg2.mask.nxv2f32.i64( [[TMP2]], [[TMP3]], ptr [[BASE]], i64 [[BSTRIDE]], [[MASK]], i64 [[VL]], i64 0) +// CHECK-RV64-NEXT: ret { , } [[TMP4]] +// +vfloat32m1x2_t test_vlsseg2e32_v_f32m1x2_tumu(vbool32_t mask, vfloat32m1x2_t maskedoff_tuple, const float *base, ptrdiff_t bstride, size_t vl) { + return __riscv_vlsseg2e32_v_tuple_f32m1x2_tumu(mask, maskedoff_tuple, base, bstride, vl); +} + +// CHECK-RV64-LABEL: define dso_local { , } @test_vlsseg2e32_v_f32m2x2_tumu +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF_TUPLE_COERCE0:%.*]], [[MASKEDOFF_TUPLE_COERCE1:%.*]], ptr noundef [[BASE:%.*]], i64 noundef [[BSTRIDE:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = insertvalue { , } poison, [[MASKEDOFF_TUPLE_COERCE0]], 0 +// CHECK-RV64-NEXT: [[TMP1:%.*]] = insertvalue { , } [[TMP0]], [[MASKEDOFF_TUPLE_COERCE1]], 1 +// CHECK-RV64-NEXT: [[TMP2:%.*]] = extractvalue { , } [[TMP1]], 0 +// CHECK-RV64-NEXT: [[TMP3:%.*]] = extractvalue { , } [[TMP1]], 1 +// CHECK-RV64-NEXT: [[TMP4:%.*]] = call { , } @llvm.riscv.vlsseg2.mask.nxv4f32.i64( [[TMP2]], [[TMP3]], ptr [[BASE]], i64 [[BSTRIDE]], [[MASK]], i64 [[VL]], i64 0) +// CHECK-RV64-NEXT: ret { , } [[TMP4]] +// +vfloat32m2x2_t test_vlsseg2e32_v_f32m2x2_tumu(vbool16_t mask, vfloat32m2x2_t maskedoff_tuple, const float *base, ptrdiff_t bstride, size_t vl) { + return __riscv_vlsseg2e32_v_tuple_f32m2x2_tumu(mask, maskedoff_tuple, base, bstride, vl); +} + +// CHECK-RV64-LABEL: define dso_local { , } @test_vlsseg2e32_v_f32m4x2_tumu +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF_TUPLE_COERCE0:%.*]], [[MASKEDOFF_TUPLE_COERCE1:%.*]], ptr noundef [[BASE:%.*]], i64 noundef [[BSTRIDE:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = insertvalue { , } poison, [[MASKEDOFF_TUPLE_COERCE0]], 0 +// CHECK-RV64-NEXT: [[TMP1:%.*]] = insertvalue { , } [[TMP0]], [[MASKEDOFF_TUPLE_COERCE1]], 1 +// CHECK-RV64-NEXT: [[TMP2:%.*]] = extractvalue { , } [[TMP1]], 0 +// CHECK-RV64-NEXT: [[TMP3:%.*]] = extractvalue { , } [[TMP1]], 1 +// CHECK-RV64-NEXT: [[TMP4:%.*]] = call { , } @llvm.riscv.vlsseg2.mask.nxv8f32.i64( [[TMP2]], [[TMP3]], ptr [[BASE]], i64 [[BSTRIDE]], [[MASK]], i64 [[VL]], i64 0) +// CHECK-RV64-NEXT: ret { , } [[TMP4]] +// +vfloat32m4x2_t test_vlsseg2e32_v_f32m4x2_tumu(vbool8_t mask, vfloat32m4x2_t maskedoff_tuple, const float *base, ptrdiff_t bstride, size_t vl) { + return __riscv_vlsseg2e32_v_tuple_f32m4x2_tumu(mask, maskedoff_tuple, base, bstride, vl); +} + +// CHECK-RV64-LABEL: define dso_local { , } @test_vlsseg2e32_v_i32mf2x2_tumu +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF_TUPLE_COERCE0:%.*]], [[MASKEDOFF_TUPLE_COERCE1:%.*]], ptr noundef [[BASE:%.*]], i64 noundef [[BSTRIDE:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = insertvalue { , } poison, [[MASKEDOFF_TUPLE_COERCE0]], 0 +// CHECK-RV64-NEXT: [[TMP1:%.*]] = insertvalue { , } [[TMP0]], [[MASKEDOFF_TUPLE_COERCE1]], 1 +// CHECK-RV64-NEXT: [[TMP2:%.*]] = extractvalue { , } [[TMP1]], 0 +// CHECK-RV64-NEXT: [[TMP3:%.*]] = extractvalue { , } [[TMP1]], 1 +// CHECK-RV64-NEXT: [[TMP4:%.*]] = call { , } @llvm.riscv.vlsseg2.mask.nxv1i32.i64( [[TMP2]], [[TMP3]], ptr [[BASE]], i64 [[BSTRIDE]], [[MASK]], i64 [[VL]], i64 0) +// CHECK-RV64-NEXT: ret { , } [[TMP4]] +// +vint32mf2x2_t test_vlsseg2e32_v_i32mf2x2_tumu(vbool64_t mask, vint32mf2x2_t maskedoff_tuple, const int32_t *base, ptrdiff_t bstride, size_t vl) { + return __riscv_vlsseg2e32_v_tuple_i32mf2x2_tumu(mask, maskedoff_tuple, base, bstride, vl); +} + +// CHECK-RV64-LABEL: define dso_local { , } @test_vlsseg2e32_v_i32m1x2_tumu +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF_TUPLE_COERCE0:%.*]], [[MASKEDOFF_TUPLE_COERCE1:%.*]], ptr noundef [[BASE:%.*]], i64 noundef [[BSTRIDE:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = insertvalue { , } poison, [[MASKEDOFF_TUPLE_COERCE0]], 0 +// CHECK-RV64-NEXT: [[TMP1:%.*]] = insertvalue { , } [[TMP0]], [[MASKEDOFF_TUPLE_COERCE1]], 1 +// CHECK-RV64-NEXT: [[TMP2:%.*]] = extractvalue { , } [[TMP1]], 0 +// CHECK-RV64-NEXT: [[TMP3:%.*]] = extractvalue { , } [[TMP1]], 1 +// CHECK-RV64-NEXT: [[TMP4:%.*]] = call { , } @llvm.riscv.vlsseg2.mask.nxv2i32.i64( [[TMP2]], [[TMP3]], ptr [[BASE]], i64 [[BSTRIDE]], [[MASK]], i64 [[VL]], i64 0) +// CHECK-RV64-NEXT: ret { , } [[TMP4]] +// +vint32m1x2_t test_vlsseg2e32_v_i32m1x2_tumu(vbool32_t mask, vint32m1x2_t maskedoff_tuple, const int32_t *base, ptrdiff_t bstride, size_t vl) { + return __riscv_vlsseg2e32_v_tuple_i32m1x2_tumu(mask, maskedoff_tuple, base, bstride, vl); +} + +// CHECK-RV64-LABEL: define dso_local { , } @test_vlsseg2e32_v_i32m2x2_tumu +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF_TUPLE_COERCE0:%.*]], [[MASKEDOFF_TUPLE_COERCE1:%.*]], ptr noundef [[BASE:%.*]], i64 noundef [[BSTRIDE:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = insertvalue { , } poison, [[MASKEDOFF_TUPLE_COERCE0]], 0 +// CHECK-RV64-NEXT: [[TMP1:%.*]] = insertvalue { , } [[TMP0]], [[MASKEDOFF_TUPLE_COERCE1]], 1 +// CHECK-RV64-NEXT: [[TMP2:%.*]] = extractvalue { , } [[TMP1]], 0 +// CHECK-RV64-NEXT: [[TMP3:%.*]] = extractvalue { , } [[TMP1]], 1 +// CHECK-RV64-NEXT: [[TMP4:%.*]] = call { , } @llvm.riscv.vlsseg2.mask.nxv4i32.i64( [[TMP2]], [[TMP3]], ptr [[BASE]], i64 [[BSTRIDE]], [[MASK]], i64 [[VL]], i64 0) +// CHECK-RV64-NEXT: ret { , } [[TMP4]] +// +vint32m2x2_t test_vlsseg2e32_v_i32m2x2_tumu(vbool16_t mask, vint32m2x2_t maskedoff_tuple, const int32_t *base, ptrdiff_t bstride, size_t vl) { + return __riscv_vlsseg2e32_v_tuple_i32m2x2_tumu(mask, maskedoff_tuple, base, bstride, vl); +} + +// CHECK-RV64-LABEL: define dso_local { , } @test_vlsseg2e32_v_i32m4x2_tumu +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF_TUPLE_COERCE0:%.*]], [[MASKEDOFF_TUPLE_COERCE1:%.*]], ptr noundef [[BASE:%.*]], i64 noundef [[BSTRIDE:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = insertvalue { , } poison, [[MASKEDOFF_TUPLE_COERCE0]], 0 +// CHECK-RV64-NEXT: [[TMP1:%.*]] = insertvalue { , } [[TMP0]], [[MASKEDOFF_TUPLE_COERCE1]], 1 +// CHECK-RV64-NEXT: [[TMP2:%.*]] = extractvalue { , } [[TMP1]], 0 +// CHECK-RV64-NEXT: [[TMP3:%.*]] = extractvalue { , } [[TMP1]], 1 +// CHECK-RV64-NEXT: [[TMP4:%.*]] = call { , } @llvm.riscv.vlsseg2.mask.nxv8i32.i64( [[TMP2]], [[TMP3]], ptr [[BASE]], i64 [[BSTRIDE]], [[MASK]], i64 [[VL]], i64 0) +// CHECK-RV64-NEXT: ret { , } [[TMP4]] +// +vint32m4x2_t test_vlsseg2e32_v_i32m4x2_tumu(vbool8_t mask, vint32m4x2_t maskedoff_tuple, const int32_t *base, ptrdiff_t bstride, size_t vl) { + return __riscv_vlsseg2e32_v_tuple_i32m4x2_tumu(mask, maskedoff_tuple, base, bstride, vl); +} + +// CHECK-RV64-LABEL: define dso_local { , } @test_vlsseg2e32_v_u32mf2x2_tumu +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF_TUPLE_COERCE0:%.*]], [[MASKEDOFF_TUPLE_COERCE1:%.*]], ptr noundef [[BASE:%.*]], i64 noundef [[BSTRIDE:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = insertvalue { , } poison, [[MASKEDOFF_TUPLE_COERCE0]], 0 +// CHECK-RV64-NEXT: [[TMP1:%.*]] = insertvalue { , } [[TMP0]], [[MASKEDOFF_TUPLE_COERCE1]], 1 +// CHECK-RV64-NEXT: [[TMP2:%.*]] = extractvalue { , } [[TMP1]], 0 +// CHECK-RV64-NEXT: [[TMP3:%.*]] = extractvalue { , } [[TMP1]], 1 +// CHECK-RV64-NEXT: [[TMP4:%.*]] = call { , } @llvm.riscv.vlsseg2.mask.nxv1i32.i64( [[TMP2]], [[TMP3]], ptr [[BASE]], i64 [[BSTRIDE]], [[MASK]], i64 [[VL]], i64 0) +// CHECK-RV64-NEXT: ret { , } [[TMP4]] +// +vuint32mf2x2_t test_vlsseg2e32_v_u32mf2x2_tumu(vbool64_t mask, vuint32mf2x2_t maskedoff_tuple, const uint32_t *base, ptrdiff_t bstride, size_t vl) { + return __riscv_vlsseg2e32_v_tuple_u32mf2x2_tumu(mask, maskedoff_tuple, base, bstride, vl); +} + +// CHECK-RV64-LABEL: define dso_local { , } @test_vlsseg2e32_v_u32m1x2_tumu +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF_TUPLE_COERCE0:%.*]], [[MASKEDOFF_TUPLE_COERCE1:%.*]], ptr noundef [[BASE:%.*]], i64 noundef [[BSTRIDE:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = insertvalue { , } poison, [[MASKEDOFF_TUPLE_COERCE0]], 0 +// CHECK-RV64-NEXT: [[TMP1:%.*]] = insertvalue { , } [[TMP0]], [[MASKEDOFF_TUPLE_COERCE1]], 1 +// CHECK-RV64-NEXT: [[TMP2:%.*]] = extractvalue { , } [[TMP1]], 0 +// CHECK-RV64-NEXT: [[TMP3:%.*]] = extractvalue { , } [[TMP1]], 1 +// CHECK-RV64-NEXT: [[TMP4:%.*]] = call { , } @llvm.riscv.vlsseg2.mask.nxv2i32.i64( [[TMP2]], [[TMP3]], ptr [[BASE]], i64 [[BSTRIDE]], [[MASK]], i64 [[VL]], i64 0) +// CHECK-RV64-NEXT: ret { , } [[TMP4]] +// +vuint32m1x2_t test_vlsseg2e32_v_u32m1x2_tumu(vbool32_t mask, vuint32m1x2_t maskedoff_tuple, const uint32_t *base, ptrdiff_t bstride, size_t vl) { + return __riscv_vlsseg2e32_v_tuple_u32m1x2_tumu(mask, maskedoff_tuple, base, bstride, vl); +} + +// CHECK-RV64-LABEL: define dso_local { , } @test_vlsseg2e32_v_u32m2x2_tumu +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF_TUPLE_COERCE0:%.*]], [[MASKEDOFF_TUPLE_COERCE1:%.*]], ptr noundef [[BASE:%.*]], i64 noundef [[BSTRIDE:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = insertvalue { , } poison, [[MASKEDOFF_TUPLE_COERCE0]], 0 +// CHECK-RV64-NEXT: [[TMP1:%.*]] = insertvalue { , } [[TMP0]], [[MASKEDOFF_TUPLE_COERCE1]], 1 +// CHECK-RV64-NEXT: [[TMP2:%.*]] = extractvalue { , } [[TMP1]], 0 +// CHECK-RV64-NEXT: [[TMP3:%.*]] = extractvalue { , } [[TMP1]], 1 +// CHECK-RV64-NEXT: [[TMP4:%.*]] = call { , } @llvm.riscv.vlsseg2.mask.nxv4i32.i64( [[TMP2]], [[TMP3]], ptr [[BASE]], i64 [[BSTRIDE]], [[MASK]], i64 [[VL]], i64 0) +// CHECK-RV64-NEXT: ret { , } [[TMP4]] +// +vuint32m2x2_t test_vlsseg2e32_v_u32m2x2_tumu(vbool16_t mask, vuint32m2x2_t maskedoff_tuple, const uint32_t *base, ptrdiff_t bstride, size_t vl) { + return __riscv_vlsseg2e32_v_tuple_u32m2x2_tumu(mask, maskedoff_tuple, base, bstride, vl); +} + +// CHECK-RV64-LABEL: define dso_local { , } @test_vlsseg2e32_v_u32m4x2_tumu +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF_TUPLE_COERCE0:%.*]], [[MASKEDOFF_TUPLE_COERCE1:%.*]], ptr noundef [[BASE:%.*]], i64 noundef [[BSTRIDE:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = insertvalue { , } poison, [[MASKEDOFF_TUPLE_COERCE0]], 0 +// CHECK-RV64-NEXT: [[TMP1:%.*]] = insertvalue { , } [[TMP0]], [[MASKEDOFF_TUPLE_COERCE1]], 1 +// CHECK-RV64-NEXT: [[TMP2:%.*]] = extractvalue { , } [[TMP1]], 0 +// CHECK-RV64-NEXT: [[TMP3:%.*]] = extractvalue { , } [[TMP1]], 1 +// CHECK-RV64-NEXT: [[TMP4:%.*]] = call { , } @llvm.riscv.vlsseg2.mask.nxv8i32.i64( [[TMP2]], [[TMP3]], ptr [[BASE]], i64 [[BSTRIDE]], [[MASK]], i64 [[VL]], i64 0) +// CHECK-RV64-NEXT: ret { , } [[TMP4]] +// +vuint32m4x2_t test_vlsseg2e32_v_u32m4x2_tumu(vbool8_t mask, vuint32m4x2_t maskedoff_tuple, const uint32_t *base, ptrdiff_t bstride, size_t vl) { + return __riscv_vlsseg2e32_v_tuple_u32m4x2_tumu(mask, maskedoff_tuple, base, bstride, vl); +} + +// CHECK-RV64-LABEL: define dso_local { , } @test_vlsseg2e32_v_f32mf2x2_mu +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF_TUPLE_COERCE0:%.*]], [[MASKEDOFF_TUPLE_COERCE1:%.*]], ptr noundef [[BASE:%.*]], i64 noundef [[BSTRIDE:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = insertvalue { , } poison, [[MASKEDOFF_TUPLE_COERCE0]], 0 +// CHECK-RV64-NEXT: [[TMP1:%.*]] = insertvalue { , } [[TMP0]], [[MASKEDOFF_TUPLE_COERCE1]], 1 +// CHECK-RV64-NEXT: [[TMP2:%.*]] = extractvalue { , } [[TMP1]], 0 +// CHECK-RV64-NEXT: [[TMP3:%.*]] = extractvalue { , } [[TMP1]], 1 +// CHECK-RV64-NEXT: [[TMP4:%.*]] = call { , } @llvm.riscv.vlsseg2.mask.nxv1f32.i64( [[TMP2]], [[TMP3]], ptr [[BASE]], i64 [[BSTRIDE]], [[MASK]], i64 [[VL]], i64 1) +// CHECK-RV64-NEXT: ret { , } [[TMP4]] +// +vfloat32mf2x2_t test_vlsseg2e32_v_f32mf2x2_mu(vbool64_t mask, vfloat32mf2x2_t maskedoff_tuple, const float *base, ptrdiff_t bstride, size_t vl) { + return __riscv_vlsseg2e32_v_tuple_f32mf2x2_mu(mask, maskedoff_tuple, base, bstride, vl); +} + +// CHECK-RV64-LABEL: define dso_local { , } @test_vlsseg2e32_v_f32m1x2_mu +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF_TUPLE_COERCE0:%.*]], [[MASKEDOFF_TUPLE_COERCE1:%.*]], ptr noundef [[BASE:%.*]], i64 noundef [[BSTRIDE:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = insertvalue { , } poison, [[MASKEDOFF_TUPLE_COERCE0]], 0 +// CHECK-RV64-NEXT: [[TMP1:%.*]] = insertvalue { , } [[TMP0]], [[MASKEDOFF_TUPLE_COERCE1]], 1 +// CHECK-RV64-NEXT: [[TMP2:%.*]] = extractvalue { , } [[TMP1]], 0 +// CHECK-RV64-NEXT: [[TMP3:%.*]] = extractvalue { , } [[TMP1]], 1 +// CHECK-RV64-NEXT: [[TMP4:%.*]] = call { , } @llvm.riscv.vlsseg2.mask.nxv2f32.i64( [[TMP2]], [[TMP3]], ptr [[BASE]], i64 [[BSTRIDE]], [[MASK]], i64 [[VL]], i64 1) +// CHECK-RV64-NEXT: ret { , } [[TMP4]] +// +vfloat32m1x2_t test_vlsseg2e32_v_f32m1x2_mu(vbool32_t mask, vfloat32m1x2_t maskedoff_tuple, const float *base, ptrdiff_t bstride, size_t vl) { + return __riscv_vlsseg2e32_v_tuple_f32m1x2_mu(mask, maskedoff_tuple, base, bstride, vl); +} + +// CHECK-RV64-LABEL: define dso_local { , } @test_vlsseg2e32_v_f32m2x2_mu +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF_TUPLE_COERCE0:%.*]], [[MASKEDOFF_TUPLE_COERCE1:%.*]], ptr noundef [[BASE:%.*]], i64 noundef [[BSTRIDE:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = insertvalue { , } poison, [[MASKEDOFF_TUPLE_COERCE0]], 0 +// CHECK-RV64-NEXT: [[TMP1:%.*]] = insertvalue { , } [[TMP0]], [[MASKEDOFF_TUPLE_COERCE1]], 1 +// CHECK-RV64-NEXT: [[TMP2:%.*]] = extractvalue { , } [[TMP1]], 0 +// CHECK-RV64-NEXT: [[TMP3:%.*]] = extractvalue { , } [[TMP1]], 1 +// CHECK-RV64-NEXT: [[TMP4:%.*]] = call { , } @llvm.riscv.vlsseg2.mask.nxv4f32.i64( [[TMP2]], [[TMP3]], ptr [[BASE]], i64 [[BSTRIDE]], [[MASK]], i64 [[VL]], i64 1) +// CHECK-RV64-NEXT: ret { , } [[TMP4]] +// +vfloat32m2x2_t test_vlsseg2e32_v_f32m2x2_mu(vbool16_t mask, vfloat32m2x2_t maskedoff_tuple, const float *base, ptrdiff_t bstride, size_t vl) { + return __riscv_vlsseg2e32_v_tuple_f32m2x2_mu(mask, maskedoff_tuple, base, bstride, vl); +} + +// CHECK-RV64-LABEL: define dso_local { , } @test_vlsseg2e32_v_f32m4x2_mu +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF_TUPLE_COERCE0:%.*]], [[MASKEDOFF_TUPLE_COERCE1:%.*]], ptr noundef [[BASE:%.*]], i64 noundef [[BSTRIDE:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = insertvalue { , } poison, [[MASKEDOFF_TUPLE_COERCE0]], 0 +// CHECK-RV64-NEXT: [[TMP1:%.*]] = insertvalue { , } [[TMP0]], [[MASKEDOFF_TUPLE_COERCE1]], 1 +// CHECK-RV64-NEXT: [[TMP2:%.*]] = extractvalue { , } [[TMP1]], 0 +// CHECK-RV64-NEXT: [[TMP3:%.*]] = extractvalue { , } [[TMP1]], 1 +// CHECK-RV64-NEXT: [[TMP4:%.*]] = call { , } @llvm.riscv.vlsseg2.mask.nxv8f32.i64( [[TMP2]], [[TMP3]], ptr [[BASE]], i64 [[BSTRIDE]], [[MASK]], i64 [[VL]], i64 1) +// CHECK-RV64-NEXT: ret { , } [[TMP4]] +// +vfloat32m4x2_t test_vlsseg2e32_v_f32m4x2_mu(vbool8_t mask, vfloat32m4x2_t maskedoff_tuple, const float *base, ptrdiff_t bstride, size_t vl) { + return __riscv_vlsseg2e32_v_tuple_f32m4x2_mu(mask, maskedoff_tuple, base, bstride, vl); +} + +// CHECK-RV64-LABEL: define dso_local { , } @test_vlsseg2e32_v_i32mf2x2_mu +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF_TUPLE_COERCE0:%.*]], [[MASKEDOFF_TUPLE_COERCE1:%.*]], ptr noundef [[BASE:%.*]], i64 noundef [[BSTRIDE:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = insertvalue { , } poison, [[MASKEDOFF_TUPLE_COERCE0]], 0 +// CHECK-RV64-NEXT: [[TMP1:%.*]] = insertvalue { , } [[TMP0]], [[MASKEDOFF_TUPLE_COERCE1]], 1 +// CHECK-RV64-NEXT: [[TMP2:%.*]] = extractvalue { , } [[TMP1]], 0 +// CHECK-RV64-NEXT: [[TMP3:%.*]] = extractvalue { , } [[TMP1]], 1 +// CHECK-RV64-NEXT: [[TMP4:%.*]] = call { , } @llvm.riscv.vlsseg2.mask.nxv1i32.i64( [[TMP2]], [[TMP3]], ptr [[BASE]], i64 [[BSTRIDE]], [[MASK]], i64 [[VL]], i64 1) +// CHECK-RV64-NEXT: ret { , } [[TMP4]] +// +vint32mf2x2_t test_vlsseg2e32_v_i32mf2x2_mu(vbool64_t mask, vint32mf2x2_t maskedoff_tuple, const int32_t *base, ptrdiff_t bstride, size_t vl) { + return __riscv_vlsseg2e32_v_tuple_i32mf2x2_mu(mask, maskedoff_tuple, base, bstride, vl); +} + +// CHECK-RV64-LABEL: define dso_local { , } @test_vlsseg2e32_v_i32m1x2_mu +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF_TUPLE_COERCE0:%.*]], [[MASKEDOFF_TUPLE_COERCE1:%.*]], ptr noundef [[BASE:%.*]], i64 noundef [[BSTRIDE:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = insertvalue { , } poison, [[MASKEDOFF_TUPLE_COERCE0]], 0 +// CHECK-RV64-NEXT: [[TMP1:%.*]] = insertvalue { , } [[TMP0]], [[MASKEDOFF_TUPLE_COERCE1]], 1 +// CHECK-RV64-NEXT: [[TMP2:%.*]] = extractvalue { , } [[TMP1]], 0 +// CHECK-RV64-NEXT: [[TMP3:%.*]] = extractvalue { , } [[TMP1]], 1 +// CHECK-RV64-NEXT: [[TMP4:%.*]] = call { , } @llvm.riscv.vlsseg2.mask.nxv2i32.i64( [[TMP2]], [[TMP3]], ptr [[BASE]], i64 [[BSTRIDE]], [[MASK]], i64 [[VL]], i64 1) +// CHECK-RV64-NEXT: ret { , } [[TMP4]] +// +vint32m1x2_t test_vlsseg2e32_v_i32m1x2_mu(vbool32_t mask, vint32m1x2_t maskedoff_tuple, const int32_t *base, ptrdiff_t bstride, size_t vl) { + return __riscv_vlsseg2e32_v_tuple_i32m1x2_mu(mask, maskedoff_tuple, base, bstride, vl); +} + +// CHECK-RV64-LABEL: define dso_local { , } @test_vlsseg2e32_v_i32m2x2_mu +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF_TUPLE_COERCE0:%.*]], [[MASKEDOFF_TUPLE_COERCE1:%.*]], ptr noundef [[BASE:%.*]], i64 noundef [[BSTRIDE:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = insertvalue { , } poison, [[MASKEDOFF_TUPLE_COERCE0]], 0 +// CHECK-RV64-NEXT: [[TMP1:%.*]] = insertvalue { , } [[TMP0]], [[MASKEDOFF_TUPLE_COERCE1]], 1 +// CHECK-RV64-NEXT: [[TMP2:%.*]] = extractvalue { , } [[TMP1]], 0 +// CHECK-RV64-NEXT: [[TMP3:%.*]] = extractvalue { , } [[TMP1]], 1 +// CHECK-RV64-NEXT: [[TMP4:%.*]] = call { , } @llvm.riscv.vlsseg2.mask.nxv4i32.i64( [[TMP2]], [[TMP3]], ptr [[BASE]], i64 [[BSTRIDE]], [[MASK]], i64 [[VL]], i64 1) +// CHECK-RV64-NEXT: ret { , } [[TMP4]] +// +vint32m2x2_t test_vlsseg2e32_v_i32m2x2_mu(vbool16_t mask, vint32m2x2_t maskedoff_tuple, const int32_t *base, ptrdiff_t bstride, size_t vl) { + return __riscv_vlsseg2e32_v_tuple_i32m2x2_mu(mask, maskedoff_tuple, base, bstride, vl); +} + +// CHECK-RV64-LABEL: define dso_local { , } @test_vlsseg2e32_v_i32m4x2_mu +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF_TUPLE_COERCE0:%.*]], [[MASKEDOFF_TUPLE_COERCE1:%.*]], ptr noundef [[BASE:%.*]], i64 noundef [[BSTRIDE:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = insertvalue { , } poison, [[MASKEDOFF_TUPLE_COERCE0]], 0 +// CHECK-RV64-NEXT: [[TMP1:%.*]] = insertvalue { , } [[TMP0]], [[MASKEDOFF_TUPLE_COERCE1]], 1 +// CHECK-RV64-NEXT: [[TMP2:%.*]] = extractvalue { , } [[TMP1]], 0 +// CHECK-RV64-NEXT: [[TMP3:%.*]] = extractvalue { , } [[TMP1]], 1 +// CHECK-RV64-NEXT: [[TMP4:%.*]] = call { , } @llvm.riscv.vlsseg2.mask.nxv8i32.i64( [[TMP2]], [[TMP3]], ptr [[BASE]], i64 [[BSTRIDE]], [[MASK]], i64 [[VL]], i64 1) +// CHECK-RV64-NEXT: ret { , } [[TMP4]] +// +vint32m4x2_t test_vlsseg2e32_v_i32m4x2_mu(vbool8_t mask, vint32m4x2_t maskedoff_tuple, const int32_t *base, ptrdiff_t bstride, size_t vl) { + return __riscv_vlsseg2e32_v_tuple_i32m4x2_mu(mask, maskedoff_tuple, base, bstride, vl); +} + +// CHECK-RV64-LABEL: define dso_local { , } @test_vlsseg2e32_v_u32mf2x2_mu +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF_TUPLE_COERCE0:%.*]], [[MASKEDOFF_TUPLE_COERCE1:%.*]], ptr noundef [[BASE:%.*]], i64 noundef [[BSTRIDE:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = insertvalue { , } poison, [[MASKEDOFF_TUPLE_COERCE0]], 0 +// CHECK-RV64-NEXT: [[TMP1:%.*]] = insertvalue { , } [[TMP0]], [[MASKEDOFF_TUPLE_COERCE1]], 1 +// CHECK-RV64-NEXT: [[TMP2:%.*]] = extractvalue { , } [[TMP1]], 0 +// CHECK-RV64-NEXT: [[TMP3:%.*]] = extractvalue { , } [[TMP1]], 1 +// CHECK-RV64-NEXT: [[TMP4:%.*]] = call { , } @llvm.riscv.vlsseg2.mask.nxv1i32.i64( [[TMP2]], [[TMP3]], ptr [[BASE]], i64 [[BSTRIDE]], [[MASK]], i64 [[VL]], i64 1) +// CHECK-RV64-NEXT: ret { , } [[TMP4]] +// +vuint32mf2x2_t test_vlsseg2e32_v_u32mf2x2_mu(vbool64_t mask, vuint32mf2x2_t maskedoff_tuple, const uint32_t *base, ptrdiff_t bstride, size_t vl) { + return __riscv_vlsseg2e32_v_tuple_u32mf2x2_mu(mask, maskedoff_tuple, base, bstride, vl); +} + +// CHECK-RV64-LABEL: define dso_local { , } @test_vlsseg2e32_v_u32m1x2_mu +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF_TUPLE_COERCE0:%.*]], [[MASKEDOFF_TUPLE_COERCE1:%.*]], ptr noundef [[BASE:%.*]], i64 noundef [[BSTRIDE:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = insertvalue { , } poison, [[MASKEDOFF_TUPLE_COERCE0]], 0 +// CHECK-RV64-NEXT: [[TMP1:%.*]] = insertvalue { , } [[TMP0]], [[MASKEDOFF_TUPLE_COERCE1]], 1 +// CHECK-RV64-NEXT: [[TMP2:%.*]] = extractvalue { , } [[TMP1]], 0 +// CHECK-RV64-NEXT: [[TMP3:%.*]] = extractvalue { , } [[TMP1]], 1 +// CHECK-RV64-NEXT: [[TMP4:%.*]] = call { , } @llvm.riscv.vlsseg2.mask.nxv2i32.i64( [[TMP2]], [[TMP3]], ptr [[BASE]], i64 [[BSTRIDE]], [[MASK]], i64 [[VL]], i64 1) +// CHECK-RV64-NEXT: ret { , } [[TMP4]] +// +vuint32m1x2_t test_vlsseg2e32_v_u32m1x2_mu(vbool32_t mask, vuint32m1x2_t maskedoff_tuple, const uint32_t *base, ptrdiff_t bstride, size_t vl) { + return __riscv_vlsseg2e32_v_tuple_u32m1x2_mu(mask, maskedoff_tuple, base, bstride, vl); +} + +// CHECK-RV64-LABEL: define dso_local { , } @test_vlsseg2e32_v_u32m2x2_mu +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF_TUPLE_COERCE0:%.*]], [[MASKEDOFF_TUPLE_COERCE1:%.*]], ptr noundef [[BASE:%.*]], i64 noundef [[BSTRIDE:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = insertvalue { , } poison, [[MASKEDOFF_TUPLE_COERCE0]], 0 +// CHECK-RV64-NEXT: [[TMP1:%.*]] = insertvalue { , } [[TMP0]], [[MASKEDOFF_TUPLE_COERCE1]], 1 +// CHECK-RV64-NEXT: [[TMP2:%.*]] = extractvalue { , } [[TMP1]], 0 +// CHECK-RV64-NEXT: [[TMP3:%.*]] = extractvalue { , } [[TMP1]], 1 +// CHECK-RV64-NEXT: [[TMP4:%.*]] = call { , } @llvm.riscv.vlsseg2.mask.nxv4i32.i64( [[TMP2]], [[TMP3]], ptr [[BASE]], i64 [[BSTRIDE]], [[MASK]], i64 [[VL]], i64 1) +// CHECK-RV64-NEXT: ret { , } [[TMP4]] +// +vuint32m2x2_t test_vlsseg2e32_v_u32m2x2_mu(vbool16_t mask, vuint32m2x2_t maskedoff_tuple, const uint32_t *base, ptrdiff_t bstride, size_t vl) { + return __riscv_vlsseg2e32_v_tuple_u32m2x2_mu(mask, maskedoff_tuple, base, bstride, vl); +} + +// CHECK-RV64-LABEL: define dso_local { , } @test_vlsseg2e32_v_u32m4x2_mu +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF_TUPLE_COERCE0:%.*]], [[MASKEDOFF_TUPLE_COERCE1:%.*]], ptr noundef [[BASE:%.*]], i64 noundef [[BSTRIDE:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = insertvalue { , } poison, [[MASKEDOFF_TUPLE_COERCE0]], 0 +// CHECK-RV64-NEXT: [[TMP1:%.*]] = insertvalue { , } [[TMP0]], [[MASKEDOFF_TUPLE_COERCE1]], 1 +// CHECK-RV64-NEXT: [[TMP2:%.*]] = extractvalue { , } [[TMP1]], 0 +// CHECK-RV64-NEXT: [[TMP3:%.*]] = extractvalue { , } [[TMP1]], 1 +// CHECK-RV64-NEXT: [[TMP4:%.*]] = call { , } @llvm.riscv.vlsseg2.mask.nxv8i32.i64( [[TMP2]], [[TMP3]], ptr [[BASE]], i64 [[BSTRIDE]], [[MASK]], i64 [[VL]], i64 1) +// CHECK-RV64-NEXT: ret { , } [[TMP4]] +// +vuint32m4x2_t test_vlsseg2e32_v_u32m4x2_mu(vbool8_t mask, vuint32m4x2_t maskedoff_tuple, const uint32_t *base, ptrdiff_t bstride, size_t vl) { + return __riscv_vlsseg2e32_v_tuple_u32m4x2_mu(mask, maskedoff_tuple, base, bstride, vl); +} + diff --git a/clang/test/CodeGen/RISCV/rvv-intrinsics-autogenerated/policy/overloaded/vlsseg2e32_tuple.c b/clang/test/CodeGen/RISCV/rvv-intrinsics-autogenerated/policy/overloaded/vlsseg2e32_tuple.c new file mode 100644 --- /dev/null +++ b/clang/test/CodeGen/RISCV/rvv-intrinsics-autogenerated/policy/overloaded/vlsseg2e32_tuple.c @@ -0,0 +1,680 @@ +// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py UTC_ARGS: --version 2 +// REQUIRES: riscv-registered-target +// RUN: %clang_cc1 -triple riscv64 -target-feature +v -target-feature +zfh \ +// RUN: -target-feature +experimental-zvfh -disable-O0-optnone \ +// RUN: -emit-llvm %s -o - | opt -S -passes=mem2reg | \ +// RUN: FileCheck --check-prefix=CHECK-RV64 %s + +#include + +// CHECK-RV64-LABEL: define dso_local { , } @test_vlsseg2e32_v_f32mf2x2_tu +// CHECK-RV64-SAME: ( [[MASKEDOFF_TUPLE_COERCE0:%.*]], [[MASKEDOFF_TUPLE_COERCE1:%.*]], ptr noundef [[BASE:%.*]], i64 noundef [[BSTRIDE:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0:[0-9]+]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = insertvalue { , } poison, [[MASKEDOFF_TUPLE_COERCE0]], 0 +// CHECK-RV64-NEXT: [[TMP1:%.*]] = insertvalue { , } [[TMP0]], [[MASKEDOFF_TUPLE_COERCE1]], 1 +// CHECK-RV64-NEXT: [[TMP2:%.*]] = extractvalue { , } [[TMP1]], 0 +// CHECK-RV64-NEXT: [[TMP3:%.*]] = extractvalue { , } [[TMP1]], 1 +// CHECK-RV64-NEXT: [[TMP4:%.*]] = call { , } @llvm.riscv.vlsseg2.nxv1f32.i64( [[TMP2]], [[TMP3]], ptr [[BASE]], i64 [[BSTRIDE]], i64 [[VL]]) +// CHECK-RV64-NEXT: ret { , } [[TMP4]] +// +vfloat32mf2x2_t test_vlsseg2e32_v_f32mf2x2_tu(vfloat32mf2x2_t maskedoff_tuple, const float *base, ptrdiff_t bstride, size_t vl) { + return __riscv_vlsseg2e32_tuple_tu(maskedoff_tuple, base, bstride, vl); +} + +// CHECK-RV64-LABEL: define dso_local { , } @test_vlsseg2e32_v_f32m1x2_tu +// CHECK-RV64-SAME: ( [[MASKEDOFF_TUPLE_COERCE0:%.*]], [[MASKEDOFF_TUPLE_COERCE1:%.*]], ptr noundef [[BASE:%.*]], i64 noundef [[BSTRIDE:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = insertvalue { , } poison, [[MASKEDOFF_TUPLE_COERCE0]], 0 +// CHECK-RV64-NEXT: [[TMP1:%.*]] = insertvalue { , } [[TMP0]], [[MASKEDOFF_TUPLE_COERCE1]], 1 +// CHECK-RV64-NEXT: [[TMP2:%.*]] = extractvalue { , } [[TMP1]], 0 +// CHECK-RV64-NEXT: [[TMP3:%.*]] = extractvalue { , } [[TMP1]], 1 +// CHECK-RV64-NEXT: [[TMP4:%.*]] = call { , } @llvm.riscv.vlsseg2.nxv2f32.i64( [[TMP2]], [[TMP3]], ptr [[BASE]], i64 [[BSTRIDE]], i64 [[VL]]) +// CHECK-RV64-NEXT: ret { , } [[TMP4]] +// +vfloat32m1x2_t test_vlsseg2e32_v_f32m1x2_tu(vfloat32m1x2_t maskedoff_tuple, const float *base, ptrdiff_t bstride, size_t vl) { + return __riscv_vlsseg2e32_tuple_tu(maskedoff_tuple, base, bstride, vl); +} + +// CHECK-RV64-LABEL: define dso_local { , } @test_vlsseg2e32_v_f32m2x2_tu +// CHECK-RV64-SAME: ( [[MASKEDOFF_TUPLE_COERCE0:%.*]], [[MASKEDOFF_TUPLE_COERCE1:%.*]], ptr noundef [[BASE:%.*]], i64 noundef [[BSTRIDE:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = insertvalue { , } poison, [[MASKEDOFF_TUPLE_COERCE0]], 0 +// CHECK-RV64-NEXT: [[TMP1:%.*]] = insertvalue { , } [[TMP0]], [[MASKEDOFF_TUPLE_COERCE1]], 1 +// CHECK-RV64-NEXT: [[TMP2:%.*]] = extractvalue { , } [[TMP1]], 0 +// CHECK-RV64-NEXT: [[TMP3:%.*]] = extractvalue { , } [[TMP1]], 1 +// CHECK-RV64-NEXT: [[TMP4:%.*]] = call { , } @llvm.riscv.vlsseg2.nxv4f32.i64( [[TMP2]], [[TMP3]], ptr [[BASE]], i64 [[BSTRIDE]], i64 [[VL]]) +// CHECK-RV64-NEXT: ret { , } [[TMP4]] +// +vfloat32m2x2_t test_vlsseg2e32_v_f32m2x2_tu(vfloat32m2x2_t maskedoff_tuple, const float *base, ptrdiff_t bstride, size_t vl) { + return __riscv_vlsseg2e32_tuple_tu(maskedoff_tuple, base, bstride, vl); +} + +// CHECK-RV64-LABEL: define dso_local { , } @test_vlsseg2e32_v_f32m4x2_tu +// CHECK-RV64-SAME: ( [[MASKEDOFF_TUPLE_COERCE0:%.*]], [[MASKEDOFF_TUPLE_COERCE1:%.*]], ptr noundef [[BASE:%.*]], i64 noundef [[BSTRIDE:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = insertvalue { , } poison, [[MASKEDOFF_TUPLE_COERCE0]], 0 +// CHECK-RV64-NEXT: [[TMP1:%.*]] = insertvalue { , } [[TMP0]], [[MASKEDOFF_TUPLE_COERCE1]], 1 +// CHECK-RV64-NEXT: [[TMP2:%.*]] = extractvalue { , } [[TMP1]], 0 +// CHECK-RV64-NEXT: [[TMP3:%.*]] = extractvalue { , } [[TMP1]], 1 +// CHECK-RV64-NEXT: [[TMP4:%.*]] = call { , } @llvm.riscv.vlsseg2.nxv8f32.i64( [[TMP2]], [[TMP3]], ptr [[BASE]], i64 [[BSTRIDE]], i64 [[VL]]) +// CHECK-RV64-NEXT: ret { , } [[TMP4]] +// +vfloat32m4x2_t test_vlsseg2e32_v_f32m4x2_tu(vfloat32m4x2_t maskedoff_tuple, const float *base, ptrdiff_t bstride, size_t vl) { + return __riscv_vlsseg2e32_tuple_tu(maskedoff_tuple, base, bstride, vl); +} + +// CHECK-RV64-LABEL: define dso_local { , } @test_vlsseg2e32_v_i32mf2x2_tu +// CHECK-RV64-SAME: ( [[MASKEDOFF_TUPLE_COERCE0:%.*]], [[MASKEDOFF_TUPLE_COERCE1:%.*]], ptr noundef [[BASE:%.*]], i64 noundef [[BSTRIDE:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = insertvalue { , } poison, [[MASKEDOFF_TUPLE_COERCE0]], 0 +// CHECK-RV64-NEXT: [[TMP1:%.*]] = insertvalue { , } [[TMP0]], [[MASKEDOFF_TUPLE_COERCE1]], 1 +// CHECK-RV64-NEXT: [[TMP2:%.*]] = extractvalue { , } [[TMP1]], 0 +// CHECK-RV64-NEXT: [[TMP3:%.*]] = extractvalue { , } [[TMP1]], 1 +// CHECK-RV64-NEXT: [[TMP4:%.*]] = call { , } @llvm.riscv.vlsseg2.nxv1i32.i64( [[TMP2]], [[TMP3]], ptr [[BASE]], i64 [[BSTRIDE]], i64 [[VL]]) +// CHECK-RV64-NEXT: ret { , } [[TMP4]] +// +vint32mf2x2_t test_vlsseg2e32_v_i32mf2x2_tu(vint32mf2x2_t maskedoff_tuple, const int32_t *base, ptrdiff_t bstride, size_t vl) { + return __riscv_vlsseg2e32_tuple_tu(maskedoff_tuple, base, bstride, vl); +} + +// CHECK-RV64-LABEL: define dso_local { , } @test_vlsseg2e32_v_i32m1x2_tu +// CHECK-RV64-SAME: ( [[MASKEDOFF_TUPLE_COERCE0:%.*]], [[MASKEDOFF_TUPLE_COERCE1:%.*]], ptr noundef [[BASE:%.*]], i64 noundef [[BSTRIDE:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = insertvalue { , } poison, [[MASKEDOFF_TUPLE_COERCE0]], 0 +// CHECK-RV64-NEXT: [[TMP1:%.*]] = insertvalue { , } [[TMP0]], [[MASKEDOFF_TUPLE_COERCE1]], 1 +// CHECK-RV64-NEXT: [[TMP2:%.*]] = extractvalue { , } [[TMP1]], 0 +// CHECK-RV64-NEXT: [[TMP3:%.*]] = extractvalue { , } [[TMP1]], 1 +// CHECK-RV64-NEXT: [[TMP4:%.*]] = call { , } @llvm.riscv.vlsseg2.nxv2i32.i64( [[TMP2]], [[TMP3]], ptr [[BASE]], i64 [[BSTRIDE]], i64 [[VL]]) +// CHECK-RV64-NEXT: ret { , } [[TMP4]] +// +vint32m1x2_t test_vlsseg2e32_v_i32m1x2_tu(vint32m1x2_t maskedoff_tuple, const int32_t *base, ptrdiff_t bstride, size_t vl) { + return __riscv_vlsseg2e32_tuple_tu(maskedoff_tuple, base, bstride, vl); +} + +// CHECK-RV64-LABEL: define dso_local { , } @test_vlsseg2e32_v_i32m2x2_tu +// CHECK-RV64-SAME: ( [[MASKEDOFF_TUPLE_COERCE0:%.*]], [[MASKEDOFF_TUPLE_COERCE1:%.*]], ptr noundef [[BASE:%.*]], i64 noundef [[BSTRIDE:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = insertvalue { , } poison, [[MASKEDOFF_TUPLE_COERCE0]], 0 +// CHECK-RV64-NEXT: [[TMP1:%.*]] = insertvalue { , } [[TMP0]], [[MASKEDOFF_TUPLE_COERCE1]], 1 +// CHECK-RV64-NEXT: [[TMP2:%.*]] = extractvalue { , } [[TMP1]], 0 +// CHECK-RV64-NEXT: [[TMP3:%.*]] = extractvalue { , } [[TMP1]], 1 +// CHECK-RV64-NEXT: [[TMP4:%.*]] = call { , } @llvm.riscv.vlsseg2.nxv4i32.i64( [[TMP2]], [[TMP3]], ptr [[BASE]], i64 [[BSTRIDE]], i64 [[VL]]) +// CHECK-RV64-NEXT: ret { , } [[TMP4]] +// +vint32m2x2_t test_vlsseg2e32_v_i32m2x2_tu(vint32m2x2_t maskedoff_tuple, const int32_t *base, ptrdiff_t bstride, size_t vl) { + return __riscv_vlsseg2e32_tuple_tu(maskedoff_tuple, base, bstride, vl); +} + +// CHECK-RV64-LABEL: define dso_local { , } @test_vlsseg2e32_v_i32m4x2_tu +// CHECK-RV64-SAME: ( [[MASKEDOFF_TUPLE_COERCE0:%.*]], [[MASKEDOFF_TUPLE_COERCE1:%.*]], ptr noundef [[BASE:%.*]], i64 noundef [[BSTRIDE:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = insertvalue { , } poison, [[MASKEDOFF_TUPLE_COERCE0]], 0 +// CHECK-RV64-NEXT: [[TMP1:%.*]] = insertvalue { , } [[TMP0]], [[MASKEDOFF_TUPLE_COERCE1]], 1 +// CHECK-RV64-NEXT: [[TMP2:%.*]] = extractvalue { , } [[TMP1]], 0 +// CHECK-RV64-NEXT: [[TMP3:%.*]] = extractvalue { , } [[TMP1]], 1 +// CHECK-RV64-NEXT: [[TMP4:%.*]] = call { , } @llvm.riscv.vlsseg2.nxv8i32.i64( [[TMP2]], [[TMP3]], ptr [[BASE]], i64 [[BSTRIDE]], i64 [[VL]]) +// CHECK-RV64-NEXT: ret { , } [[TMP4]] +// +vint32m4x2_t test_vlsseg2e32_v_i32m4x2_tu(vint32m4x2_t maskedoff_tuple, const int32_t *base, ptrdiff_t bstride, size_t vl) { + return __riscv_vlsseg2e32_tuple_tu(maskedoff_tuple, base, bstride, vl); +} + +// CHECK-RV64-LABEL: define dso_local { , } @test_vlsseg2e32_v_u32mf2x2_tu +// CHECK-RV64-SAME: ( [[MASKEDOFF_TUPLE_COERCE0:%.*]], [[MASKEDOFF_TUPLE_COERCE1:%.*]], ptr noundef [[BASE:%.*]], i64 noundef [[BSTRIDE:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = insertvalue { , } poison, [[MASKEDOFF_TUPLE_COERCE0]], 0 +// CHECK-RV64-NEXT: [[TMP1:%.*]] = insertvalue { , } [[TMP0]], [[MASKEDOFF_TUPLE_COERCE1]], 1 +// CHECK-RV64-NEXT: [[TMP2:%.*]] = extractvalue { , } [[TMP1]], 0 +// CHECK-RV64-NEXT: [[TMP3:%.*]] = extractvalue { , } [[TMP1]], 1 +// CHECK-RV64-NEXT: [[TMP4:%.*]] = call { , } @llvm.riscv.vlsseg2.nxv1i32.i64( [[TMP2]], [[TMP3]], ptr [[BASE]], i64 [[BSTRIDE]], i64 [[VL]]) +// CHECK-RV64-NEXT: ret { , } [[TMP4]] +// +vuint32mf2x2_t test_vlsseg2e32_v_u32mf2x2_tu(vuint32mf2x2_t maskedoff_tuple, const uint32_t *base, ptrdiff_t bstride, size_t vl) { + return __riscv_vlsseg2e32_tuple_tu(maskedoff_tuple, base, bstride, vl); +} + +// CHECK-RV64-LABEL: define dso_local { , } @test_vlsseg2e32_v_u32m1x2_tu +// CHECK-RV64-SAME: ( [[MASKEDOFF_TUPLE_COERCE0:%.*]], [[MASKEDOFF_TUPLE_COERCE1:%.*]], ptr noundef [[BASE:%.*]], i64 noundef [[BSTRIDE:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = insertvalue { , } poison, [[MASKEDOFF_TUPLE_COERCE0]], 0 +// CHECK-RV64-NEXT: [[TMP1:%.*]] = insertvalue { , } [[TMP0]], [[MASKEDOFF_TUPLE_COERCE1]], 1 +// CHECK-RV64-NEXT: [[TMP2:%.*]] = extractvalue { , } [[TMP1]], 0 +// CHECK-RV64-NEXT: [[TMP3:%.*]] = extractvalue { , } [[TMP1]], 1 +// CHECK-RV64-NEXT: [[TMP4:%.*]] = call { , } @llvm.riscv.vlsseg2.nxv2i32.i64( [[TMP2]], [[TMP3]], ptr [[BASE]], i64 [[BSTRIDE]], i64 [[VL]]) +// CHECK-RV64-NEXT: ret { , } [[TMP4]] +// +vuint32m1x2_t test_vlsseg2e32_v_u32m1x2_tu(vuint32m1x2_t maskedoff_tuple, const uint32_t *base, ptrdiff_t bstride, size_t vl) { + return __riscv_vlsseg2e32_tuple_tu(maskedoff_tuple, base, bstride, vl); +} + +// CHECK-RV64-LABEL: define dso_local { , } @test_vlsseg2e32_v_u32m2x2_tu +// CHECK-RV64-SAME: ( [[MASKEDOFF_TUPLE_COERCE0:%.*]], [[MASKEDOFF_TUPLE_COERCE1:%.*]], ptr noundef [[BASE:%.*]], i64 noundef [[BSTRIDE:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = insertvalue { , } poison, [[MASKEDOFF_TUPLE_COERCE0]], 0 +// CHECK-RV64-NEXT: [[TMP1:%.*]] = insertvalue { , } [[TMP0]], [[MASKEDOFF_TUPLE_COERCE1]], 1 +// CHECK-RV64-NEXT: [[TMP2:%.*]] = extractvalue { , } [[TMP1]], 0 +// CHECK-RV64-NEXT: [[TMP3:%.*]] = extractvalue { , } [[TMP1]], 1 +// CHECK-RV64-NEXT: [[TMP4:%.*]] = call { , } @llvm.riscv.vlsseg2.nxv4i32.i64( [[TMP2]], [[TMP3]], ptr [[BASE]], i64 [[BSTRIDE]], i64 [[VL]]) +// CHECK-RV64-NEXT: ret { , } [[TMP4]] +// +vuint32m2x2_t test_vlsseg2e32_v_u32m2x2_tu(vuint32m2x2_t maskedoff_tuple, const uint32_t *base, ptrdiff_t bstride, size_t vl) { + return __riscv_vlsseg2e32_tuple_tu(maskedoff_tuple, base, bstride, vl); +} + +// CHECK-RV64-LABEL: define dso_local { , } @test_vlsseg2e32_v_u32m4x2_tu +// CHECK-RV64-SAME: ( [[MASKEDOFF_TUPLE_COERCE0:%.*]], [[MASKEDOFF_TUPLE_COERCE1:%.*]], ptr noundef [[BASE:%.*]], i64 noundef [[BSTRIDE:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = insertvalue { , } poison, [[MASKEDOFF_TUPLE_COERCE0]], 0 +// CHECK-RV64-NEXT: [[TMP1:%.*]] = insertvalue { , } [[TMP0]], [[MASKEDOFF_TUPLE_COERCE1]], 1 +// CHECK-RV64-NEXT: [[TMP2:%.*]] = extractvalue { , } [[TMP1]], 0 +// CHECK-RV64-NEXT: [[TMP3:%.*]] = extractvalue { , } [[TMP1]], 1 +// CHECK-RV64-NEXT: [[TMP4:%.*]] = call { , } @llvm.riscv.vlsseg2.nxv8i32.i64( [[TMP2]], [[TMP3]], ptr [[BASE]], i64 [[BSTRIDE]], i64 [[VL]]) +// CHECK-RV64-NEXT: ret { , } [[TMP4]] +// +vuint32m4x2_t test_vlsseg2e32_v_u32m4x2_tu(vuint32m4x2_t maskedoff_tuple, const uint32_t *base, ptrdiff_t bstride, size_t vl) { + return __riscv_vlsseg2e32_tuple_tu(maskedoff_tuple, base, bstride, vl); +} + +// CHECK-RV64-LABEL: define dso_local { , } @test_vlsseg2e32_v_f32mf2x2_tum +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF_TUPLE_COERCE0:%.*]], [[MASKEDOFF_TUPLE_COERCE1:%.*]], ptr noundef [[BASE:%.*]], i64 noundef [[BSTRIDE:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = insertvalue { , } poison, [[MASKEDOFF_TUPLE_COERCE0]], 0 +// CHECK-RV64-NEXT: [[TMP1:%.*]] = insertvalue { , } [[TMP0]], [[MASKEDOFF_TUPLE_COERCE1]], 1 +// CHECK-RV64-NEXT: [[TMP2:%.*]] = extractvalue { , } [[TMP1]], 0 +// CHECK-RV64-NEXT: [[TMP3:%.*]] = extractvalue { , } [[TMP1]], 1 +// CHECK-RV64-NEXT: [[TMP4:%.*]] = call { , } @llvm.riscv.vlsseg2.mask.nxv1f32.i64( [[TMP2]], [[TMP3]], ptr [[BASE]], i64 [[BSTRIDE]], [[MASK]], i64 [[VL]], i64 2) +// CHECK-RV64-NEXT: ret { , } [[TMP4]] +// +vfloat32mf2x2_t test_vlsseg2e32_v_f32mf2x2_tum(vbool64_t mask, vfloat32mf2x2_t maskedoff_tuple, const float *base, ptrdiff_t bstride, size_t vl) { + return __riscv_vlsseg2e32_tuple_tum(mask, maskedoff_tuple, base, bstride, vl); +} + +// CHECK-RV64-LABEL: define dso_local { , } @test_vlsseg2e32_v_f32m1x2_tum +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF_TUPLE_COERCE0:%.*]], [[MASKEDOFF_TUPLE_COERCE1:%.*]], ptr noundef [[BASE:%.*]], i64 noundef [[BSTRIDE:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = insertvalue { , } poison, [[MASKEDOFF_TUPLE_COERCE0]], 0 +// CHECK-RV64-NEXT: [[TMP1:%.*]] = insertvalue { , } [[TMP0]], [[MASKEDOFF_TUPLE_COERCE1]], 1 +// CHECK-RV64-NEXT: [[TMP2:%.*]] = extractvalue { , } [[TMP1]], 0 +// CHECK-RV64-NEXT: [[TMP3:%.*]] = extractvalue { , } [[TMP1]], 1 +// CHECK-RV64-NEXT: [[TMP4:%.*]] = call { , } @llvm.riscv.vlsseg2.mask.nxv2f32.i64( [[TMP2]], [[TMP3]], ptr [[BASE]], i64 [[BSTRIDE]], [[MASK]], i64 [[VL]], i64 2) +// CHECK-RV64-NEXT: ret { , } [[TMP4]] +// +vfloat32m1x2_t test_vlsseg2e32_v_f32m1x2_tum(vbool32_t mask, vfloat32m1x2_t maskedoff_tuple, const float *base, ptrdiff_t bstride, size_t vl) { + return __riscv_vlsseg2e32_tuple_tum(mask, maskedoff_tuple, base, bstride, vl); +} + +// CHECK-RV64-LABEL: define dso_local { , } @test_vlsseg2e32_v_f32m2x2_tum +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF_TUPLE_COERCE0:%.*]], [[MASKEDOFF_TUPLE_COERCE1:%.*]], ptr noundef [[BASE:%.*]], i64 noundef [[BSTRIDE:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = insertvalue { , } poison, [[MASKEDOFF_TUPLE_COERCE0]], 0 +// CHECK-RV64-NEXT: [[TMP1:%.*]] = insertvalue { , } [[TMP0]], [[MASKEDOFF_TUPLE_COERCE1]], 1 +// CHECK-RV64-NEXT: [[TMP2:%.*]] = extractvalue { , } [[TMP1]], 0 +// CHECK-RV64-NEXT: [[TMP3:%.*]] = extractvalue { , } [[TMP1]], 1 +// CHECK-RV64-NEXT: [[TMP4:%.*]] = call { , } @llvm.riscv.vlsseg2.mask.nxv4f32.i64( [[TMP2]], [[TMP3]], ptr [[BASE]], i64 [[BSTRIDE]], [[MASK]], i64 [[VL]], i64 2) +// CHECK-RV64-NEXT: ret { , } [[TMP4]] +// +vfloat32m2x2_t test_vlsseg2e32_v_f32m2x2_tum(vbool16_t mask, vfloat32m2x2_t maskedoff_tuple, const float *base, ptrdiff_t bstride, size_t vl) { + return __riscv_vlsseg2e32_tuple_tum(mask, maskedoff_tuple, base, bstride, vl); +} + +// CHECK-RV64-LABEL: define dso_local { , } @test_vlsseg2e32_v_f32m4x2_tum +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF_TUPLE_COERCE0:%.*]], [[MASKEDOFF_TUPLE_COERCE1:%.*]], ptr noundef [[BASE:%.*]], i64 noundef [[BSTRIDE:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = insertvalue { , } poison, [[MASKEDOFF_TUPLE_COERCE0]], 0 +// CHECK-RV64-NEXT: [[TMP1:%.*]] = insertvalue { , } [[TMP0]], [[MASKEDOFF_TUPLE_COERCE1]], 1 +// CHECK-RV64-NEXT: [[TMP2:%.*]] = extractvalue { , } [[TMP1]], 0 +// CHECK-RV64-NEXT: [[TMP3:%.*]] = extractvalue { , } [[TMP1]], 1 +// CHECK-RV64-NEXT: [[TMP4:%.*]] = call { , } @llvm.riscv.vlsseg2.mask.nxv8f32.i64( [[TMP2]], [[TMP3]], ptr [[BASE]], i64 [[BSTRIDE]], [[MASK]], i64 [[VL]], i64 2) +// CHECK-RV64-NEXT: ret { , } [[TMP4]] +// +vfloat32m4x2_t test_vlsseg2e32_v_f32m4x2_tum(vbool8_t mask, vfloat32m4x2_t maskedoff_tuple, const float *base, ptrdiff_t bstride, size_t vl) { + return __riscv_vlsseg2e32_tuple_tum(mask, maskedoff_tuple, base, bstride, vl); +} + +// CHECK-RV64-LABEL: define dso_local { , } @test_vlsseg2e32_v_i32mf2x2_tum +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF_TUPLE_COERCE0:%.*]], [[MASKEDOFF_TUPLE_COERCE1:%.*]], ptr noundef [[BASE:%.*]], i64 noundef [[BSTRIDE:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = insertvalue { , } poison, [[MASKEDOFF_TUPLE_COERCE0]], 0 +// CHECK-RV64-NEXT: [[TMP1:%.*]] = insertvalue { , } [[TMP0]], [[MASKEDOFF_TUPLE_COERCE1]], 1 +// CHECK-RV64-NEXT: [[TMP2:%.*]] = extractvalue { , } [[TMP1]], 0 +// CHECK-RV64-NEXT: [[TMP3:%.*]] = extractvalue { , } [[TMP1]], 1 +// CHECK-RV64-NEXT: [[TMP4:%.*]] = call { , } @llvm.riscv.vlsseg2.mask.nxv1i32.i64( [[TMP2]], [[TMP3]], ptr [[BASE]], i64 [[BSTRIDE]], [[MASK]], i64 [[VL]], i64 2) +// CHECK-RV64-NEXT: ret { , } [[TMP4]] +// +vint32mf2x2_t test_vlsseg2e32_v_i32mf2x2_tum(vbool64_t mask, vint32mf2x2_t maskedoff_tuple, const int32_t *base, ptrdiff_t bstride, size_t vl) { + return __riscv_vlsseg2e32_tuple_tum(mask, maskedoff_tuple, base, bstride, vl); +} + +// CHECK-RV64-LABEL: define dso_local { , } @test_vlsseg2e32_v_i32m1x2_tum +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF_TUPLE_COERCE0:%.*]], [[MASKEDOFF_TUPLE_COERCE1:%.*]], ptr noundef [[BASE:%.*]], i64 noundef [[BSTRIDE:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = insertvalue { , } poison, [[MASKEDOFF_TUPLE_COERCE0]], 0 +// CHECK-RV64-NEXT: [[TMP1:%.*]] = insertvalue { , } [[TMP0]], [[MASKEDOFF_TUPLE_COERCE1]], 1 +// CHECK-RV64-NEXT: [[TMP2:%.*]] = extractvalue { , } [[TMP1]], 0 +// CHECK-RV64-NEXT: [[TMP3:%.*]] = extractvalue { , } [[TMP1]], 1 +// CHECK-RV64-NEXT: [[TMP4:%.*]] = call { , } @llvm.riscv.vlsseg2.mask.nxv2i32.i64( [[TMP2]], [[TMP3]], ptr [[BASE]], i64 [[BSTRIDE]], [[MASK]], i64 [[VL]], i64 2) +// CHECK-RV64-NEXT: ret { , } [[TMP4]] +// +vint32m1x2_t test_vlsseg2e32_v_i32m1x2_tum(vbool32_t mask, vint32m1x2_t maskedoff_tuple, const int32_t *base, ptrdiff_t bstride, size_t vl) { + return __riscv_vlsseg2e32_tuple_tum(mask, maskedoff_tuple, base, bstride, vl); +} + +// CHECK-RV64-LABEL: define dso_local { , } @test_vlsseg2e32_v_i32m2x2_tum +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF_TUPLE_COERCE0:%.*]], [[MASKEDOFF_TUPLE_COERCE1:%.*]], ptr noundef [[BASE:%.*]], i64 noundef [[BSTRIDE:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = insertvalue { , } poison, [[MASKEDOFF_TUPLE_COERCE0]], 0 +// CHECK-RV64-NEXT: [[TMP1:%.*]] = insertvalue { , } [[TMP0]], [[MASKEDOFF_TUPLE_COERCE1]], 1 +// CHECK-RV64-NEXT: [[TMP2:%.*]] = extractvalue { , } [[TMP1]], 0 +// CHECK-RV64-NEXT: [[TMP3:%.*]] = extractvalue { , } [[TMP1]], 1 +// CHECK-RV64-NEXT: [[TMP4:%.*]] = call { , } @llvm.riscv.vlsseg2.mask.nxv4i32.i64( [[TMP2]], [[TMP3]], ptr [[BASE]], i64 [[BSTRIDE]], [[MASK]], i64 [[VL]], i64 2) +// CHECK-RV64-NEXT: ret { , } [[TMP4]] +// +vint32m2x2_t test_vlsseg2e32_v_i32m2x2_tum(vbool16_t mask, vint32m2x2_t maskedoff_tuple, const int32_t *base, ptrdiff_t bstride, size_t vl) { + return __riscv_vlsseg2e32_tuple_tum(mask, maskedoff_tuple, base, bstride, vl); +} + +// CHECK-RV64-LABEL: define dso_local { , } @test_vlsseg2e32_v_i32m4x2_tum +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF_TUPLE_COERCE0:%.*]], [[MASKEDOFF_TUPLE_COERCE1:%.*]], ptr noundef [[BASE:%.*]], i64 noundef [[BSTRIDE:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = insertvalue { , } poison, [[MASKEDOFF_TUPLE_COERCE0]], 0 +// CHECK-RV64-NEXT: [[TMP1:%.*]] = insertvalue { , } [[TMP0]], [[MASKEDOFF_TUPLE_COERCE1]], 1 +// CHECK-RV64-NEXT: [[TMP2:%.*]] = extractvalue { , } [[TMP1]], 0 +// CHECK-RV64-NEXT: [[TMP3:%.*]] = extractvalue { , } [[TMP1]], 1 +// CHECK-RV64-NEXT: [[TMP4:%.*]] = call { , } @llvm.riscv.vlsseg2.mask.nxv8i32.i64( [[TMP2]], [[TMP3]], ptr [[BASE]], i64 [[BSTRIDE]], [[MASK]], i64 [[VL]], i64 2) +// CHECK-RV64-NEXT: ret { , } [[TMP4]] +// +vint32m4x2_t test_vlsseg2e32_v_i32m4x2_tum(vbool8_t mask, vint32m4x2_t maskedoff_tuple, const int32_t *base, ptrdiff_t bstride, size_t vl) { + return __riscv_vlsseg2e32_tuple_tum(mask, maskedoff_tuple, base, bstride, vl); +} + +// CHECK-RV64-LABEL: define dso_local { , } @test_vlsseg2e32_v_u32mf2x2_tum +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF_TUPLE_COERCE0:%.*]], [[MASKEDOFF_TUPLE_COERCE1:%.*]], ptr noundef [[BASE:%.*]], i64 noundef [[BSTRIDE:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = insertvalue { , } poison, [[MASKEDOFF_TUPLE_COERCE0]], 0 +// CHECK-RV64-NEXT: [[TMP1:%.*]] = insertvalue { , } [[TMP0]], [[MASKEDOFF_TUPLE_COERCE1]], 1 +// CHECK-RV64-NEXT: [[TMP2:%.*]] = extractvalue { , } [[TMP1]], 0 +// CHECK-RV64-NEXT: [[TMP3:%.*]] = extractvalue { , } [[TMP1]], 1 +// CHECK-RV64-NEXT: [[TMP4:%.*]] = call { , } @llvm.riscv.vlsseg2.mask.nxv1i32.i64( [[TMP2]], [[TMP3]], ptr [[BASE]], i64 [[BSTRIDE]], [[MASK]], i64 [[VL]], i64 2) +// CHECK-RV64-NEXT: ret { , } [[TMP4]] +// +vuint32mf2x2_t test_vlsseg2e32_v_u32mf2x2_tum(vbool64_t mask, vuint32mf2x2_t maskedoff_tuple, const uint32_t *base, ptrdiff_t bstride, size_t vl) { + return __riscv_vlsseg2e32_tuple_tum(mask, maskedoff_tuple, base, bstride, vl); +} + +// CHECK-RV64-LABEL: define dso_local { , } @test_vlsseg2e32_v_u32m1x2_tum +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF_TUPLE_COERCE0:%.*]], [[MASKEDOFF_TUPLE_COERCE1:%.*]], ptr noundef [[BASE:%.*]], i64 noundef [[BSTRIDE:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = insertvalue { , } poison, [[MASKEDOFF_TUPLE_COERCE0]], 0 +// CHECK-RV64-NEXT: [[TMP1:%.*]] = insertvalue { , } [[TMP0]], [[MASKEDOFF_TUPLE_COERCE1]], 1 +// CHECK-RV64-NEXT: [[TMP2:%.*]] = extractvalue { , } [[TMP1]], 0 +// CHECK-RV64-NEXT: [[TMP3:%.*]] = extractvalue { , } [[TMP1]], 1 +// CHECK-RV64-NEXT: [[TMP4:%.*]] = call { , } @llvm.riscv.vlsseg2.mask.nxv2i32.i64( [[TMP2]], [[TMP3]], ptr [[BASE]], i64 [[BSTRIDE]], [[MASK]], i64 [[VL]], i64 2) +// CHECK-RV64-NEXT: ret { , } [[TMP4]] +// +vuint32m1x2_t test_vlsseg2e32_v_u32m1x2_tum(vbool32_t mask, vuint32m1x2_t maskedoff_tuple, const uint32_t *base, ptrdiff_t bstride, size_t vl) { + return __riscv_vlsseg2e32_tuple_tum(mask, maskedoff_tuple, base, bstride, vl); +} + +// CHECK-RV64-LABEL: define dso_local { , } @test_vlsseg2e32_v_u32m2x2_tum +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF_TUPLE_COERCE0:%.*]], [[MASKEDOFF_TUPLE_COERCE1:%.*]], ptr noundef [[BASE:%.*]], i64 noundef [[BSTRIDE:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = insertvalue { , } poison, [[MASKEDOFF_TUPLE_COERCE0]], 0 +// CHECK-RV64-NEXT: [[TMP1:%.*]] = insertvalue { , } [[TMP0]], [[MASKEDOFF_TUPLE_COERCE1]], 1 +// CHECK-RV64-NEXT: [[TMP2:%.*]] = extractvalue { , } [[TMP1]], 0 +// CHECK-RV64-NEXT: [[TMP3:%.*]] = extractvalue { , } [[TMP1]], 1 +// CHECK-RV64-NEXT: [[TMP4:%.*]] = call { , } @llvm.riscv.vlsseg2.mask.nxv4i32.i64( [[TMP2]], [[TMP3]], ptr [[BASE]], i64 [[BSTRIDE]], [[MASK]], i64 [[VL]], i64 2) +// CHECK-RV64-NEXT: ret { , } [[TMP4]] +// +vuint32m2x2_t test_vlsseg2e32_v_u32m2x2_tum(vbool16_t mask, vuint32m2x2_t maskedoff_tuple, const uint32_t *base, ptrdiff_t bstride, size_t vl) { + return __riscv_vlsseg2e32_tuple_tum(mask, maskedoff_tuple, base, bstride, vl); +} + +// CHECK-RV64-LABEL: define dso_local { , } @test_vlsseg2e32_v_u32m4x2_tum +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF_TUPLE_COERCE0:%.*]], [[MASKEDOFF_TUPLE_COERCE1:%.*]], ptr noundef [[BASE:%.*]], i64 noundef [[BSTRIDE:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = insertvalue { , } poison, [[MASKEDOFF_TUPLE_COERCE0]], 0 +// CHECK-RV64-NEXT: [[TMP1:%.*]] = insertvalue { , } [[TMP0]], [[MASKEDOFF_TUPLE_COERCE1]], 1 +// CHECK-RV64-NEXT: [[TMP2:%.*]] = extractvalue { , } [[TMP1]], 0 +// CHECK-RV64-NEXT: [[TMP3:%.*]] = extractvalue { , } [[TMP1]], 1 +// CHECK-RV64-NEXT: [[TMP4:%.*]] = call { , } @llvm.riscv.vlsseg2.mask.nxv8i32.i64( [[TMP2]], [[TMP3]], ptr [[BASE]], i64 [[BSTRIDE]], [[MASK]], i64 [[VL]], i64 2) +// CHECK-RV64-NEXT: ret { , } [[TMP4]] +// +vuint32m4x2_t test_vlsseg2e32_v_u32m4x2_tum(vbool8_t mask, vuint32m4x2_t maskedoff_tuple, const uint32_t *base, ptrdiff_t bstride, size_t vl) { + return __riscv_vlsseg2e32_tuple_tum(mask, maskedoff_tuple, base, bstride, vl); +} + +// CHECK-RV64-LABEL: define dso_local { , } @test_vlsseg2e32_v_f32mf2x2_tumu +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF_TUPLE_COERCE0:%.*]], [[MASKEDOFF_TUPLE_COERCE1:%.*]], ptr noundef [[BASE:%.*]], i64 noundef [[BSTRIDE:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = insertvalue { , } poison, [[MASKEDOFF_TUPLE_COERCE0]], 0 +// CHECK-RV64-NEXT: [[TMP1:%.*]] = insertvalue { , } [[TMP0]], [[MASKEDOFF_TUPLE_COERCE1]], 1 +// CHECK-RV64-NEXT: [[TMP2:%.*]] = extractvalue { , } [[TMP1]], 0 +// CHECK-RV64-NEXT: [[TMP3:%.*]] = extractvalue { , } [[TMP1]], 1 +// CHECK-RV64-NEXT: [[TMP4:%.*]] = call { , } @llvm.riscv.vlsseg2.mask.nxv1f32.i64( [[TMP2]], [[TMP3]], ptr [[BASE]], i64 [[BSTRIDE]], [[MASK]], i64 [[VL]], i64 0) +// CHECK-RV64-NEXT: ret { , } [[TMP4]] +// +vfloat32mf2x2_t test_vlsseg2e32_v_f32mf2x2_tumu(vbool64_t mask, vfloat32mf2x2_t maskedoff_tuple, const float *base, ptrdiff_t bstride, size_t vl) { + return __riscv_vlsseg2e32_tuple_tumu(mask, maskedoff_tuple, base, bstride, vl); +} + +// CHECK-RV64-LABEL: define dso_local { , } @test_vlsseg2e32_v_f32m1x2_tumu +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF_TUPLE_COERCE0:%.*]], [[MASKEDOFF_TUPLE_COERCE1:%.*]], ptr noundef [[BASE:%.*]], i64 noundef [[BSTRIDE:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = insertvalue { , } poison, [[MASKEDOFF_TUPLE_COERCE0]], 0 +// CHECK-RV64-NEXT: [[TMP1:%.*]] = insertvalue { , } [[TMP0]], [[MASKEDOFF_TUPLE_COERCE1]], 1 +// CHECK-RV64-NEXT: [[TMP2:%.*]] = extractvalue { , } [[TMP1]], 0 +// CHECK-RV64-NEXT: [[TMP3:%.*]] = extractvalue { , } [[TMP1]], 1 +// CHECK-RV64-NEXT: [[TMP4:%.*]] = call { , } @llvm.riscv.vlsseg2.mask.nxv2f32.i64( [[TMP2]], [[TMP3]], ptr [[BASE]], i64 [[BSTRIDE]], [[MASK]], i64 [[VL]], i64 0) +// CHECK-RV64-NEXT: ret { , } [[TMP4]] +// +vfloat32m1x2_t test_vlsseg2e32_v_f32m1x2_tumu(vbool32_t mask, vfloat32m1x2_t maskedoff_tuple, const float *base, ptrdiff_t bstride, size_t vl) { + return __riscv_vlsseg2e32_tuple_tumu(mask, maskedoff_tuple, base, bstride, vl); +} + +// CHECK-RV64-LABEL: define dso_local { , } @test_vlsseg2e32_v_f32m2x2_tumu +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF_TUPLE_COERCE0:%.*]], [[MASKEDOFF_TUPLE_COERCE1:%.*]], ptr noundef [[BASE:%.*]], i64 noundef [[BSTRIDE:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = insertvalue { , } poison, [[MASKEDOFF_TUPLE_COERCE0]], 0 +// CHECK-RV64-NEXT: [[TMP1:%.*]] = insertvalue { , } [[TMP0]], [[MASKEDOFF_TUPLE_COERCE1]], 1 +// CHECK-RV64-NEXT: [[TMP2:%.*]] = extractvalue { , } [[TMP1]], 0 +// CHECK-RV64-NEXT: [[TMP3:%.*]] = extractvalue { , } [[TMP1]], 1 +// CHECK-RV64-NEXT: [[TMP4:%.*]] = call { , } @llvm.riscv.vlsseg2.mask.nxv4f32.i64( [[TMP2]], [[TMP3]], ptr [[BASE]], i64 [[BSTRIDE]], [[MASK]], i64 [[VL]], i64 0) +// CHECK-RV64-NEXT: ret { , } [[TMP4]] +// +vfloat32m2x2_t test_vlsseg2e32_v_f32m2x2_tumu(vbool16_t mask, vfloat32m2x2_t maskedoff_tuple, const float *base, ptrdiff_t bstride, size_t vl) { + return __riscv_vlsseg2e32_tuple_tumu(mask, maskedoff_tuple, base, bstride, vl); +} + +// CHECK-RV64-LABEL: define dso_local { , } @test_vlsseg2e32_v_f32m4x2_tumu +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF_TUPLE_COERCE0:%.*]], [[MASKEDOFF_TUPLE_COERCE1:%.*]], ptr noundef [[BASE:%.*]], i64 noundef [[BSTRIDE:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = insertvalue { , } poison, [[MASKEDOFF_TUPLE_COERCE0]], 0 +// CHECK-RV64-NEXT: [[TMP1:%.*]] = insertvalue { , } [[TMP0]], [[MASKEDOFF_TUPLE_COERCE1]], 1 +// CHECK-RV64-NEXT: [[TMP2:%.*]] = extractvalue { , } [[TMP1]], 0 +// CHECK-RV64-NEXT: [[TMP3:%.*]] = extractvalue { , } [[TMP1]], 1 +// CHECK-RV64-NEXT: [[TMP4:%.*]] = call { , } @llvm.riscv.vlsseg2.mask.nxv8f32.i64( [[TMP2]], [[TMP3]], ptr [[BASE]], i64 [[BSTRIDE]], [[MASK]], i64 [[VL]], i64 0) +// CHECK-RV64-NEXT: ret { , } [[TMP4]] +// +vfloat32m4x2_t test_vlsseg2e32_v_f32m4x2_tumu(vbool8_t mask, vfloat32m4x2_t maskedoff_tuple, const float *base, ptrdiff_t bstride, size_t vl) { + return __riscv_vlsseg2e32_tuple_tumu(mask, maskedoff_tuple, base, bstride, vl); +} + +// CHECK-RV64-LABEL: define dso_local { , } @test_vlsseg2e32_v_i32mf2x2_tumu +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF_TUPLE_COERCE0:%.*]], [[MASKEDOFF_TUPLE_COERCE1:%.*]], ptr noundef [[BASE:%.*]], i64 noundef [[BSTRIDE:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = insertvalue { , } poison, [[MASKEDOFF_TUPLE_COERCE0]], 0 +// CHECK-RV64-NEXT: [[TMP1:%.*]] = insertvalue { , } [[TMP0]], [[MASKEDOFF_TUPLE_COERCE1]], 1 +// CHECK-RV64-NEXT: [[TMP2:%.*]] = extractvalue { , } [[TMP1]], 0 +// CHECK-RV64-NEXT: [[TMP3:%.*]] = extractvalue { , } [[TMP1]], 1 +// CHECK-RV64-NEXT: [[TMP4:%.*]] = call { , } @llvm.riscv.vlsseg2.mask.nxv1i32.i64( [[TMP2]], [[TMP3]], ptr [[BASE]], i64 [[BSTRIDE]], [[MASK]], i64 [[VL]], i64 0) +// CHECK-RV64-NEXT: ret { , } [[TMP4]] +// +vint32mf2x2_t test_vlsseg2e32_v_i32mf2x2_tumu(vbool64_t mask, vint32mf2x2_t maskedoff_tuple, const int32_t *base, ptrdiff_t bstride, size_t vl) { + return __riscv_vlsseg2e32_tuple_tumu(mask, maskedoff_tuple, base, bstride, vl); +} + +// CHECK-RV64-LABEL: define dso_local { , } @test_vlsseg2e32_v_i32m1x2_tumu +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF_TUPLE_COERCE0:%.*]], [[MASKEDOFF_TUPLE_COERCE1:%.*]], ptr noundef [[BASE:%.*]], i64 noundef [[BSTRIDE:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = insertvalue { , } poison, [[MASKEDOFF_TUPLE_COERCE0]], 0 +// CHECK-RV64-NEXT: [[TMP1:%.*]] = insertvalue { , } [[TMP0]], [[MASKEDOFF_TUPLE_COERCE1]], 1 +// CHECK-RV64-NEXT: [[TMP2:%.*]] = extractvalue { , } [[TMP1]], 0 +// CHECK-RV64-NEXT: [[TMP3:%.*]] = extractvalue { , } [[TMP1]], 1 +// CHECK-RV64-NEXT: [[TMP4:%.*]] = call { , } @llvm.riscv.vlsseg2.mask.nxv2i32.i64( [[TMP2]], [[TMP3]], ptr [[BASE]], i64 [[BSTRIDE]], [[MASK]], i64 [[VL]], i64 0) +// CHECK-RV64-NEXT: ret { , } [[TMP4]] +// +vint32m1x2_t test_vlsseg2e32_v_i32m1x2_tumu(vbool32_t mask, vint32m1x2_t maskedoff_tuple, const int32_t *base, ptrdiff_t bstride, size_t vl) { + return __riscv_vlsseg2e32_tuple_tumu(mask, maskedoff_tuple, base, bstride, vl); +} + +// CHECK-RV64-LABEL: define dso_local { , } @test_vlsseg2e32_v_i32m2x2_tumu +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF_TUPLE_COERCE0:%.*]], [[MASKEDOFF_TUPLE_COERCE1:%.*]], ptr noundef [[BASE:%.*]], i64 noundef [[BSTRIDE:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = insertvalue { , } poison, [[MASKEDOFF_TUPLE_COERCE0]], 0 +// CHECK-RV64-NEXT: [[TMP1:%.*]] = insertvalue { , } [[TMP0]], [[MASKEDOFF_TUPLE_COERCE1]], 1 +// CHECK-RV64-NEXT: [[TMP2:%.*]] = extractvalue { , } [[TMP1]], 0 +// CHECK-RV64-NEXT: [[TMP3:%.*]] = extractvalue { , } [[TMP1]], 1 +// CHECK-RV64-NEXT: [[TMP4:%.*]] = call { , } @llvm.riscv.vlsseg2.mask.nxv4i32.i64( [[TMP2]], [[TMP3]], ptr [[BASE]], i64 [[BSTRIDE]], [[MASK]], i64 [[VL]], i64 0) +// CHECK-RV64-NEXT: ret { , } [[TMP4]] +// +vint32m2x2_t test_vlsseg2e32_v_i32m2x2_tumu(vbool16_t mask, vint32m2x2_t maskedoff_tuple, const int32_t *base, ptrdiff_t bstride, size_t vl) { + return __riscv_vlsseg2e32_tuple_tumu(mask, maskedoff_tuple, base, bstride, vl); +} + +// CHECK-RV64-LABEL: define dso_local { , } @test_vlsseg2e32_v_i32m4x2_tumu +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF_TUPLE_COERCE0:%.*]], [[MASKEDOFF_TUPLE_COERCE1:%.*]], ptr noundef [[BASE:%.*]], i64 noundef [[BSTRIDE:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = insertvalue { , } poison, [[MASKEDOFF_TUPLE_COERCE0]], 0 +// CHECK-RV64-NEXT: [[TMP1:%.*]] = insertvalue { , } [[TMP0]], [[MASKEDOFF_TUPLE_COERCE1]], 1 +// CHECK-RV64-NEXT: [[TMP2:%.*]] = extractvalue { , } [[TMP1]], 0 +// CHECK-RV64-NEXT: [[TMP3:%.*]] = extractvalue { , } [[TMP1]], 1 +// CHECK-RV64-NEXT: [[TMP4:%.*]] = call { , } @llvm.riscv.vlsseg2.mask.nxv8i32.i64( [[TMP2]], [[TMP3]], ptr [[BASE]], i64 [[BSTRIDE]], [[MASK]], i64 [[VL]], i64 0) +// CHECK-RV64-NEXT: ret { , } [[TMP4]] +// +vint32m4x2_t test_vlsseg2e32_v_i32m4x2_tumu(vbool8_t mask, vint32m4x2_t maskedoff_tuple, const int32_t *base, ptrdiff_t bstride, size_t vl) { + return __riscv_vlsseg2e32_tuple_tumu(mask, maskedoff_tuple, base, bstride, vl); +} + +// CHECK-RV64-LABEL: define dso_local { , } @test_vlsseg2e32_v_u32mf2x2_tumu +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF_TUPLE_COERCE0:%.*]], [[MASKEDOFF_TUPLE_COERCE1:%.*]], ptr noundef [[BASE:%.*]], i64 noundef [[BSTRIDE:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = insertvalue { , } poison, [[MASKEDOFF_TUPLE_COERCE0]], 0 +// CHECK-RV64-NEXT: [[TMP1:%.*]] = insertvalue { , } [[TMP0]], [[MASKEDOFF_TUPLE_COERCE1]], 1 +// CHECK-RV64-NEXT: [[TMP2:%.*]] = extractvalue { , } [[TMP1]], 0 +// CHECK-RV64-NEXT: [[TMP3:%.*]] = extractvalue { , } [[TMP1]], 1 +// CHECK-RV64-NEXT: [[TMP4:%.*]] = call { , } @llvm.riscv.vlsseg2.mask.nxv1i32.i64( [[TMP2]], [[TMP3]], ptr [[BASE]], i64 [[BSTRIDE]], [[MASK]], i64 [[VL]], i64 0) +// CHECK-RV64-NEXT: ret { , } [[TMP4]] +// +vuint32mf2x2_t test_vlsseg2e32_v_u32mf2x2_tumu(vbool64_t mask, vuint32mf2x2_t maskedoff_tuple, const uint32_t *base, ptrdiff_t bstride, size_t vl) { + return __riscv_vlsseg2e32_tuple_tumu(mask, maskedoff_tuple, base, bstride, vl); +} + +// CHECK-RV64-LABEL: define dso_local { , } @test_vlsseg2e32_v_u32m1x2_tumu +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF_TUPLE_COERCE0:%.*]], [[MASKEDOFF_TUPLE_COERCE1:%.*]], ptr noundef [[BASE:%.*]], i64 noundef [[BSTRIDE:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = insertvalue { , } poison, [[MASKEDOFF_TUPLE_COERCE0]], 0 +// CHECK-RV64-NEXT: [[TMP1:%.*]] = insertvalue { , } [[TMP0]], [[MASKEDOFF_TUPLE_COERCE1]], 1 +// CHECK-RV64-NEXT: [[TMP2:%.*]] = extractvalue { , } [[TMP1]], 0 +// CHECK-RV64-NEXT: [[TMP3:%.*]] = extractvalue { , } [[TMP1]], 1 +// CHECK-RV64-NEXT: [[TMP4:%.*]] = call { , } @llvm.riscv.vlsseg2.mask.nxv2i32.i64( [[TMP2]], [[TMP3]], ptr [[BASE]], i64 [[BSTRIDE]], [[MASK]], i64 [[VL]], i64 0) +// CHECK-RV64-NEXT: ret { , } [[TMP4]] +// +vuint32m1x2_t test_vlsseg2e32_v_u32m1x2_tumu(vbool32_t mask, vuint32m1x2_t maskedoff_tuple, const uint32_t *base, ptrdiff_t bstride, size_t vl) { + return __riscv_vlsseg2e32_tuple_tumu(mask, maskedoff_tuple, base, bstride, vl); +} + +// CHECK-RV64-LABEL: define dso_local { , } @test_vlsseg2e32_v_u32m2x2_tumu +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF_TUPLE_COERCE0:%.*]], [[MASKEDOFF_TUPLE_COERCE1:%.*]], ptr noundef [[BASE:%.*]], i64 noundef [[BSTRIDE:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = insertvalue { , } poison, [[MASKEDOFF_TUPLE_COERCE0]], 0 +// CHECK-RV64-NEXT: [[TMP1:%.*]] = insertvalue { , } [[TMP0]], [[MASKEDOFF_TUPLE_COERCE1]], 1 +// CHECK-RV64-NEXT: [[TMP2:%.*]] = extractvalue { , } [[TMP1]], 0 +// CHECK-RV64-NEXT: [[TMP3:%.*]] = extractvalue { , } [[TMP1]], 1 +// CHECK-RV64-NEXT: [[TMP4:%.*]] = call { , } @llvm.riscv.vlsseg2.mask.nxv4i32.i64( [[TMP2]], [[TMP3]], ptr [[BASE]], i64 [[BSTRIDE]], [[MASK]], i64 [[VL]], i64 0) +// CHECK-RV64-NEXT: ret { , } [[TMP4]] +// +vuint32m2x2_t test_vlsseg2e32_v_u32m2x2_tumu(vbool16_t mask, vuint32m2x2_t maskedoff_tuple, const uint32_t *base, ptrdiff_t bstride, size_t vl) { + return __riscv_vlsseg2e32_tuple_tumu(mask, maskedoff_tuple, base, bstride, vl); +} + +// CHECK-RV64-LABEL: define dso_local { , } @test_vlsseg2e32_v_u32m4x2_tumu +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF_TUPLE_COERCE0:%.*]], [[MASKEDOFF_TUPLE_COERCE1:%.*]], ptr noundef [[BASE:%.*]], i64 noundef [[BSTRIDE:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = insertvalue { , } poison, [[MASKEDOFF_TUPLE_COERCE0]], 0 +// CHECK-RV64-NEXT: [[TMP1:%.*]] = insertvalue { , } [[TMP0]], [[MASKEDOFF_TUPLE_COERCE1]], 1 +// CHECK-RV64-NEXT: [[TMP2:%.*]] = extractvalue { , } [[TMP1]], 0 +// CHECK-RV64-NEXT: [[TMP3:%.*]] = extractvalue { , } [[TMP1]], 1 +// CHECK-RV64-NEXT: [[TMP4:%.*]] = call { , } @llvm.riscv.vlsseg2.mask.nxv8i32.i64( [[TMP2]], [[TMP3]], ptr [[BASE]], i64 [[BSTRIDE]], [[MASK]], i64 [[VL]], i64 0) +// CHECK-RV64-NEXT: ret { , } [[TMP4]] +// +vuint32m4x2_t test_vlsseg2e32_v_u32m4x2_tumu(vbool8_t mask, vuint32m4x2_t maskedoff_tuple, const uint32_t *base, ptrdiff_t bstride, size_t vl) { + return __riscv_vlsseg2e32_tuple_tumu(mask, maskedoff_tuple, base, bstride, vl); +} + +// CHECK-RV64-LABEL: define dso_local { , } @test_vlsseg2e32_v_f32mf2x2_mu +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF_TUPLE_COERCE0:%.*]], [[MASKEDOFF_TUPLE_COERCE1:%.*]], ptr noundef [[BASE:%.*]], i64 noundef [[BSTRIDE:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = insertvalue { , } poison, [[MASKEDOFF_TUPLE_COERCE0]], 0 +// CHECK-RV64-NEXT: [[TMP1:%.*]] = insertvalue { , } [[TMP0]], [[MASKEDOFF_TUPLE_COERCE1]], 1 +// CHECK-RV64-NEXT: [[TMP2:%.*]] = extractvalue { , } [[TMP1]], 0 +// CHECK-RV64-NEXT: [[TMP3:%.*]] = extractvalue { , } [[TMP1]], 1 +// CHECK-RV64-NEXT: [[TMP4:%.*]] = call { , } @llvm.riscv.vlsseg2.mask.nxv1f32.i64( [[TMP2]], [[TMP3]], ptr [[BASE]], i64 [[BSTRIDE]], [[MASK]], i64 [[VL]], i64 1) +// CHECK-RV64-NEXT: ret { , } [[TMP4]] +// +vfloat32mf2x2_t test_vlsseg2e32_v_f32mf2x2_mu(vbool64_t mask, vfloat32mf2x2_t maskedoff_tuple, const float *base, ptrdiff_t bstride, size_t vl) { + return __riscv_vlsseg2e32_tuple_mu(mask, maskedoff_tuple, base, bstride, vl); +} + +// CHECK-RV64-LABEL: define dso_local { , } @test_vlsseg2e32_v_f32m1x2_mu +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF_TUPLE_COERCE0:%.*]], [[MASKEDOFF_TUPLE_COERCE1:%.*]], ptr noundef [[BASE:%.*]], i64 noundef [[BSTRIDE:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = insertvalue { , } poison, [[MASKEDOFF_TUPLE_COERCE0]], 0 +// CHECK-RV64-NEXT: [[TMP1:%.*]] = insertvalue { , } [[TMP0]], [[MASKEDOFF_TUPLE_COERCE1]], 1 +// CHECK-RV64-NEXT: [[TMP2:%.*]] = extractvalue { , } [[TMP1]], 0 +// CHECK-RV64-NEXT: [[TMP3:%.*]] = extractvalue { , } [[TMP1]], 1 +// CHECK-RV64-NEXT: [[TMP4:%.*]] = call { , } @llvm.riscv.vlsseg2.mask.nxv2f32.i64( [[TMP2]], [[TMP3]], ptr [[BASE]], i64 [[BSTRIDE]], [[MASK]], i64 [[VL]], i64 1) +// CHECK-RV64-NEXT: ret { , } [[TMP4]] +// +vfloat32m1x2_t test_vlsseg2e32_v_f32m1x2_mu(vbool32_t mask, vfloat32m1x2_t maskedoff_tuple, const float *base, ptrdiff_t bstride, size_t vl) { + return __riscv_vlsseg2e32_tuple_mu(mask, maskedoff_tuple, base, bstride, vl); +} + +// CHECK-RV64-LABEL: define dso_local { , } @test_vlsseg2e32_v_f32m2x2_mu +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF_TUPLE_COERCE0:%.*]], [[MASKEDOFF_TUPLE_COERCE1:%.*]], ptr noundef [[BASE:%.*]], i64 noundef [[BSTRIDE:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = insertvalue { , } poison, [[MASKEDOFF_TUPLE_COERCE0]], 0 +// CHECK-RV64-NEXT: [[TMP1:%.*]] = insertvalue { , } [[TMP0]], [[MASKEDOFF_TUPLE_COERCE1]], 1 +// CHECK-RV64-NEXT: [[TMP2:%.*]] = extractvalue { , } [[TMP1]], 0 +// CHECK-RV64-NEXT: [[TMP3:%.*]] = extractvalue { , } [[TMP1]], 1 +// CHECK-RV64-NEXT: [[TMP4:%.*]] = call { , } @llvm.riscv.vlsseg2.mask.nxv4f32.i64( [[TMP2]], [[TMP3]], ptr [[BASE]], i64 [[BSTRIDE]], [[MASK]], i64 [[VL]], i64 1) +// CHECK-RV64-NEXT: ret { , } [[TMP4]] +// +vfloat32m2x2_t test_vlsseg2e32_v_f32m2x2_mu(vbool16_t mask, vfloat32m2x2_t maskedoff_tuple, const float *base, ptrdiff_t bstride, size_t vl) { + return __riscv_vlsseg2e32_tuple_mu(mask, maskedoff_tuple, base, bstride, vl); +} + +// CHECK-RV64-LABEL: define dso_local { , } @test_vlsseg2e32_v_f32m4x2_mu +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF_TUPLE_COERCE0:%.*]], [[MASKEDOFF_TUPLE_COERCE1:%.*]], ptr noundef [[BASE:%.*]], i64 noundef [[BSTRIDE:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = insertvalue { , } poison, [[MASKEDOFF_TUPLE_COERCE0]], 0 +// CHECK-RV64-NEXT: [[TMP1:%.*]] = insertvalue { , } [[TMP0]], [[MASKEDOFF_TUPLE_COERCE1]], 1 +// CHECK-RV64-NEXT: [[TMP2:%.*]] = extractvalue { , } [[TMP1]], 0 +// CHECK-RV64-NEXT: [[TMP3:%.*]] = extractvalue { , } [[TMP1]], 1 +// CHECK-RV64-NEXT: [[TMP4:%.*]] = call { , } @llvm.riscv.vlsseg2.mask.nxv8f32.i64( [[TMP2]], [[TMP3]], ptr [[BASE]], i64 [[BSTRIDE]], [[MASK]], i64 [[VL]], i64 1) +// CHECK-RV64-NEXT: ret { , } [[TMP4]] +// +vfloat32m4x2_t test_vlsseg2e32_v_f32m4x2_mu(vbool8_t mask, vfloat32m4x2_t maskedoff_tuple, const float *base, ptrdiff_t bstride, size_t vl) { + return __riscv_vlsseg2e32_tuple_mu(mask, maskedoff_tuple, base, bstride, vl); +} + +// CHECK-RV64-LABEL: define dso_local { , } @test_vlsseg2e32_v_i32mf2x2_mu +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF_TUPLE_COERCE0:%.*]], [[MASKEDOFF_TUPLE_COERCE1:%.*]], ptr noundef [[BASE:%.*]], i64 noundef [[BSTRIDE:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = insertvalue { , } poison, [[MASKEDOFF_TUPLE_COERCE0]], 0 +// CHECK-RV64-NEXT: [[TMP1:%.*]] = insertvalue { , } [[TMP0]], [[MASKEDOFF_TUPLE_COERCE1]], 1 +// CHECK-RV64-NEXT: [[TMP2:%.*]] = extractvalue { , } [[TMP1]], 0 +// CHECK-RV64-NEXT: [[TMP3:%.*]] = extractvalue { , } [[TMP1]], 1 +// CHECK-RV64-NEXT: [[TMP4:%.*]] = call { , } @llvm.riscv.vlsseg2.mask.nxv1i32.i64( [[TMP2]], [[TMP3]], ptr [[BASE]], i64 [[BSTRIDE]], [[MASK]], i64 [[VL]], i64 1) +// CHECK-RV64-NEXT: ret { , } [[TMP4]] +// +vint32mf2x2_t test_vlsseg2e32_v_i32mf2x2_mu(vbool64_t mask, vint32mf2x2_t maskedoff_tuple, const int32_t *base, ptrdiff_t bstride, size_t vl) { + return __riscv_vlsseg2e32_tuple_mu(mask, maskedoff_tuple, base, bstride, vl); +} + +// CHECK-RV64-LABEL: define dso_local { , } @test_vlsseg2e32_v_i32m1x2_mu +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF_TUPLE_COERCE0:%.*]], [[MASKEDOFF_TUPLE_COERCE1:%.*]], ptr noundef [[BASE:%.*]], i64 noundef [[BSTRIDE:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = insertvalue { , } poison, [[MASKEDOFF_TUPLE_COERCE0]], 0 +// CHECK-RV64-NEXT: [[TMP1:%.*]] = insertvalue { , } [[TMP0]], [[MASKEDOFF_TUPLE_COERCE1]], 1 +// CHECK-RV64-NEXT: [[TMP2:%.*]] = extractvalue { , } [[TMP1]], 0 +// CHECK-RV64-NEXT: [[TMP3:%.*]] = extractvalue { , } [[TMP1]], 1 +// CHECK-RV64-NEXT: [[TMP4:%.*]] = call { , } @llvm.riscv.vlsseg2.mask.nxv2i32.i64( [[TMP2]], [[TMP3]], ptr [[BASE]], i64 [[BSTRIDE]], [[MASK]], i64 [[VL]], i64 1) +// CHECK-RV64-NEXT: ret { , } [[TMP4]] +// +vint32m1x2_t test_vlsseg2e32_v_i32m1x2_mu(vbool32_t mask, vint32m1x2_t maskedoff_tuple, const int32_t *base, ptrdiff_t bstride, size_t vl) { + return __riscv_vlsseg2e32_tuple_mu(mask, maskedoff_tuple, base, bstride, vl); +} + +// CHECK-RV64-LABEL: define dso_local { , } @test_vlsseg2e32_v_i32m2x2_mu +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF_TUPLE_COERCE0:%.*]], [[MASKEDOFF_TUPLE_COERCE1:%.*]], ptr noundef [[BASE:%.*]], i64 noundef [[BSTRIDE:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = insertvalue { , } poison, [[MASKEDOFF_TUPLE_COERCE0]], 0 +// CHECK-RV64-NEXT: [[TMP1:%.*]] = insertvalue { , } [[TMP0]], [[MASKEDOFF_TUPLE_COERCE1]], 1 +// CHECK-RV64-NEXT: [[TMP2:%.*]] = extractvalue { , } [[TMP1]], 0 +// CHECK-RV64-NEXT: [[TMP3:%.*]] = extractvalue { , } [[TMP1]], 1 +// CHECK-RV64-NEXT: [[TMP4:%.*]] = call { , } @llvm.riscv.vlsseg2.mask.nxv4i32.i64( [[TMP2]], [[TMP3]], ptr [[BASE]], i64 [[BSTRIDE]], [[MASK]], i64 [[VL]], i64 1) +// CHECK-RV64-NEXT: ret { , } [[TMP4]] +// +vint32m2x2_t test_vlsseg2e32_v_i32m2x2_mu(vbool16_t mask, vint32m2x2_t maskedoff_tuple, const int32_t *base, ptrdiff_t bstride, size_t vl) { + return __riscv_vlsseg2e32_tuple_mu(mask, maskedoff_tuple, base, bstride, vl); +} + +// CHECK-RV64-LABEL: define dso_local { , } @test_vlsseg2e32_v_i32m4x2_mu +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF_TUPLE_COERCE0:%.*]], [[MASKEDOFF_TUPLE_COERCE1:%.*]], ptr noundef [[BASE:%.*]], i64 noundef [[BSTRIDE:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = insertvalue { , } poison, [[MASKEDOFF_TUPLE_COERCE0]], 0 +// CHECK-RV64-NEXT: [[TMP1:%.*]] = insertvalue { , } [[TMP0]], [[MASKEDOFF_TUPLE_COERCE1]], 1 +// CHECK-RV64-NEXT: [[TMP2:%.*]] = extractvalue { , } [[TMP1]], 0 +// CHECK-RV64-NEXT: [[TMP3:%.*]] = extractvalue { , } [[TMP1]], 1 +// CHECK-RV64-NEXT: [[TMP4:%.*]] = call { , } @llvm.riscv.vlsseg2.mask.nxv8i32.i64( [[TMP2]], [[TMP3]], ptr [[BASE]], i64 [[BSTRIDE]], [[MASK]], i64 [[VL]], i64 1) +// CHECK-RV64-NEXT: ret { , } [[TMP4]] +// +vint32m4x2_t test_vlsseg2e32_v_i32m4x2_mu(vbool8_t mask, vint32m4x2_t maskedoff_tuple, const int32_t *base, ptrdiff_t bstride, size_t vl) { + return __riscv_vlsseg2e32_tuple_mu(mask, maskedoff_tuple, base, bstride, vl); +} + +// CHECK-RV64-LABEL: define dso_local { , } @test_vlsseg2e32_v_u32mf2x2_mu +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF_TUPLE_COERCE0:%.*]], [[MASKEDOFF_TUPLE_COERCE1:%.*]], ptr noundef [[BASE:%.*]], i64 noundef [[BSTRIDE:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = insertvalue { , } poison, [[MASKEDOFF_TUPLE_COERCE0]], 0 +// CHECK-RV64-NEXT: [[TMP1:%.*]] = insertvalue { , } [[TMP0]], [[MASKEDOFF_TUPLE_COERCE1]], 1 +// CHECK-RV64-NEXT: [[TMP2:%.*]] = extractvalue { , } [[TMP1]], 0 +// CHECK-RV64-NEXT: [[TMP3:%.*]] = extractvalue { , } [[TMP1]], 1 +// CHECK-RV64-NEXT: [[TMP4:%.*]] = call { , } @llvm.riscv.vlsseg2.mask.nxv1i32.i64( [[TMP2]], [[TMP3]], ptr [[BASE]], i64 [[BSTRIDE]], [[MASK]], i64 [[VL]], i64 1) +// CHECK-RV64-NEXT: ret { , } [[TMP4]] +// +vuint32mf2x2_t test_vlsseg2e32_v_u32mf2x2_mu(vbool64_t mask, vuint32mf2x2_t maskedoff_tuple, const uint32_t *base, ptrdiff_t bstride, size_t vl) { + return __riscv_vlsseg2e32_tuple_mu(mask, maskedoff_tuple, base, bstride, vl); +} + +// CHECK-RV64-LABEL: define dso_local { , } @test_vlsseg2e32_v_u32m1x2_mu +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF_TUPLE_COERCE0:%.*]], [[MASKEDOFF_TUPLE_COERCE1:%.*]], ptr noundef [[BASE:%.*]], i64 noundef [[BSTRIDE:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = insertvalue { , } poison, [[MASKEDOFF_TUPLE_COERCE0]], 0 +// CHECK-RV64-NEXT: [[TMP1:%.*]] = insertvalue { , } [[TMP0]], [[MASKEDOFF_TUPLE_COERCE1]], 1 +// CHECK-RV64-NEXT: [[TMP2:%.*]] = extractvalue { , } [[TMP1]], 0 +// CHECK-RV64-NEXT: [[TMP3:%.*]] = extractvalue { , } [[TMP1]], 1 +// CHECK-RV64-NEXT: [[TMP4:%.*]] = call { , } @llvm.riscv.vlsseg2.mask.nxv2i32.i64( [[TMP2]], [[TMP3]], ptr [[BASE]], i64 [[BSTRIDE]], [[MASK]], i64 [[VL]], i64 1) +// CHECK-RV64-NEXT: ret { , } [[TMP4]] +// +vuint32m1x2_t test_vlsseg2e32_v_u32m1x2_mu(vbool32_t mask, vuint32m1x2_t maskedoff_tuple, const uint32_t *base, ptrdiff_t bstride, size_t vl) { + return __riscv_vlsseg2e32_tuple_mu(mask, maskedoff_tuple, base, bstride, vl); +} + +// CHECK-RV64-LABEL: define dso_local { , } @test_vlsseg2e32_v_u32m2x2_mu +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF_TUPLE_COERCE0:%.*]], [[MASKEDOFF_TUPLE_COERCE1:%.*]], ptr noundef [[BASE:%.*]], i64 noundef [[BSTRIDE:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = insertvalue { , } poison, [[MASKEDOFF_TUPLE_COERCE0]], 0 +// CHECK-RV64-NEXT: [[TMP1:%.*]] = insertvalue { , } [[TMP0]], [[MASKEDOFF_TUPLE_COERCE1]], 1 +// CHECK-RV64-NEXT: [[TMP2:%.*]] = extractvalue { , } [[TMP1]], 0 +// CHECK-RV64-NEXT: [[TMP3:%.*]] = extractvalue { , } [[TMP1]], 1 +// CHECK-RV64-NEXT: [[TMP4:%.*]] = call { , } @llvm.riscv.vlsseg2.mask.nxv4i32.i64( [[TMP2]], [[TMP3]], ptr [[BASE]], i64 [[BSTRIDE]], [[MASK]], i64 [[VL]], i64 1) +// CHECK-RV64-NEXT: ret { , } [[TMP4]] +// +vuint32m2x2_t test_vlsseg2e32_v_u32m2x2_mu(vbool16_t mask, vuint32m2x2_t maskedoff_tuple, const uint32_t *base, ptrdiff_t bstride, size_t vl) { + return __riscv_vlsseg2e32_tuple_mu(mask, maskedoff_tuple, base, bstride, vl); +} + +// CHECK-RV64-LABEL: define dso_local { , } @test_vlsseg2e32_v_u32m4x2_mu +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF_TUPLE_COERCE0:%.*]], [[MASKEDOFF_TUPLE_COERCE1:%.*]], ptr noundef [[BASE:%.*]], i64 noundef [[BSTRIDE:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = insertvalue { , } poison, [[MASKEDOFF_TUPLE_COERCE0]], 0 +// CHECK-RV64-NEXT: [[TMP1:%.*]] = insertvalue { , } [[TMP0]], [[MASKEDOFF_TUPLE_COERCE1]], 1 +// CHECK-RV64-NEXT: [[TMP2:%.*]] = extractvalue { , } [[TMP1]], 0 +// CHECK-RV64-NEXT: [[TMP3:%.*]] = extractvalue { , } [[TMP1]], 1 +// CHECK-RV64-NEXT: [[TMP4:%.*]] = call { , } @llvm.riscv.vlsseg2.mask.nxv8i32.i64( [[TMP2]], [[TMP3]], ptr [[BASE]], i64 [[BSTRIDE]], [[MASK]], i64 [[VL]], i64 1) +// CHECK-RV64-NEXT: ret { , } [[TMP4]] +// +vuint32m4x2_t test_vlsseg2e32_v_u32m4x2_mu(vbool8_t mask, vuint32m4x2_t maskedoff_tuple, const uint32_t *base, ptrdiff_t bstride, size_t vl) { + return __riscv_vlsseg2e32_tuple_mu(mask, maskedoff_tuple, base, bstride, vl); +}