From 3d2af5038abf4bdae6e7b6a49aa8568cf1af83d2 Mon Sep 17 00:00:00 2001 From: Craig Topper Date: Thu, 8 Mar 2018 21:53:36 +0000 Subject: [PATCH] [TargetLowering] Remove redundant if condition in SimplifySetcc. NFC We were checking the condition code a second time when we were already in a block with this same condition code check. llvm-svn: 327069 --- llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp b/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp index fe24d4d..02b1818 100644 --- a/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp @@ -2314,7 +2314,7 @@ SDValue TargetLowering::SimplifySetCC(EVT VT, SDValue N0, SDValue N1, return DAG.getSetCC(dl, VT, N0, N1, ISD::SETNE); // If we have setugt X, Max-1, turn it into seteq X, Max - if ((Cond == ISD::SETGT || Cond == ISD::SETUGT) && C1 == MaxVal-1) + if (C1 == MaxVal-1) return DAG.getSetCC(dl, VT, N0, DAG.getConstant(MaxVal, dl, N0.getValueType()), ISD::SETEQ); -- 2.7.4