Make BasicAliasAnalysis a normal AliasAnalysis implementation which
authorDan Gohman <gohman@apple.com>
Mon, 18 Oct 2010 18:04:47 +0000 (18:04 +0000)
committerDan Gohman <gohman@apple.com>
Mon, 18 Oct 2010 18:04:47 +0000 (18:04 +0000)
does normal initialization and normal chaining. Change the default
AliasAnalysis implementation to NoAlias.

Update StandardCompileOpts.h and friends to explicitly request
BasicAliasAnalysis.

Update tests to explicitly request -basicaa.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@116720 91177308-0d34-0410-b5e6-96231b3b80d8

81 files changed:
include/llvm/Support/StandardPasses.h
lib/Analysis/BasicAliasAnalysis.cpp
lib/CodeGen/LLVMTargetMachine.cpp
test/Analysis/BasicAA/2003-02-26-AccessSizeTest.ll
test/Analysis/BasicAA/2003-04-22-GEPProblem.ll
test/Analysis/BasicAA/2003-05-21-GEP-Problem.ll
test/Analysis/BasicAA/2003-09-19-LocalArgument.ll
test/Analysis/BasicAA/2003-11-04-SimpleCases.ll
test/Analysis/BasicAA/2003-12-11-ConstExprGEP.ll
test/Analysis/BasicAA/2004-07-28-MustAliasbug.ll
test/Analysis/BasicAA/2004-12-08-BasicAACrash.ll
test/Analysis/BasicAA/2004-12-08-BasicAACrash2.ll
test/Analysis/BasicAA/2006-03-03-BadArraySubscript.ll
test/Analysis/BasicAA/2006-11-03-BasicAAVectorCrash.ll
test/Analysis/BasicAA/2007-11-05-SizeCrash.ll
test/Analysis/BasicAA/2007-12-08-OutOfBoundsCrash.ll
test/Analysis/BasicAA/2008-06-02-GEPTailCrash.ll
test/Analysis/BasicAA/2008-11-23-NoaliasRet.ll
test/Analysis/BasicAA/2009-10-13-AtomicModRef.ll
test/Analysis/BasicAA/2009-10-13-GEP-BaseNoAlias.ll
test/Analysis/BasicAA/args-rets-allocas-loads.ll
test/Analysis/BasicAA/byval.ll
test/Analysis/BasicAA/constant-over-index.ll
test/Analysis/BasicAA/empty.ll
test/Analysis/BasicAA/gep-alias.ll
test/Analysis/BasicAA/getmodrefinfo-cs-cs.ll
test/Analysis/BasicAA/phi-and-select.ll
test/Analysis/BasicAA/unreachable-block.ll
test/Analysis/GlobalsModRef/aliastest.ll
test/Analysis/GlobalsModRef/chaining-analysis.ll
test/Analysis/GlobalsModRef/indirect-global.ll
test/Analysis/GlobalsModRef/modreftest.ll
test/Analysis/LoopDependenceAnalysis/alias.ll
test/Analysis/LoopDependenceAnalysis/siv-strong.ll
test/Analysis/LoopDependenceAnalysis/siv-weak-crossing.ll
test/Analysis/LoopDependenceAnalysis/siv-weak-zero.ll
test/Analysis/LoopDependenceAnalysis/ziv.ll
test/Analysis/TypeBasedAliasAnalysis/aliastest.ll
test/Other/lint.ll
test/Transforms/ArgumentPromotion/basictest.ll
test/Transforms/DeadStoreElimination/2008-07-28-load-store.ll
test/Transforms/DeadStoreElimination/PartialStore.ll
test/Transforms/DeadStoreElimination/const-pointers.ll
test/Transforms/DeadStoreElimination/context-sensitive.ll
test/Transforms/DeadStoreElimination/free.ll
test/Transforms/DeadStoreElimination/lifetime.ll
test/Transforms/DeadStoreElimination/no-targetdata.ll
test/Transforms/DeadStoreElimination/simple.ll
test/Transforms/GVN/2007-07-25-InfiniteLoop.ll
test/Transforms/GVN/2007-07-26-InterlockingLoops.ll
test/Transforms/GVN/2007-07-31-NoDomInherit.ll
test/Transforms/GVN/2007-07-31-RedundantPhi.ll
test/Transforms/GVN/2008-07-02-Unreachable.ll
test/Transforms/GVN/2010-03-31-RedundantPHIs.ll
test/Transforms/GVN/calls-nonlocal.ll
test/Transforms/GVN/condprop.ll
test/Transforms/GVN/invariant-simple.ll
test/Transforms/GVN/lifetime-simple.ll
test/Transforms/GVN/load-constant-mem.ll
test/Transforms/GVN/load-pre-licm.ll
test/Transforms/GVN/lpre-call-wrap-2.ll
test/Transforms/GVN/mixed.ll
test/Transforms/GVN/nonescaping-malloc.ll
test/Transforms/GVN/null-aliases-nothing.ll
test/Transforms/GVN/pre-load.ll
test/Transforms/GVN/rle-must-alias.ll
test/Transforms/GVN/rle-nonlocal.ll
test/Transforms/GVN/rle-semidominated.ll
test/Transforms/GVN/rle.ll
test/Transforms/Inline/devirtualize-3.ll
test/Transforms/Inline/devirtualize.ll
test/Transforms/Inline/gvn-inline-iteration.ll
test/Transforms/LICM/2008-07-22-LoadGlobalConstant.ll
test/Transforms/LICM/scalar_promote.ll
test/Transforms/MemCpyOpt/2008-02-24-MultipleUseofSRet.ll
test/Transforms/MemCpyOpt/2008-03-13-ReturnSlotBitcast.ll
test/Transforms/MemCpyOpt/loadstore-sret.ll
test/Transforms/MemCpyOpt/memcpy.ll
test/Transforms/MemCpyOpt/memmove.ll
test/Transforms/MemCpyOpt/sret.ll
test/Transforms/Sink/basic.ll

