@@ -11968,7 +11968,7 @@ SDValue RISCVTargetLowering::lowerVECTOR_DEINTERLEAVE(SDValue Op,
11968
11968
11969
11969
// Store with unit-stride store and load it back with segmented load.
11970
11970
MVT XLenVT = Subtarget.getXLenVT();
11971
- SDValue VL = getDefaultScalableVLOps(ConcatVT , DL, DAG, Subtarget).second ;
11971
+ auto [Mask, VL] = getDefaultScalableVLOps(VecVT , DL, DAG, Subtarget);
11972
11972
SDValue Passthru = DAG.getUNDEF(ConcatVT);
11973
11973
11974
11974
// Allocate a stack slot.
@@ -11989,16 +11989,20 @@ SDValue RISCVTargetLowering::lowerVECTOR_DEINTERLEAVE(SDValue Op,
11989
11989
MachineMemOperand::MOStore, LocationSize::beforeOrAfterPointer());
11990
11990
11991
11991
static const Intrinsic::ID VlsegIntrinsicsIds[] = {
11992
- Intrinsic::riscv_vlseg2, Intrinsic::riscv_vlseg3, Intrinsic::riscv_vlseg4,
11993
- Intrinsic::riscv_vlseg5, Intrinsic::riscv_vlseg6, Intrinsic::riscv_vlseg7,
11994
- Intrinsic::riscv_vlseg8};
11992
+ Intrinsic::riscv_vlseg2_mask, Intrinsic::riscv_vlseg3_mask,
11993
+ Intrinsic::riscv_vlseg4_mask, Intrinsic::riscv_vlseg5_mask,
11994
+ Intrinsic::riscv_vlseg6_mask, Intrinsic::riscv_vlseg7_mask,
11995
+ Intrinsic::riscv_vlseg8_mask};
11995
11996
11996
11997
SDValue LoadOps[] = {
11997
11998
Chain,
11998
11999
DAG.getTargetConstant(VlsegIntrinsicsIds[Factor - 2], DL, XLenVT),
11999
12000
Passthru,
12000
12001
StackPtr,
12002
+ Mask,
12001
12003
VL,
12004
+ DAG.getTargetConstant(
12005
+ RISCVVType::TAIL_AGNOSTIC | RISCVVType::MASK_AGNOSTIC, DL, XLenVT),
12002
12006
DAG.getTargetConstant(Log2_64(VecVT.getScalarSizeInBits()), DL, XLenVT)};
12003
12007
12004
12008
unsigned Sz =
@@ -12050,7 +12054,7 @@ SDValue RISCVTargetLowering::lowerVECTOR_INTERLEAVE(SDValue Op,
12050
12054
}
12051
12055
12052
12056
MVT XLenVT = Subtarget.getXLenVT();
12053
- SDValue VL = DAG.getRegister(RISCV::X0, XLenVT );
12057
+ auto [Mask, VL] = getDefaultScalableVLOps(VecVT, DL, DAG, Subtarget );
12054
12058
12055
12059
// If the VT is larger than LMUL=8, we need to split and reassemble.
12056
12060
if ((VecVT.getSizeInBits().getKnownMinValue() * Factor) >
@@ -12099,10 +12103,10 @@ SDValue RISCVTargetLowering::lowerVECTOR_INTERLEAVE(SDValue Op,
12099
12103
auto PtrInfo = MachinePointerInfo::getFixedStack(MF, FrameIndex);
12100
12104
12101
12105
static const Intrinsic::ID IntrIds[] = {
12102
- Intrinsic::riscv_vsseg2 , Intrinsic::riscv_vsseg3 ,
12103
- Intrinsic::riscv_vsseg4 , Intrinsic::riscv_vsseg5 ,
12104
- Intrinsic::riscv_vsseg6 , Intrinsic::riscv_vsseg7 ,
12105
- Intrinsic::riscv_vsseg8 ,
12106
+ Intrinsic::riscv_vsseg2_mask , Intrinsic::riscv_vsseg3_mask ,
12107
+ Intrinsic::riscv_vsseg4_mask , Intrinsic::riscv_vsseg5_mask ,
12108
+ Intrinsic::riscv_vsseg6_mask , Intrinsic::riscv_vsseg7_mask ,
12109
+ Intrinsic::riscv_vsseg8_mask ,
12106
12110
};
12107
12111
12108
12112
unsigned Sz =
@@ -12118,6 +12122,7 @@ SDValue RISCVTargetLowering::lowerVECTOR_INTERLEAVE(SDValue Op,
12118
12122
DAG.getTargetConstant(IntrIds[Factor - 2], DL, XLenVT),
12119
12123
StoredVal,
12120
12124
StackPtr,
12125
+ Mask,
12121
12126
VL,
12122
12127
DAG.getTargetConstant(Log2_64(VecVT.getScalarSizeInBits()),
12123
12128
DL, XLenVT)};
0 commit comments