[llvm] [M68k] Use ISD::getSetCCInverse instead of ISD::GlobalISel::getSetCCInverse. NFCI (PR #216871)
Craig Topper via llvm-commits
llvm-commits at lists.llvm.org
Mon Aug 17 16:04:14 PDT 2026
https://github.com/topperc created https://github.com/llvm/llvm-project/pull/216871
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.
>From 93fcfb123bc0e1221e507bfe8492987669ec8235 Mon Sep 17 00:00:00 2001
From: Craig Topper <craig.topper at sifive.com>
Date: Mon, 17 Aug 2026 16:00:47 -0700
Subject: [PATCH] [M68k] Use ISD::getSetCCInverse instead of
ISD::GlobalISel::getSetCCInverse. NFCI
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.
---
llvm/lib/Target/M68k/M68kISelLowering.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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)) {
More information about the llvm-commits
mailing list