[llvm] [LoongArch] Refine 256-bit vector_shuffle legalization for LASX (PR #160254)

via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 24 19:02:25 PDT 2025


================
@@ -2354,7 +2357,7 @@ static SDValue lowerVECTOR_SHUFFLE_XVSHUF(const SDLoc &DL, ArrayRef<int> Mask,
 /// cases need to be converted to it for processing.
 ///
 /// This function may modify V1, V2 and Mask
-static void canonicalizeShuffleVectorByLane(
+static bool canonicalizeShuffleVectorByLane(
----------------
zhaoqi5 wrote:

Thanks for your review. Added this:

```
-/// This function may modify V1, V2 and Mask
+/// This function will return true for the last three cases above and will
+/// modify V1, V2 and Mask. Otherwise, return false for the first case and
+/// cross-lane shuffle cases.
```

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


More information about the llvm-commits mailing list