[llvm] [RISCV] Add isel patterns for generating Xqcibi branch instructions (PR #139872)

Craig Topper via llvm-commits llvm-commits at lists.llvm.org
Wed May 14 13:53:55 PDT 2025


================
@@ -2398,6 +2400,13 @@ static void translateSetCCForBranch(const SDLoc &DL, SDValue &LHS, SDValue &RHS,
         CC = ISD::SETGE;
         return;
       }
+      if (Subtarget.hasVendorXqcibi() && isInt<16>(C + 1)) {
----------------
topperc wrote:

Need to check `C != INT64_MAX` before doing `C + 1` in case anyone wants to build clang with UBSAN.

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


More information about the llvm-commits mailing list