summaryrefslogtreecommitdiff
path: root/lib/Transforms/Scalar/LoopUnroll.cpp
diff options
context:
space:
mode:
authorAndreas Bolka <a@bolka.at>2009-08-13 03:05:20 +0000
committerAndreas Bolka <a@bolka.at>2009-08-13 03:05:20 +0000
commit62728dc14d05e9a677664b784c4f5c6e188aa11a (patch)
tree4d44207af4e28fc5ce8aade58b46e1875042802b /lib/Transforms/Scalar/LoopUnroll.cpp
parentec40eb411a3ce6a90e3e086b8a7f291903798ed6 (diff)
downloadllvm-62728dc14d05e9a677664b784c4f5c6e188aa11a.tar.gz
llvm-62728dc14d05e9a677664b784c4f5c6e188aa11a.tar.bz2
llvm-62728dc14d05e9a677664b784c4f5c6e188aa11a.tar.xz
Simplify conditional.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78889 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/Scalar/LoopUnroll.cpp')
-rw-r--r--lib/Transforms/Scalar/LoopUnroll.cpp5
1 files changed, 1 insertions, 4 deletions
diff --git a/lib/Transforms/Scalar/LoopUnroll.cpp b/lib/Transforms/Scalar/LoopUnroll.cpp
index 3f70c33bd4..c5a213fa55 100644
--- a/lib/Transforms/Scalar/LoopUnroll.cpp
+++ b/lib/Transforms/Scalar/LoopUnroll.cpp
@@ -97,10 +97,7 @@ static unsigned ApproximateLoopSize(const Loop *L) {
// is higher than other instructions. Here 3 and 10 are magic
// numbers that help one isolated test case from PR2067 without
// negatively impacting measured benchmarks.
- if (isa<IntrinsicInst>(I))
- Size = Size + 3;
- else
- Size = Size + 10;
+ Size += isa<IntrinsicInst>(I) ? 3 : 10;
} else {
++Size;
}