Use > instead of >=. We want to promote aggregates of 128-bytes.
authorBill Wendling <isanbard@gmail.com>
Tue, 3 Mar 2009 19:18:49 +0000 (19:18 +0000)
committerBill Wendling <isanbard@gmail.com>
Tue, 3 Mar 2009 19:18:49 +0000 (19:18 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65960 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Transforms/Scalar/ScalarReplAggregates.cpp
lib/Transforms/Utils/SimplifyCFG.cpp
test/BugPoint/misopt-basictest.ll

index ee4b87227aedb8702271c3457c50780da32cbbff..93830b1f51ee57469230c6b57647d56a1a018a42 100644 (file)
@@ -255,7 +255,7 @@ bool SROA::performScalarRepl(Function &F) {
     uint64_t AllocaSize = TD->getTypePaddedSize(AI->getAllocatedType());
 
     // Do not promote any struct whose size is too big.
-    if (AllocaSize >= SRThreshold) continue;
+    if (AllocaSize > SRThreshold) continue;
         
     if ((isa<StructType>(AI->getAllocatedType()) ||
          isa<ArrayType>(AI->getAllocatedType())) &&
index 25579614ecfdf7f7cde8b2ea3fd4435e38c1b654..96cd299242da8464dbe84238345d557e908f1518 100644 (file)
@@ -33,6 +33,10 @@ using namespace llvm;
 
 STATISTIC(NumSpeculations, "Number of speculative executed instructions");
 
+#include "llvm/Support/CommandLine.h"
+static cl::opt<bool>
+DisableXForm("disable-xform", cl::Hidden, cl::init(false));
+
 /// SafeToMergeTerminators - Return true if it is safe to merge these two
 /// terminator instructions together.
 ///
@@ -1782,7 +1786,7 @@ bool llvm::SimplifyCFG(BasicBlock *BB) {
       }
 
       // If we found some, do the transformation!
-      if (!UncondBranchPreds.empty()) {
+      if (!UncondBranchPreds.empty() && !DisableXForm) {
         while (!UncondBranchPreds.empty()) {
           BasicBlock *Pred = UncondBranchPreds.back();
           DOUT << "FOLDING: " << *BB
index e59b4ed7d90807d8561fa5d9a6e6e6d04b19e018..6350f40db7af916605a8a35005e332e9bbc34132 100644 (file)
@@ -1,4 +1,4 @@
-; RUN: bugpoint %s -dce -bugpoint-deletecalls -simplifycfg -silence-passes
+; RUN: bugpoint %s -dce -bugpoint-deletecalls -simplifycfg -silence-passes -gcc-tool-args -m32
 
 @.LC0 = internal global [13 x i8] c"Hello World\0A\00"          ; <[13 x i8]*> [#uses=1]