[llvm] [AArch64] Utilize `XAR` for certain vector rotates (PR #137629)

via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 28 06:19:00 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 -- llvm/lib/Target/AArch64/AArch64ISelDAGToDAG.cpp
``````````

</details>

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

``````````diff
diff --git a/llvm/lib/Target/AArch64/AArch64ISelDAGToDAG.cpp b/llvm/lib/Target/AArch64/AArch64ISelDAGToDAG.cpp
index b05596923..c3d100371 100644
--- a/llvm/lib/Target/AArch64/AArch64ISelDAGToDAG.cpp
+++ b/llvm/lib/Target/AArch64/AArch64ISelDAGToDAG.cpp
@@ -4564,7 +4564,8 @@ bool AArch64DAGToDAGISel::trySelectXAR(SDNode *N) {
       if (N0.getOperand(1) != N1.getOperand(1))
         return false;
       SDLoc DL(N1->getOperand(0));
-      SDValue Zero = CurDAG->getRegister(AArch64::XZR, N1->getOperand(0).getValueType());
+      SDValue Zero =
+          CurDAG->getRegister(AArch64::XZR, N1->getOperand(0).getValueType());
       R1 = N1->getOperand(0);
       R2 = Zero;
     }
@@ -4598,14 +4599,14 @@ bool AArch64DAGToDAGISel::trySelectXAR(SDNode *N) {
       N1->getOpcode() != AArch64ISD::VLSHR)
     return false;
 
-
   if (N0->getOperand(0) != N1->getOperand(0))
     return false;
 
   SDValue R1, R2;
   if (N1->getOperand(0)->getOpcode() != ISD::XOR) {
     SDLoc DL(N1->getOperand(0));
-    SDValue Zero = CurDAG->getRegister(AArch64::XZR, N1->getOperand(0).getValueType());
+    SDValue Zero =
+        CurDAG->getRegister(AArch64::XZR, N1->getOperand(0).getValueType());
     R1 = N1->getOperand(0);
     R2 = Zero;
   } else {

``````````

</details>


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


More information about the llvm-commits mailing list