index 1b40ede14b849744b899381bededd2af4f24b721..deee00e686a7a7e6a3ce991ca00a13e7c39d4c5d 100644 (file)
@@ -72,6 +72,7 @@ namespace llvm {
   static inline void createStandardFunctionPasses(PassManagerBase *PM,
                                                   unsigned OptimizationLevel) {
     if (OptimizationLevel > 0) {
+      PM->add(createBasicAliasAnalysisPass());
       PM->add(createCFGSimplificationPass());
       if (OptimizationLevel == 1)
         PM->add(createPromoteMemoryToRegisterPass());
@@ -91,6 +92,8 @@ namespace llvm {
                                                 bool SimplifyLibCalls,
                                                 bool HaveExceptions,
                                                 Pass *InliningPass) {
+    PM->add(createBasicAliasAnalysisPass());
+
     if (OptimizationLevel == 0) {
       if (InliningPass)
         PM->add(InliningPass);
@@ -177,6 +180,9 @@ namespace llvm {
                                              bool Internalize,
                                              bool RunInliner,
                                              bool VerifyEach) {
+    // Provide AliasAnalysis services for optimizations.
+    PM->add(createBasicAliasAnalysisPass());
+
     // Now that composite has been compiled, scan through the module, looking
     // for a main function.  If main is defined, mark all other functions
     // internal.
index 0b54e75be67d4ef47f6e026a1d35f1a14ef00b92..4d3717a6312c26237b13b51c7d2977815182806c 100644 (file)
@@ -190,7 +190,7 @@ namespace {
 char NoAA::ID = 0;
 INITIALIZE_AG_PASS(NoAA, AliasAnalysis, "no-aa",
                    "No Alias Analysis (always returns 'may' alias)",
-                   true, true, false)
+                   true, true, true)
 
 ImmutablePass *llvm::createNoAAPass() { return new NoAA(); }
 
@@ -492,6 +492,14 @@ namespace {
     static char ID; // Class identification, replacement for typeinfo
     BasicAliasAnalysis() : NoAA(ID) {}
 
+    virtual void initializePass() {
+      InitializeAliasAnalysis(this);
+    }
+
+    virtual void getAnalysisUsage(AnalysisUsage &AU) const {
+      AU.addRequired<AliasAnalysis>();
+    }
+
     virtual AliasResult alias(const Location &LocA,
                               const Location &LocB) {
       assert(Visited.empty() && "Visited must be cleared after use!");
@@ -561,7 +569,7 @@ namespace {
 char BasicAliasAnalysis::ID = 0;
 INITIALIZE_AG_PASS(BasicAliasAnalysis, AliasAnalysis, "basicaa",
                    "Basic Alias Analysis (default AA impl)",
-                   false, true, true)
+                   false, true, false)
 
 ImmutablePass *llvm::createBasicAliasAnalysisPass() {
   return new BasicAliasAnalysis();
@@ -578,7 +586,7 @@ bool BasicAliasAnalysis::pointsToConstantMemory(const Location &Loc) {
     // GV may even be a declaration, not a definition.
     return GV->isConstant();
 
-  return NoAA::pointsToConstantMemory(Loc);
+  return AliasAnalysis::pointsToConstantMemory(Loc);
 }
 
 /// getModRefBehavior - Return the behavior when calling the given call site.
@@ -611,7 +619,7 @@ BasicAliasAnalysis::getModRefBehavior(const Function *F) {
   if (unsigned id = F->getIntrinsicID())
     return getIntrinsicModRefBehavior(id);
 
-  return NoAA::getModRefBehavior(F);
+  return AliasAnalysis::getModRefBehavior(F);
 }
 
 /// getModRefInfo - Check to see if the specified callsite can clobber the
@@ -1065,24 +1073,30 @@ BasicAliasAnalysis::aliasCheck(const Value *V1, unsigned V1Size,
     std::swap(V1Size, V2Size);
     std::swap(O1, O2);
   }
-  if (const GEPOperator *GV1 = dyn_cast<GEPOperator>(V1))
-    return aliasGEP(GV1, V1Size, V2, V2Size, O1, O2);
+  if (const GEPOperator *GV1 = dyn_cast<GEPOperator>(V1)) {
+    AliasResult Result = aliasGEP(GV1, V1Size, V2, V2Size, O1, O2);
+    if (Result != MayAlias) return Result;
+  }
 
   if (isa<PHINode>(V2) && !isa<PHINode>(V1)) {
     std::swap(V1, V2);
     std::swap(V1Size, V2Size);
   }
-  if (const PHINode *PN = dyn_cast<PHINode>(V1))
-    return aliasPHI(PN, V1Size, V2, V2Size);
+  if (const PHINode *PN = dyn_cast<PHINode>(V1)) {
+    AliasResult Result = aliasPHI(PN, V1Size, V2, V2Size);
+    if (Result != MayAlias) return Result;
+  }
 
   if (isa<SelectInst>(V2) && !isa<SelectInst>(V1)) {
     std::swap(V1, V2);
     std::swap(V1Size, V2Size);
   }
-  if (const SelectInst *S1 = dyn_cast<SelectInst>(V1))
-    return aliasSelect(S1, V1Size, V2, V2Size);
+  if (const SelectInst *S1 = dyn_cast<SelectInst>(V1)) {
+    AliasResult Result = aliasSelect(S1, V1Size, V2, V2Size);
+    if (Result != MayAlias) return Result;
+  }
 
-  return NoAA::alias(Location(V1, V1Size), Location(V2, V2Size));
+  return AliasAnalysis::alias(Location(V1, V1Size), Location(V2, V2Size));
 }
 
 // Make sure that anything that uses AliasAnalysis pulls in this file.
index cf46738e2c9dc8ee3803471ecc0cccc9030e7fa8..a3b605238ab9cc83c296981eab434eb791ce2f51 100644 (file)
@@ -14,6 +14,7 @@
 #include "llvm/Target/TargetMachine.h"
 #include "llvm/PassManager.h"
 #include "llvm/Analysis/Verifier.h"
+#include "llvm/Analysis/Passes.h"
 #include "llvm/Assembly/PrintModulePass.h"
 #include "llvm/CodeGen/AsmPrinter.h"
 #include "llvm/CodeGen/MachineFunctionAnalysis.h"
@@ -254,6 +255,9 @@ bool LLVMTargetMachine::addCommonCodeGenPasses(PassManagerBase &PM,
                                                MCContext *&OutContext) {
   // Standard LLVM-Level Passes.
 
+  // Basic AliasAnalysis support.
+  PM.add(createBasicAliasAnalysisPass());
+
   // Before running any passes, run the verifier to determine if the input
   // coming from the front-end and/or optimizer is valid.
   if (!DisableVerify)
index 6b50a168cd0a4d8e5b477ae3913df37a6c3bf892..1c2d910c10912ce7bca266a37a646b2520b283b4 100644 (file)
@@ -2,7 +2,7 @@
 ; is performed.  It is not legal to delete the second load instruction because
 ; the value computed by the first load instruction is changed by the store.
 
-; RUN: opt < %s -gvn -instcombine -S | grep DONOTREMOVE
+; RUN: opt < %s -basicaa -gvn -instcombine -S | grep DONOTREMOVE
 
 define i32 @test() {
        %A = alloca i32
index f7e82951da7601b553480046f23cd59ff9c800a1..5d200774da5f02d6ab59eb712d073692e2cc4224 100644 (file)
@@ -1,4 +1,4 @@
-; RUN: opt < %s -gvn -instcombine -S | grep sub
+; RUN: opt < %s -basicaa -gvn -instcombine -S | grep sub
 
 ; BasicAA was incorrectly concluding that P1 and P2 didn't conflict!
 
index d439dfc530ba5dcb44a1315723bdf5a4a50e0baa..8ca346985593632653e6bd3564ac82ab28be7671 100644 (file)
@@ -1,4 +1,4 @@
-; RUN: opt < %s -licm -disable-output
+; RUN: opt < %s -basicaa -licm -disable-output
        %struct..apr_array_header_t = type { i32*, i32, i32, i32, i8* }
        %struct..apr_table_t = type { %struct..apr_array_header_t, i32, [32 x i32], [32 x i32] }
 
index 637d8f0db48625fef3a6ec85b9958a8500cc39d6..56e3339370135bc999f004619551c66b15868b54 100644 (file)
@@ -1,6 +1,6 @@
 ; In this test, a local alloca cannot alias an incoming argument.
 
-; RUN: opt < %s -gvn -instcombine -S | not grep sub
+; RUN: opt < %s -basicaa -gvn -instcombine -S | not grep sub
 
 define i32 @test(i32* %P) {
        %X = alloca i32
index 911f78cc827ea6f27d4dba627e892923649ac1dc..010a45881039ee7d9e509139c2637f0b99057f27 100644 (file)
@@ -1,7 +1,7 @@
 ; This testcase consists of alias relations which should be completely
 ; resolvable by basicaa.
 
-; RUN: opt < %s -aa-eval -print-may-aliases -disable-output \
+; RUN: opt < %s -basicaa -aa-eval -print-may-aliases -disable-output \
 ; RUN: |& not grep May:
 
 %T = type { i32, [10 x i8] }
index 8166b979ddab3ab700d92ab0dd310c02be887a00..ce01db647ffa5517537daf692f8a1a322d246a25 100644 (file)
@@ -1,7 +1,7 @@
 ; This testcase consists of alias relations which should be completely
 ; resolvable by basicaa, but require analysis of getelementptr constant exprs.
 
-; RUN: opt < %s -aa-eval -print-may-aliases -disable-output \
+; RUN: opt < %s -basicaa -aa-eval -print-may-aliases -disable-output \
 ; RUN: |& not grep May:
 
 %T = type { i32, [10 x i8] }
index e1cfd0348f35c8acdd6aee3b26a6f7e75560fd67..56e4ed05cefe6ad9291d3ea148701b0cc92372a9 100644 (file)
@@ -1,4 +1,4 @@
-; RUN: opt < %s -dse -S | grep {store i32 0}
+; RUN: opt < %s -basicaa -dse -S | grep {store i32 0}
 
 define void @test({i32,i32 }* %P) {
        %Q = getelementptr {i32,i32}* %P, i32 1
index 81248db328811aaef8c06f2459b2b76b4ab72ed0..50fb222a5d6f81465938379b2dee41a3add2d087 100644 (file)
@@ -1,4 +1,4 @@
-; RUN: opt < %s -licm
+; RUN: opt < %s -basicaa -licm
 
 %"java/lang/Object" = type { %struct.llvm_java_object_base }
 %"java/lang/StringBuffer" = type { "java/lang/Object", i32, { "java/lang/Object", i32, [0 x i8] }*, i1 }
index 0e03db330c0461e5a464d377a971cddf61a7036a..cc8431496ed776312f8cc9c8374a61697ab2a4bf 100644 (file)
@@ -1,4 +1,4 @@
-; RUN: opt < %s -dse
+; RUN: opt < %s -basicaa -dse
 
 %"java/lang/Object" = type { %struct.llvm_java_object_base }
 %"java/lang/StringBuffer" = type { "java/lang/Object", i32, { "java/lang/Object", i32, [0 x i8] }*, i1 }
index 49327acdae0e5341fde3a75f72882f0e9b78b3b4..83205944727252ef53c9f815eebc9fcaa2278477 100644 (file)
@@ -1,4 +1,4 @@
-; RUN: opt < %s -aa-eval -disable-output |& grep {2 no alias respon}
+; RUN: opt < %s -basicaa -aa-eval -disable-output |& grep {2 no alias respon}
 ; TEST that A[1][0] may alias A[0][i].
 target datalayout = "E-p:64:64:64-a0:0:8-f32:32:32-f64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-v64:64:64-v128:128:128"
 
index 85f53a6cda489c39f5f170004757f1c1f808bd84..0db58156547adb283040eaf9ecfcdd7b706fd135 100644 (file)
@@ -1,4 +1,4 @@
-; RUN: opt < %s -licm -disable-output
+; RUN: opt < %s -basicaa -licm -disable-output
 target datalayout = "E-p:32:32"
 target triple = "powerpc-apple-darwin8.7.0"
 
index f699ba2911c5d8829325ef31ccd38370c70bcad8..563d3326367b4d47bff54c9882d8452d0171ca22 100644 (file)
@@ -1,4 +1,4 @@
-; RUN: opt < %s -gvn -disable-output
+; RUN: opt < %s -basicaa -gvn -disable-output
 ; PR1774
 
 target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128"
index 8028afb0d003e4008f5b474a1364b084a90fc75d..52d0af1b81ce5718d10ead83f91b1692baab271b 100644 (file)
@@ -1,4 +1,4 @@
-; RUN: opt < %s -gvn -disable-output
+; RUN: opt < %s -basicaa -gvn -disable-output
 ; PR1782
 
 target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128"
index ba29f3abcffe820fd1e91a4f721adfc7b084064e..170914447644becad862f040207291b253853963 100644 (file)
@@ -1,4 +1,4 @@
-; RUN: opt < %s -gvn -disable-output
+; RUN: opt < %s -basicaa -gvn -disable-output
 ; PR2395
 
 target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64-f80:32:32"
index 06018ccd5b578e92c009702c863fb6879e2702b2..c9e553d69476c89087c114ff1622cfdd3d8674ff 100644 (file)
@@ -1,4 +1,4 @@
-; RUN: opt < %s -aa-eval |& grep {1 no alias response}
+; RUN: opt < %s -basicaa -aa-eval |& grep {1 no alias response}
 
 declare noalias i32* @_Znwj(i32 %x) nounwind
 
index 64754712d43a7fbe575a5c947fbe659ad86aa126..5078dd53a79f56e5562e2ac0bdc8fdb4e64d81d6 100644 (file)
@@ -1,4 +1,4 @@
-; RUN: opt -gvn -instcombine -S < %s | FileCheck %s
+; RUN: opt -basicaa -gvn -instcombine -S < %s | FileCheck %s
 target datalayout = "E-p:64:64:64-a0:0:8-f32:32:32-f64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-v64:64:64-v128:128:128"
 
 declare i8 @llvm.atomic.load.add.i8.p0i8(i8*, i8)
index 771636f42cfa9cc922343162c0c4ad82e60fc815..965792f8216696d17ebe2aa19f9e477e50dacfd9 100644 (file)
@@ -1,4 +1,4 @@
-; RUN: opt < %s -aa-eval -print-all-alias-modref-info -disable-output |& grep {NoAlias:.*%P,.*@Z}
+; RUN: opt < %s -basicaa -aa-eval -print-all-alias-modref-info -disable-output |& grep {NoAlias:.*%P,.*@Z}
 ; If GEP base doesn't alias Z, then GEP doesn't alias Z.
 ; rdar://7282591
 
index 7555a4c2a9b06d3ce4abf797159f21228d30e121..c3c4afcc2396ba709f599f3959297cfe1d9b8de0 100644 (file)
@@ -1,4 +1,4 @@
-; RUN: opt -aa-eval -print-all-alias-modref-info -disable-output < %s |& FileCheck  %s
+; RUN: opt -basicaa -aa-eval -print-all-alias-modref-info -disable-output < %s |& FileCheck  %s
 
 declare void @callee(double* %callee_arg)
 declare void @nocap_callee(double* nocapture %nocap_callee_arg)
index cdcafdf474f3006f66091f0b4cc25a6152fbd5c0..2aba7538ed5e485a0f0d4d808d9fac1f3e1a1235 100644 (file)
@@ -1,4 +1,4 @@
-; RUN: opt < %s -gvn -S | grep {ret i32 1}
+; RUN: opt < %s -basicaa -gvn -S | grep {ret i32 1}
 target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64-f80:128:128"
 target triple = "i686-apple-darwin8"
        %struct.x = type { i32, i32, i32, i32 }
index 0e0c45c8ad5cb48a6779bd2168d715af961d78cf..8a8ac4f7210313c5d5c60ff2c9efaae46af783c9 100644 (file)
@@ -1,4 +1,4 @@
-; RUN: opt < %s -aa-eval -print-all-alias-modref-info |& FileCheck %s
+; RUN: opt < %s -basicaa -aa-eval -print-all-alias-modref-info |& FileCheck %s
 ; PR4267
 
 ; CHECK: MayAlias: double* %p.0.i.0, double* %p3
index 689efec26adb4052985816af0c7503765f2afc54..7b06780e6b18fe9bca8594026d0c95d3b17a53c1 100644 (file)
@@ -1,4 +1,4 @@
-; RUN: opt < %s -aa-eval -print-all-alias-modref-info -disable-output \
+; RUN: opt < %s -basicaa -aa-eval -print-all-alias-modref-info -disable-output \
 ; RUN:   |& grep {NoAlias:     \{\}\\* \[%\]p, \{\}\\* \[%\]q}
 
 target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64"
index eba9599ba07bbf220c57b18446cb09262dbbb113..69f7fafaca07be20fdb207819370529e7e317a89 100644 (file)
@@ -1,4 +1,4 @@
-; RUN: opt < %s -gvn -instcombine -S |& FileCheck %s
+; RUN: opt < %s -basicaa -gvn -instcombine -S |& FileCheck %s
 
 target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64-f80:128:128"
 
index 12b088b1f6518adfe0c24854d44789f263171731..062ea59f128b46d360367a7d9b242f45272ddbe5 100644 (file)
@@ -1,4 +1,4 @@
-; RUN: opt < %s -aa-eval -print-all-alias-modref-info -disable-output |& FileCheck %s
+; RUN: opt < %s -basicaa -aa-eval -print-all-alias-modref-info -disable-output |& FileCheck %s
 
 
 ; CHECK: Just Ref: call void @ro() <-> call void @f0()
index c69e824035a8ce7a6a3f28c5cb02767977a9c492..9bc47ae44a9739cb29377512b65191907bfc346d 100644 (file)
@@ -1,4 +1,4 @@
-; RUN: opt < %s -aa-eval -print-all-alias-modref-info -disable-output \
+; RUN: opt < %s -basicaa -aa-eval -print-all-alias-modref-info -disable-output \
 ; RUN:   |& grep {NoAlias:     double\\* \[%\]a, double\\* \[%\]b\$} | count 4
 
 ; BasicAA should detect NoAliases in PHIs and Selects.
index 3382188f4bbe66d4f9b1eba8454961c780418dff..1ca1e66f8947a533b8722b60a17e6bf4a9fe4ae1 100644 (file)
@@ -1,4 +1,4 @@
-; RUN: opt -aa-eval -disable-output < %s >& /dev/null
+; RUN: opt -basicaa -aa-eval -disable-output < %s >& /dev/null
 
 ; BasicAA shouldn't infinitely recurse on the use-def cycles in
 ; unreachable code.
index 3e5d11907aa642d1bebae66b2e006e6804e32cc6..75af4dc5b93467b375d9f57e52ce66c7babcdd73 100644 (file)
@@ -1,4 +1,4 @@
-; RUN: opt < %s -globalsmodref-aa -gvn -S | not grep load
+; RUN: opt < %s -basicaa -globalsmodref-aa -gvn -S | not grep load
 @X = internal global i32 4             ; <i32*> [#uses=1]
 
 define i32 @test(i32* %P) {
index b1d4593ac99207ead11cc85a39e90b734f222365..431b2a68cf4cd6fa77ae2118430b6fb8d108a672 100644 (file)
@@ -1,4 +1,4 @@
-; RUN: opt < %s -globalsmodref-aa -gvn -S | not grep load
+; RUN: opt < %s -basicaa -globalsmodref-aa -gvn -S | not grep load
 
 ; This test requires the use of previous analyses to determine that
 ; doesnotmodX does not modify X (because 'sin' doesn't).
index 4074909ce7854c9ece0b98a469c18e4fe35c5b7c..1eab0bc2081157c0d1afd074c9890da61fbfa17e 100644 (file)
@@ -1,4 +1,4 @@
-; RUN: opt < %s -globalsmodref-aa -gvn -instcombine -S | \
+; RUN: opt < %s -basicaa -globalsmodref-aa -gvn -instcombine -S | \
 ; RUN:   grep {ret i32 0}
 
 @G = internal global i32* null         ; <i32**> [#uses=3]
index 257c0ee7deb29f91519dc63cc15240b32e164f68..3a02a94a99b55c5b149555c6d2698b1e4bcad6c4 100644 (file)
@@ -1,4 +1,4 @@
-; RUN: opt < %s -globalsmodref-aa -gvn -S | not grep load
+; RUN: opt < %s -basicaa -globalsmodref-aa -gvn -S | not grep load
 @X = internal global i32 4             ; <i32*> [#uses=2]
 
 define i32 @test(i32* %P) {
index 97be3fd03590751a55270d5bdc570f463fe00296..78d0bf4fee1ab9c4958d1660eabd3ec744e4ee98 100644 (file)
@@ -1,4 +1,4 @@
-; RUN: opt < %s -analyze -lda | FileCheck %s
+; RUN: opt < %s -analyze -basicaa -lda | FileCheck %s
 
 ;; x[5] = x[6] // with x being a pointer passed as argument
 
index 36ac15336d6a2c6d58c9be5e3a7b56bce0d4c972..401e466d6669d0362ab246d368067853bbdadbab 100644 (file)
@@ -1,4 +1,4 @@
-; RUN: opt < %s -analyze -lda | FileCheck %s
+; RUN: opt < %s -analyze -basicaa -lda | FileCheck %s
 
 @x = common global [256 x i32] zeroinitializer, align 4
 @y = common global [256 x i32] zeroinitializer, align 4
index a7f9bdaa59e25e1ae567d211b78dd3154e6c2a00..9d0128c5fec4af3a847f0249fb776e035a3524f5 100644 (file)
@@ -1,4 +1,4 @@
-; RUN: opt < %s -analyze -lda | FileCheck %s
+; RUN: opt < %s -analyze -basicaa -lda | FileCheck %s
 
 @x = common global [256 x i32] zeroinitializer, align 4
 @y = common global [256 x i32] zeroinitializer, align 4
index e75aefd64d3dc2b3ed803987ed152fe896cd465a..1c5ae4c490e3403b32d7809c29ea8d89af10f444 100644 (file)
@@ -1,4 +1,4 @@
-; RUN: opt < %s -analyze -lda | FileCheck %s
+; RUN: opt < %s -analyze -basicaa -lda | FileCheck %s
 
 @x = common global [256 x i32] zeroinitializer, align 4
 @y = common global [256 x i32] zeroinitializer, align 4
index ba459487743467872430c28ef900b54a4fcc5a0c..645ae7f152e2f0b790d898443df4c85ec506a9c1 100644 (file)
@@ -1,4 +1,4 @@
-; RUN: opt < %s -analyze -lda | FileCheck %s
+; RUN: opt < %s -analyze -basicaa -lda | FileCheck %s
 
 @x = common global [256 x i32] zeroinitializer, align 4
 
index 5ea2e3fd4fa7ba88916d8d8d0b12e1086332a207..21f28e075f49fae721baf9e1e694164a78d0e06c 100644 (file)
@@ -1,4 +1,4 @@
-; RUN: opt < %s -tbaa -gvn -S | FileCheck %s
+; RUN: opt < %s -basicaa -tbaa -gvn -S | FileCheck %s
 
 ; CHECK: @test0_yes
 ; CHECK: add i8 %x, %x
index fcef7ee2d57133779ee1f2134fc8265ed5bf6f2e..4aa984e2e1b7b59df6278cd8472bcf656b082bcb 100644 (file)
@@ -1,4 +1,4 @@
-; RUN: opt -lint -disable-output < %s |& FileCheck %s
+; RUN: opt -basicaa -lint -disable-output < %s |& FileCheck %s
 target datalayout = "e-p:64:64:64"
 
 declare fastcc void @bar()
index ac9d7bf5abb685b1cd112b8cf27e35cb5c52ad06..d3d21fcabee1c9858485f9c28827f5f8b8977994 100644 (file)
@@ -1,4 +1,4 @@
-; RUN: opt < %s -argpromotion -mem2reg -S | not grep alloca
+; RUN: opt < %s -basicaa -argpromotion -mem2reg -S | not grep alloca
 target datalayout = "E-p:64:64:64-a0:0:8-f32:32:32-f64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-v64:64:64-v128:128:128"
 define internal i32 @test(i32* %X, i32* %Y) {
         %A = load i32* %X               ; <i32> [#uses=1]
index 9fcbf078c8b4d6659f3f74058c33903ef0aff7a0..3675548700cbc9b1c11eed5cea9ab25b2ac5c61e 100644 (file)
@@ -1,4 +1,4 @@
-; RUN: opt < %s -dse -S | not grep tmp5
+; RUN: opt < %s -basicaa -dse -S | not grep tmp5
 ; PR2599
 target datalayout = "E-p:64:64:64-a0:0:8-f32:32:32-f64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-v64:64:64-v128:128:128"
 
index ab1edf5b4731bdc189cc86fdd153d5aafde5ef4d..c97d48169b1e46e485db0b150af06f3ee4f03a9a 100644 (file)
@@ -1,4 +1,4 @@
-; RUN: opt < %s -dse -S | \
+; RUN: opt < %s -basicaa -dse -S | \
 ; RUN:    not grep {store i8}
 ; Ensure that the dead store is deleted in this case.  It is wholely
 ; overwritten by the second store.
index 728a118944d6636c6c572e179a3f2fccf9bfb8e8..7d57804631daa2bfc209f8d0b5b7321c6cacc723 100644 (file)
@@ -1,4 +1,4 @@
-; RUN: opt %s -dse -S | FileCheck %s
+; RUN: opt %s -basicaa -dse -S | FileCheck %s
 
 %t = type { i32 }
 
index 7954310f56bd4850c14eb44df9c1b4115d19c220..071d7e19cded2d0582b351e41926f3e3b754c94c 100644 (file)
@@ -1,4 +1,4 @@
-; RUN: opt < %s -dse -S | not grep DEAD
+; RUN: opt < %s -basicaa -dse -S | not grep DEAD
 target datalayout = "E-p:64:64:64-a0:0:8-f32:32:32-f64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-v64:64:64-v128:128:128"
 
 declare void @ext()
index 8b81ee353033877fb7a74199b96318a3095f183c..ec2a4ffd85e11b734b6e92b3adb6d459821f1ded 100644 (file)
@@ -1,4 +1,4 @@
-; RUN: opt < %s -dse -S | not grep DEAD
+; RUN: opt < %s -basicaa -dse -S | not grep DEAD
 
 define void @test(i32* %Q, i32* %P) {
         %DEAD = load i32* %Q            ; <i32> [#uses=1]
index fd127d9f51bc4b4cbc64f196d909d7d575b5b63d..2b5cc5aedb7f411e47df7caad8e7caa052274c1a 100644 (file)
@@ -1,4 +1,4 @@
-; RUN: opt -S -dse < %s | FileCheck %s
+; RUN: opt -S -basicaa -dse < %s | FileCheck %s
 
 target datalayout = "E-p:64:64:64-a0:0:8-f32:32:32-f64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-v64:64:64-v128:128:128"
 
index 7e8f52a085bf87e25be01424a0e997b2f37b0e43..6c7f940316a0042c8f2fb885e7975746be297f97 100644 (file)
@@ -1,4 +1,4 @@
-; RUN: opt %s -dse -S | FileCheck %s
+; RUN: opt %s -basicaa -dse -S | FileCheck %s
 
 declare void @test1f()
 
index d8596401b30cee04ad1d911d1d3ac16b9c8a2401..d3f5c61434c7da0cc8466cc99bc0fed79e2aa9b3 100644 (file)
@@ -1,4 +1,4 @@
-; RUN: opt < %s -dse -S | not grep DEAD
+; RUN: opt < %s -basicaa -dse -S | not grep DEAD
 target datalayout = "E-p:64:64:64-a0:0:8-f32:32:32-f64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-v64:64:64-v128:128:128"
 
 define void @test(i32* %Q, i32* %P) {
index 2e0a1015caf550ebb4f51a24b07de5026d19ce83..9983374b154e3393fa47d383ad23a52e6cb99116 100644 (file)
@@ -1,4 +1,4 @@
-; RUN: opt < %s -gvn -S | not grep {tmp10 =}
+; RUN: opt < %s -basicaa -gvn -S | not grep {tmp10 =}
 
        %struct.INT2 = type { i32, i32 }
 @blkshifts = external global %struct.INT2*             ; <%struct.INT2**> [#uses=2]
index 0be33791f6170882a76cc76d810079fd5d05ef1f..13d1bd1b7ef0dd1b006cbe4cbc7096086de7c681 100644 (file)
@@ -1,5 +1,5 @@
-; RUN: opt < %s -gvn -S | grep {tmp17625.* = phi i32. }
-; RUN: opt < %s -gvn -S | grep {tmp17631.* = phi i32. }
+; RUN: opt < %s -basicaa -gvn -S | grep {tmp17625.* = phi i32. }
+; RUN: opt < %s -basicaa -gvn -S | grep {tmp17631.* = phi i32. }
 
 @last = external global [65 x i32*]            ; <[65 x i32*]*> [#uses=1]
 
index faa1157dd8be1110bab6d8ea6f705c46717d4721..f2c001296f63f855202bfc10ac3dff6859b6c2f7 100644 (file)
@@ -1,4 +1,4 @@
-; RUN: opt < %s -gvn -S | grep {tmp47 = phi i32 }
+; RUN: opt < %s -basicaa -gvn -S | grep {tmp47 = phi i32 }
 
        %struct.anon = type { i32 (i32, i32, i32)*, i32, i32, [3 x i32], i8*, i8*, i8* }
 @debug = external constant i32         ; <i32*> [#uses=0]
index 0d1d8bced000342f255f4fc0825553c9e3d2c7b8..a570e3571ee0c434859e72f3e4464732c5b4b8de 100644 (file)
@@ -1,4 +1,4 @@
-; RUN: opt < %s -gvn -S | not grep {tmp701 =}
+; RUN: opt < %s -basicaa -gvn -S | not grep {tmp701 =}
 
 @img_width = external global i16               ; <i16*> [#uses=2]
 
index 361c1557f24f8b08006afc554a10132b681cd4d7..be69cfc0319ce355aa9ee3a6538c347015a8b07f 100644 (file)
@@ -1,4 +1,4 @@
-; RUN: opt < %s -gvn -S | grep {ret i8 \[%\]tmp3}
+; RUN: opt < %s -basicaa -gvn -S | grep {ret i8 \[%\]tmp3}
 ; PR2503
 
 @g_3 = external global i8              ; <i8*> [#uses=2]
index 504004763d0cd832fdd70c2855470d9280f4cabf..c408daa58da17f7a37c28b08b26536c76004a302 100644 (file)
@@ -1,4 +1,4 @@
-; RUN: opt < %s -gvn -S | FileCheck %s
+; RUN: opt < %s -basicaa -gvn -S | FileCheck %s
 
 define i8* @cat(i8* %s1, ...) nounwind {
 entry:
index f0edf09bff9888600c0d9ff49ffe8fb7e47f1f4f..24ef2e9ec412129dca6404cdfc754284b9f2ad69 100644 (file)
@@ -1,4 +1,4 @@
-; RUN: opt < %s -gvn -S | grep strlen | count 2
+; RUN: opt < %s -basicaa -gvn -S | grep strlen | count 2
 target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64-f80:128:128"
 target triple = "i386-apple-darwin9"
 
index e212d791ae5a9e929eadbc6bc7abb7332e9c7b46..f7bcacd613f8608bd5ba7addccbf80ba1a87fa71 100644 (file)
@@ -1,4 +1,4 @@
-; RUN: opt < %s -gvn -S | grep {br i1 false}
+; RUN: opt < %s -basicaa -gvn -S | grep {br i1 false}
 
 @a = external global i32               ; <i32*> [#uses=7]
 
index 0a4182c410aeb8df1961ce9bcf22171995e4920d..98ea48cdde3242dbfabdfad5630108682117b8ba 100644 (file)
@@ -1,4 +1,4 @@
-; RUN: opt < %s -gvn -S | FileCheck %s
+; RUN: opt < %s -basicaa -gvn -S | FileCheck %s
 
 target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64-f80:128:128"
 target triple = "i386-apple-darwin7"
index 48e5bc8bb63fb81f70a1dd0c4669fdc4e99d3cc9..02f7bcc9e85707c92dd1bae22063602bde18b33d 100644 (file)
@@ -1,4 +1,4 @@
-; RUN: opt < %s -gvn -S | FileCheck %s
+; RUN: opt < %s -basicaa -gvn -S | FileCheck %s
 
 target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64-f80:128:128"
 target triple = "i386-apple-darwin7"
index 87f33eaadadb1f5fe763e0911ebbd14e45190aa7..314c8069cacefc69f5a0dc9379e9e4f793a440af 100644 (file)
@@ -1,4 +1,4 @@
-; RUN: opt < %s -gvn -instcombine -S | grep {ret i32 0}
+; RUN: opt < %s -basicaa -gvn -instcombine -S | grep {ret i32 0}
 ; PR4189
 @G = external constant [4 x i32]
 
index bbcc6223f5a5c6062774a984fb02332de04f06df..63541ad181d1d4aeb9285ae90fcf538bf7683b9b 100644 (file)
@@ -1,4 +1,4 @@
-; RUN: opt -S -gvn < %s | FileCheck %s
+; RUN: opt -S -basicaa -gvn < %s | FileCheck %s
 target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64-f80:128:128-n8:16:32"
 target triple = "i386-apple-darwin11.0.0"
 
index 79512a33d99305e2a3736bf02219e906e8ca86e1..e39f3ed87d1c3b2ef118977db8c22c5c676e42d9 100644 (file)
@@ -1,4 +1,4 @@
-; RUN: opt -S -gvn -enable-load-pre %s | FileCheck %s
+; RUN: opt -S -basicaa -gvn -enable-load-pre %s | FileCheck %s
 ;
 ; The partially redundant load in bb1 should be hoisted to "bb".  This comes
 ; from this C code (GCC PR 23455):
index 5152f68f0efb55fd1962c7d65cdfa3c39f787cdf..6bfada2f4d5c28713953a6db65854d6eeed92c2c 100644 (file)
@@ -1,5 +1,5 @@
-; RUN: opt < %s -gvn -S | not grep DEADLOAD
-; RUN: opt < %s -gvn -S | not grep DEADGEP
+; RUN: opt < %s -basicaa -gvn -S | not grep DEADLOAD
+; RUN: opt < %s -basicaa -gvn -S | not grep DEADGEP
 
 define i32 @main(i32** %p) {
 block1:
index 5a42d9536ca1e11201df7e7b88d8452a10487b7b..1d50205c6851b4ebde758df6941676356647b734 100644 (file)
@@ -1,4 +1,4 @@
-; RUN: opt < %s -gvn -stats -disable-output |& grep {Number of loads deleted}
+; RUN: opt < %s -basicaa -gvn -stats -disable-output |& grep {Number of loads deleted}
 ; rdar://7363102
 
 ; GVN should be able to eliminate load %tmp22.i, because it is redundant with
index 4d533bbc406439a7c4db824669d96e95d57219fb..9e4ae18c710cca95a7d1ce0c4e812405d2eb0783 100644 (file)
@@ -1,4 +1,4 @@
-; RUN: opt %s -gvn -S | FileCheck %s
+; RUN: opt %s -basicaa -gvn -S | FileCheck %s
 
 %t = type { i32 }
 declare void @test1f(i8*)
index d40a467bf6776b73c998142c6416c2afd66802c1..bf4add42e80b6c0614f14baa5847791f3399c705 100644 (file)
@@ -1,4 +1,4 @@
-; RUN: opt < %s -gvn -enable-load-pre -S | FileCheck %s
+; RUN: opt < %s -basicaa -gvn -enable-load-pre -S | FileCheck %s
 target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64"
 
 define i32 @test1(i32* %p, i1 %C) {
index d61eb81b06914d1d390e6d18d1a18207d307a863..479724063e0b3a5d961b181ec0c11e0fb59729a3 100644 (file)
@@ -1,4 +1,4 @@
-; RUN: opt < %s -gvn -S | grep {DEAD = phi i32 }
+; RUN: opt < %s -basicaa -gvn -S | grep {DEAD = phi i32 }
 
 ; GVN should eliminate the fully redundant %9 GEP which 
 ; allows DEAD to be removed.  This is PR3198.
index 5c73dad399e697503bd816c2841b57d8a9cfebca..6b74e9a946d16ccedb09335fed1bb186673370d8 100644 (file)
@@ -1,4 +1,4 @@
-; RUN: opt < %s -gvn -S | FileCheck %s
+; RUN: opt < %s -basicaa -gvn -S | FileCheck %s
 
 define i32 @main(i32** %p) {
 block1:
index 04e8c38568457bc1ee08610623a35b9941c187ad..c6cd1fdc00c53497fa39eb65d60cbaf93047302f 100644 (file)
@@ -1,4 +1,4 @@
-; RUN: opt < %s -gvn -S | grep {DEAD = phi i32 }
+; RUN: opt < %s -basicaa -gvn -S | grep {DEAD = phi i32 }
 
 define i32 @main(i32* %p) {
 block1:
index d656c1a5fcc74876bc6118514632b456427344a6..2e433217507061246f185bb91ca21a2e155259ae 100644 (file)
@@ -1,4 +1,4 @@
-; RUN: opt < %s -gvn -S | FileCheck %s
+; RUN: opt < %s -basicaa -gvn -S | FileCheck %s
 
 ; 32-bit little endian target.
 target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64-f80:128:128"
index 0a50786498dfec51eba7046cb538f56a1c31bb91..c32be4e024a3fc798d6db2c5096fea3ecf618567 100644 (file)
@@ -1,4 +1,4 @@
-; RUN: opt -inline -S -scalarrepl -gvn -instcombine %s | FileCheck %s
+; RUN: opt -basicaa -inline -S -scalarrepl -gvn -instcombine %s | FileCheck %s
 ; PR5009
 
 ; CHECK: define i32 @main() 
index 9ed4b6958c38cb7afee70593e58edd9596908bf9..51ea4baa3866648bc612bd8d7c83d870d1c02117 100644 (file)
@@ -1,4 +1,4 @@
-; RUN: opt -S -inline -scalarrepl -instcombine -simplifycfg -instcombine -gvn -globaldce %s | FileCheck %s
+; RUN: opt -S -basicaa -inline -scalarrepl -instcombine -simplifycfg -instcombine -gvn -globaldce %s | FileCheck %s
 target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64"
 target triple = "x86_64-apple-darwin10.0.0"
 
index 32144d4ebba50a614776b993df8e3e56299c6dbf..e502fd5777d5afee9559699a1e686db93f3520e0 100644 (file)
@@ -1,4 +1,4 @@
-; RUN: opt -inline -gvn %s -S -max-cg-scc-iterations=1 | FileCheck %s
+; RUN: opt -basicaa -inline -gvn %s -S -max-cg-scc-iterations=1 | FileCheck %s
 ; rdar://6295824 and PR6724
 
 target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64"
index 10b00bab8fd9aa896bedc3b4f7ae6e14e412a9c0..d4df26e67abc7a3351bb30048aeb11fc8d97d095 100644 (file)
@@ -1,4 +1,4 @@
-; RUN: opt < %s -licm -S | FileCheck %s
+; RUN: opt < %s -basicaa -licm -S | FileCheck %s
 
 @a = external constant float*
 
index c1d2b24b0bba52fb30ab81def8fe0cfffb6cb04e..67ad5bc0f4dcb9aa55b7bc8261c25df49f43bc2a 100644 (file)
@@ -1,4 +1,4 @@
-; RUN: opt < %s  -licm -S | FileCheck %s
+; RUN: opt < %s -basicaa -licm -S | FileCheck %s
 target datalayout = "E-p:64:64:64-a0:0:8-f32:32:32-f64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-v64:64:64-v128:128:128"
 
 @X = global i32 7              ; <i32*> [#uses=4]
index 30c27137d909a24dbc723a5e4775e98d7d76a679..9f1e280467078fb43b1464c77572d65c525a9479 100644 (file)
@@ -1,4 +1,4 @@
-; RUN: opt < %s -memcpyopt -dse -S | grep {call.*initialize} | not grep memtmp
+; RUN: opt < %s -basicaa -memcpyopt -dse -S | grep {call.*initialize} | not grep memtmp
 ; PR2077
 
 target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64-f80:32:32"
index 38a727148e57fc08f2b92847bed74020b25dc188..418761e9361c85a99e59422ad75bd6bdafe39088 100644 (file)
@@ -1,4 +1,4 @@
-; RUN: opt < %s -memcpyopt -S | not grep {call.*memcpy.}
+; RUN: opt < %s -basicaa -memcpyopt -S | not grep {call.*memcpy.}
 target datalayout = "E-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64"
        %a = type { i32 }
        %b = type { float }
index ebc11fc0fbe63ab45453bcded92047888f107067..67e7137e7e4971b75d8661fc696a8a9c9de341e0 100644 (file)
@@ -1,4 +1,4 @@
-; RUN: opt -S < %s -memcpyopt | FileCheck %s
+; RUN: opt -S < %s -basicaa -memcpyopt | FileCheck %s
 ; <rdar://problem/8536696>
 
 target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64"
index 724acfab4750a40bc179d0d3086b28956b7ada35..e4cd0ef388db5fd240659e83f0292bdba66140d1 100644 (file)
@@ -1,4 +1,4 @@
-; RUN: opt < %s -memcpyopt -dse -S | grep {call.*memcpy} | count 1
+; RUN: opt < %s -basicaa -memcpyopt -dse -S | grep {call.*memcpy} | count 1
 
 target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64-f80:128:128"
 target triple = "i686-apple-darwin9"
index 73bbf0bd2e4ee665dae833d288ac04340efcce93..8babb04e4b387f0ddb01da70d9752c73014acd60 100644 (file)
@@ -1,4 +1,4 @@
-; RUN: opt < %s -memcpyopt -S | FileCheck %s
+; RUN: opt < %s -basicaa -memcpyopt -S | FileCheck %s
 ; These memmoves should get optimized to memcpys.
 
 target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128"
index 5002875ae3287991d817c9dc28b7a9dc55c4af0b..d35ab910d7c23f41ea089b6a48ba5f81244e6330 100644 (file)
@@ -1,4 +1,4 @@
-; RUN: opt < %s -memcpyopt -S | not grep {call.*memcpy}
+; RUN: opt < %s -basicaa -memcpyopt -S | not grep {call.*memcpy}
 
 target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64-f80:128:128"
 target triple = "i686-apple-darwin9"
index beb9481c840f0b2a40dfc972889f431d1400c090..54b7f1369de47a1f1e723b6ae62ac8f7f591c65a 100644 (file)
@@ -1,4 +1,4 @@
-; RUN: opt < %s -sink -S | FileCheck %s
+; RUN: opt < %s -basicaa -sink -S | FileCheck %s
 
 @A = external global i32
 @B = external global i32