Skip to content

Commit 7e08f23

Browse files
committed
Don't use MVT::i1
1 parent 57e2ea0 commit 7e08f23

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6200,11 +6200,12 @@ SDValue DAGCombiner::visitIMINMAX(SDNode *N) {
62006200
return SD;
62016201

62026202
// (umin (sub a, b) a) -> (usubo a, b); (select usubo.1, a, usubo.0)
6203-
if (N0.getOpcode() == ISD::SUB) {
6203+
{
62046204
SDValue A, B;
62056205
if (sd_match(N, m_UMin(m_Sub(m_Value(A), m_Value(B)), m_Deferred(A)))) {
62066206
if (TLI.isOperationLegalOrCustom(ISD::USUBO, VT)) {
6207-
SDVTList VTs = DAG.getVTList(VT, MVT::i1);
6207+
EVT SETCCT = getSetCCResultType(VT);
6208+
SDVTList VTs = DAG.getVTList(VT, SETCCT);
62086209
SDValue USO = DAG.getNode(ISD::USUBO, DL, VTs, A, B);
62096210
return DAG.getSelect(DL, VT, USO.getValue(1), A, USO.getValue(0));
62106211
}

0 commit comments

Comments
 (0)