[llvm] [RISCV][ISel] Fix comment to match direction of predicate in code. NFC. (PR #68248)

via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 4 12:11:00 PDT 2023


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-backend-risc-v

<details>
<summary>Changes</summary>

The comment says something different than what is happening in the code. This patch aligns the comment with the code.

---
Full diff: https://github.com/llvm/llvm-project/pull/68248.diff


1 Files Affected:

- (modified) llvm/lib/Target/RISCV/RISCVISelLowering.cpp (+1-1) 


``````````diff
diff --git a/llvm/lib/Target/RISCV/RISCVISelLowering.cpp b/llvm/lib/Target/RISCV/RISCVISelLowering.cpp
index d72ec1591f9b0b3..4376969c0e5ae73 100644
--- a/llvm/lib/Target/RISCV/RISCVISelLowering.cpp
+++ b/llvm/lib/Target/RISCV/RISCVISelLowering.cpp
@@ -2128,7 +2128,7 @@ static void translateSetCCForBranch(const SDLoc &DL, SDValue &LHS, SDValue &RHS,
       }
       break;
     case ISD::SETLT:
-      // Convert X < 1 to 0 <= X.
+      // Convert X < 1 to 0 >= X.
       if (C == 1) {
         RHS = LHS;
         LHS = DAG.getConstant(0, DL, RHS.getValueType());

``````````

</details>


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


More information about the llvm-commits mailing list