[llvm] [RISCV] Allow undef elements in isDeinterleaveShuffle (PR #114585)

via llvm-commits llvm-commits at lists.llvm.org
Fri Nov 1 11:10:35 PDT 2024


github-actions[bot] wrote:

<!--LLVM CODE FORMAT COMMENT: {clang-format}-->


:warning: C/C++ code formatter, clang-format found issues in your code. :warning:

<details>
<summary>
You can test this locally with the following command:
</summary>

``````````bash
git-clang-format --diff faa385a9f4d164791e2400f3f53e9c021114f52b 946ac97e610b659638b57092b592bc15095021f4 --extensions cpp -- llvm/lib/Target/RISCV/RISCVISelLowering.cpp
``````````

</details>

<details>
<summary>
View the diff from clang-format here.
</summary>

``````````diff
diff --git a/llvm/lib/Target/RISCV/RISCVISelLowering.cpp b/llvm/lib/Target/RISCV/RISCVISelLowering.cpp
index 047f74f3e6..aab6d38406 100644
--- a/llvm/lib/Target/RISCV/RISCVISelLowering.cpp
+++ b/llvm/lib/Target/RISCV/RISCVISelLowering.cpp
@@ -4477,8 +4477,7 @@ static bool isDeinterleaveShuffle(MVT VT, MVT ContainerVT, SDValue V1,
 
   // The others must increase by 2 each time (or be undef).
   for (unsigned i = 1; i != Mask.size(); ++i)
-    if (Mask[i] != Mask[i - 1] + 2 &&
-        Mask[i] != -1)
+    if (Mask[i] != Mask[i - 1] + 2 && Mask[i] != -1)
       return false;
 
   return true;

``````````

</details>


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


More information about the llvm-commits mailing list