[llvm] [RISCV] Use ri.vzip2{a, b} for interleave2 if available (PR #136364)

via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 18 13:28:27 PDT 2025


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 HEAD~1 HEAD --extensions cpp,h -- llvm/lib/Target/RISCV/RISCVISelLowering.cpp llvm/lib/Target/RISCV/RISCVISelLowering.h
``````````

</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 6abcba4fa..8f96a8e37 100644
--- a/llvm/lib/Target/RISCV/RISCVISelLowering.cpp
+++ b/llvm/lib/Target/RISCV/RISCVISelLowering.cpp
@@ -11755,8 +11755,8 @@ SDValue RISCVTargetLowering::lowerVECTOR_INTERLEAVE(SDValue Op,
 
   // Use ri.vzip2{a,b} if available
   // TODO: Figure out the best lowering for the spread variants
-  if (Subtarget.hasVendorXRivosVizip() &&
-      !Op.getOperand(0).isUndef() && !Op.getOperand(1).isUndef()) {
+  if (Subtarget.hasVendorXRivosVizip() && !Op.getOperand(0).isUndef() &&
+      !Op.getOperand(1).isUndef()) {
     SDValue V1 = Op->getOperand(0);
     SDValue V2 = Op->getOperand(1);
     SDValue Lo = lowerVZIP(RISCVISD::RI_VZIP2A_VL, V1, V2, DL, DAG, Subtarget);

``````````

</details>


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


More information about the llvm-commits mailing list