[llvm] [RISCV] Lower SEW<=32 vector_deinterleave(2) via vunzip2{a, b} (PR #136463)

Philip Reames via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 21 10:47:43 PDT 2025


================
@@ -4569,36 +4569,48 @@ static SDValue lowerScalarInsert(SDValue Scalar, SDValue VL, MVT VT,
                      VL);
 }
 
-// Can this shuffle be performed on exactly one (possibly larger) input?
-static SDValue getSingleShuffleSrc(MVT VT, SDValue V1, SDValue V2) {
-
-  if (V2.isUndef())
-    return V1;
-
+/// If concat_vector(V1,V2) could be folded away to some existing
+/// vector source, return it.  Note that the source may be larger
+/// than the requested concat_vector (i.e. a extract_subvector
+/// might be required.)
+static SDValue FoldConcatVector(SDValue V1, SDValue V2) {
+  EVT VT = V1.getValueType();
+  assert(VT == V1.getValueType() && "precondition");
----------------
preames wrote:

The assert should have been V2, not V1.  (i.e. the arguments have to have the same time.)  Will fix in next update.

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


More information about the llvm-commits mailing list