summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/SystemZ/SystemZHazardRecognizer.cpp
diff options
context:
space:
mode:
authorJonas Paulsson <paulsson@linux.vnet.ibm.com>2018-08-07 13:44:11 +0000
committerJonas Paulsson <paulsson@linux.vnet.ibm.com>2018-08-07 13:44:11 +0000
commit25cbfdd423571d97442b08c8c7596b877f111b2e (patch)
treefe46afeab9e9d54ef11fc1bdaa54cdd0c7f9152c /llvm/lib/Target/SystemZ/SystemZHazardRecognizer.cpp
parent39bbe179aa895bc63f1c26604e9cfcd92e60254c (diff)
downloadbcm5719-llvm-25cbfdd423571d97442b08c8c7596b877f111b2e.tar.gz
bcm5719-llvm-25cbfdd423571d97442b08c8c7596b877f111b2e.zip
[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
Diffstat (limited to 'llvm/lib/Target/SystemZ/SystemZHazardRecognizer.cpp')
-rw-r--r--llvm/lib/Target/SystemZ/SystemZHazardRecognizer.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/llvm/lib/Target/SystemZ/SystemZHazardRecognizer.cpp b/llvm/lib/Target/SystemZ/SystemZHazardRecognizer.cpp
index 2e3e56280f9..09ea018b2d6 100644
--- a/llvm/lib/Target/SystemZ/SystemZHazardRecognizer.cpp
+++ b/llvm/lib/Target/SystemZ/SystemZHazardRecognizer.cpp
@@ -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 &&
OpenPOWER on IntegriCloud