[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
diff --git a/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp b/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp index dc2475b..81bba2f 100644 --- a/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
@@ -6703,9 +6703,9 @@ // 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();