[llvm] [RISCV] Make single source reverse legal in isShuffleMaskLegal (PR #125949)

Philip Reames via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 5 15:04:53 PST 2025


================
@@ -5811,6 +5811,11 @@ bool RISCVTargetLowering::isShuffleMaskLegal(ArrayRef<int> M, EVT VT) const {
   if (SVT.getScalarType() == MVT::i1)
     return false;
 
+  unsigned NumElts = M.size();
+  if (ShuffleVectorInst::isReverseMask(M, NumElts) &&
+      ShuffleVectorInst::isSingleSourceMask(M, NumElts))
----------------
preames wrote:

So it does.  I swear I checked that, but I guess not.  Will remove.

https://github.com/llvm/llvm-project/pull/125949


More information about the llvm-commits mailing list