Skip to content

Commit 1512332

Browse files
committed
Address review comment
1 parent 115aeb0 commit 1512332

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

llvm/lib/Target/RISCV/RISCVISelLowering.cpp

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5805,19 +5805,16 @@ bool RISCVTargetLowering::isShuffleMaskLegal(ArrayRef<int> M, EVT VT) const {
58055805
if (ShuffleVectorSDNode::isSplatMask(M.data(), VT))
58065806
return true;
58075807

5808+
const unsigned NumElts = M.size();
58085809
MVT SVT = VT.getSimpleVT();
58095810

58105811
// Not for i1 vectors.
58115812
if (SVT.getScalarType() == MVT::i1)
58125813
return false;
58135814

5814-
unsigned NumElts = M.size();
5815-
if (ShuffleVectorInst::isReverseMask(M, NumElts) &&
5816-
ShuffleVectorInst::isSingleSourceMask(M, NumElts))
5817-
return true;
5818-
58195815
int Dummy1, Dummy2;
5820-
return (isElementRotate(Dummy1, Dummy2, M) > 0) ||
5816+
return ShuffleVectorInst::isReverseMask(M, NumElts) ||
5817+
(isElementRotate(Dummy1, Dummy2, M) > 0) ||
58215818
isInterleaveShuffle(M, SVT, Dummy1, Dummy2, Subtarget);
58225819
}
58235820

0 commit comments

Comments
 (0)