[llvm] 344368f - [TargetLowering] Stop passing an ISD::CondCode to isOperationLegalOrCustom.
Craig Topper via llvm-commits
llvm-commits at lists.llvm.org
Sat Apr 29 15:24:59 PDT 2023
Author: Craig Topper
Date: 2023-04-29T15:23:09-07:00
New Revision: 344368fb981941562539068ec92e78078cf8e63b
URL: https://github.com/llvm/llvm-project/commit/344368fb981941562539068ec92e78078cf8e63b
DIFF: https://github.com/llvm/llvm-project/commit/344368fb981941562539068ec92e78078cf8e63b.diff
LOG: [TargetLowering] Stop passing an ISD::CondCode to isOperationLegalOrCustom.
ISD::CondCode is a separate num space from opcodes. isOperationLegalOrCustom
should take an opcode.
Reviewed By: barannikov88
Differential Revision: https://reviews.llvm.org/D149528
Added:
Modified:
llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
Removed:
################################################################################
diff --git a/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp b/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
index dc2475bee140..81bba2f8d5d5 100644
--- a/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
@@ -6703,9 +6703,9 @@ TargetLowering::prepareSREMEqFold(EVT SETCCVT, SDValue REMNode,
// NOTE: we avoid letting illegal types through even if we're before legalize
// ops – legalization has a hard time producing good code for the code that
// follows.
- if (!isOperationLegalOrCustom(ISD::SETEQ, VT) ||
+ if (!isOperationLegalOrCustom(ISD::SETCC, SETCCVT) ||
!isOperationLegalOrCustom(ISD::AND, VT) ||
- !isOperationLegalOrCustom(Cond, VT) ||
+ !isCondCodeLegalOrCustom(Cond, VT.getSimpleVT()) ||
!isOperationLegalOrCustom(ISD::VSELECT, SETCCVT))
return SDValue();
More information about the llvm-commits
mailing list