Skip to content

Commit

Permalink
[TargetLowering] Stop passing an ISD::CondCode to isOperationLegalOrC…
Browse files Browse the repository at this point in the history
…ustom.

ISD::CondCode is a separate num space from opcodes. isOperationLegalOrCustom
should take an opcode.

Reviewed By: barannikov88

Differential Revision: https://reviews.llvm.org/D149528
  • Loading branch information
topperc committed Apr 29, 2023
1 parent ee9cbe3 commit 344368f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand Down

0 comments on commit 344368f

Please sign in to comment.