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

Michael Maitland via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 4 12:09:45 PDT 2023


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

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

>From 526a983f63af8ef4a5a86d5e0d7198d4790c5728 Mon Sep 17 00:00:00 2001
From: Michael Maitland <michaeltmaitland at gmail.com>
Date: Wed, 4 Oct 2023 11:59:34 -0700
Subject: [PATCH] [RISCV][ISel] Fix comment to match direction of predicate in
 code. NFC.

---
 llvm/lib/Target/RISCV/RISCVISelLowering.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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());



More information about the llvm-commits mailing list