Skip to content

Commit 4c4232f

Browse files
committed
fixup! improve comments
1 parent 167e6a9 commit 4c4232f

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

llvm/lib/Target/RISCV/RISCVISelLowering.cpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16252,11 +16252,10 @@ static SDValue performVP_REVERSECombine(SDNode *N, SelectionDAG &DAG,
1625216252
return SDValue();
1625316253

1625416254
SDValue LoadMask = VPLoad->getMask();
16255-
// If Mask is not all 1's, try to replace the mask if its opcode
16256-
// is EXPERIMENTAL_VP_REVERSE and its operand can be directly extracted.
16255+
// If Mask is all ones, then load is unmasked and can be reversed.
1625716256
if (!isOneOrOneSplat(LoadMask)) {
16258-
// Check if the mask of vp.reverse in vp.load are all 1's and
16259-
// the length of mask is same as evl.
16257+
// If the mask is not all ones, we can reverse the load if the mask was also
16258+
// reversed by an unmasked vp.reverse with the same EVL.
1626016259
if (LoadMask.getOpcode() != ISD::EXPERIMENTAL_VP_REVERSE ||
1626116260
!isOneOrOneSplat(LoadMask.getOperand(1)) ||
1626216261
LoadMask.getOperand(2) != VPLoad->getVectorLength())

0 commit comments

Comments
 (0)