diff options
author | Craig Topper <craig.topper@intel.com> | 2018-03-08 21:53:36 +0000 |
---|---|---|
committer | Craig Topper <craig.topper@intel.com> | 2018-03-08 21:53:36 +0000 |
commit | 3d2af5038abf4bdae6e7b6a49aa8568cf1af83d2 (patch) | |
tree | d283421a102d87c071f47eb229379331255e9db3 /llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp | |
parent | 0faaa99e4dcbbc991a474379c768c716d2cc2dd0 (diff) | |
download | bcm5719-llvm-3d2af5038abf4bdae6e7b6a49aa8568cf1af83d2.tar.gz bcm5719-llvm-3d2af5038abf4bdae6e7b6a49aa8568cf1af83d2.zip |
[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
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp')
-rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp b/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp index fe24d4dbff6..02b1818d5ce 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); |