summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorBill Wendling <isanbard@gmail.com>2009-03-01 03:55:12 +0000
committerBill Wendling <isanbard@gmail.com>2009-03-01 03:55:12 +0000
commit38eae046cf9f126c8ebda0bde52141784d1e1a74 (patch)
tree8d35a8e01ba81cd933624f84f43c5856545d5a5f /llvm/lib
parentd3fd8fb3acb5bc456d5a878ac53a22a6e794ce20 (diff)
downloadbcm5719-llvm-38eae046cf9f126c8ebda0bde52141784d1e1a74.tar.gz
bcm5719-llvm-38eae046cf9f126c8ebda0bde52141784d1e1a74.zip
Temporarily revert r65755. It was causing failures in the self-hosting
testsuite: Running /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/test/CodeGen/X86/dg.exp ... FAIL: /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/test/CodeGen/X86/nancvt.ll Failed with exit(1) at line 2 while running: grep 2147027116 nancvt.ll.tmp | count 3 count: expected 3 lines and got 0. child process exited abnormally FAIL: /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/test/CodeGen/X86/vec_ins_extract.ll Failed with exit(1) at line 1 while running: llvm-as < /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/test/CodeGen/X86/vec_ins_extract.ll | opt -scalarrepl -instcombine | llc -march=x86 -mcpu=yonah | not /usr/bin/grep sub.*esp subl $28, %esp subl $28, %esp child process exited abnormally And more. llvm-svn: 65758
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/Transforms/Scalar/ScalarReplAggregates.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/llvm/lib/Transforms/Scalar/ScalarReplAggregates.cpp b/llvm/lib/Transforms/Scalar/ScalarReplAggregates.cpp
index 92ac76be74f..3a4201bf81e 100644
--- a/llvm/lib/Transforms/Scalar/ScalarReplAggregates.cpp
+++ b/llvm/lib/Transforms/Scalar/ScalarReplAggregates.cpp
@@ -253,13 +253,11 @@ bool SROA::performScalarRepl(Function &F) {
// (allocations OF arrays are ok though), and an allocation of a scalar
// value cannot be decomposed at all.
uint64_t AllocaSize = TD->getTypePaddedSize(AI->getAllocatedType());
-
- // Do not promote any struct whose size is too big.
- if (AllocaSize < SRThreshold)
- continue;
-
+
if ((isa<StructType>(AI->getAllocatedType()) ||
isa<ArrayType>(AI->getAllocatedType())) &&
+ // Do not promote any struct whose size is too big.
+ AllocaSize < SRThreshold &&
// Do not promote any struct into more than "32" separate vars.
getNumSAElements(AI->getAllocatedType()) < SRThreshold/4) {
// Check that all of the users of the allocation are capable of being
OpenPOWER on IntegriCloud