[llvm] [RISCV] custom scmp(x, 0) and scmp(0, x) lowering for RVV (PR #151753)

via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 4 09:19:11 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/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 53080f6ce..28deb9c02 100644
--- a/llvm/lib/Target/RISCV/RISCVISelLowering.cpp
+++ b/llvm/lib/Target/RISCV/RISCVISelLowering.cpp
@@ -8233,7 +8233,7 @@ SDValue RISCVTargetLowering::LowerOperation(SDValue Op,
     unsigned SEW = VT.getScalarSizeInBits();
     EVT CCVT = getSetCCResultType(DAG.getDataLayout(), *DAG.getContext(), VT);
 
-    SDValue Shift = DAG.getConstant(SEW-1, DL, VT);
+    SDValue Shift = DAG.getConstant(SEW - 1, DL, VT);
     SDValue Zero = DAG.getConstant(0, DL, VT);
     SDValue One = DAG.getConstant(1, DL, VT);
     SDValue MinusOne = DAG.getAllOnesConstant(DL, VT);

``````````

</details>


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


More information about the llvm-commits mailing list