[SystemZ] NFC: Remove redundant check in SystemZHazardRecognizer.

Remove the redundant check against zero when updating ProcResourceCounters in
nextGroup(), as pointed out in https://reviews.llvm.org/D50187.

Review: Ulrich Weigand.
llvm-svn: 339139
This commit is contained in:
Jonas Paulsson 2018-08-07 13:44:11 +00:00
parent 39bbe179aa
commit 25cbfdd423
1 changed files with 3 additions and 4 deletions

View File

@ -151,10 +151,9 @@ void SystemZHazardRecognizer::nextGroup() {
// Decrease counters for execution units by one.
for (unsigned i = 0; i < SchedModel->getNumProcResourceKinds(); ++i)
if (ProcResourceCounters[i] > 0)
ProcResourceCounters[i] =
((ProcResourceCounters[i] > NumGroups) ?
(ProcResourceCounters[i] - NumGroups) : 0);
ProcResourceCounters[i] = ((ProcResourceCounters[i] > NumGroups)
? (ProcResourceCounters[i] - NumGroups)
: 0);
// Clear CriticalResourceIdx if it is now below the threshold.
if (CriticalResourceIdx != UINT_MAX &&