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 @@ -1505,9 +1505,15 @@ } multiclass RVVUnitStridedSegLoadTuple { - 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, @@ -1515,17 +1521,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 if (IsMasked) Operands.push_back(Ops[0]); @@ -1542,8 +1554,11 @@ return Builder.CreateStore(LoadValue, ReturnValue.getValue()); } }] in { - defvar T = "(Tuple:" # nf # ")"; - def : RVVBuiltin<"v", T # "vPCe", type>; + defvar T = "(Tuple:" # nf # ")"; + def : RVVBuiltin; + if !not(IsFloat.val) then { + def : RVVBuiltin; + } } } } @@ -1844,11 +1859,15 @@ } } +let UnMaskedPolicyScheme = HasPassthruOperand, + IsTuple = true in { + defm : RVVUnitStridedSegLoadTuple<"vlseg">; +} + // TODO: Extend for policy let UnMaskedPolicyScheme = NonePolicy, MaskedPolicyScheme = NonePolicy, IsTuple = true in { -defm : RVVUnitStridedSegLoadTuple<"vlseg">; defm : RVVUnitStridedSegLoadFFTuple<"vlseg">; defm : RVVStridedSegLoadTuple<"vlsseg">; defm : RVVIndexedSegLoadTuple<"vluxseg">; diff --git a/clang/lib/Support/RISCVVIntrinsicUtils.cpp b/clang/lib/Support/RISCVVIntrinsicUtils.cpp --- a/clang/lib/Support/RISCVVIntrinsicUtils.cpp +++ b/clang/lib/Support/RISCVVIntrinsicUtils.cpp @@ -889,6 +889,26 @@ ((uint64_t)(Proto.VTM & 0xff) << 32); } +static VectorTypeModifier getTupleVTM(unsigned NF) { + switch (NF) { + case 2: + return VectorTypeModifier::Tuple2; + case 3: + return VectorTypeModifier::Tuple3; + case 4: + return VectorTypeModifier::Tuple4; + case 5: + return VectorTypeModifier::Tuple5; + case 6: + return VectorTypeModifier::Tuple6; + case 7: + return VectorTypeModifier::Tuple7; + case 8: + return VectorTypeModifier::Tuple8; + } + llvm_unreachable("2 <= NF <= 8"); +} + std::optional RVVTypeCache::computeType(BasicType BT, int Log2LMUL, PrototypeDescriptor Proto) { uint64_t Idx = computeRVVTypeHashValue(BT, Log2LMUL, Proto); @@ -996,13 +1016,22 @@ if (NF == 1) { NewPrototype.insert(NewPrototype.begin() + 1, NewPrototype[0]); } else if (NF > 1) { - // Convert - // (void, op0 address, op1 address, ...) - // to - // (void, op0 address, op1 address, ..., maskedoff0, maskedoff1, ...) - PrototypeDescriptor MaskoffType = NewPrototype[1]; - MaskoffType.TM &= ~static_cast(TypeModifier::Pointer); - NewPrototype.insert(NewPrototype.begin() + NF + 1, NF, MaskoffType); + if (IsTuple) { + PrototypeDescriptor BasePtrOperand = Prototype[1]; + PrototypeDescriptor MaskoffType = PrototypeDescriptor( + static_cast(BaseTypeModifier::Vector), + static_cast(getTupleVTM(NF)), + BasePtrOperand.TM & ~static_cast(TypeModifier::Pointer)); + NewPrototype.insert(NewPrototype.begin() + 1, MaskoffType); + } else { + // Convert + // (void, op0 address, op1 address, ...) + // to + // (void, op0 address, op1 address, ..., maskedoff0, maskedoff1, ...) + PrototypeDescriptor MaskoffType = NewPrototype[1]; + MaskoffType.TM &= ~static_cast(TypeModifier::Pointer); + NewPrototype.insert(NewPrototype.begin() + NF + 1, NF, MaskoffType); + } } } if (HasMaskedOffOperand && NF > 1) { @@ -1026,14 +1055,23 @@ if (PolicyAttrs.isTUPolicy() && HasPassthruOp) NewPrototype.insert(NewPrototype.begin(), NewPrototype[0]); } else if (PolicyAttrs.isTUPolicy() && HasPassthruOp) { - // NF > 1 cases for segment load operations. - // Convert - // (void, op0 address, op1 address, ...) - // to - // (void, op0 address, op1 address, maskedoff0, maskedoff1, ...) - PrototypeDescriptor MaskoffType = Prototype[1]; - MaskoffType.TM &= ~static_cast(TypeModifier::Pointer); - NewPrototype.insert(NewPrototype.begin() + NF + 1, NF, MaskoffType); + if (IsTuple) { + PrototypeDescriptor BasePtrOperand = Prototype[0]; + PrototypeDescriptor MaskoffType = PrototypeDescriptor( + static_cast(BaseTypeModifier::Vector), + static_cast(getTupleVTM(NF)), + BasePtrOperand.TM & ~static_cast(TypeModifier::Pointer)); + NewPrototype.insert(NewPrototype.begin(), MaskoffType); + } else { + // NF > 1 cases for segment load operations. + // Convert + // (void, op0 address, op1 address, ...) + // to + // (void, op0 address, op1 address, maskedoff0, maskedoff1, ...) + PrototypeDescriptor MaskoffType = Prototype[1]; + MaskoffType.TM &= ~static_cast(TypeModifier::Pointer); + NewPrototype.insert(NewPrototype.begin() + NF + 1, NF, MaskoffType); + } } } diff --git a/clang/test/CodeGen/RISCV/rvv-intrinsics-autogenerated/non-policy/non-overloaded/vlseg2e32_tuple.c b/clang/test/CodeGen/RISCV/rvv-intrinsics-autogenerated/non-policy/non-overloaded/vlseg2e32_tuple.c --- a/clang/test/CodeGen/RISCV/rvv-intrinsics-autogenerated/non-policy/non-overloaded/vlseg2e32_tuple.c +++ b/clang/test/CodeGen/RISCV/rvv-intrinsics-autogenerated/non-policy/non-overloaded/vlseg2e32_tuple.c @@ -4,24 +4,246 @@ // 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_vlseg2e32_v_tuple_i32m1 +// CHECK-RV64-LABEL: define dso_local { , } @test_vlseg2e32_v_f32mf2x2 // CHECK-RV64-SAME: (ptr noundef [[BASE:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0:[0-9]+]] { // CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call { , } @llvm.riscv.vlseg2.nxv1f32.i64( poison, poison, ptr [[BASE]], i64 [[VL]]) +// CHECK-RV64-NEXT: ret { , } [[TMP0]] +// +vfloat32mf2x2_t test_vlseg2e32_v_f32mf2x2(const float *base, size_t vl) { + return __riscv_vlseg2e32_v_tuple_f32mf2x2(base, vl); +} + +// CHECK-RV64-LABEL: define dso_local { , } @test_vlseg2e32_v_f32m1x2 +// CHECK-RV64-SAME: (ptr noundef [[BASE:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call { , } @llvm.riscv.vlseg2.nxv2f32.i64( poison, poison, ptr [[BASE]], i64 [[VL]]) +// CHECK-RV64-NEXT: ret { , } [[TMP0]] +// +vfloat32m1x2_t test_vlseg2e32_v_f32m1x2(const float *base, size_t vl) { + return __riscv_vlseg2e32_v_tuple_f32m1x2(base, vl); +} + +// CHECK-RV64-LABEL: define dso_local { , } @test_vlseg2e32_v_f32m2x2 +// CHECK-RV64-SAME: (ptr noundef [[BASE:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call { , } @llvm.riscv.vlseg2.nxv4f32.i64( poison, poison, ptr [[BASE]], i64 [[VL]]) +// CHECK-RV64-NEXT: ret { , } [[TMP0]] +// +vfloat32m2x2_t test_vlseg2e32_v_f32m2x2(const float *base, size_t vl) { + return __riscv_vlseg2e32_v_tuple_f32m2x2(base, vl); +} + +// CHECK-RV64-LABEL: define dso_local { , } @test_vlseg2e32_v_f32m4x2 +// CHECK-RV64-SAME: (ptr noundef [[BASE:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call { , } @llvm.riscv.vlseg2.nxv8f32.i64( poison, poison, ptr [[BASE]], i64 [[VL]]) +// CHECK-RV64-NEXT: ret { , } [[TMP0]] +// +vfloat32m4x2_t test_vlseg2e32_v_f32m4x2(const float *base, size_t vl) { + return __riscv_vlseg2e32_v_tuple_f32m4x2(base, vl); +} + +// CHECK-RV64-LABEL: define dso_local { , } @test_vlseg2e32_v_i32mf2x2 +// CHECK-RV64-SAME: (ptr noundef [[BASE:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call { , } @llvm.riscv.vlseg2.nxv1i32.i64( poison, poison, ptr [[BASE]], i64 [[VL]]) +// CHECK-RV64-NEXT: ret { , } [[TMP0]] +// +vint32mf2x2_t test_vlseg2e32_v_i32mf2x2(const int32_t *base, size_t vl) { + return __riscv_vlseg2e32_v_tuple_i32mf2x2(base, vl); +} + +// CHECK-RV64-LABEL: define dso_local { , } @test_vlseg2e32_v_i32m1x2 +// CHECK-RV64-SAME: (ptr noundef [[BASE:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call { , } @llvm.riscv.vlseg2.nxv2i32.i64( poison, poison, ptr [[BASE]], i64 [[VL]]) +// CHECK-RV64-NEXT: ret { , } [[TMP0]] +// +vint32m1x2_t test_vlseg2e32_v_i32m1x2(const int32_t *base, size_t vl) { + return __riscv_vlseg2e32_v_tuple_i32m1x2(base, vl); +} + +// CHECK-RV64-LABEL: define dso_local { , } @test_vlseg2e32_v_i32m2x2 +// CHECK-RV64-SAME: (ptr noundef [[BASE:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call { , } @llvm.riscv.vlseg2.nxv4i32.i64( poison, poison, ptr [[BASE]], i64 [[VL]]) +// CHECK-RV64-NEXT: ret { , } [[TMP0]] +// +vint32m2x2_t test_vlseg2e32_v_i32m2x2(const int32_t *base, size_t vl) { + return __riscv_vlseg2e32_v_tuple_i32m2x2(base, vl); +} + +// CHECK-RV64-LABEL: define dso_local { , } @test_vlseg2e32_v_i32m4x2 +// CHECK-RV64-SAME: (ptr noundef [[BASE:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call { , } @llvm.riscv.vlseg2.nxv8i32.i64( poison, poison, ptr [[BASE]], i64 [[VL]]) +// CHECK-RV64-NEXT: ret { , } [[TMP0]] +// +vint32m4x2_t test_vlseg2e32_v_i32m4x2(const int32_t *base, size_t vl) { + return __riscv_vlseg2e32_v_tuple_i32m4x2(base, vl); +} + +// CHECK-RV64-LABEL: define dso_local { , } @test_vlseg2e32_v_u32mf2x2 +// CHECK-RV64-SAME: (ptr noundef [[BASE:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call { , } @llvm.riscv.vlseg2.nxv1i32.i64( poison, poison, ptr [[BASE]], i64 [[VL]]) +// CHECK-RV64-NEXT: ret { , } [[TMP0]] +// +vuint32mf2x2_t test_vlseg2e32_v_u32mf2x2(const uint32_t *base, size_t vl) { + return __riscv_vlseg2e32_v_tuple_u32mf2x2(base, vl); +} + +// CHECK-RV64-LABEL: define dso_local { , } @test_vlseg2e32_v_u32m1x2 +// CHECK-RV64-SAME: (ptr noundef [[BASE:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: // CHECK-RV64-NEXT: [[TMP0:%.*]] = call { , } @llvm.riscv.vlseg2.nxv2i32.i64( poison, poison, ptr [[BASE]], i64 [[VL]]) // CHECK-RV64-NEXT: ret { , } [[TMP0]] // -vint32m1x2_t test_vlseg2e32_v_tuple_i32m1(const int32_t *base, size_t vl) { - return __riscv_vlseg2e32_v_tuple_i32m1(base, vl); +vuint32m1x2_t test_vlseg2e32_v_u32m1x2(const uint32_t *base, size_t vl) { + return __riscv_vlseg2e32_v_tuple_u32m1x2(base, vl); +} + +// CHECK-RV64-LABEL: define dso_local { , } @test_vlseg2e32_v_u32m2x2 +// CHECK-RV64-SAME: (ptr noundef [[BASE:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call { , } @llvm.riscv.vlseg2.nxv4i32.i64( poison, poison, ptr [[BASE]], i64 [[VL]]) +// CHECK-RV64-NEXT: ret { , } [[TMP0]] +// +vuint32m2x2_t test_vlseg2e32_v_u32m2x2(const uint32_t *base, size_t vl) { + return __riscv_vlseg2e32_v_tuple_u32m2x2(base, vl); +} + +// CHECK-RV64-LABEL: define dso_local { , } @test_vlseg2e32_v_u32m4x2 +// CHECK-RV64-SAME: (ptr noundef [[BASE:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call { , } @llvm.riscv.vlseg2.nxv8i32.i64( poison, poison, ptr [[BASE]], i64 [[VL]]) +// CHECK-RV64-NEXT: ret { , } [[TMP0]] +// +vuint32m4x2_t test_vlseg2e32_v_u32m4x2(const uint32_t *base, size_t vl) { + return __riscv_vlseg2e32_v_tuple_u32m4x2(base, vl); +} + +// CHECK-RV64-LABEL: define dso_local { , } @test_vlseg2e32_v_f32mf2x2_m +// CHECK-RV64-SAME: ( [[MASK:%.*]], ptr noundef [[BASE:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call { , } @llvm.riscv.vlseg2.mask.nxv1f32.i64( poison, poison, ptr [[BASE]], [[MASK]], i64 [[VL]], i64 3) +// CHECK-RV64-NEXT: ret { , } [[TMP0]] +// +vfloat32mf2x2_t test_vlseg2e32_v_f32mf2x2_m(vbool64_t mask, const float *base, size_t vl) { + return __riscv_vlseg2e32_v_tuple_f32mf2x2_m(mask, base, vl); +} + +// CHECK-RV64-LABEL: define dso_local { , } @test_vlseg2e32_v_f32m1x2_m +// CHECK-RV64-SAME: ( [[MASK:%.*]], ptr noundef [[BASE:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call { , } @llvm.riscv.vlseg2.mask.nxv2f32.i64( poison, poison, ptr [[BASE]], [[MASK]], i64 [[VL]], i64 3) +// CHECK-RV64-NEXT: ret { , } [[TMP0]] +// +vfloat32m1x2_t test_vlseg2e32_v_f32m1x2_m(vbool32_t mask, const float *base, size_t vl) { + return __riscv_vlseg2e32_v_tuple_f32m1x2_m(mask, base, vl); +} + +// CHECK-RV64-LABEL: define dso_local { , } @test_vlseg2e32_v_f32m2x2_m +// CHECK-RV64-SAME: ( [[MASK:%.*]], ptr noundef [[BASE:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call { , } @llvm.riscv.vlseg2.mask.nxv4f32.i64( poison, poison, ptr [[BASE]], [[MASK]], i64 [[VL]], i64 3) +// CHECK-RV64-NEXT: ret { , } [[TMP0]] +// +vfloat32m2x2_t test_vlseg2e32_v_f32m2x2_m(vbool16_t mask, const float *base, size_t vl) { + return __riscv_vlseg2e32_v_tuple_f32m2x2_m(mask, base, vl); +} + +// CHECK-RV64-LABEL: define dso_local { , } @test_vlseg2e32_v_f32m4x2_m +// CHECK-RV64-SAME: ( [[MASK:%.*]], ptr noundef [[BASE:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call { , } @llvm.riscv.vlseg2.mask.nxv8f32.i64( poison, poison, ptr [[BASE]], [[MASK]], i64 [[VL]], i64 3) +// CHECK-RV64-NEXT: ret { , } [[TMP0]] +// +vfloat32m4x2_t test_vlseg2e32_v_f32m4x2_m(vbool8_t mask, const float *base, size_t vl) { + return __riscv_vlseg2e32_v_tuple_f32m4x2_m(mask, base, vl); +} + +// CHECK-RV64-LABEL: define dso_local { , } @test_vlseg2e32_v_i32mf2x2_m +// CHECK-RV64-SAME: ( [[MASK:%.*]], ptr noundef [[BASE:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call { , } @llvm.riscv.vlseg2.mask.nxv1i32.i64( poison, poison, ptr [[BASE]], [[MASK]], i64 [[VL]], i64 3) +// CHECK-RV64-NEXT: ret { , } [[TMP0]] +// +vint32mf2x2_t test_vlseg2e32_v_i32mf2x2_m(vbool64_t mask, const int32_t *base, size_t vl) { + return __riscv_vlseg2e32_v_tuple_i32mf2x2_m(mask, base, vl); +} + +// CHECK-RV64-LABEL: define dso_local { , } @test_vlseg2e32_v_i32m1x2_m +// CHECK-RV64-SAME: ( [[MASK:%.*]], ptr noundef [[BASE:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call { , } @llvm.riscv.vlseg2.mask.nxv2i32.i64( poison, poison, ptr [[BASE]], [[MASK]], i64 [[VL]], i64 3) +// CHECK-RV64-NEXT: ret { , } [[TMP0]] +// +vint32m1x2_t test_vlseg2e32_v_i32m1x2_m(vbool32_t mask, const int32_t *base, size_t vl) { + return __riscv_vlseg2e32_v_tuple_i32m1x2_m(mask, base, vl); +} + +// CHECK-RV64-LABEL: define dso_local { , } @test_vlseg2e32_v_i32m2x2_m +// CHECK-RV64-SAME: ( [[MASK:%.*]], ptr noundef [[BASE:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call { , } @llvm.riscv.vlseg2.mask.nxv4i32.i64( poison, poison, ptr [[BASE]], [[MASK]], i64 [[VL]], i64 3) +// CHECK-RV64-NEXT: ret { , } [[TMP0]] +// +vint32m2x2_t test_vlseg2e32_v_i32m2x2_m(vbool16_t mask, const int32_t *base, size_t vl) { + return __riscv_vlseg2e32_v_tuple_i32m2x2_m(mask, base, vl); +} + +// CHECK-RV64-LABEL: define dso_local { , } @test_vlseg2e32_v_i32m4x2_m +// CHECK-RV64-SAME: ( [[MASK:%.*]], ptr noundef [[BASE:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call { , } @llvm.riscv.vlseg2.mask.nxv8i32.i64( poison, poison, ptr [[BASE]], [[MASK]], i64 [[VL]], i64 3) +// CHECK-RV64-NEXT: ret { , } [[TMP0]] +// +vint32m4x2_t test_vlseg2e32_v_i32m4x2_m(vbool8_t mask, const int32_t *base, size_t vl) { + return __riscv_vlseg2e32_v_tuple_i32m4x2_m(mask, base, vl); +} + +// CHECK-RV64-LABEL: define dso_local { , } @test_vlseg2e32_v_u32mf2x2_m +// CHECK-RV64-SAME: ( [[MASK:%.*]], ptr noundef [[BASE:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call { , } @llvm.riscv.vlseg2.mask.nxv1i32.i64( poison, poison, ptr [[BASE]], [[MASK]], i64 [[VL]], i64 3) +// CHECK-RV64-NEXT: ret { , } [[TMP0]] +// +vuint32mf2x2_t test_vlseg2e32_v_u32mf2x2_m(vbool64_t mask, const uint32_t *base, size_t vl) { + return __riscv_vlseg2e32_v_tuple_u32mf2x2_m(mask, base, vl); } -// CHECK-RV64-LABEL: define dso_local { , } @test_vlseg2e32_v_tuple_i32m1_m +// CHECK-RV64-LABEL: define dso_local { , } @test_vlseg2e32_v_u32m1x2_m // CHECK-RV64-SAME: ( [[MASK:%.*]], ptr noundef [[BASE:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { // CHECK-RV64-NEXT: entry: // CHECK-RV64-NEXT: [[TMP0:%.*]] = call { , } @llvm.riscv.vlseg2.mask.nxv2i32.i64( poison, poison, ptr [[BASE]], [[MASK]], i64 [[VL]], i64 3) // CHECK-RV64-NEXT: ret { , } [[TMP0]] // -vint32m1x2_t test_vlseg2e32_v_tuple_i32m1_m(vbool32_t mask, const int32_t *base, size_t vl) { - return __riscv_vlseg2e32_v_tuple_i32m1_m(mask, base, vl); +vuint32m1x2_t test_vlseg2e32_v_u32m1x2_m(vbool32_t mask, const uint32_t *base, size_t vl) { + return __riscv_vlseg2e32_v_tuple_u32m1x2_m(mask, base, vl); +} + +// CHECK-RV64-LABEL: define dso_local { , } @test_vlseg2e32_v_u32m2x2_m +// CHECK-RV64-SAME: ( [[MASK:%.*]], ptr noundef [[BASE:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call { , } @llvm.riscv.vlseg2.mask.nxv4i32.i64( poison, poison, ptr [[BASE]], [[MASK]], i64 [[VL]], i64 3) +// CHECK-RV64-NEXT: ret { , } [[TMP0]] +// +vuint32m2x2_t test_vlseg2e32_v_u32m2x2_m(vbool16_t mask, const uint32_t *base, size_t vl) { + return __riscv_vlseg2e32_v_tuple_u32m2x2_m(mask, base, vl); +} + +// CHECK-RV64-LABEL: define dso_local { , } @test_vlseg2e32_v_u32m4x2_m +// CHECK-RV64-SAME: ( [[MASK:%.*]], ptr noundef [[BASE:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call { , } @llvm.riscv.vlseg2.mask.nxv8i32.i64( poison, poison, ptr [[BASE]], [[MASK]], i64 [[VL]], i64 3) +// CHECK-RV64-NEXT: ret { , } [[TMP0]] +// +vuint32m4x2_t test_vlseg2e32_v_u32m4x2_m(vbool8_t mask, const uint32_t *base, size_t vl) { + return __riscv_vlseg2e32_v_tuple_u32m4x2_m(mask, base, vl); } + diff --git a/clang/test/CodeGen/RISCV/rvv-intrinsics-autogenerated/non-policy/overloaded/vlseg2e32_tuple.c b/clang/test/CodeGen/RISCV/rvv-intrinsics-autogenerated/non-policy/overloaded/vlseg2e32_tuple.c new file mode 100644 --- /dev/null +++ b/clang/test/CodeGen/RISCV/rvv-intrinsics-autogenerated/non-policy/overloaded/vlseg2e32_tuple.c @@ -0,0 +1,129 @@ +// 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_vlseg2e32_v_f32mf2x2_m +// CHECK-RV64-SAME: ( [[MASK:%.*]], ptr noundef [[BASE:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0:[0-9]+]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call { , } @llvm.riscv.vlseg2.mask.nxv1f32.i64( poison, poison, ptr [[BASE]], [[MASK]], i64 [[VL]], i64 3) +// CHECK-RV64-NEXT: ret { , } [[TMP0]] +// +vfloat32mf2x2_t test_vlseg2e32_v_f32mf2x2_m(vbool64_t mask, const float *base, size_t vl) { + return __riscv_vlseg2e32_tuple(mask, base, vl); +} + +// CHECK-RV64-LABEL: define dso_local { , } @test_vlseg2e32_v_f32m1x2_m +// CHECK-RV64-SAME: ( [[MASK:%.*]], ptr noundef [[BASE:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call { , } @llvm.riscv.vlseg2.mask.nxv2f32.i64( poison, poison, ptr [[BASE]], [[MASK]], i64 [[VL]], i64 3) +// CHECK-RV64-NEXT: ret { , } [[TMP0]] +// +vfloat32m1x2_t test_vlseg2e32_v_f32m1x2_m(vbool32_t mask, const float *base, size_t vl) { + return __riscv_vlseg2e32_tuple(mask, base, vl); +} + +// CHECK-RV64-LABEL: define dso_local { , } @test_vlseg2e32_v_f32m2x2_m +// CHECK-RV64-SAME: ( [[MASK:%.*]], ptr noundef [[BASE:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call { , } @llvm.riscv.vlseg2.mask.nxv4f32.i64( poison, poison, ptr [[BASE]], [[MASK]], i64 [[VL]], i64 3) +// CHECK-RV64-NEXT: ret { , } [[TMP0]] +// +vfloat32m2x2_t test_vlseg2e32_v_f32m2x2_m(vbool16_t mask, const float *base, size_t vl) { + return __riscv_vlseg2e32_tuple(mask, base, vl); +} + +// CHECK-RV64-LABEL: define dso_local { , } @test_vlseg2e32_v_f32m4x2_m +// CHECK-RV64-SAME: ( [[MASK:%.*]], ptr noundef [[BASE:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call { , } @llvm.riscv.vlseg2.mask.nxv8f32.i64( poison, poison, ptr [[BASE]], [[MASK]], i64 [[VL]], i64 3) +// CHECK-RV64-NEXT: ret { , } [[TMP0]] +// +vfloat32m4x2_t test_vlseg2e32_v_f32m4x2_m(vbool8_t mask, const float *base, size_t vl) { + return __riscv_vlseg2e32_tuple(mask, base, vl); +} + +// CHECK-RV64-LABEL: define dso_local { , } @test_vlseg2e32_v_i32mf2x2_m +// CHECK-RV64-SAME: ( [[MASK:%.*]], ptr noundef [[BASE:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call { , } @llvm.riscv.vlseg2.mask.nxv1i32.i64( poison, poison, ptr [[BASE]], [[MASK]], i64 [[VL]], i64 3) +// CHECK-RV64-NEXT: ret { , } [[TMP0]] +// +vint32mf2x2_t test_vlseg2e32_v_i32mf2x2_m(vbool64_t mask, const int32_t *base, size_t vl) { + return __riscv_vlseg2e32_tuple(mask, base, vl); +} + +// CHECK-RV64-LABEL: define dso_local { , } @test_vlseg2e32_v_i32m1x2_m +// CHECK-RV64-SAME: ( [[MASK:%.*]], ptr noundef [[BASE:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call { , } @llvm.riscv.vlseg2.mask.nxv2i32.i64( poison, poison, ptr [[BASE]], [[MASK]], i64 [[VL]], i64 3) +// CHECK-RV64-NEXT: ret { , } [[TMP0]] +// +vint32m1x2_t test_vlseg2e32_v_i32m1x2_m(vbool32_t mask, const int32_t *base, size_t vl) { + return __riscv_vlseg2e32_tuple(mask, base, vl); +} + +// CHECK-RV64-LABEL: define dso_local { , } @test_vlseg2e32_v_i32m2x2_m +// CHECK-RV64-SAME: ( [[MASK:%.*]], ptr noundef [[BASE:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call { , } @llvm.riscv.vlseg2.mask.nxv4i32.i64( poison, poison, ptr [[BASE]], [[MASK]], i64 [[VL]], i64 3) +// CHECK-RV64-NEXT: ret { , } [[TMP0]] +// +vint32m2x2_t test_vlseg2e32_v_i32m2x2_m(vbool16_t mask, const int32_t *base, size_t vl) { + return __riscv_vlseg2e32_tuple(mask, base, vl); +} + +// CHECK-RV64-LABEL: define dso_local { , } @test_vlseg2e32_v_i32m4x2_m +// CHECK-RV64-SAME: ( [[MASK:%.*]], ptr noundef [[BASE:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call { , } @llvm.riscv.vlseg2.mask.nxv8i32.i64( poison, poison, ptr [[BASE]], [[MASK]], i64 [[VL]], i64 3) +// CHECK-RV64-NEXT: ret { , } [[TMP0]] +// +vint32m4x2_t test_vlseg2e32_v_i32m4x2_m(vbool8_t mask, const int32_t *base, size_t vl) { + return __riscv_vlseg2e32_tuple(mask, base, vl); +} + +// CHECK-RV64-LABEL: define dso_local { , } @test_vlseg2e32_v_u32mf2x2_m +// CHECK-RV64-SAME: ( [[MASK:%.*]], ptr noundef [[BASE:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call { , } @llvm.riscv.vlseg2.mask.nxv1i32.i64( poison, poison, ptr [[BASE]], [[MASK]], i64 [[VL]], i64 3) +// CHECK-RV64-NEXT: ret { , } [[TMP0]] +// +vuint32mf2x2_t test_vlseg2e32_v_u32mf2x2_m(vbool64_t mask, const uint32_t *base, size_t vl) { + return __riscv_vlseg2e32_tuple(mask, base, vl); +} + +// CHECK-RV64-LABEL: define dso_local { , } @test_vlseg2e32_v_u32m1x2_m +// CHECK-RV64-SAME: ( [[MASK:%.*]], ptr noundef [[BASE:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call { , } @llvm.riscv.vlseg2.mask.nxv2i32.i64( poison, poison, ptr [[BASE]], [[MASK]], i64 [[VL]], i64 3) +// CHECK-RV64-NEXT: ret { , } [[TMP0]] +// +vuint32m1x2_t test_vlseg2e32_v_u32m1x2_m(vbool32_t mask, const uint32_t *base, size_t vl) { + return __riscv_vlseg2e32_tuple(mask, base, vl); +} + +// CHECK-RV64-LABEL: define dso_local { , } @test_vlseg2e32_v_u32m2x2_m +// CHECK-RV64-SAME: ( [[MASK:%.*]], ptr noundef [[BASE:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call { , } @llvm.riscv.vlseg2.mask.nxv4i32.i64( poison, poison, ptr [[BASE]], [[MASK]], i64 [[VL]], i64 3) +// CHECK-RV64-NEXT: ret { , } [[TMP0]] +// +vuint32m2x2_t test_vlseg2e32_v_u32m2x2_m(vbool16_t mask, const uint32_t *base, size_t vl) { + return __riscv_vlseg2e32_tuple(mask, base, vl); +} + +// CHECK-RV64-LABEL: define dso_local { , } @test_vlseg2e32_v_u32m4x2_m +// CHECK-RV64-SAME: ( [[MASK:%.*]], ptr noundef [[BASE:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] { +// CHECK-RV64-NEXT: entry: +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call { , } @llvm.riscv.vlseg2.mask.nxv8i32.i64( poison, poison, ptr [[BASE]], [[MASK]], i64 [[VL]], i64 3) +// CHECK-RV64-NEXT: ret { , } [[TMP0]] +// +vuint32m4x2_t test_vlseg2e32_v_u32m4x2_m(vbool8_t mask, const uint32_t *base, size_t vl) { + return __riscv_vlseg2e32_tuple(mask, base, vl); +} + diff --git a/clang/test/CodeGen/RISCV/rvv-intrinsics-autogenerated/policy/non-overloaded/vlseg2e32_tuple.c b/clang/test/CodeGen/RISCV/rvv-intrinsics-autogenerated/policy/non-overloaded/vlseg2e32_tuple.c new file mode 100644 --- /dev/null +++ b/clang/test/CodeGen/RISCV/rvv-intrinsics-autogenerated/policy/non-overloaded/vlseg2e32_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_vlseg2e32_v_f32mf2x2_tu +// CHECK-RV64-SAME: ( [[MASKEDOFF_TUPLE_COERCE0:%.*]], [[MASKEDOFF_TUPLE_COERCE1:%.*]], ptr noundef [[BASE:%.*]], 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.vlseg2.nxv1f32.i64( [[TMP2]], [[TMP3]], ptr [[BASE]], i64 [[VL]]) +// CHECK-RV64-NEXT: ret { , } [[TMP4]] +// +vfloat32mf2x2_t test_vlseg2e32_v_f32mf2x2_tu(vfloat32mf2x2_t maskedoff_tuple, const float *base, size_t vl) { + return __riscv_vlseg2e32_v_tuple_f32mf2x2_tu(maskedoff_tuple, base, vl); +} + +// CHECK-RV64-LABEL: define dso_local { , } @test_vlseg2e32_v_f32m1x2_tu +// CHECK-RV64-SAME: ( [[MASKEDOFF_TUPLE_COERCE0:%.*]], [[MASKEDOFF_TUPLE_COERCE1:%.*]], ptr noundef [[BASE:%.*]], 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.vlseg2.nxv2f32.i64( [[TMP2]], [[TMP3]], ptr [[BASE]], i64 [[VL]]) +// CHECK-RV64-NEXT: ret { , } [[TMP4]] +// +vfloat32m1x2_t test_vlseg2e32_v_f32m1x2_tu(vfloat32m1x2_t maskedoff_tuple, const float *base, size_t vl) { + return __riscv_vlseg2e32_v_tuple_f32m1x2_tu(maskedoff_tuple, base, vl); +} + +// CHECK-RV64-LABEL: define dso_local { , } @test_vlseg2e32_v_f32m2x2_tu +// CHECK-RV64-SAME: ( [[MASKEDOFF_TUPLE_COERCE0:%.*]], [[MASKEDOFF_TUPLE_COERCE1:%.*]], ptr noundef [[BASE:%.*]], 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.vlseg2.nxv4f32.i64( [[TMP2]], [[TMP3]], ptr [[BASE]], i64 [[VL]]) +// CHECK-RV64-NEXT: ret { , } [[TMP4]] +// +vfloat32m2x2_t test_vlseg2e32_v_f32m2x2_tu(vfloat32m2x2_t maskedoff_tuple, const float *base, size_t vl) { + return __riscv_vlseg2e32_v_tuple_f32m2x2_tu(maskedoff_tuple, base, vl); +} + +// CHECK-RV64-LABEL: define dso_local { , } @test_vlseg2e32_v_f32m4x2_tu +// CHECK-RV64-SAME: ( [[MASKEDOFF_TUPLE_COERCE0:%.*]], [[MASKEDOFF_TUPLE_COERCE1:%.*]], ptr noundef [[BASE:%.*]], 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.vlseg2.nxv8f32.i64( [[TMP2]], [[TMP3]], ptr [[BASE]], i64 [[VL]]) +// CHECK-RV64-NEXT: ret { , } [[TMP4]] +// +vfloat32m4x2_t test_vlseg2e32_v_f32m4x2_tu(vfloat32m4x2_t maskedoff_tuple, const float *base, size_t vl) { + return __riscv_vlseg2e32_v_tuple_f32m4x2_tu(maskedoff_tuple, base, vl); +} + +// CHECK-RV64-LABEL: define dso_local { , } @test_vlseg2e32_v_i32mf2x2_tu +// CHECK-RV64-SAME: ( [[MASKEDOFF_TUPLE_COERCE0:%.*]], [[MASKEDOFF_TUPLE_COERCE1:%.*]], ptr noundef [[BASE:%.*]], 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.vlseg2.nxv1i32.i64( [[TMP2]], [[TMP3]], ptr [[BASE]], i64 [[VL]]) +// CHECK-RV64-NEXT: ret { , } [[TMP4]] +// +vint32mf2x2_t test_vlseg2e32_v_i32mf2x2_tu(vint32mf2x2_t maskedoff_tuple, const int32_t *base, size_t vl) { + return __riscv_vlseg2e32_v_tuple_i32mf2x2_tu(maskedoff_tuple, base, vl); +} + +// CHECK-RV64-LABEL: define dso_local { , } @test_vlseg2e32_v_i32m1x2_tu +// CHECK-RV64-SAME: ( [[MASKEDOFF_TUPLE_COERCE0:%.*]], [[MASKEDOFF_TUPLE_COERCE1:%.*]], ptr noundef [[BASE:%.*]], 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.vlseg2.nxv2i32.i64( [[TMP2]], [[TMP3]], ptr [[BASE]], i64 [[VL]]) +// CHECK-RV64-NEXT: ret { , } [[TMP4]] +// +vint32m1x2_t test_vlseg2e32_v_i32m1x2_tu(vint32m1x2_t maskedoff_tuple, const int32_t *base, size_t vl) { + return __riscv_vlseg2e32_v_tuple_i32m1x2_tu(maskedoff_tuple, base, vl); +} + +// CHECK-RV64-LABEL: define dso_local { , } @test_vlseg2e32_v_i32m2x2_tu +// CHECK-RV64-SAME: ( [[MASKEDOFF_TUPLE_COERCE0:%.*]], [[MASKEDOFF_TUPLE_COERCE1:%.*]], ptr noundef [[BASE:%.*]], 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.vlseg2.nxv4i32.i64( [[TMP2]], [[TMP3]], ptr [[BASE]], i64 [[VL]]) +// CHECK-RV64-NEXT: ret { , } [[TMP4]] +// +vint32m2x2_t test_vlseg2e32_v_i32m2x2_tu(vint32m2x2_t maskedoff_tuple, const int32_t *base, size_t vl) { + return __riscv_vlseg2e32_v_tuple_i32m2x2_tu(maskedoff_tuple, base, vl); +} + +// CHECK-RV64-LABEL: define dso_local { , } @test_vlseg2e32_v_i32m4x2_tu +// CHECK-RV64-SAME: ( [[MASKEDOFF_TUPLE_COERCE0:%.*]], [[MASKEDOFF_TUPLE_COERCE1:%.*]], ptr noundef [[BASE:%.*]], 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.vlseg2.nxv8i32.i64( [[TMP2]], [[TMP3]], ptr [[BASE]], i64 [[VL]]) +// CHECK-RV64-NEXT: ret { , } [[TMP4]] +// +vint32m4x2_t test_vlseg2e32_v_i32m4x2_tu(vint32m4x2_t maskedoff_tuple, const int32_t *base, size_t vl) { + return __riscv_vlseg2e32_v_tuple_i32m4x2_tu(maskedoff_tuple, base, vl); +} + +// CHECK-RV64-LABEL: define dso_local { , } @test_vlseg2e32_v_u32mf2x2_tu +// CHECK-RV64-SAME: ( [[MASKEDOFF_TUPLE_COERCE0:%.*]], [[MASKEDOFF_TUPLE_COERCE1:%.*]], ptr noundef [[BASE:%.*]], 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.vlseg2.nxv1i32.i64( [[TMP2]], [[TMP3]], ptr [[BASE]], i64 [[VL]]) +// CHECK-RV64-NEXT: ret { , } [[TMP4]] +// +vuint32mf2x2_t test_vlseg2e32_v_u32mf2x2_tu(vuint32mf2x2_t maskedoff_tuple, const uint32_t *base, size_t vl) { + return __riscv_vlseg2e32_v_tuple_u32mf2x2_tu(maskedoff_tuple, base, vl); +} + +// CHECK-RV64-LABEL: define dso_local { , } @test_vlseg2e32_v_u32m1x2_tu +// CHECK-RV64-SAME: ( [[MASKEDOFF_TUPLE_COERCE0:%.*]], [[MASKEDOFF_TUPLE_COERCE1:%.*]], ptr noundef [[BASE:%.*]], 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.vlseg2.nxv2i32.i64( [[TMP2]], [[TMP3]], ptr [[BASE]], i64 [[VL]]) +// CHECK-RV64-NEXT: ret { , } [[TMP4]] +// +vuint32m1x2_t test_vlseg2e32_v_u32m1x2_tu(vuint32m1x2_t maskedoff_tuple, const uint32_t *base, size_t vl) { + return __riscv_vlseg2e32_v_tuple_u32m1x2_tu(maskedoff_tuple, base, vl); +} + +// CHECK-RV64-LABEL: define dso_local { , } @test_vlseg2e32_v_u32m2x2_tu +// CHECK-RV64-SAME: ( [[MASKEDOFF_TUPLE_COERCE0:%.*]], [[MASKEDOFF_TUPLE_COERCE1:%.*]], ptr noundef [[BASE:%.*]], 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.vlseg2.nxv4i32.i64( [[TMP2]], [[TMP3]], ptr [[BASE]], i64 [[VL]]) +// CHECK-RV64-NEXT: ret { , } [[TMP4]] +// +vuint32m2x2_t test_vlseg2e32_v_u32m2x2_tu(vuint32m2x2_t maskedoff_tuple, const uint32_t *base, size_t vl) { + return __riscv_vlseg2e32_v_tuple_u32m2x2_tu(maskedoff_tuple, base, vl); +} + +// CHECK-RV64-LABEL: define dso_local { , } @test_vlseg2e32_v_u32m4x2_tu +// CHECK-RV64-SAME: ( [[MASKEDOFF_TUPLE_COERCE0:%.*]], [[MASKEDOFF_TUPLE_COERCE1:%.*]], ptr noundef [[BASE:%.*]], 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.vlseg2.nxv8i32.i64( [[TMP2]], [[TMP3]], ptr [[BASE]], i64 [[VL]]) +// CHECK-RV64-NEXT: ret { , } [[TMP4]] +// +vuint32m4x2_t test_vlseg2e32_v_u32m4x2_tu(vuint32m4x2_t maskedoff_tuple, const uint32_t *base, size_t vl) { + return __riscv_vlseg2e32_v_tuple_u32m4x2_tu(maskedoff_tuple, base, vl); +} + +// CHECK-RV64-LABEL: define dso_local { , } @test_vlseg2e32_v_f32mf2x2_tum +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF_TUPLE_COERCE0:%.*]], [[MASKEDOFF_TUPLE_COERCE1:%.*]], ptr noundef [[BASE:%.*]], 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.vlseg2.mask.nxv1f32.i64( [[TMP2]], [[TMP3]], ptr [[BASE]], [[MASK]], i64 [[VL]], i64 2) +// CHECK-RV64-NEXT: ret { , } [[TMP4]] +// +vfloat32mf2x2_t test_vlseg2e32_v_f32mf2x2_tum(vbool64_t mask, vfloat32mf2x2_t maskedoff_tuple, const float *base, size_t vl) { + return __riscv_vlseg2e32_v_tuple_f32mf2x2_tum(mask, maskedoff_tuple, base, vl); +} + +// CHECK-RV64-LABEL: define dso_local { , } @test_vlseg2e32_v_f32m1x2_tum +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF_TUPLE_COERCE0:%.*]], [[MASKEDOFF_TUPLE_COERCE1:%.*]], ptr noundef [[BASE:%.*]], 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.vlseg2.mask.nxv2f32.i64( [[TMP2]], [[TMP3]], ptr [[BASE]], [[MASK]], i64 [[VL]], i64 2) +// CHECK-RV64-NEXT: ret { , } [[TMP4]] +// +vfloat32m1x2_t test_vlseg2e32_v_f32m1x2_tum(vbool32_t mask, vfloat32m1x2_t maskedoff_tuple, const float *base, size_t vl) { + return __riscv_vlseg2e32_v_tuple_f32m1x2_tum(mask, maskedoff_tuple, base, vl); +} + +// CHECK-RV64-LABEL: define dso_local { , } @test_vlseg2e32_v_f32m2x2_tum +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF_TUPLE_COERCE0:%.*]], [[MASKEDOFF_TUPLE_COERCE1:%.*]], ptr noundef [[BASE:%.*]], 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.vlseg2.mask.nxv4f32.i64( [[TMP2]], [[TMP3]], ptr [[BASE]], [[MASK]], i64 [[VL]], i64 2) +// CHECK-RV64-NEXT: ret { , } [[TMP4]] +// +vfloat32m2x2_t test_vlseg2e32_v_f32m2x2_tum(vbool16_t mask, vfloat32m2x2_t maskedoff_tuple, const float *base, size_t vl) { + return __riscv_vlseg2e32_v_tuple_f32m2x2_tum(mask, maskedoff_tuple, base, vl); +} + +// CHECK-RV64-LABEL: define dso_local { , } @test_vlseg2e32_v_f32m4x2_tum +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF_TUPLE_COERCE0:%.*]], [[MASKEDOFF_TUPLE_COERCE1:%.*]], ptr noundef [[BASE:%.*]], 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.vlseg2.mask.nxv8f32.i64( [[TMP2]], [[TMP3]], ptr [[BASE]], [[MASK]], i64 [[VL]], i64 2) +// CHECK-RV64-NEXT: ret { , } [[TMP4]] +// +vfloat32m4x2_t test_vlseg2e32_v_f32m4x2_tum(vbool8_t mask, vfloat32m4x2_t maskedoff_tuple, const float *base, size_t vl) { + return __riscv_vlseg2e32_v_tuple_f32m4x2_tum(mask, maskedoff_tuple, base, vl); +} + +// CHECK-RV64-LABEL: define dso_local { , } @test_vlseg2e32_v_i32mf2x2_tum +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF_TUPLE_COERCE0:%.*]], [[MASKEDOFF_TUPLE_COERCE1:%.*]], ptr noundef [[BASE:%.*]], 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.vlseg2.mask.nxv1i32.i64( [[TMP2]], [[TMP3]], ptr [[BASE]], [[MASK]], i64 [[VL]], i64 2) +// CHECK-RV64-NEXT: ret { , } [[TMP4]] +// +vint32mf2x2_t test_vlseg2e32_v_i32mf2x2_tum(vbool64_t mask, vint32mf2x2_t maskedoff_tuple, const int32_t *base, size_t vl) { + return __riscv_vlseg2e32_v_tuple_i32mf2x2_tum(mask, maskedoff_tuple, base, vl); +} + +// CHECK-RV64-LABEL: define dso_local { , } @test_vlseg2e32_v_i32m1x2_tum +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF_TUPLE_COERCE0:%.*]], [[MASKEDOFF_TUPLE_COERCE1:%.*]], ptr noundef [[BASE:%.*]], 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.vlseg2.mask.nxv2i32.i64( [[TMP2]], [[TMP3]], ptr [[BASE]], [[MASK]], i64 [[VL]], i64 2) +// CHECK-RV64-NEXT: ret { , } [[TMP4]] +// +vint32m1x2_t test_vlseg2e32_v_i32m1x2_tum(vbool32_t mask, vint32m1x2_t maskedoff_tuple, const int32_t *base, size_t vl) { + return __riscv_vlseg2e32_v_tuple_i32m1x2_tum(mask, maskedoff_tuple, base, vl); +} + +// CHECK-RV64-LABEL: define dso_local { , } @test_vlseg2e32_v_i32m2x2_tum +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF_TUPLE_COERCE0:%.*]], [[MASKEDOFF_TUPLE_COERCE1:%.*]], ptr noundef [[BASE:%.*]], 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.vlseg2.mask.nxv4i32.i64( [[TMP2]], [[TMP3]], ptr [[BASE]], [[MASK]], i64 [[VL]], i64 2) +// CHECK-RV64-NEXT: ret { , } [[TMP4]] +// +vint32m2x2_t test_vlseg2e32_v_i32m2x2_tum(vbool16_t mask, vint32m2x2_t maskedoff_tuple, const int32_t *base, size_t vl) { + return __riscv_vlseg2e32_v_tuple_i32m2x2_tum(mask, maskedoff_tuple, base, vl); +} + +// CHECK-RV64-LABEL: define dso_local { , } @test_vlseg2e32_v_i32m4x2_tum +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF_TUPLE_COERCE0:%.*]], [[MASKEDOFF_TUPLE_COERCE1:%.*]], ptr noundef [[BASE:%.*]], 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.vlseg2.mask.nxv8i32.i64( [[TMP2]], [[TMP3]], ptr [[BASE]], [[MASK]], i64 [[VL]], i64 2) +// CHECK-RV64-NEXT: ret { , } [[TMP4]] +// +vint32m4x2_t test_vlseg2e32_v_i32m4x2_tum(vbool8_t mask, vint32m4x2_t maskedoff_tuple, const int32_t *base, size_t vl) { + return __riscv_vlseg2e32_v_tuple_i32m4x2_tum(mask, maskedoff_tuple, base, vl); +} + +// CHECK-RV64-LABEL: define dso_local { , } @test_vlseg2e32_v_u32mf2x2_tum +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF_TUPLE_COERCE0:%.*]], [[MASKEDOFF_TUPLE_COERCE1:%.*]], ptr noundef [[BASE:%.*]], 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.vlseg2.mask.nxv1i32.i64( [[TMP2]], [[TMP3]], ptr [[BASE]], [[MASK]], i64 [[VL]], i64 2) +// CHECK-RV64-NEXT: ret { , } [[TMP4]] +// +vuint32mf2x2_t test_vlseg2e32_v_u32mf2x2_tum(vbool64_t mask, vuint32mf2x2_t maskedoff_tuple, const uint32_t *base, size_t vl) { + return __riscv_vlseg2e32_v_tuple_u32mf2x2_tum(mask, maskedoff_tuple, base, vl); +} + +// CHECK-RV64-LABEL: define dso_local { , } @test_vlseg2e32_v_u32m1x2_tum +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF_TUPLE_COERCE0:%.*]], [[MASKEDOFF_TUPLE_COERCE1:%.*]], ptr noundef [[BASE:%.*]], 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.vlseg2.mask.nxv2i32.i64( [[TMP2]], [[TMP3]], ptr [[BASE]], [[MASK]], i64 [[VL]], i64 2) +// CHECK-RV64-NEXT: ret { , } [[TMP4]] +// +vuint32m1x2_t test_vlseg2e32_v_u32m1x2_tum(vbool32_t mask, vuint32m1x2_t maskedoff_tuple, const uint32_t *base, size_t vl) { + return __riscv_vlseg2e32_v_tuple_u32m1x2_tum(mask, maskedoff_tuple, base, vl); +} + +// CHECK-RV64-LABEL: define dso_local { , } @test_vlseg2e32_v_u32m2x2_tum +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF_TUPLE_COERCE0:%.*]], [[MASKEDOFF_TUPLE_COERCE1:%.*]], ptr noundef [[BASE:%.*]], 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.vlseg2.mask.nxv4i32.i64( [[TMP2]], [[TMP3]], ptr [[BASE]], [[MASK]], i64 [[VL]], i64 2) +// CHECK-RV64-NEXT: ret { , } [[TMP4]] +// +vuint32m2x2_t test_vlseg2e32_v_u32m2x2_tum(vbool16_t mask, vuint32m2x2_t maskedoff_tuple, const uint32_t *base, size_t vl) { + return __riscv_vlseg2e32_v_tuple_u32m2x2_tum(mask, maskedoff_tuple, base, vl); +} + +// CHECK-RV64-LABEL: define dso_local { , } @test_vlseg2e32_v_u32m4x2_tum +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF_TUPLE_COERCE0:%.*]], [[MASKEDOFF_TUPLE_COERCE1:%.*]], ptr noundef [[BASE:%.*]], 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.vlseg2.mask.nxv8i32.i64( [[TMP2]], [[TMP3]], ptr [[BASE]], [[MASK]], i64 [[VL]], i64 2) +// CHECK-RV64-NEXT: ret { , } [[TMP4]] +// +vuint32m4x2_t test_vlseg2e32_v_u32m4x2_tum(vbool8_t mask, vuint32m4x2_t maskedoff_tuple, const uint32_t *base, size_t vl) { + return __riscv_vlseg2e32_v_tuple_u32m4x2_tum(mask, maskedoff_tuple, base, vl); +} + +// CHECK-RV64-LABEL: define dso_local { , } @test_vlseg2e32_v_f32mf2x2_tumu +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF_TUPLE_COERCE0:%.*]], [[MASKEDOFF_TUPLE_COERCE1:%.*]], ptr noundef [[BASE:%.*]], 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.vlseg2.mask.nxv1f32.i64( [[TMP2]], [[TMP3]], ptr [[BASE]], [[MASK]], i64 [[VL]], i64 0) +// CHECK-RV64-NEXT: ret { , } [[TMP4]] +// +vfloat32mf2x2_t test_vlseg2e32_v_f32mf2x2_tumu(vbool64_t mask, vfloat32mf2x2_t maskedoff_tuple, const float *base, size_t vl) { + return __riscv_vlseg2e32_v_tuple_f32mf2x2_tumu(mask, maskedoff_tuple, base, vl); +} + +// CHECK-RV64-LABEL: define dso_local { , } @test_vlseg2e32_v_f32m1x2_tumu +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF_TUPLE_COERCE0:%.*]], [[MASKEDOFF_TUPLE_COERCE1:%.*]], ptr noundef [[BASE:%.*]], 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.vlseg2.mask.nxv2f32.i64( [[TMP2]], [[TMP3]], ptr [[BASE]], [[MASK]], i64 [[VL]], i64 0) +// CHECK-RV64-NEXT: ret { , } [[TMP4]] +// +vfloat32m1x2_t test_vlseg2e32_v_f32m1x2_tumu(vbool32_t mask, vfloat32m1x2_t maskedoff_tuple, const float *base, size_t vl) { + return __riscv_vlseg2e32_v_tuple_f32m1x2_tumu(mask, maskedoff_tuple, base, vl); +} + +// CHECK-RV64-LABEL: define dso_local { , } @test_vlseg2e32_v_f32m2x2_tumu +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF_TUPLE_COERCE0:%.*]], [[MASKEDOFF_TUPLE_COERCE1:%.*]], ptr noundef [[BASE:%.*]], 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.vlseg2.mask.nxv4f32.i64( [[TMP2]], [[TMP3]], ptr [[BASE]], [[MASK]], i64 [[VL]], i64 0) +// CHECK-RV64-NEXT: ret { , } [[TMP4]] +// +vfloat32m2x2_t test_vlseg2e32_v_f32m2x2_tumu(vbool16_t mask, vfloat32m2x2_t maskedoff_tuple, const float *base, size_t vl) { + return __riscv_vlseg2e32_v_tuple_f32m2x2_tumu(mask, maskedoff_tuple, base, vl); +} + +// CHECK-RV64-LABEL: define dso_local { , } @test_vlseg2e32_v_f32m4x2_tumu +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF_TUPLE_COERCE0:%.*]], [[MASKEDOFF_TUPLE_COERCE1:%.*]], ptr noundef [[BASE:%.*]], 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.vlseg2.mask.nxv8f32.i64( [[TMP2]], [[TMP3]], ptr [[BASE]], [[MASK]], i64 [[VL]], i64 0) +// CHECK-RV64-NEXT: ret { , } [[TMP4]] +// +vfloat32m4x2_t test_vlseg2e32_v_f32m4x2_tumu(vbool8_t mask, vfloat32m4x2_t maskedoff_tuple, const float *base, size_t vl) { + return __riscv_vlseg2e32_v_tuple_f32m4x2_tumu(mask, maskedoff_tuple, base, vl); +} + +// CHECK-RV64-LABEL: define dso_local { , } @test_vlseg2e32_v_i32mf2x2_tumu +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF_TUPLE_COERCE0:%.*]], [[MASKEDOFF_TUPLE_COERCE1:%.*]], ptr noundef [[BASE:%.*]], 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.vlseg2.mask.nxv1i32.i64( [[TMP2]], [[TMP3]], ptr [[BASE]], [[MASK]], i64 [[VL]], i64 0) +// CHECK-RV64-NEXT: ret { , } [[TMP4]] +// +vint32mf2x2_t test_vlseg2e32_v_i32mf2x2_tumu(vbool64_t mask, vint32mf2x2_t maskedoff_tuple, const int32_t *base, size_t vl) { + return __riscv_vlseg2e32_v_tuple_i32mf2x2_tumu(mask, maskedoff_tuple, base, vl); +} + +// CHECK-RV64-LABEL: define dso_local { , } @test_vlseg2e32_v_i32m1x2_tumu +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF_TUPLE_COERCE0:%.*]], [[MASKEDOFF_TUPLE_COERCE1:%.*]], ptr noundef [[BASE:%.*]], 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.vlseg2.mask.nxv2i32.i64( [[TMP2]], [[TMP3]], ptr [[BASE]], [[MASK]], i64 [[VL]], i64 0) +// CHECK-RV64-NEXT: ret { , } [[TMP4]] +// +vint32m1x2_t test_vlseg2e32_v_i32m1x2_tumu(vbool32_t mask, vint32m1x2_t maskedoff_tuple, const int32_t *base, size_t vl) { + return __riscv_vlseg2e32_v_tuple_i32m1x2_tumu(mask, maskedoff_tuple, base, vl); +} + +// CHECK-RV64-LABEL: define dso_local { , } @test_vlseg2e32_v_i32m2x2_tumu +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF_TUPLE_COERCE0:%.*]], [[MASKEDOFF_TUPLE_COERCE1:%.*]], ptr noundef [[BASE:%.*]], 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.vlseg2.mask.nxv4i32.i64( [[TMP2]], [[TMP3]], ptr [[BASE]], [[MASK]], i64 [[VL]], i64 0) +// CHECK-RV64-NEXT: ret { , } [[TMP4]] +// +vint32m2x2_t test_vlseg2e32_v_i32m2x2_tumu(vbool16_t mask, vint32m2x2_t maskedoff_tuple, const int32_t *base, size_t vl) { + return __riscv_vlseg2e32_v_tuple_i32m2x2_tumu(mask, maskedoff_tuple, base, vl); +} + +// CHECK-RV64-LABEL: define dso_local { , } @test_vlseg2e32_v_i32m4x2_tumu +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF_TUPLE_COERCE0:%.*]], [[MASKEDOFF_TUPLE_COERCE1:%.*]], ptr noundef [[BASE:%.*]], 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.vlseg2.mask.nxv8i32.i64( [[TMP2]], [[TMP3]], ptr [[BASE]], [[MASK]], i64 [[VL]], i64 0) +// CHECK-RV64-NEXT: ret { , } [[TMP4]] +// +vint32m4x2_t test_vlseg2e32_v_i32m4x2_tumu(vbool8_t mask, vint32m4x2_t maskedoff_tuple, const int32_t *base, size_t vl) { + return __riscv_vlseg2e32_v_tuple_i32m4x2_tumu(mask, maskedoff_tuple, base, vl); +} + +// CHECK-RV64-LABEL: define dso_local { , } @test_vlseg2e32_v_u32mf2x2_tumu +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF_TUPLE_COERCE0:%.*]], [[MASKEDOFF_TUPLE_COERCE1:%.*]], ptr noundef [[BASE:%.*]], 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.vlseg2.mask.nxv1i32.i64( [[TMP2]], [[TMP3]], ptr [[BASE]], [[MASK]], i64 [[VL]], i64 0) +// CHECK-RV64-NEXT: ret { , } [[TMP4]] +// +vuint32mf2x2_t test_vlseg2e32_v_u32mf2x2_tumu(vbool64_t mask, vuint32mf2x2_t maskedoff_tuple, const uint32_t *base, size_t vl) { + return __riscv_vlseg2e32_v_tuple_u32mf2x2_tumu(mask, maskedoff_tuple, base, vl); +} + +// CHECK-RV64-LABEL: define dso_local { , } @test_vlseg2e32_v_u32m1x2_tumu +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF_TUPLE_COERCE0:%.*]], [[MASKEDOFF_TUPLE_COERCE1:%.*]], ptr noundef [[BASE:%.*]], 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.vlseg2.mask.nxv2i32.i64( [[TMP2]], [[TMP3]], ptr [[BASE]], [[MASK]], i64 [[VL]], i64 0) +// CHECK-RV64-NEXT: ret { , } [[TMP4]] +// +vuint32m1x2_t test_vlseg2e32_v_u32m1x2_tumu(vbool32_t mask, vuint32m1x2_t maskedoff_tuple, const uint32_t *base, size_t vl) { + return __riscv_vlseg2e32_v_tuple_u32m1x2_tumu(mask, maskedoff_tuple, base, vl); +} + +// CHECK-RV64-LABEL: define dso_local { , } @test_vlseg2e32_v_u32m2x2_tumu +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF_TUPLE_COERCE0:%.*]], [[MASKEDOFF_TUPLE_COERCE1:%.*]], ptr noundef [[BASE:%.*]], 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.vlseg2.mask.nxv4i32.i64( [[TMP2]], [[TMP3]], ptr [[BASE]], [[MASK]], i64 [[VL]], i64 0) +// CHECK-RV64-NEXT: ret { , } [[TMP4]] +// +vuint32m2x2_t test_vlseg2e32_v_u32m2x2_tumu(vbool16_t mask, vuint32m2x2_t maskedoff_tuple, const uint32_t *base, size_t vl) { + return __riscv_vlseg2e32_v_tuple_u32m2x2_tumu(mask, maskedoff_tuple, base, vl); +} + +// CHECK-RV64-LABEL: define dso_local { , } @test_vlseg2e32_v_u32m4x2_tumu +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF_TUPLE_COERCE0:%.*]], [[MASKEDOFF_TUPLE_COERCE1:%.*]], ptr noundef [[BASE:%.*]], 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.vlseg2.mask.nxv8i32.i64( [[TMP2]], [[TMP3]], ptr [[BASE]], [[MASK]], i64 [[VL]], i64 0) +// CHECK-RV64-NEXT: ret { , } [[TMP4]] +// +vuint32m4x2_t test_vlseg2e32_v_u32m4x2_tumu(vbool8_t mask, vuint32m4x2_t maskedoff_tuple, const uint32_t *base, size_t vl) { + return __riscv_vlseg2e32_v_tuple_u32m4x2_tumu(mask, maskedoff_tuple, base, vl); +} + +// CHECK-RV64-LABEL: define dso_local { , } @test_vlseg2e32_v_f32mf2x2_mu +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF_TUPLE_COERCE0:%.*]], [[MASKEDOFF_TUPLE_COERCE1:%.*]], ptr noundef [[BASE:%.*]], 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.vlseg2.mask.nxv1f32.i64( [[TMP2]], [[TMP3]], ptr [[BASE]], [[MASK]], i64 [[VL]], i64 1) +// CHECK-RV64-NEXT: ret { , } [[TMP4]] +// +vfloat32mf2x2_t test_vlseg2e32_v_f32mf2x2_mu(vbool64_t mask, vfloat32mf2x2_t maskedoff_tuple, const float *base, size_t vl) { + return __riscv_vlseg2e32_v_tuple_f32mf2x2_mu(mask, maskedoff_tuple, base, vl); +} + +// CHECK-RV64-LABEL: define dso_local { , } @test_vlseg2e32_v_f32m1x2_mu +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF_TUPLE_COERCE0:%.*]], [[MASKEDOFF_TUPLE_COERCE1:%.*]], ptr noundef [[BASE:%.*]], 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.vlseg2.mask.nxv2f32.i64( [[TMP2]], [[TMP3]], ptr [[BASE]], [[MASK]], i64 [[VL]], i64 1) +// CHECK-RV64-NEXT: ret { , } [[TMP4]] +// +vfloat32m1x2_t test_vlseg2e32_v_f32m1x2_mu(vbool32_t mask, vfloat32m1x2_t maskedoff_tuple, const float *base, size_t vl) { + return __riscv_vlseg2e32_v_tuple_f32m1x2_mu(mask, maskedoff_tuple, base, vl); +} + +// CHECK-RV64-LABEL: define dso_local { , } @test_vlseg2e32_v_f32m2x2_mu +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF_TUPLE_COERCE0:%.*]], [[MASKEDOFF_TUPLE_COERCE1:%.*]], ptr noundef [[BASE:%.*]], 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.vlseg2.mask.nxv4f32.i64( [[TMP2]], [[TMP3]], ptr [[BASE]], [[MASK]], i64 [[VL]], i64 1) +// CHECK-RV64-NEXT: ret { , } [[TMP4]] +// +vfloat32m2x2_t test_vlseg2e32_v_f32m2x2_mu(vbool16_t mask, vfloat32m2x2_t maskedoff_tuple, const float *base, size_t vl) { + return __riscv_vlseg2e32_v_tuple_f32m2x2_mu(mask, maskedoff_tuple, base, vl); +} + +// CHECK-RV64-LABEL: define dso_local { , } @test_vlseg2e32_v_f32m4x2_mu +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF_TUPLE_COERCE0:%.*]], [[MASKEDOFF_TUPLE_COERCE1:%.*]], ptr noundef [[BASE:%.*]], 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.vlseg2.mask.nxv8f32.i64( [[TMP2]], [[TMP3]], ptr [[BASE]], [[MASK]], i64 [[VL]], i64 1) +// CHECK-RV64-NEXT: ret { , } [[TMP4]] +// +vfloat32m4x2_t test_vlseg2e32_v_f32m4x2_mu(vbool8_t mask, vfloat32m4x2_t maskedoff_tuple, const float *base, size_t vl) { + return __riscv_vlseg2e32_v_tuple_f32m4x2_mu(mask, maskedoff_tuple, base, vl); +} + +// CHECK-RV64-LABEL: define dso_local { , } @test_vlseg2e32_v_i32mf2x2_mu +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF_TUPLE_COERCE0:%.*]], [[MASKEDOFF_TUPLE_COERCE1:%.*]], ptr noundef [[BASE:%.*]], 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.vlseg2.mask.nxv1i32.i64( [[TMP2]], [[TMP3]], ptr [[BASE]], [[MASK]], i64 [[VL]], i64 1) +// CHECK-RV64-NEXT: ret { , } [[TMP4]] +// +vint32mf2x2_t test_vlseg2e32_v_i32mf2x2_mu(vbool64_t mask, vint32mf2x2_t maskedoff_tuple, const int32_t *base, size_t vl) { + return __riscv_vlseg2e32_v_tuple_i32mf2x2_mu(mask, maskedoff_tuple, base, vl); +} + +// CHECK-RV64-LABEL: define dso_local { , } @test_vlseg2e32_v_i32m1x2_mu +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF_TUPLE_COERCE0:%.*]], [[MASKEDOFF_TUPLE_COERCE1:%.*]], ptr noundef [[BASE:%.*]], 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.vlseg2.mask.nxv2i32.i64( [[TMP2]], [[TMP3]], ptr [[BASE]], [[MASK]], i64 [[VL]], i64 1) +// CHECK-RV64-NEXT: ret { , } [[TMP4]] +// +vint32m1x2_t test_vlseg2e32_v_i32m1x2_mu(vbool32_t mask, vint32m1x2_t maskedoff_tuple, const int32_t *base, size_t vl) { + return __riscv_vlseg2e32_v_tuple_i32m1x2_mu(mask, maskedoff_tuple, base, vl); +} + +// CHECK-RV64-LABEL: define dso_local { , } @test_vlseg2e32_v_i32m2x2_mu +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF_TUPLE_COERCE0:%.*]], [[MASKEDOFF_TUPLE_COERCE1:%.*]], ptr noundef [[BASE:%.*]], 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.vlseg2.mask.nxv4i32.i64( [[TMP2]], [[TMP3]], ptr [[BASE]], [[MASK]], i64 [[VL]], i64 1) +// CHECK-RV64-NEXT: ret { , } [[TMP4]] +// +vint32m2x2_t test_vlseg2e32_v_i32m2x2_mu(vbool16_t mask, vint32m2x2_t maskedoff_tuple, const int32_t *base, size_t vl) { + return __riscv_vlseg2e32_v_tuple_i32m2x2_mu(mask, maskedoff_tuple, base, vl); +} + +// CHECK-RV64-LABEL: define dso_local { , } @test_vlseg2e32_v_i32m4x2_mu +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF_TUPLE_COERCE0:%.*]], [[MASKEDOFF_TUPLE_COERCE1:%.*]], ptr noundef [[BASE:%.*]], 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.vlseg2.mask.nxv8i32.i64( [[TMP2]], [[TMP3]], ptr [[BASE]], [[MASK]], i64 [[VL]], i64 1) +// CHECK-RV64-NEXT: ret { , } [[TMP4]] +// +vint32m4x2_t test_vlseg2e32_v_i32m4x2_mu(vbool8_t mask, vint32m4x2_t maskedoff_tuple, const int32_t *base, size_t vl) { + return __riscv_vlseg2e32_v_tuple_i32m4x2_mu(mask, maskedoff_tuple, base, vl); +} + +// CHECK-RV64-LABEL: define dso_local { , } @test_vlseg2e32_v_u32mf2x2_mu +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF_TUPLE_COERCE0:%.*]], [[MASKEDOFF_TUPLE_COERCE1:%.*]], ptr noundef [[BASE:%.*]], 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.vlseg2.mask.nxv1i32.i64( [[TMP2]], [[TMP3]], ptr [[BASE]], [[MASK]], i64 [[VL]], i64 1) +// CHECK-RV64-NEXT: ret { , } [[TMP4]] +// +vuint32mf2x2_t test_vlseg2e32_v_u32mf2x2_mu(vbool64_t mask, vuint32mf2x2_t maskedoff_tuple, const uint32_t *base, size_t vl) { + return __riscv_vlseg2e32_v_tuple_u32mf2x2_mu(mask, maskedoff_tuple, base, vl); +} + +// CHECK-RV64-LABEL: define dso_local { , } @test_vlseg2e32_v_u32m1x2_mu +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF_TUPLE_COERCE0:%.*]], [[MASKEDOFF_TUPLE_COERCE1:%.*]], ptr noundef [[BASE:%.*]], 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.vlseg2.mask.nxv2i32.i64( [[TMP2]], [[TMP3]], ptr [[BASE]], [[MASK]], i64 [[VL]], i64 1) +// CHECK-RV64-NEXT: ret { , } [[TMP4]] +// +vuint32m1x2_t test_vlseg2e32_v_u32m1x2_mu(vbool32_t mask, vuint32m1x2_t maskedoff_tuple, const uint32_t *base, size_t vl) { + return __riscv_vlseg2e32_v_tuple_u32m1x2_mu(mask, maskedoff_tuple, base, vl); +} + +// CHECK-RV64-LABEL: define dso_local { , } @test_vlseg2e32_v_u32m2x2_mu +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF_TUPLE_COERCE0:%.*]], [[MASKEDOFF_TUPLE_COERCE1:%.*]], ptr noundef [[BASE:%.*]], 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.vlseg2.mask.nxv4i32.i64( [[TMP2]], [[TMP3]], ptr [[BASE]], [[MASK]], i64 [[VL]], i64 1) +// CHECK-RV64-NEXT: ret { , } [[TMP4]] +// +vuint32m2x2_t test_vlseg2e32_v_u32m2x2_mu(vbool16_t mask, vuint32m2x2_t maskedoff_tuple, const uint32_t *base, size_t vl) { + return __riscv_vlseg2e32_v_tuple_u32m2x2_mu(mask, maskedoff_tuple, base, vl); +} + +// CHECK-RV64-LABEL: define dso_local { , } @test_vlseg2e32_v_u32m4x2_mu +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF_TUPLE_COERCE0:%.*]], [[MASKEDOFF_TUPLE_COERCE1:%.*]], ptr noundef [[BASE:%.*]], 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.vlseg2.mask.nxv8i32.i64( [[TMP2]], [[TMP3]], ptr [[BASE]], [[MASK]], i64 [[VL]], i64 1) +// CHECK-RV64-NEXT: ret { , } [[TMP4]] +// +vuint32m4x2_t test_vlseg2e32_v_u32m4x2_mu(vbool8_t mask, vuint32m4x2_t maskedoff_tuple, const uint32_t *base, size_t vl) { + return __riscv_vlseg2e32_v_tuple_u32m4x2_mu(mask, maskedoff_tuple, base, vl); +} + diff --git a/clang/test/CodeGen/RISCV/rvv-intrinsics-autogenerated/policy/overloaded/vlseg2e32_tuple.c b/clang/test/CodeGen/RISCV/rvv-intrinsics-autogenerated/policy/overloaded/vlseg2e32_tuple.c new file mode 100644 --- /dev/null +++ b/clang/test/CodeGen/RISCV/rvv-intrinsics-autogenerated/policy/overloaded/vlseg2e32_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_vlseg2e32_v_f32mf2x2_tu +// CHECK-RV64-SAME: ( [[MASKEDOFF_TUPLE_COERCE0:%.*]], [[MASKEDOFF_TUPLE_COERCE1:%.*]], ptr noundef [[BASE:%.*]], 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.vlseg2.nxv1f32.i64( [[TMP2]], [[TMP3]], ptr [[BASE]], i64 [[VL]]) +// CHECK-RV64-NEXT: ret { , } [[TMP4]] +// +vfloat32mf2x2_t test_vlseg2e32_v_f32mf2x2_tu(vfloat32mf2x2_t maskedoff_tuple, const float *base, size_t vl) { + return __riscv_vlseg2e32_tuple_tu(maskedoff_tuple, base, vl); +} + +// CHECK-RV64-LABEL: define dso_local { , } @test_vlseg2e32_v_f32m1x2_tu +// CHECK-RV64-SAME: ( [[MASKEDOFF_TUPLE_COERCE0:%.*]], [[MASKEDOFF_TUPLE_COERCE1:%.*]], ptr noundef [[BASE:%.*]], 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.vlseg2.nxv2f32.i64( [[TMP2]], [[TMP3]], ptr [[BASE]], i64 [[VL]]) +// CHECK-RV64-NEXT: ret { , } [[TMP4]] +// +vfloat32m1x2_t test_vlseg2e32_v_f32m1x2_tu(vfloat32m1x2_t maskedoff_tuple, const float *base, size_t vl) { + return __riscv_vlseg2e32_tuple_tu(maskedoff_tuple, base, vl); +} + +// CHECK-RV64-LABEL: define dso_local { , } @test_vlseg2e32_v_f32m2x2_tu +// CHECK-RV64-SAME: ( [[MASKEDOFF_TUPLE_COERCE0:%.*]], [[MASKEDOFF_TUPLE_COERCE1:%.*]], ptr noundef [[BASE:%.*]], 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.vlseg2.nxv4f32.i64( [[TMP2]], [[TMP3]], ptr [[BASE]], i64 [[VL]]) +// CHECK-RV64-NEXT: ret { , } [[TMP4]] +// +vfloat32m2x2_t test_vlseg2e32_v_f32m2x2_tu(vfloat32m2x2_t maskedoff_tuple, const float *base, size_t vl) { + return __riscv_vlseg2e32_tuple_tu(maskedoff_tuple, base, vl); +} + +// CHECK-RV64-LABEL: define dso_local { , } @test_vlseg2e32_v_f32m4x2_tu +// CHECK-RV64-SAME: ( [[MASKEDOFF_TUPLE_COERCE0:%.*]], [[MASKEDOFF_TUPLE_COERCE1:%.*]], ptr noundef [[BASE:%.*]], 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.vlseg2.nxv8f32.i64( [[TMP2]], [[TMP3]], ptr [[BASE]], i64 [[VL]]) +// CHECK-RV64-NEXT: ret { , } [[TMP4]] +// +vfloat32m4x2_t test_vlseg2e32_v_f32m4x2_tu(vfloat32m4x2_t maskedoff_tuple, const float *base, size_t vl) { + return __riscv_vlseg2e32_tuple_tu(maskedoff_tuple, base, vl); +} + +// CHECK-RV64-LABEL: define dso_local { , } @test_vlseg2e32_v_i32mf2x2_tu +// CHECK-RV64-SAME: ( [[MASKEDOFF_TUPLE_COERCE0:%.*]], [[MASKEDOFF_TUPLE_COERCE1:%.*]], ptr noundef [[BASE:%.*]], 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.vlseg2.nxv1i32.i64( [[TMP2]], [[TMP3]], ptr [[BASE]], i64 [[VL]]) +// CHECK-RV64-NEXT: ret { , } [[TMP4]] +// +vint32mf2x2_t test_vlseg2e32_v_i32mf2x2_tu(vint32mf2x2_t maskedoff_tuple, const int32_t *base, size_t vl) { + return __riscv_vlseg2e32_tuple_tu(maskedoff_tuple, base, vl); +} + +// CHECK-RV64-LABEL: define dso_local { , } @test_vlseg2e32_v_i32m1x2_tu +// CHECK-RV64-SAME: ( [[MASKEDOFF_TUPLE_COERCE0:%.*]], [[MASKEDOFF_TUPLE_COERCE1:%.*]], ptr noundef [[BASE:%.*]], 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.vlseg2.nxv2i32.i64( [[TMP2]], [[TMP3]], ptr [[BASE]], i64 [[VL]]) +// CHECK-RV64-NEXT: ret { , } [[TMP4]] +// +vint32m1x2_t test_vlseg2e32_v_i32m1x2_tu(vint32m1x2_t maskedoff_tuple, const int32_t *base, size_t vl) { + return __riscv_vlseg2e32_tuple_tu(maskedoff_tuple, base, vl); +} + +// CHECK-RV64-LABEL: define dso_local { , } @test_vlseg2e32_v_i32m2x2_tu +// CHECK-RV64-SAME: ( [[MASKEDOFF_TUPLE_COERCE0:%.*]], [[MASKEDOFF_TUPLE_COERCE1:%.*]], ptr noundef [[BASE:%.*]], 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.vlseg2.nxv4i32.i64( [[TMP2]], [[TMP3]], ptr [[BASE]], i64 [[VL]]) +// CHECK-RV64-NEXT: ret { , } [[TMP4]] +// +vint32m2x2_t test_vlseg2e32_v_i32m2x2_tu(vint32m2x2_t maskedoff_tuple, const int32_t *base, size_t vl) { + return __riscv_vlseg2e32_tuple_tu(maskedoff_tuple, base, vl); +} + +// CHECK-RV64-LABEL: define dso_local { , } @test_vlseg2e32_v_i32m4x2_tu +// CHECK-RV64-SAME: ( [[MASKEDOFF_TUPLE_COERCE0:%.*]], [[MASKEDOFF_TUPLE_COERCE1:%.*]], ptr noundef [[BASE:%.*]], 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.vlseg2.nxv8i32.i64( [[TMP2]], [[TMP3]], ptr [[BASE]], i64 [[VL]]) +// CHECK-RV64-NEXT: ret { , } [[TMP4]] +// +vint32m4x2_t test_vlseg2e32_v_i32m4x2_tu(vint32m4x2_t maskedoff_tuple, const int32_t *base, size_t vl) { + return __riscv_vlseg2e32_tuple_tu(maskedoff_tuple, base, vl); +} + +// CHECK-RV64-LABEL: define dso_local { , } @test_vlseg2e32_v_u32mf2x2_tu +// CHECK-RV64-SAME: ( [[MASKEDOFF_TUPLE_COERCE0:%.*]], [[MASKEDOFF_TUPLE_COERCE1:%.*]], ptr noundef [[BASE:%.*]], 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.vlseg2.nxv1i32.i64( [[TMP2]], [[TMP3]], ptr [[BASE]], i64 [[VL]]) +// CHECK-RV64-NEXT: ret { , } [[TMP4]] +// +vuint32mf2x2_t test_vlseg2e32_v_u32mf2x2_tu(vuint32mf2x2_t maskedoff_tuple, const uint32_t *base, size_t vl) { + return __riscv_vlseg2e32_tuple_tu(maskedoff_tuple, base, vl); +} + +// CHECK-RV64-LABEL: define dso_local { , } @test_vlseg2e32_v_u32m1x2_tu +// CHECK-RV64-SAME: ( [[MASKEDOFF_TUPLE_COERCE0:%.*]], [[MASKEDOFF_TUPLE_COERCE1:%.*]], ptr noundef [[BASE:%.*]], 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.vlseg2.nxv2i32.i64( [[TMP2]], [[TMP3]], ptr [[BASE]], i64 [[VL]]) +// CHECK-RV64-NEXT: ret { , } [[TMP4]] +// +vuint32m1x2_t test_vlseg2e32_v_u32m1x2_tu(vuint32m1x2_t maskedoff_tuple, const uint32_t *base, size_t vl) { + return __riscv_vlseg2e32_tuple_tu(maskedoff_tuple, base, vl); +} + +// CHECK-RV64-LABEL: define dso_local { , } @test_vlseg2e32_v_u32m2x2_tu +// CHECK-RV64-SAME: ( [[MASKEDOFF_TUPLE_COERCE0:%.*]], [[MASKEDOFF_TUPLE_COERCE1:%.*]], ptr noundef [[BASE:%.*]], 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.vlseg2.nxv4i32.i64( [[TMP2]], [[TMP3]], ptr [[BASE]], i64 [[VL]]) +// CHECK-RV64-NEXT: ret { , } [[TMP4]] +// +vuint32m2x2_t test_vlseg2e32_v_u32m2x2_tu(vuint32m2x2_t maskedoff_tuple, const uint32_t *base, size_t vl) { + return __riscv_vlseg2e32_tuple_tu(maskedoff_tuple, base, vl); +} + +// CHECK-RV64-LABEL: define dso_local { , } @test_vlseg2e32_v_u32m4x2_tu +// CHECK-RV64-SAME: ( [[MASKEDOFF_TUPLE_COERCE0:%.*]], [[MASKEDOFF_TUPLE_COERCE1:%.*]], ptr noundef [[BASE:%.*]], 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.vlseg2.nxv8i32.i64( [[TMP2]], [[TMP3]], ptr [[BASE]], i64 [[VL]]) +// CHECK-RV64-NEXT: ret { , } [[TMP4]] +// +vuint32m4x2_t test_vlseg2e32_v_u32m4x2_tu(vuint32m4x2_t maskedoff_tuple, const uint32_t *base, size_t vl) { + return __riscv_vlseg2e32_tuple_tu(maskedoff_tuple, base, vl); +} + +// CHECK-RV64-LABEL: define dso_local { , } @test_vlseg2e32_v_f32mf2x2_tum +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF_TUPLE_COERCE0:%.*]], [[MASKEDOFF_TUPLE_COERCE1:%.*]], ptr noundef [[BASE:%.*]], 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.vlseg2.mask.nxv1f32.i64( [[TMP2]], [[TMP3]], ptr [[BASE]], [[MASK]], i64 [[VL]], i64 2) +// CHECK-RV64-NEXT: ret { , } [[TMP4]] +// +vfloat32mf2x2_t test_vlseg2e32_v_f32mf2x2_tum(vbool64_t mask, vfloat32mf2x2_t maskedoff_tuple, const float *base, size_t vl) { + return __riscv_vlseg2e32_tuple_tum(mask, maskedoff_tuple, base, vl); +} + +// CHECK-RV64-LABEL: define dso_local { , } @test_vlseg2e32_v_f32m1x2_tum +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF_TUPLE_COERCE0:%.*]], [[MASKEDOFF_TUPLE_COERCE1:%.*]], ptr noundef [[BASE:%.*]], 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.vlseg2.mask.nxv2f32.i64( [[TMP2]], [[TMP3]], ptr [[BASE]], [[MASK]], i64 [[VL]], i64 2) +// CHECK-RV64-NEXT: ret { , } [[TMP4]] +// +vfloat32m1x2_t test_vlseg2e32_v_f32m1x2_tum(vbool32_t mask, vfloat32m1x2_t maskedoff_tuple, const float *base, size_t vl) { + return __riscv_vlseg2e32_tuple_tum(mask, maskedoff_tuple, base, vl); +} + +// CHECK-RV64-LABEL: define dso_local { , } @test_vlseg2e32_v_f32m2x2_tum +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF_TUPLE_COERCE0:%.*]], [[MASKEDOFF_TUPLE_COERCE1:%.*]], ptr noundef [[BASE:%.*]], 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.vlseg2.mask.nxv4f32.i64( [[TMP2]], [[TMP3]], ptr [[BASE]], [[MASK]], i64 [[VL]], i64 2) +// CHECK-RV64-NEXT: ret { , } [[TMP4]] +// +vfloat32m2x2_t test_vlseg2e32_v_f32m2x2_tum(vbool16_t mask, vfloat32m2x2_t maskedoff_tuple, const float *base, size_t vl) { + return __riscv_vlseg2e32_tuple_tum(mask, maskedoff_tuple, base, vl); +} + +// CHECK-RV64-LABEL: define dso_local { , } @test_vlseg2e32_v_f32m4x2_tum +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF_TUPLE_COERCE0:%.*]], [[MASKEDOFF_TUPLE_COERCE1:%.*]], ptr noundef [[BASE:%.*]], 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.vlseg2.mask.nxv8f32.i64( [[TMP2]], [[TMP3]], ptr [[BASE]], [[MASK]], i64 [[VL]], i64 2) +// CHECK-RV64-NEXT: ret { , } [[TMP4]] +// +vfloat32m4x2_t test_vlseg2e32_v_f32m4x2_tum(vbool8_t mask, vfloat32m4x2_t maskedoff_tuple, const float *base, size_t vl) { + return __riscv_vlseg2e32_tuple_tum(mask, maskedoff_tuple, base, vl); +} + +// CHECK-RV64-LABEL: define dso_local { , } @test_vlseg2e32_v_i32mf2x2_tum +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF_TUPLE_COERCE0:%.*]], [[MASKEDOFF_TUPLE_COERCE1:%.*]], ptr noundef [[BASE:%.*]], 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.vlseg2.mask.nxv1i32.i64( [[TMP2]], [[TMP3]], ptr [[BASE]], [[MASK]], i64 [[VL]], i64 2) +// CHECK-RV64-NEXT: ret { , } [[TMP4]] +// +vint32mf2x2_t test_vlseg2e32_v_i32mf2x2_tum(vbool64_t mask, vint32mf2x2_t maskedoff_tuple, const int32_t *base, size_t vl) { + return __riscv_vlseg2e32_tuple_tum(mask, maskedoff_tuple, base, vl); +} + +// CHECK-RV64-LABEL: define dso_local { , } @test_vlseg2e32_v_i32m1x2_tum +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF_TUPLE_COERCE0:%.*]], [[MASKEDOFF_TUPLE_COERCE1:%.*]], ptr noundef [[BASE:%.*]], 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.vlseg2.mask.nxv2i32.i64( [[TMP2]], [[TMP3]], ptr [[BASE]], [[MASK]], i64 [[VL]], i64 2) +// CHECK-RV64-NEXT: ret { , } [[TMP4]] +// +vint32m1x2_t test_vlseg2e32_v_i32m1x2_tum(vbool32_t mask, vint32m1x2_t maskedoff_tuple, const int32_t *base, size_t vl) { + return __riscv_vlseg2e32_tuple_tum(mask, maskedoff_tuple, base, vl); +} + +// CHECK-RV64-LABEL: define dso_local { , } @test_vlseg2e32_v_i32m2x2_tum +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF_TUPLE_COERCE0:%.*]], [[MASKEDOFF_TUPLE_COERCE1:%.*]], ptr noundef [[BASE:%.*]], 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.vlseg2.mask.nxv4i32.i64( [[TMP2]], [[TMP3]], ptr [[BASE]], [[MASK]], i64 [[VL]], i64 2) +// CHECK-RV64-NEXT: ret { , } [[TMP4]] +// +vint32m2x2_t test_vlseg2e32_v_i32m2x2_tum(vbool16_t mask, vint32m2x2_t maskedoff_tuple, const int32_t *base, size_t vl) { + return __riscv_vlseg2e32_tuple_tum(mask, maskedoff_tuple, base, vl); +} + +// CHECK-RV64-LABEL: define dso_local { , } @test_vlseg2e32_v_i32m4x2_tum +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF_TUPLE_COERCE0:%.*]], [[MASKEDOFF_TUPLE_COERCE1:%.*]], ptr noundef [[BASE:%.*]], 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.vlseg2.mask.nxv8i32.i64( [[TMP2]], [[TMP3]], ptr [[BASE]], [[MASK]], i64 [[VL]], i64 2) +// CHECK-RV64-NEXT: ret { , } [[TMP4]] +// +vint32m4x2_t test_vlseg2e32_v_i32m4x2_tum(vbool8_t mask, vint32m4x2_t maskedoff_tuple, const int32_t *base, size_t vl) { + return __riscv_vlseg2e32_tuple_tum(mask, maskedoff_tuple, base, vl); +} + +// CHECK-RV64-LABEL: define dso_local { , } @test_vlseg2e32_v_u32mf2x2_tum +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF_TUPLE_COERCE0:%.*]], [[MASKEDOFF_TUPLE_COERCE1:%.*]], ptr noundef [[BASE:%.*]], 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.vlseg2.mask.nxv1i32.i64( [[TMP2]], [[TMP3]], ptr [[BASE]], [[MASK]], i64 [[VL]], i64 2) +// CHECK-RV64-NEXT: ret { , } [[TMP4]] +// +vuint32mf2x2_t test_vlseg2e32_v_u32mf2x2_tum(vbool64_t mask, vuint32mf2x2_t maskedoff_tuple, const uint32_t *base, size_t vl) { + return __riscv_vlseg2e32_tuple_tum(mask, maskedoff_tuple, base, vl); +} + +// CHECK-RV64-LABEL: define dso_local { , } @test_vlseg2e32_v_u32m1x2_tum +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF_TUPLE_COERCE0:%.*]], [[MASKEDOFF_TUPLE_COERCE1:%.*]], ptr noundef [[BASE:%.*]], 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.vlseg2.mask.nxv2i32.i64( [[TMP2]], [[TMP3]], ptr [[BASE]], [[MASK]], i64 [[VL]], i64 2) +// CHECK-RV64-NEXT: ret { , } [[TMP4]] +// +vuint32m1x2_t test_vlseg2e32_v_u32m1x2_tum(vbool32_t mask, vuint32m1x2_t maskedoff_tuple, const uint32_t *base, size_t vl) { + return __riscv_vlseg2e32_tuple_tum(mask, maskedoff_tuple, base, vl); +} + +// CHECK-RV64-LABEL: define dso_local { , } @test_vlseg2e32_v_u32m2x2_tum +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF_TUPLE_COERCE0:%.*]], [[MASKEDOFF_TUPLE_COERCE1:%.*]], ptr noundef [[BASE:%.*]], 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.vlseg2.mask.nxv4i32.i64( [[TMP2]], [[TMP3]], ptr [[BASE]], [[MASK]], i64 [[VL]], i64 2) +// CHECK-RV64-NEXT: ret { , } [[TMP4]] +// +vuint32m2x2_t test_vlseg2e32_v_u32m2x2_tum(vbool16_t mask, vuint32m2x2_t maskedoff_tuple, const uint32_t *base, size_t vl) { + return __riscv_vlseg2e32_tuple_tum(mask, maskedoff_tuple, base, vl); +} + +// CHECK-RV64-LABEL: define dso_local { , } @test_vlseg2e32_v_u32m4x2_tum +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF_TUPLE_COERCE0:%.*]], [[MASKEDOFF_TUPLE_COERCE1:%.*]], ptr noundef [[BASE:%.*]], 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.vlseg2.mask.nxv8i32.i64( [[TMP2]], [[TMP3]], ptr [[BASE]], [[MASK]], i64 [[VL]], i64 2) +// CHECK-RV64-NEXT: ret { , } [[TMP4]] +// +vuint32m4x2_t test_vlseg2e32_v_u32m4x2_tum(vbool8_t mask, vuint32m4x2_t maskedoff_tuple, const uint32_t *base, size_t vl) { + return __riscv_vlseg2e32_tuple_tum(mask, maskedoff_tuple, base, vl); +} + +// CHECK-RV64-LABEL: define dso_local { , } @test_vlseg2e32_v_f32mf2x2_tumu +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF_TUPLE_COERCE0:%.*]], [[MASKEDOFF_TUPLE_COERCE1:%.*]], ptr noundef [[BASE:%.*]], 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.vlseg2.mask.nxv1f32.i64( [[TMP2]], [[TMP3]], ptr [[BASE]], [[MASK]], i64 [[VL]], i64 0) +// CHECK-RV64-NEXT: ret { , } [[TMP4]] +// +vfloat32mf2x2_t test_vlseg2e32_v_f32mf2x2_tumu(vbool64_t mask, vfloat32mf2x2_t maskedoff_tuple, const float *base, size_t vl) { + return __riscv_vlseg2e32_tuple_tumu(mask, maskedoff_tuple, base, vl); +} + +// CHECK-RV64-LABEL: define dso_local { , } @test_vlseg2e32_v_f32m1x2_tumu +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF_TUPLE_COERCE0:%.*]], [[MASKEDOFF_TUPLE_COERCE1:%.*]], ptr noundef [[BASE:%.*]], 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.vlseg2.mask.nxv2f32.i64( [[TMP2]], [[TMP3]], ptr [[BASE]], [[MASK]], i64 [[VL]], i64 0) +// CHECK-RV64-NEXT: ret { , } [[TMP4]] +// +vfloat32m1x2_t test_vlseg2e32_v_f32m1x2_tumu(vbool32_t mask, vfloat32m1x2_t maskedoff_tuple, const float *base, size_t vl) { + return __riscv_vlseg2e32_tuple_tumu(mask, maskedoff_tuple, base, vl); +} + +// CHECK-RV64-LABEL: define dso_local { , } @test_vlseg2e32_v_f32m2x2_tumu +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF_TUPLE_COERCE0:%.*]], [[MASKEDOFF_TUPLE_COERCE1:%.*]], ptr noundef [[BASE:%.*]], 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.vlseg2.mask.nxv4f32.i64( [[TMP2]], [[TMP3]], ptr [[BASE]], [[MASK]], i64 [[VL]], i64 0) +// CHECK-RV64-NEXT: ret { , } [[TMP4]] +// +vfloat32m2x2_t test_vlseg2e32_v_f32m2x2_tumu(vbool16_t mask, vfloat32m2x2_t maskedoff_tuple, const float *base, size_t vl) { + return __riscv_vlseg2e32_tuple_tumu(mask, maskedoff_tuple, base, vl); +} + +// CHECK-RV64-LABEL: define dso_local { , } @test_vlseg2e32_v_f32m4x2_tumu +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF_TUPLE_COERCE0:%.*]], [[MASKEDOFF_TUPLE_COERCE1:%.*]], ptr noundef [[BASE:%.*]], 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.vlseg2.mask.nxv8f32.i64( [[TMP2]], [[TMP3]], ptr [[BASE]], [[MASK]], i64 [[VL]], i64 0) +// CHECK-RV64-NEXT: ret { , } [[TMP4]] +// +vfloat32m4x2_t test_vlseg2e32_v_f32m4x2_tumu(vbool8_t mask, vfloat32m4x2_t maskedoff_tuple, const float *base, size_t vl) { + return __riscv_vlseg2e32_tuple_tumu(mask, maskedoff_tuple, base, vl); +} + +// CHECK-RV64-LABEL: define dso_local { , } @test_vlseg2e32_v_i32mf2x2_tumu +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF_TUPLE_COERCE0:%.*]], [[MASKEDOFF_TUPLE_COERCE1:%.*]], ptr noundef [[BASE:%.*]], 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.vlseg2.mask.nxv1i32.i64( [[TMP2]], [[TMP3]], ptr [[BASE]], [[MASK]], i64 [[VL]], i64 0) +// CHECK-RV64-NEXT: ret { , } [[TMP4]] +// +vint32mf2x2_t test_vlseg2e32_v_i32mf2x2_tumu(vbool64_t mask, vint32mf2x2_t maskedoff_tuple, const int32_t *base, size_t vl) { + return __riscv_vlseg2e32_tuple_tumu(mask, maskedoff_tuple, base, vl); +} + +// CHECK-RV64-LABEL: define dso_local { , } @test_vlseg2e32_v_i32m1x2_tumu +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF_TUPLE_COERCE0:%.*]], [[MASKEDOFF_TUPLE_COERCE1:%.*]], ptr noundef [[BASE:%.*]], 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.vlseg2.mask.nxv2i32.i64( [[TMP2]], [[TMP3]], ptr [[BASE]], [[MASK]], i64 [[VL]], i64 0) +// CHECK-RV64-NEXT: ret { , } [[TMP4]] +// +vint32m1x2_t test_vlseg2e32_v_i32m1x2_tumu(vbool32_t mask, vint32m1x2_t maskedoff_tuple, const int32_t *base, size_t vl) { + return __riscv_vlseg2e32_tuple_tumu(mask, maskedoff_tuple, base, vl); +} + +// CHECK-RV64-LABEL: define dso_local { , } @test_vlseg2e32_v_i32m2x2_tumu +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF_TUPLE_COERCE0:%.*]], [[MASKEDOFF_TUPLE_COERCE1:%.*]], ptr noundef [[BASE:%.*]], 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.vlseg2.mask.nxv4i32.i64( [[TMP2]], [[TMP3]], ptr [[BASE]], [[MASK]], i64 [[VL]], i64 0) +// CHECK-RV64-NEXT: ret { , } [[TMP4]] +// +vint32m2x2_t test_vlseg2e32_v_i32m2x2_tumu(vbool16_t mask, vint32m2x2_t maskedoff_tuple, const int32_t *base, size_t vl) { + return __riscv_vlseg2e32_tuple_tumu(mask, maskedoff_tuple, base, vl); +} + +// CHECK-RV64-LABEL: define dso_local { , } @test_vlseg2e32_v_i32m4x2_tumu +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF_TUPLE_COERCE0:%.*]], [[MASKEDOFF_TUPLE_COERCE1:%.*]], ptr noundef [[BASE:%.*]], 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.vlseg2.mask.nxv8i32.i64( [[TMP2]], [[TMP3]], ptr [[BASE]], [[MASK]], i64 [[VL]], i64 0) +// CHECK-RV64-NEXT: ret { , } [[TMP4]] +// +vint32m4x2_t test_vlseg2e32_v_i32m4x2_tumu(vbool8_t mask, vint32m4x2_t maskedoff_tuple, const int32_t *base, size_t vl) { + return __riscv_vlseg2e32_tuple_tumu(mask, maskedoff_tuple, base, vl); +} + +// CHECK-RV64-LABEL: define dso_local { , } @test_vlseg2e32_v_u32mf2x2_tumu +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF_TUPLE_COERCE0:%.*]], [[MASKEDOFF_TUPLE_COERCE1:%.*]], ptr noundef [[BASE:%.*]], 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.vlseg2.mask.nxv1i32.i64( [[TMP2]], [[TMP3]], ptr [[BASE]], [[MASK]], i64 [[VL]], i64 0) +// CHECK-RV64-NEXT: ret { , } [[TMP4]] +// +vuint32mf2x2_t test_vlseg2e32_v_u32mf2x2_tumu(vbool64_t mask, vuint32mf2x2_t maskedoff_tuple, const uint32_t *base, size_t vl) { + return __riscv_vlseg2e32_tuple_tumu(mask, maskedoff_tuple, base, vl); +} + +// CHECK-RV64-LABEL: define dso_local { , } @test_vlseg2e32_v_u32m1x2_tumu +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF_TUPLE_COERCE0:%.*]], [[MASKEDOFF_TUPLE_COERCE1:%.*]], ptr noundef [[BASE:%.*]], 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.vlseg2.mask.nxv2i32.i64( [[TMP2]], [[TMP3]], ptr [[BASE]], [[MASK]], i64 [[VL]], i64 0) +// CHECK-RV64-NEXT: ret { , } [[TMP4]] +// +vuint32m1x2_t test_vlseg2e32_v_u32m1x2_tumu(vbool32_t mask, vuint32m1x2_t maskedoff_tuple, const uint32_t *base, size_t vl) { + return __riscv_vlseg2e32_tuple_tumu(mask, maskedoff_tuple, base, vl); +} + +// CHECK-RV64-LABEL: define dso_local { , } @test_vlseg2e32_v_u32m2x2_tumu +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF_TUPLE_COERCE0:%.*]], [[MASKEDOFF_TUPLE_COERCE1:%.*]], ptr noundef [[BASE:%.*]], 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.vlseg2.mask.nxv4i32.i64( [[TMP2]], [[TMP3]], ptr [[BASE]], [[MASK]], i64 [[VL]], i64 0) +// CHECK-RV64-NEXT: ret { , } [[TMP4]] +// +vuint32m2x2_t test_vlseg2e32_v_u32m2x2_tumu(vbool16_t mask, vuint32m2x2_t maskedoff_tuple, const uint32_t *base, size_t vl) { + return __riscv_vlseg2e32_tuple_tumu(mask, maskedoff_tuple, base, vl); +} + +// CHECK-RV64-LABEL: define dso_local { , } @test_vlseg2e32_v_u32m4x2_tumu +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF_TUPLE_COERCE0:%.*]], [[MASKEDOFF_TUPLE_COERCE1:%.*]], ptr noundef [[BASE:%.*]], 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.vlseg2.mask.nxv8i32.i64( [[TMP2]], [[TMP3]], ptr [[BASE]], [[MASK]], i64 [[VL]], i64 0) +// CHECK-RV64-NEXT: ret { , } [[TMP4]] +// +vuint32m4x2_t test_vlseg2e32_v_u32m4x2_tumu(vbool8_t mask, vuint32m4x2_t maskedoff_tuple, const uint32_t *base, size_t vl) { + return __riscv_vlseg2e32_tuple_tumu(mask, maskedoff_tuple, base, vl); +} + +// CHECK-RV64-LABEL: define dso_local { , } @test_vlseg2e32_v_f32mf2x2_mu +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF_TUPLE_COERCE0:%.*]], [[MASKEDOFF_TUPLE_COERCE1:%.*]], ptr noundef [[BASE:%.*]], 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.vlseg2.mask.nxv1f32.i64( [[TMP2]], [[TMP3]], ptr [[BASE]], [[MASK]], i64 [[VL]], i64 1) +// CHECK-RV64-NEXT: ret { , } [[TMP4]] +// +vfloat32mf2x2_t test_vlseg2e32_v_f32mf2x2_mu(vbool64_t mask, vfloat32mf2x2_t maskedoff_tuple, const float *base, size_t vl) { + return __riscv_vlseg2e32_tuple_mu(mask, maskedoff_tuple, base, vl); +} + +// CHECK-RV64-LABEL: define dso_local { , } @test_vlseg2e32_v_f32m1x2_mu +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF_TUPLE_COERCE0:%.*]], [[MASKEDOFF_TUPLE_COERCE1:%.*]], ptr noundef [[BASE:%.*]], 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.vlseg2.mask.nxv2f32.i64( [[TMP2]], [[TMP3]], ptr [[BASE]], [[MASK]], i64 [[VL]], i64 1) +// CHECK-RV64-NEXT: ret { , } [[TMP4]] +// +vfloat32m1x2_t test_vlseg2e32_v_f32m1x2_mu(vbool32_t mask, vfloat32m1x2_t maskedoff_tuple, const float *base, size_t vl) { + return __riscv_vlseg2e32_tuple_mu(mask, maskedoff_tuple, base, vl); +} + +// CHECK-RV64-LABEL: define dso_local { , } @test_vlseg2e32_v_f32m2x2_mu +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF_TUPLE_COERCE0:%.*]], [[MASKEDOFF_TUPLE_COERCE1:%.*]], ptr noundef [[BASE:%.*]], 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.vlseg2.mask.nxv4f32.i64( [[TMP2]], [[TMP3]], ptr [[BASE]], [[MASK]], i64 [[VL]], i64 1) +// CHECK-RV64-NEXT: ret { , } [[TMP4]] +// +vfloat32m2x2_t test_vlseg2e32_v_f32m2x2_mu(vbool16_t mask, vfloat32m2x2_t maskedoff_tuple, const float *base, size_t vl) { + return __riscv_vlseg2e32_tuple_mu(mask, maskedoff_tuple, base, vl); +} + +// CHECK-RV64-LABEL: define dso_local { , } @test_vlseg2e32_v_f32m4x2_mu +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF_TUPLE_COERCE0:%.*]], [[MASKEDOFF_TUPLE_COERCE1:%.*]], ptr noundef [[BASE:%.*]], 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.vlseg2.mask.nxv8f32.i64( [[TMP2]], [[TMP3]], ptr [[BASE]], [[MASK]], i64 [[VL]], i64 1) +// CHECK-RV64-NEXT: ret { , } [[TMP4]] +// +vfloat32m4x2_t test_vlseg2e32_v_f32m4x2_mu(vbool8_t mask, vfloat32m4x2_t maskedoff_tuple, const float *base, size_t vl) { + return __riscv_vlseg2e32_tuple_mu(mask, maskedoff_tuple, base, vl); +} + +// CHECK-RV64-LABEL: define dso_local { , } @test_vlseg2e32_v_i32mf2x2_mu +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF_TUPLE_COERCE0:%.*]], [[MASKEDOFF_TUPLE_COERCE1:%.*]], ptr noundef [[BASE:%.*]], 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.vlseg2.mask.nxv1i32.i64( [[TMP2]], [[TMP3]], ptr [[BASE]], [[MASK]], i64 [[VL]], i64 1) +// CHECK-RV64-NEXT: ret { , } [[TMP4]] +// +vint32mf2x2_t test_vlseg2e32_v_i32mf2x2_mu(vbool64_t mask, vint32mf2x2_t maskedoff_tuple, const int32_t *base, size_t vl) { + return __riscv_vlseg2e32_tuple_mu(mask, maskedoff_tuple, base, vl); +} + +// CHECK-RV64-LABEL: define dso_local { , } @test_vlseg2e32_v_i32m1x2_mu +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF_TUPLE_COERCE0:%.*]], [[MASKEDOFF_TUPLE_COERCE1:%.*]], ptr noundef [[BASE:%.*]], 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.vlseg2.mask.nxv2i32.i64( [[TMP2]], [[TMP3]], ptr [[BASE]], [[MASK]], i64 [[VL]], i64 1) +// CHECK-RV64-NEXT: ret { , } [[TMP4]] +// +vint32m1x2_t test_vlseg2e32_v_i32m1x2_mu(vbool32_t mask, vint32m1x2_t maskedoff_tuple, const int32_t *base, size_t vl) { + return __riscv_vlseg2e32_tuple_mu(mask, maskedoff_tuple, base, vl); +} + +// CHECK-RV64-LABEL: define dso_local { , } @test_vlseg2e32_v_i32m2x2_mu +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF_TUPLE_COERCE0:%.*]], [[MASKEDOFF_TUPLE_COERCE1:%.*]], ptr noundef [[BASE:%.*]], 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.vlseg2.mask.nxv4i32.i64( [[TMP2]], [[TMP3]], ptr [[BASE]], [[MASK]], i64 [[VL]], i64 1) +// CHECK-RV64-NEXT: ret { , } [[TMP4]] +// +vint32m2x2_t test_vlseg2e32_v_i32m2x2_mu(vbool16_t mask, vint32m2x2_t maskedoff_tuple, const int32_t *base, size_t vl) { + return __riscv_vlseg2e32_tuple_mu(mask, maskedoff_tuple, base, vl); +} + +// CHECK-RV64-LABEL: define dso_local { , } @test_vlseg2e32_v_i32m4x2_mu +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF_TUPLE_COERCE0:%.*]], [[MASKEDOFF_TUPLE_COERCE1:%.*]], ptr noundef [[BASE:%.*]], 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.vlseg2.mask.nxv8i32.i64( [[TMP2]], [[TMP3]], ptr [[BASE]], [[MASK]], i64 [[VL]], i64 1) +// CHECK-RV64-NEXT: ret { , } [[TMP4]] +// +vint32m4x2_t test_vlseg2e32_v_i32m4x2_mu(vbool8_t mask, vint32m4x2_t maskedoff_tuple, const int32_t *base, size_t vl) { + return __riscv_vlseg2e32_tuple_mu(mask, maskedoff_tuple, base, vl); +} + +// CHECK-RV64-LABEL: define dso_local { , } @test_vlseg2e32_v_u32mf2x2_mu +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF_TUPLE_COERCE0:%.*]], [[MASKEDOFF_TUPLE_COERCE1:%.*]], ptr noundef [[BASE:%.*]], 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.vlseg2.mask.nxv1i32.i64( [[TMP2]], [[TMP3]], ptr [[BASE]], [[MASK]], i64 [[VL]], i64 1) +// CHECK-RV64-NEXT: ret { , } [[TMP4]] +// +vuint32mf2x2_t test_vlseg2e32_v_u32mf2x2_mu(vbool64_t mask, vuint32mf2x2_t maskedoff_tuple, const uint32_t *base, size_t vl) { + return __riscv_vlseg2e32_tuple_mu(mask, maskedoff_tuple, base, vl); +} + +// CHECK-RV64-LABEL: define dso_local { , } @test_vlseg2e32_v_u32m1x2_mu +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF_TUPLE_COERCE0:%.*]], [[MASKEDOFF_TUPLE_COERCE1:%.*]], ptr noundef [[BASE:%.*]], 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.vlseg2.mask.nxv2i32.i64( [[TMP2]], [[TMP3]], ptr [[BASE]], [[MASK]], i64 [[VL]], i64 1) +// CHECK-RV64-NEXT: ret { , } [[TMP4]] +// +vuint32m1x2_t test_vlseg2e32_v_u32m1x2_mu(vbool32_t mask, vuint32m1x2_t maskedoff_tuple, const uint32_t *base, size_t vl) { + return __riscv_vlseg2e32_tuple_mu(mask, maskedoff_tuple, base, vl); +} + +// CHECK-RV64-LABEL: define dso_local { , } @test_vlseg2e32_v_u32m2x2_mu +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF_TUPLE_COERCE0:%.*]], [[MASKEDOFF_TUPLE_COERCE1:%.*]], ptr noundef [[BASE:%.*]], 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.vlseg2.mask.nxv4i32.i64( [[TMP2]], [[TMP3]], ptr [[BASE]], [[MASK]], i64 [[VL]], i64 1) +// CHECK-RV64-NEXT: ret { , } [[TMP4]] +// +vuint32m2x2_t test_vlseg2e32_v_u32m2x2_mu(vbool16_t mask, vuint32m2x2_t maskedoff_tuple, const uint32_t *base, size_t vl) { + return __riscv_vlseg2e32_tuple_mu(mask, maskedoff_tuple, base, vl); +} + +// CHECK-RV64-LABEL: define dso_local { , } @test_vlseg2e32_v_u32m4x2_mu +// CHECK-RV64-SAME: ( [[MASK:%.*]], [[MASKEDOFF_TUPLE_COERCE0:%.*]], [[MASKEDOFF_TUPLE_COERCE1:%.*]], ptr noundef [[BASE:%.*]], 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.vlseg2.mask.nxv8i32.i64( [[TMP2]], [[TMP3]], ptr [[BASE]], [[MASK]], i64 [[VL]], i64 1) +// CHECK-RV64-NEXT: ret { , } [[TMP4]] +// +vuint32m4x2_t test_vlseg2e32_v_u32m4x2_mu(vbool8_t mask, vuint32m4x2_t maskedoff_tuple, const uint32_t *base, size_t vl) { + return __riscv_vlseg2e32_tuple_mu(mask, maskedoff_tuple, base, vl); +} +