[llvm] [M68k] Use ISD::getSetCCInverse instead of ISD::GlobalISel::getSetCCInverse. NFCI (PR #216871)

via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 17 16:04:57 PDT 2026


llvmorg-github-actions[bot] wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-backend-m68k

Author: Craig Topper (topperc)

<details>
<summary>Changes</summary>

It's odd to use a GlobalISel named function in SelectionDAG code. This code path isn't exercised by lit, but I think this should be equivalent.

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


1 Files Affected:

- (modified) llvm/lib/Target/M68k/M68kISelLowering.cpp (+1-1) 


``````````diff
diff --git a/llvm/lib/Target/M68k/M68kISelLowering.cpp b/llvm/lib/Target/M68k/M68kISelLowering.cpp
index 18e974e6f7383..465c4dfb8fbc0 100644
--- a/llvm/lib/Target/M68k/M68kISelLowering.cpp
+++ b/llvm/lib/Target/M68k/M68kISelLowering.cpp
@@ -2207,7 +2207,7 @@ SDValue M68kTargetLowering::LowerSETCC(SDValue Op, SelectionDAG &DAG) const {
   }
   if (Op0.getValueType() == MVT::i1 && (CC == ISD::SETEQ || CC == ISD::SETNE)) {
     if (isOneConstant(Op1)) {
-      ISD::CondCode NewCC = ISD::GlobalISel::getSetCCInverse(CC, true);
+      ISD::CondCode NewCC = ISD::getSetCCInverse(CC, Op0.getValueType());
       return DAG.getSetCC(DL, VT, Op0, DAG.getConstant(0, DL, MVT::i1), NewCC);
     }
     if (!isNullConstant(Op1)) {

``````````

</details>


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


More information about the llvm-commits mailing list