aboutsummaryrefslogtreecommitdiff
path: root/lib/Transforms
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2009-03-06 00:56:43 +0000
committerEvan Cheng <evan.cheng@apple.com>2009-03-06 00:56:43 +0000
commit67fca63da267da491de9526b09a7de0a2e99ece2 (patch)
treeb5e955b105ad40c592c287f7231681fa7a1b9a53 /lib/Transforms
parent2511abf6e79d36f679bd5ed5af94208cde579e74 (diff)
SRThreshold is meant to be inclusive.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@66227 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms')
-rw-r--r--lib/Transforms/Scalar/ScalarReplAggregates.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Transforms/Scalar/ScalarReplAggregates.cpp b/lib/Transforms/Scalar/ScalarReplAggregates.cpp
index 441b448c01..710bdfb6f7 100644
--- a/lib/Transforms/Scalar/ScalarReplAggregates.cpp
+++ b/lib/Transforms/Scalar/ScalarReplAggregates.cpp
@@ -260,7 +260,7 @@ bool SROA::performScalarRepl(Function &F) {
if ((isa<StructType>(AI->getAllocatedType()) ||
isa<ArrayType>(AI->getAllocatedType())) &&
// Do not promote any struct into more than "32" separate vars.
- getNumSAElements(AI->getAllocatedType()) < SRThreshold/4) {
+ getNumSAElements(AI->getAllocatedType()) <= SRThreshold/4) {
// Check that all of the users of the allocation are capable of being
// transformed.
switch (isSafeAllocaToScalarRepl(AI)) {