[llvm] [DA] enable update_analyze_test_checks.py (PR #123435)
Sebastian Pop via llvm-commits
llvm-commits at lists.llvm.org
Fri Jan 17 18:15:20 PST 2025
https://github.com/sebpop updated https://github.com/llvm/llvm-project/pull/123435
>From f7ba5a414cbee784e7564f6993e1a7465152d605 Mon Sep 17 00:00:00 2001
From: Sebastian Pop <spop at nvidia.com>
Date: Mon, 25 Nov 2024 18:05:19 +0000
Subject: [PATCH 1/2] [DA] enable update_analyze_test_checks.py
Modify the DA pretty printer to match the output of other analysis passes.
This enables update_analyze_test_checks.py to also work on DA tests.
Auto generate all the Dependence Analysis tests.
---
llvm/lib/Analysis/DependenceAnalysis.cpp | 3 +-
llvm/test/Analysis/DependenceAnalysis/AA.ll | 118 ++-
.../Analysis/DependenceAnalysis/Banerjee.ll | 858 +++++++++++-------
.../Analysis/DependenceAnalysis/BasePtrBug.ll | 29 +-
.../DependenceAnalysis/Constraints.ll | 138 ++-
.../Analysis/DependenceAnalysis/Coupled.ll | 370 +++++---
.../Analysis/DependenceAnalysis/DADelin.ll | 121 ++-
llvm/test/Analysis/DependenceAnalysis/Dump.ll | 18 +-
.../Analysis/DependenceAnalysis/ExactRDIV.ll | 274 ++++--
.../Analysis/DependenceAnalysis/ExactSIV.ll | 309 ++++---
llvm/test/Analysis/DependenceAnalysis/GCD.ll | 223 +++--
.../Analysis/DependenceAnalysis/Invariant.ll | 14 +-
.../DependenceAnalysis/MIVCheckConst.ll | 17 +-
.../MIVMaxLevelThreshold.ll | 25 +-
.../MismatchingNestLevels.ll | 43 +-
.../DependenceAnalysis/NonAffineExpr.ll | 18 +-
.../NonCanonicalizedSubscript.ll | 27 +-
.../Analysis/DependenceAnalysis/PR21585.ll | 46 +-
.../DependenceAnalysis/Preliminary.ll | 222 +++--
.../PreliminaryNoValidityCheckFixedSize.ll | 45 +-
.../DependenceAnalysis/Propagating.ll | 221 +++--
.../DependenceAnalysis/Separability.ll | 85 +-
.../SimpleSIVNoValidityCheck.ll | 79 +-
.../SimpleSIVNoValidityCheckFixedSize.ll | 44 +-
.../Analysis/DependenceAnalysis/StrongSIV.ll | 232 +++--
.../DependenceAnalysis/SymbolicRDIV.ll | 155 ++--
.../DependenceAnalysis/SymbolicSIV.ll | 193 ++--
.../Analysis/DependenceAnalysis/UsefulGEP.ll | 24 +-
.../DependenceAnalysis/WeakCrossingSIV.ll | 152 ++--
.../DependenceAnalysis/WeakZeroDstSIV.ll | 160 ++--
.../DependenceAnalysis/WeakZeroSrcSIV.ll | 160 ++--
llvm/test/Analysis/DependenceAnalysis/ZIV.ll | 67 +-
.../test/Analysis/DependenceAnalysis/lcssa.ll | 12 +-
.../DependenceAnalysis/new-pm-invalidation.ll | 23 +-
llvm/utils/UpdateTestChecks/common.py | 1 +
35 files changed, 2995 insertions(+), 1531 deletions(-)
diff --git a/llvm/lib/Analysis/DependenceAnalysis.cpp b/llvm/lib/Analysis/DependenceAnalysis.cpp
index a4a98ea0bae146..440af7cdfe3ae2 100644
--- a/llvm/lib/Analysis/DependenceAnalysis.cpp
+++ b/llvm/lib/Analysis/DependenceAnalysis.cpp
@@ -216,7 +216,8 @@ void DependenceAnalysisWrapperPass::print(raw_ostream &OS,
PreservedAnalyses
DependenceAnalysisPrinterPass::run(Function &F, FunctionAnalysisManager &FAM) {
- OS << "'Dependence Analysis' for function '" << F.getName() << "':\n";
+ OS << "Printing analysis 'Dependence Analysis' for function '" << F.getName()
+ << "':\n";
dumpExampleDependence(OS, &FAM.getResult<DependenceAnalysis>(F),
FAM.getResult<ScalarEvolutionAnalysis>(F),
NormalizeResults);
diff --git a/llvm/test/Analysis/DependenceAnalysis/AA.ll b/llvm/test/Analysis/DependenceAnalysis/AA.ll
index a478143720d04f..173744a07ef968 100644
--- a/llvm/test/Analysis/DependenceAnalysis/AA.ll
+++ b/llvm/test/Analysis/DependenceAnalysis/AA.ll
@@ -1,99 +1,139 @@
+; NOTE: Assertions have been autogenerated by utils/update_analyze_test_checks.py UTC_ARGS: --version 5
; RUN: opt < %s -disable-output "-passes=print<da>" \
; RUN: "-aa-pipeline=basic-aa,tbaa" 2>&1 | FileCheck %s
-; CHECK-LABEL: 'Dependence Analysis' for function 'test_no_noalias'
-; CHECK: da analyze - none!
-; CHECK: da analyze - confused!
-; CHECK: da analyze - none!
define void @test_no_noalias(ptr %A, ptr %B) {
+; CHECK-LABEL: 'test_no_noalias'
+; CHECK-NEXT: Src: store i32 1, ptr %A, align 4 --> Dst: store i32 1, ptr %A, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: store i32 1, ptr %A, align 4 --> Dst: store i32 2, ptr %B, align 4
+; CHECK-NEXT: da analyze - confused!
+; CHECK-NEXT: Src: store i32 2, ptr %B, align 4 --> Dst: store i32 2, ptr %B, align 4
+; CHECK-NEXT: da analyze - none!
+;
store i32 1, ptr %A
store i32 2, ptr %B
ret void
}
-; CHECK-LABEL: test_one_noalias
-; CHECK: da analyze - none!
-; CHECK: da analyze - none!
-; CHECK: da analyze - none!
define void @test_one_noalias(ptr noalias %A, ptr %B) {
+; CHECK-LABEL: 'test_one_noalias'
+; CHECK-NEXT: Src: store i32 1, ptr %A, align 4 --> Dst: store i32 1, ptr %A, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: store i32 1, ptr %A, align 4 --> Dst: store i32 2, ptr %B, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: store i32 2, ptr %B, align 4 --> Dst: store i32 2, ptr %B, align 4
+; CHECK-NEXT: da analyze - none!
+;
store i32 1, ptr %A
store i32 2, ptr %B
ret void
}
-; CHECK-LABEL: test_two_noalias
-; CHECK: da analyze - none!
-; CHECK: da analyze - none!
-; CHECK: da analyze - none!
define void @test_two_noalias(ptr noalias %A, ptr noalias %B) {
+; CHECK-LABEL: 'test_two_noalias'
+; CHECK-NEXT: Src: store i32 1, ptr %A, align 4 --> Dst: store i32 1, ptr %A, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: store i32 1, ptr %A, align 4 --> Dst: store i32 2, ptr %B, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: store i32 2, ptr %B, align 4 --> Dst: store i32 2, ptr %B, align 4
+; CHECK-NEXT: da analyze - none!
+;
store i32 1, ptr %A
store i32 2, ptr %B
ret void
}
-; CHECK-LABEL: test_global_alias
-; CHECK: da analyze - none!
-; CHECK: da analyze - confused!
-; CHECK: da analyze - none!
@g = global i32 5
define void @test_global_alias(ptr %A) {
+; CHECK-LABEL: 'test_global_alias'
+; CHECK-NEXT: Src: store i32 1, ptr %A, align 4 --> Dst: store i32 1, ptr %A, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: store i32 1, ptr %A, align 4 --> Dst: store i32 2, ptr @g, align 4
+; CHECK-NEXT: da analyze - confused!
+; CHECK-NEXT: Src: store i32 2, ptr @g, align 4 --> Dst: store i32 2, ptr @g, align 4
+; CHECK-NEXT: da analyze - none!
+;
store i32 1, ptr %A
store i32 2, ptr @g
ret void
}
-; CHECK-LABEL: test_global_noalias
-; CHECK: da analyze - none!
-; CHECK: da analyze - none!
-; CHECK: da analyze - none!
define void @test_global_noalias(ptr noalias %A) {
+; CHECK-LABEL: 'test_global_noalias'
+; CHECK-NEXT: Src: store i32 1, ptr %A, align 4 --> Dst: store i32 1, ptr %A, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: store i32 1, ptr %A, align 4 --> Dst: store i32 2, ptr @g, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: store i32 2, ptr @g, align 4 --> Dst: store i32 2, ptr @g, align 4
+; CHECK-NEXT: da analyze - none!
+;
store i32 1, ptr %A
store i32 2, ptr @g
ret void
}
-; CHECK-LABEL: test_global_size
-; CHECK: da analyze - none!
-; CHECK: da analyze - confused!
-; CHECK: da analyze - none!
-; CHECK: da analyze - none!
-; CHECK: da analyze - confused!
-; CHECK: da analyze - none!
@a = global i16 5, align 2
@b = global ptr @a, align 4
define void @test_global_size() {
+; CHECK-LABEL: 'test_global_size'
+; CHECK-NEXT: Src: %l0 = load ptr, ptr @b, align 4 --> Dst: %l0 = load ptr, ptr @b, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: %l0 = load ptr, ptr @b, align 4 --> Dst: %l1 = load i16, ptr %l0, align 2
+; CHECK-NEXT: da analyze - confused!
+; CHECK-NEXT: Src: %l0 = load ptr, ptr @b, align 4 --> Dst: store i16 1, ptr @a, align 2
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: %l1 = load i16, ptr %l0, align 2 --> Dst: %l1 = load i16, ptr %l0, align 2
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: %l1 = load i16, ptr %l0, align 2 --> Dst: store i16 1, ptr @a, align 2
+; CHECK-NEXT: da analyze - confused!
+; CHECK-NEXT: Src: store i16 1, ptr @a, align 2 --> Dst: store i16 1, ptr @a, align 2
+; CHECK-NEXT: da analyze - none!
+;
%l0 = load ptr, ptr @b, align 4
%l1 = load i16, ptr %l0, align 2
store i16 1, ptr @a, align 2
ret void
}
-; CHECK-LABEL: test_tbaa_same
-; CHECK: da analyze - none!
-; CHECK: da analyze - confused!
-; CHECK: da analyze - none!
define void @test_tbaa_same(ptr %A, ptr %B) {
+; CHECK-LABEL: 'test_tbaa_same'
+; CHECK-NEXT: Src: store i32 1, ptr %A, align 4, !tbaa !0 --> Dst: store i32 1, ptr %A, align 4, !tbaa !0
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: store i32 1, ptr %A, align 4, !tbaa !0 --> Dst: store i32 2, ptr %B, align 4, !tbaa !0
+; CHECK-NEXT: da analyze - confused!
+; CHECK-NEXT: Src: store i32 2, ptr %B, align 4, !tbaa !0 --> Dst: store i32 2, ptr %B, align 4, !tbaa !0
+; CHECK-NEXT: da analyze - none!
+;
store i32 1, ptr %A, !tbaa !5
store i32 2, ptr %B, !tbaa !5
ret void
}
-; CHECK-LABEL: test_tbaa_diff
-; CHECK: da analyze - none!
-; CHECK: da analyze - none!
-; CHECK: da analyze - none!
define void @test_tbaa_diff(ptr %A, ptr %B) {
+; CHECK-LABEL: 'test_tbaa_diff'
+; CHECK-NEXT: Src: store i32 1, ptr %A, align 4, !tbaa !0 --> Dst: store i32 1, ptr %A, align 4, !tbaa !0
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: store i32 1, ptr %A, align 4, !tbaa !0 --> Dst: store i16 2, ptr %B, align 2, !tbaa !4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: store i16 2, ptr %B, align 2, !tbaa !4 --> Dst: store i16 2, ptr %B, align 2, !tbaa !4
+; CHECK-NEXT: da analyze - none!
+;
store i32 1, ptr %A, !tbaa !5
store i16 2, ptr %B, !tbaa !9
ret void
}
-; CHECK-LABEL: tbaa_loop
-; CHECK: da analyze - input
-; CHECK: da analyze - none
-; CHECK: da analyze - output
define void @tbaa_loop(i32 %I, i32 %J, ptr nocapture %A, ptr nocapture readonly %B) {
+; CHECK-LABEL: 'tbaa_loop'
+; CHECK-NEXT: Src: %0 = load i16, ptr %arrayidx.us, align 4, !tbaa !0 --> Dst: %0 = load i16, ptr %arrayidx.us, align 4, !tbaa !0
+; CHECK-NEXT: da analyze - input [* *]!
+; CHECK-NEXT: Src: %0 = load i16, ptr %arrayidx.us, align 4, !tbaa !0 --> Dst: store i32 %add.us.lcssa, ptr %arrayidx6.us, align 4, !tbaa !4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: store i32 %add.us.lcssa, ptr %arrayidx6.us, align 4, !tbaa !4 --> Dst: store i32 %add.us.lcssa, ptr %arrayidx6.us, align 4, !tbaa !4
+; CHECK-NEXT: da analyze - output [*]!
+;
entry:
%cmp = icmp ne i32 %J, 0
%cmp122 = icmp ne i32 %I, 0
diff --git a/llvm/test/Analysis/DependenceAnalysis/Banerjee.ll b/llvm/test/Analysis/DependenceAnalysis/Banerjee.ll
index efc86d39b28ee1..6768e9067dca38 100644
--- a/llvm/test/Analysis/DependenceAnalysis/Banerjee.ll
+++ b/llvm/test/Analysis/DependenceAnalysis/Banerjee.ll
@@ -1,3 +1,4 @@
+; NOTE: Assertions have been autogenerated by utils/update_analyze_test_checks.py UTC_ARGS: --version 5
; RUN: opt < %s -disable-output -da-delinearize=false "-passes=print<da>" \
; RUN: -aa-pipeline=basic-aa 2>&1 | FileCheck %s
; RUN: opt < %s -disable-output -da-delinearize=false -passes='print<da><normalized-results>' \
@@ -15,31 +16,50 @@ target triple = "x86_64-apple-macosx10.6.0"
;; *B++ = A[10*i + j - 1];
define void @banerjee0(ptr %A, ptr %B, i64 %m, i64 %n) nounwind uwtable ssp {
+; CHECK-LABEL: 'banerjee0'
+; CHECK-NEXT: Src: store i64 0, ptr %arrayidx, align 8 --> Dst: store i64 0, ptr %arrayidx, align 8
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: store i64 0, ptr %arrayidx, align 8 --> Dst: %0 = load i64, ptr %arrayidx6, align 8
+; CHECK-NEXT: da analyze - flow [<= <>]!
+; CHECK-NEXT: Src: store i64 0, ptr %arrayidx, align 8 --> Dst: store i64 %0, ptr %B.addr.11, align 8
+; CHECK-NEXT: da analyze - confused!
+; CHECK-NEXT: Src: %0 = load i64, ptr %arrayidx6, align 8 --> Dst: %0 = load i64, ptr %arrayidx6, align 8
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: %0 = load i64, ptr %arrayidx6, align 8 --> Dst: store i64 %0, ptr %B.addr.11, align 8
+; CHECK-NEXT: da analyze - confused!
+; CHECK-NEXT: Src: store i64 %0, ptr %B.addr.11, align 8 --> Dst: store i64 %0, ptr %B.addr.11, align 8
+; CHECK-NEXT: da analyze - none!
+;
+; NORMALIZE-LABEL: 'banerjee0'
+; NORMALIZE-NEXT: Src: store i64 0, ptr %arrayidx, align 8 --> Dst: store i64 0, ptr %arrayidx, align 8
+; NORMALIZE-NEXT: da analyze - none!
+; NORMALIZE-NEXT: Src: store i64 0, ptr %arrayidx, align 8 --> Dst: %0 = load i64, ptr %arrayidx6, align 8
+; NORMALIZE-NEXT: da analyze - flow [<= <>]!
+; NORMALIZE-NEXT: Src: store i64 0, ptr %arrayidx, align 8 --> Dst: store i64 %0, ptr %B.addr.11, align 8
+; NORMALIZE-NEXT: da analyze - confused!
+; NORMALIZE-NEXT: Src: %0 = load i64, ptr %arrayidx6, align 8 --> Dst: %0 = load i64, ptr %arrayidx6, align 8
+; NORMALIZE-NEXT: da analyze - none!
+; NORMALIZE-NEXT: Src: %0 = load i64, ptr %arrayidx6, align 8 --> Dst: store i64 %0, ptr %B.addr.11, align 8
+; NORMALIZE-NEXT: da analyze - confused!
+; NORMALIZE-NEXT: Src: store i64 %0, ptr %B.addr.11, align 8 --> Dst: store i64 %0, ptr %B.addr.11, align 8
+; NORMALIZE-NEXT: da analyze - none!
+;
+; DELIN-LABEL: 'banerjee0'
+; DELIN-NEXT: Src: store i64 0, ptr %arrayidx, align 8 --> Dst: store i64 0, ptr %arrayidx, align 8
+; DELIN-NEXT: da analyze - none!
+; DELIN-NEXT: Src: store i64 0, ptr %arrayidx, align 8 --> Dst: %0 = load i64, ptr %arrayidx6, align 8
+; DELIN-NEXT: da analyze - flow [<= <>]!
+; DELIN-NEXT: Src: store i64 0, ptr %arrayidx, align 8 --> Dst: store i64 %0, ptr %B.addr.11, align 8
+; DELIN-NEXT: da analyze - confused!
+; DELIN-NEXT: Src: %0 = load i64, ptr %arrayidx6, align 8 --> Dst: %0 = load i64, ptr %arrayidx6, align 8
+; DELIN-NEXT: da analyze - none!
+; DELIN-NEXT: Src: %0 = load i64, ptr %arrayidx6, align 8 --> Dst: store i64 %0, ptr %B.addr.11, align 8
+; DELIN-NEXT: da analyze - confused!
+; DELIN-NEXT: Src: store i64 %0, ptr %B.addr.11, align 8 --> Dst: store i64 %0, ptr %B.addr.11, align 8
+; DELIN-NEXT: da analyze - none!
+;
entry:
br label %for.cond1.preheader
-; CHECK: 'Dependence Analysis' for function 'banerjee0':
-; CHECK: da analyze - none!
-; CHECK: da analyze - flow [<= <>]!
-; CHECK: da analyze - confused!
-; CHECK: da analyze - none!
-; CHECK: da analyze - confused!
-; CHECK: da analyze - none!
-
-; NORMALIZE: 'Dependence Analysis' for function 'banerjee0':
-; NORMALIZE: da analyze - none!
-; NORMALIZE: da analyze - flow [<= <>]!
-; NORMALIZE: da analyze - confused!
-; NORMALIZE: da analyze - none!
-; NORMALIZE: da analyze - confused!
-; NORMALIZE: da analyze - none!
-
-; DELIN: 'Dependence Analysis' for function 'banerjee0':
-; DELIN: da analyze - none!
-; DELIN: da analyze - flow [<= <>]!
-; DELIN: da analyze - confused!
-; DELIN: da analyze - none!
-; DELIN: da analyze - confused!
-; DELIN: da analyze - none!
for.cond1.preheader: ; preds = %entry, %for.inc7
%B.addr.04 = phi ptr [ %B, %entry ], [ %scevgep, %for.inc7 ]
@@ -81,34 +101,52 @@ for.end9: ; preds = %for.inc7
;; *B++ = A[10*i + j - 1];
define void @banerjee1(ptr %A, ptr %B, i64 %m, i64 %n) nounwind uwtable ssp {
+; CHECK-LABEL: 'banerjee1'
+; CHECK-NEXT: Src: store i64 0, ptr %arrayidx, align 8 --> Dst: store i64 0, ptr %arrayidx, align 8
+; CHECK-NEXT: da analyze - output [* *]!
+; CHECK-NEXT: Src: store i64 0, ptr %arrayidx, align 8 --> Dst: %2 = load i64, ptr %arrayidx6, align 8
+; CHECK-NEXT: da analyze - flow [* <>]!
+; CHECK-NEXT: Src: store i64 0, ptr %arrayidx, align 8 --> Dst: store i64 %2, ptr %B.addr.12, align 8
+; CHECK-NEXT: da analyze - confused!
+; CHECK-NEXT: Src: %2 = load i64, ptr %arrayidx6, align 8 --> Dst: %2 = load i64, ptr %arrayidx6, align 8
+; CHECK-NEXT: da analyze - input [* *]!
+; CHECK-NEXT: Src: %2 = load i64, ptr %arrayidx6, align 8 --> Dst: store i64 %2, ptr %B.addr.12, align 8
+; CHECK-NEXT: da analyze - confused!
+; CHECK-NEXT: Src: store i64 %2, ptr %B.addr.12, align 8 --> Dst: store i64 %2, ptr %B.addr.12, align 8
+; CHECK-NEXT: da analyze - output [* *]!
+;
+; NORMALIZE-LABEL: 'banerjee1'
+; NORMALIZE-NEXT: Src: store i64 0, ptr %arrayidx, align 8 --> Dst: store i64 0, ptr %arrayidx, align 8
+; NORMALIZE-NEXT: da analyze - output [* *]!
+; NORMALIZE-NEXT: Src: store i64 0, ptr %arrayidx, align 8 --> Dst: %2 = load i64, ptr %arrayidx6, align 8
+; NORMALIZE-NEXT: da analyze - flow [* <>]!
+; NORMALIZE-NEXT: Src: store i64 0, ptr %arrayidx, align 8 --> Dst: store i64 %2, ptr %B.addr.12, align 8
+; NORMALIZE-NEXT: da analyze - confused!
+; NORMALIZE-NEXT: Src: %2 = load i64, ptr %arrayidx6, align 8 --> Dst: %2 = load i64, ptr %arrayidx6, align 8
+; NORMALIZE-NEXT: da analyze - input [* *]!
+; NORMALIZE-NEXT: Src: %2 = load i64, ptr %arrayidx6, align 8 --> Dst: store i64 %2, ptr %B.addr.12, align 8
+; NORMALIZE-NEXT: da analyze - confused!
+; NORMALIZE-NEXT: Src: store i64 %2, ptr %B.addr.12, align 8 --> Dst: store i64 %2, ptr %B.addr.12, align 8
+; NORMALIZE-NEXT: da analyze - output [* *]!
+;
+; DELIN-LABEL: 'banerjee1'
+; DELIN-NEXT: Src: store i64 0, ptr %arrayidx, align 8 --> Dst: store i64 0, ptr %arrayidx, align 8
+; DELIN-NEXT: da analyze - output [* *]!
+; DELIN-NEXT: Src: store i64 0, ptr %arrayidx, align 8 --> Dst: %2 = load i64, ptr %arrayidx6, align 8
+; DELIN-NEXT: da analyze - flow [* <>]!
+; DELIN-NEXT: Src: store i64 0, ptr %arrayidx, align 8 --> Dst: store i64 %2, ptr %B.addr.12, align 8
+; DELIN-NEXT: da analyze - confused!
+; DELIN-NEXT: Src: %2 = load i64, ptr %arrayidx6, align 8 --> Dst: %2 = load i64, ptr %arrayidx6, align 8
+; DELIN-NEXT: da analyze - input [* *]!
+; DELIN-NEXT: Src: %2 = load i64, ptr %arrayidx6, align 8 --> Dst: store i64 %2, ptr %B.addr.12, align 8
+; DELIN-NEXT: da analyze - confused!
+; DELIN-NEXT: Src: store i64 %2, ptr %B.addr.12, align 8 --> Dst: store i64 %2, ptr %B.addr.12, align 8
+; DELIN-NEXT: da analyze - output [* *]!
+;
entry:
%cmp4 = icmp sgt i64 %n, 0
br i1 %cmp4, label %for.cond1.preheader.preheader, label %for.end9
-; CHECK: 'Dependence Analysis' for function 'banerjee1':
-; CHECK: da analyze - output [* *]!
-; CHECK: da analyze - flow [* <>]!
-; CHECK: da analyze - confused!
-; CHECK: da analyze - input [* *]!
-; CHECK: da analyze - confused!
-; CHECK: da analyze - output [* *]!
-
-; NORMALIZE: 'Dependence Analysis' for function 'banerjee1':
-; NORMALIZE: da analyze - output [* *]!
-; NORMALIZE: da analyze - flow [* <>]!
-; NORMALIZE: da analyze - confused!
-; NORMALIZE: da analyze - input [* *]!
-; NORMALIZE: da analyze - confused!
-; NORMALIZE: da analyze - output [* *]!
-
-; DELIN: 'Dependence Analysis' for function 'banerjee1':
-; DELIN: da analyze - output [* *]!
-; DELIN: da analyze - flow [* <>]!
-; DELIN: da analyze - confused!
-; DELIN: da analyze - input [* *]!
-; DELIN: da analyze - confused!
-; DELIN: da analyze - output [* *]!
-
for.cond1.preheader.preheader: ; preds = %entry
%0 = add i64 %n, 1
br label %for.cond1.preheader
@@ -165,33 +203,51 @@ for.end9: ; preds = %for.end9.loopexit,
;; *B++ = A[10*i + j + 100];
define void @banerjee2(ptr %A, ptr %B, i64 %m, i64 %n) nounwind uwtable ssp {
+; CHECK-LABEL: 'banerjee2'
+; CHECK-NEXT: Src: store i64 0, ptr %arrayidx, align 8 --> Dst: store i64 0, ptr %arrayidx, align 8
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: store i64 0, ptr %arrayidx, align 8 --> Dst: %0 = load i64, ptr %arrayidx7, align 8
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: store i64 0, ptr %arrayidx, align 8 --> Dst: store i64 %0, ptr %B.addr.11, align 8
+; CHECK-NEXT: da analyze - confused!
+; CHECK-NEXT: Src: %0 = load i64, ptr %arrayidx7, align 8 --> Dst: %0 = load i64, ptr %arrayidx7, align 8
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: %0 = load i64, ptr %arrayidx7, align 8 --> Dst: store i64 %0, ptr %B.addr.11, align 8
+; CHECK-NEXT: da analyze - confused!
+; CHECK-NEXT: Src: store i64 %0, ptr %B.addr.11, align 8 --> Dst: store i64 %0, ptr %B.addr.11, align 8
+; CHECK-NEXT: da analyze - none!
+;
+; NORMALIZE-LABEL: 'banerjee2'
+; NORMALIZE-NEXT: Src: store i64 0, ptr %arrayidx, align 8 --> Dst: store i64 0, ptr %arrayidx, align 8
+; NORMALIZE-NEXT: da analyze - none!
+; NORMALIZE-NEXT: Src: store i64 0, ptr %arrayidx, align 8 --> Dst: %0 = load i64, ptr %arrayidx7, align 8
+; NORMALIZE-NEXT: da analyze - none!
+; NORMALIZE-NEXT: Src: store i64 0, ptr %arrayidx, align 8 --> Dst: store i64 %0, ptr %B.addr.11, align 8
+; NORMALIZE-NEXT: da analyze - confused!
+; NORMALIZE-NEXT: Src: %0 = load i64, ptr %arrayidx7, align 8 --> Dst: %0 = load i64, ptr %arrayidx7, align 8
+; NORMALIZE-NEXT: da analyze - none!
+; NORMALIZE-NEXT: Src: %0 = load i64, ptr %arrayidx7, align 8 --> Dst: store i64 %0, ptr %B.addr.11, align 8
+; NORMALIZE-NEXT: da analyze - confused!
+; NORMALIZE-NEXT: Src: store i64 %0, ptr %B.addr.11, align 8 --> Dst: store i64 %0, ptr %B.addr.11, align 8
+; NORMALIZE-NEXT: da analyze - none!
+;
+; DELIN-LABEL: 'banerjee2'
+; DELIN-NEXT: Src: store i64 0, ptr %arrayidx, align 8 --> Dst: store i64 0, ptr %arrayidx, align 8
+; DELIN-NEXT: da analyze - none!
+; DELIN-NEXT: Src: store i64 0, ptr %arrayidx, align 8 --> Dst: %0 = load i64, ptr %arrayidx7, align 8
+; DELIN-NEXT: da analyze - none!
+; DELIN-NEXT: Src: store i64 0, ptr %arrayidx, align 8 --> Dst: store i64 %0, ptr %B.addr.11, align 8
+; DELIN-NEXT: da analyze - confused!
+; DELIN-NEXT: Src: %0 = load i64, ptr %arrayidx7, align 8 --> Dst: %0 = load i64, ptr %arrayidx7, align 8
+; DELIN-NEXT: da analyze - none!
+; DELIN-NEXT: Src: %0 = load i64, ptr %arrayidx7, align 8 --> Dst: store i64 %0, ptr %B.addr.11, align 8
+; DELIN-NEXT: da analyze - confused!
+; DELIN-NEXT: Src: store i64 %0, ptr %B.addr.11, align 8 --> Dst: store i64 %0, ptr %B.addr.11, align 8
+; DELIN-NEXT: da analyze - none!
+;
entry:
br label %for.cond1.preheader
-; CHECK: 'Dependence Analysis' for function 'banerjee2':
-; CHECK: da analyze - none!
-; CHECK: da analyze - none!
-; CHECK: da analyze - confused!
-; CHECK: da analyze - none!
-; CHECK: da analyze - confused!
-; CHECK: da analyze - none!
-
-; NORMALIZE: 'Dependence Analysis' for function 'banerjee2':
-; NORMALIZE: da analyze - none!
-; NORMALIZE: da analyze - none!
-; NORMALIZE: da analyze - confused!
-; NORMALIZE: da analyze - none!
-; NORMALIZE: da analyze - confused!
-; NORMALIZE: da analyze - none!
-
-; DELIN: 'Dependence Analysis' for function 'banerjee2':
-; DELIN: da analyze - none!
-; DELIN: da analyze - none!
-; DELIN: da analyze - confused!
-; DELIN: da analyze - none!
-; DELIN: da analyze - confused!
-; DELIN: da analyze - none!
-
for.cond1.preheader: ; preds = %entry, %for.inc8
%B.addr.04 = phi ptr [ %B, %entry ], [ %scevgep, %for.inc8 ]
%i.03 = phi i64 [ 0, %entry ], [ %inc9, %for.inc8 ]
@@ -232,33 +288,51 @@ for.end10: ; preds = %for.inc8
;; *B++ = A[10*i + j + 99];
define void @banerjee3(ptr %A, ptr %B, i64 %m, i64 %n) nounwind uwtable ssp {
+; CHECK-LABEL: 'banerjee3'
+; CHECK-NEXT: Src: store i64 0, ptr %arrayidx, align 8 --> Dst: store i64 0, ptr %arrayidx, align 8
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: store i64 0, ptr %arrayidx, align 8 --> Dst: %0 = load i64, ptr %arrayidx7, align 8
+; CHECK-NEXT: da analyze - flow [> >]!
+; CHECK-NEXT: Src: store i64 0, ptr %arrayidx, align 8 --> Dst: store i64 %0, ptr %B.addr.11, align 8
+; CHECK-NEXT: da analyze - confused!
+; CHECK-NEXT: Src: %0 = load i64, ptr %arrayidx7, align 8 --> Dst: %0 = load i64, ptr %arrayidx7, align 8
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: %0 = load i64, ptr %arrayidx7, align 8 --> Dst: store i64 %0, ptr %B.addr.11, align 8
+; CHECK-NEXT: da analyze - confused!
+; CHECK-NEXT: Src: store i64 %0, ptr %B.addr.11, align 8 --> Dst: store i64 %0, ptr %B.addr.11, align 8
+; CHECK-NEXT: da analyze - none!
+;
+; NORMALIZE-LABEL: 'banerjee3'
+; NORMALIZE-NEXT: Src: store i64 0, ptr %arrayidx, align 8 --> Dst: store i64 0, ptr %arrayidx, align 8
+; NORMALIZE-NEXT: da analyze - none!
+; NORMALIZE-NEXT: Src: store i64 0, ptr %arrayidx, align 8 --> Dst: %0 = load i64, ptr %arrayidx7, align 8
+; NORMALIZE-NEXT: da analyze - normalized - anti [< <]!
+; NORMALIZE-NEXT: Src: store i64 0, ptr %arrayidx, align 8 --> Dst: store i64 %0, ptr %B.addr.11, align 8
+; NORMALIZE-NEXT: da analyze - confused!
+; NORMALIZE-NEXT: Src: %0 = load i64, ptr %arrayidx7, align 8 --> Dst: %0 = load i64, ptr %arrayidx7, align 8
+; NORMALIZE-NEXT: da analyze - none!
+; NORMALIZE-NEXT: Src: %0 = load i64, ptr %arrayidx7, align 8 --> Dst: store i64 %0, ptr %B.addr.11, align 8
+; NORMALIZE-NEXT: da analyze - confused!
+; NORMALIZE-NEXT: Src: store i64 %0, ptr %B.addr.11, align 8 --> Dst: store i64 %0, ptr %B.addr.11, align 8
+; NORMALIZE-NEXT: da analyze - none!
+;
+; DELIN-LABEL: 'banerjee3'
+; DELIN-NEXT: Src: store i64 0, ptr %arrayidx, align 8 --> Dst: store i64 0, ptr %arrayidx, align 8
+; DELIN-NEXT: da analyze - none!
+; DELIN-NEXT: Src: store i64 0, ptr %arrayidx, align 8 --> Dst: %0 = load i64, ptr %arrayidx7, align 8
+; DELIN-NEXT: da analyze - flow [> >]!
+; DELIN-NEXT: Src: store i64 0, ptr %arrayidx, align 8 --> Dst: store i64 %0, ptr %B.addr.11, align 8
+; DELIN-NEXT: da analyze - confused!
+; DELIN-NEXT: Src: %0 = load i64, ptr %arrayidx7, align 8 --> Dst: %0 = load i64, ptr %arrayidx7, align 8
+; DELIN-NEXT: da analyze - none!
+; DELIN-NEXT: Src: %0 = load i64, ptr %arrayidx7, align 8 --> Dst: store i64 %0, ptr %B.addr.11, align 8
+; DELIN-NEXT: da analyze - confused!
+; DELIN-NEXT: Src: store i64 %0, ptr %B.addr.11, align 8 --> Dst: store i64 %0, ptr %B.addr.11, align 8
+; DELIN-NEXT: da analyze - none!
+;
entry:
br label %for.cond1.preheader
-; CHECK: 'Dependence Analysis' for function 'banerjee3':
-; CHECK: da analyze - none!
-; CHECK: da analyze - flow [> >]!
-; CHECK: da analyze - confused!
-; CHECK: da analyze - none!
-; CHECK: da analyze - confused!
-; CHECK: da analyze - none!
-
-; NORMALIZE: 'Dependence Analysis' for function 'banerjee3':
-; NORMALIZE: da analyze - none!
-; NORMALIZE: da analyze - normalized - anti [< <]!
-; NORMALIZE: da analyze - confused!
-; NORMALIZE: da analyze - none!
-; NORMALIZE: da analyze - confused!
-; NORMALIZE: da analyze - none!
-
-; DELIN: 'Dependence Analysis' for function 'banerjee3':
-; DELIN: da analyze - none!
-; DELIN: da analyze - flow [> >]!
-; DELIN: da analyze - confused!
-; DELIN: da analyze - none!
-; DELIN: da analyze - confused!
-; DELIN: da analyze - none!
-
for.cond1.preheader: ; preds = %entry, %for.inc8
%B.addr.04 = phi ptr [ %B, %entry ], [ %scevgep, %for.inc8 ]
%i.03 = phi i64 [ 0, %entry ], [ %inc9, %for.inc8 ]
@@ -299,33 +373,51 @@ for.end10: ; preds = %for.inc8
;; *B++ = A[10*i + j - 100];
define void @banerjee4(ptr %A, ptr %B, i64 %m, i64 %n) nounwind uwtable ssp {
+; CHECK-LABEL: 'banerjee4'
+; CHECK-NEXT: Src: store i64 0, ptr %arrayidx, align 8 --> Dst: store i64 0, ptr %arrayidx, align 8
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: store i64 0, ptr %arrayidx, align 8 --> Dst: %0 = load i64, ptr %arrayidx6, align 8
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: store i64 0, ptr %arrayidx, align 8 --> Dst: store i64 %0, ptr %B.addr.11, align 8
+; CHECK-NEXT: da analyze - confused!
+; CHECK-NEXT: Src: %0 = load i64, ptr %arrayidx6, align 8 --> Dst: %0 = load i64, ptr %arrayidx6, align 8
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: %0 = load i64, ptr %arrayidx6, align 8 --> Dst: store i64 %0, ptr %B.addr.11, align 8
+; CHECK-NEXT: da analyze - confused!
+; CHECK-NEXT: Src: store i64 %0, ptr %B.addr.11, align 8 --> Dst: store i64 %0, ptr %B.addr.11, align 8
+; CHECK-NEXT: da analyze - none!
+;
+; NORMALIZE-LABEL: 'banerjee4'
+; NORMALIZE-NEXT: Src: store i64 0, ptr %arrayidx, align 8 --> Dst: store i64 0, ptr %arrayidx, align 8
+; NORMALIZE-NEXT: da analyze - none!
+; NORMALIZE-NEXT: Src: store i64 0, ptr %arrayidx, align 8 --> Dst: %0 = load i64, ptr %arrayidx6, align 8
+; NORMALIZE-NEXT: da analyze - none!
+; NORMALIZE-NEXT: Src: store i64 0, ptr %arrayidx, align 8 --> Dst: store i64 %0, ptr %B.addr.11, align 8
+; NORMALIZE-NEXT: da analyze - confused!
+; NORMALIZE-NEXT: Src: %0 = load i64, ptr %arrayidx6, align 8 --> Dst: %0 = load i64, ptr %arrayidx6, align 8
+; NORMALIZE-NEXT: da analyze - none!
+; NORMALIZE-NEXT: Src: %0 = load i64, ptr %arrayidx6, align 8 --> Dst: store i64 %0, ptr %B.addr.11, align 8
+; NORMALIZE-NEXT: da analyze - confused!
+; NORMALIZE-NEXT: Src: store i64 %0, ptr %B.addr.11, align 8 --> Dst: store i64 %0, ptr %B.addr.11, align 8
+; NORMALIZE-NEXT: da analyze - none!
+;
+; DELIN-LABEL: 'banerjee4'
+; DELIN-NEXT: Src: store i64 0, ptr %arrayidx, align 8 --> Dst: store i64 0, ptr %arrayidx, align 8
+; DELIN-NEXT: da analyze - none!
+; DELIN-NEXT: Src: store i64 0, ptr %arrayidx, align 8 --> Dst: %0 = load i64, ptr %arrayidx6, align 8
+; DELIN-NEXT: da analyze - none!
+; DELIN-NEXT: Src: store i64 0, ptr %arrayidx, align 8 --> Dst: store i64 %0, ptr %B.addr.11, align 8
+; DELIN-NEXT: da analyze - confused!
+; DELIN-NEXT: Src: %0 = load i64, ptr %arrayidx6, align 8 --> Dst: %0 = load i64, ptr %arrayidx6, align 8
+; DELIN-NEXT: da analyze - none!
+; DELIN-NEXT: Src: %0 = load i64, ptr %arrayidx6, align 8 --> Dst: store i64 %0, ptr %B.addr.11, align 8
+; DELIN-NEXT: da analyze - confused!
+; DELIN-NEXT: Src: store i64 %0, ptr %B.addr.11, align 8 --> Dst: store i64 %0, ptr %B.addr.11, align 8
+; DELIN-NEXT: da analyze - none!
+;
entry:
br label %for.cond1.preheader
-; CHECK: 'Dependence Analysis' for function 'banerjee4':
-; CHECK: da analyze - none!
-; CHECK: da analyze - none!
-; CHECK: da analyze - confused!
-; CHECK: da analyze - none!
-; CHECK: da analyze - confused!
-; CHECK: da analyze - none!
-
-; NORMALIZE: 'Dependence Analysis' for function 'banerjee4':
-; NORMALIZE: da analyze - none!
-; NORMALIZE: da analyze - none!
-; NORMALIZE: da analyze - confused!
-; NORMALIZE: da analyze - none!
-; NORMALIZE: da analyze - confused!
-; NORMALIZE: da analyze - none!
-
-; DELIN: 'Dependence Analysis' for function 'banerjee4':
-; DELIN: da analyze - none!
-; DELIN: da analyze - none!
-; DELIN: da analyze - confused!
-; DELIN: da analyze - none!
-; DELIN: da analyze - confused!
-; DELIN: da analyze - none!
-
for.cond1.preheader: ; preds = %entry, %for.inc7
%B.addr.04 = phi ptr [ %B, %entry ], [ %scevgep, %for.inc7 ]
%i.03 = phi i64 [ 0, %entry ], [ %inc8, %for.inc7 ]
@@ -366,33 +458,51 @@ for.end9: ; preds = %for.inc7
;; *B++ = A[10*i + j - 99];
define void @banerjee5(ptr %A, ptr %B, i64 %m, i64 %n) nounwind uwtable ssp {
+; CHECK-LABEL: 'banerjee5'
+; CHECK-NEXT: Src: store i64 0, ptr %arrayidx, align 8 --> Dst: store i64 0, ptr %arrayidx, align 8
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: store i64 0, ptr %arrayidx, align 8 --> Dst: %0 = load i64, ptr %arrayidx6, align 8
+; CHECK-NEXT: da analyze - flow [< <]!
+; CHECK-NEXT: Src: store i64 0, ptr %arrayidx, align 8 --> Dst: store i64 %0, ptr %B.addr.11, align 8
+; CHECK-NEXT: da analyze - confused!
+; CHECK-NEXT: Src: %0 = load i64, ptr %arrayidx6, align 8 --> Dst: %0 = load i64, ptr %arrayidx6, align 8
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: %0 = load i64, ptr %arrayidx6, align 8 --> Dst: store i64 %0, ptr %B.addr.11, align 8
+; CHECK-NEXT: da analyze - confused!
+; CHECK-NEXT: Src: store i64 %0, ptr %B.addr.11, align 8 --> Dst: store i64 %0, ptr %B.addr.11, align 8
+; CHECK-NEXT: da analyze - none!
+;
+; NORMALIZE-LABEL: 'banerjee5'
+; NORMALIZE-NEXT: Src: store i64 0, ptr %arrayidx, align 8 --> Dst: store i64 0, ptr %arrayidx, align 8
+; NORMALIZE-NEXT: da analyze - none!
+; NORMALIZE-NEXT: Src: store i64 0, ptr %arrayidx, align 8 --> Dst: %0 = load i64, ptr %arrayidx6, align 8
+; NORMALIZE-NEXT: da analyze - flow [< <]!
+; NORMALIZE-NEXT: Src: store i64 0, ptr %arrayidx, align 8 --> Dst: store i64 %0, ptr %B.addr.11, align 8
+; NORMALIZE-NEXT: da analyze - confused!
+; NORMALIZE-NEXT: Src: %0 = load i64, ptr %arrayidx6, align 8 --> Dst: %0 = load i64, ptr %arrayidx6, align 8
+; NORMALIZE-NEXT: da analyze - none!
+; NORMALIZE-NEXT: Src: %0 = load i64, ptr %arrayidx6, align 8 --> Dst: store i64 %0, ptr %B.addr.11, align 8
+; NORMALIZE-NEXT: da analyze - confused!
+; NORMALIZE-NEXT: Src: store i64 %0, ptr %B.addr.11, align 8 --> Dst: store i64 %0, ptr %B.addr.11, align 8
+; NORMALIZE-NEXT: da analyze - none!
+;
+; DELIN-LABEL: 'banerjee5'
+; DELIN-NEXT: Src: store i64 0, ptr %arrayidx, align 8 --> Dst: store i64 0, ptr %arrayidx, align 8
+; DELIN-NEXT: da analyze - none!
+; DELIN-NEXT: Src: store i64 0, ptr %arrayidx, align 8 --> Dst: %0 = load i64, ptr %arrayidx6, align 8
+; DELIN-NEXT: da analyze - flow [< <]!
+; DELIN-NEXT: Src: store i64 0, ptr %arrayidx, align 8 --> Dst: store i64 %0, ptr %B.addr.11, align 8
+; DELIN-NEXT: da analyze - confused!
+; DELIN-NEXT: Src: %0 = load i64, ptr %arrayidx6, align 8 --> Dst: %0 = load i64, ptr %arrayidx6, align 8
+; DELIN-NEXT: da analyze - none!
+; DELIN-NEXT: Src: %0 = load i64, ptr %arrayidx6, align 8 --> Dst: store i64 %0, ptr %B.addr.11, align 8
+; DELIN-NEXT: da analyze - confused!
+; DELIN-NEXT: Src: store i64 %0, ptr %B.addr.11, align 8 --> Dst: store i64 %0, ptr %B.addr.11, align 8
+; DELIN-NEXT: da analyze - none!
+;
entry:
br label %for.cond1.preheader
-; CHECK: 'Dependence Analysis' for function 'banerjee5':
-; CHECK: da analyze - none!
-; CHECK: da analyze - flow [< <]!
-; CHECK: da analyze - confused!
-; CHECK: da analyze - none!
-; CHECK: da analyze - confused!
-; CHECK: da analyze - none!
-
-; NORMALIZE: 'Dependence Analysis' for function 'banerjee5':
-; NORMALIZE: da analyze - none!
-; NORMALIZE: da analyze - flow [< <]!
-; NORMALIZE: da analyze - confused!
-; NORMALIZE: da analyze - none!
-; NORMALIZE: da analyze - confused!
-; NORMALIZE: da analyze - none!
-
-; DELIN: 'Dependence Analysis' for function 'banerjee5':
-; DELIN: da analyze - none!
-; DELIN: da analyze - flow [< <]!
-; DELIN: da analyze - confused!
-; DELIN: da analyze - none!
-; DELIN: da analyze - confused!
-; DELIN: da analyze - none!
-
for.cond1.preheader: ; preds = %entry, %for.inc7
%B.addr.04 = phi ptr [ %B, %entry ], [ %scevgep, %for.inc7 ]
%i.03 = phi i64 [ 0, %entry ], [ %inc8, %for.inc7 ]
@@ -433,33 +543,51 @@ for.end9: ; preds = %for.inc7
;; *B++ = A[10*i + j + 9];
define void @banerjee6(ptr %A, ptr %B, i64 %m, i64 %n) nounwind uwtable ssp {
+; CHECK-LABEL: 'banerjee6'
+; CHECK-NEXT: Src: store i64 0, ptr %arrayidx, align 8 --> Dst: store i64 0, ptr %arrayidx, align 8
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: store i64 0, ptr %arrayidx, align 8 --> Dst: %0 = load i64, ptr %arrayidx7, align 8
+; CHECK-NEXT: da analyze - flow [=> <>]!
+; CHECK-NEXT: Src: store i64 0, ptr %arrayidx, align 8 --> Dst: store i64 %0, ptr %B.addr.11, align 8
+; CHECK-NEXT: da analyze - confused!
+; CHECK-NEXT: Src: %0 = load i64, ptr %arrayidx7, align 8 --> Dst: %0 = load i64, ptr %arrayidx7, align 8
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: %0 = load i64, ptr %arrayidx7, align 8 --> Dst: store i64 %0, ptr %B.addr.11, align 8
+; CHECK-NEXT: da analyze - confused!
+; CHECK-NEXT: Src: store i64 %0, ptr %B.addr.11, align 8 --> Dst: store i64 %0, ptr %B.addr.11, align 8
+; CHECK-NEXT: da analyze - none!
+;
+; NORMALIZE-LABEL: 'banerjee6'
+; NORMALIZE-NEXT: Src: store i64 0, ptr %arrayidx, align 8 --> Dst: store i64 0, ptr %arrayidx, align 8
+; NORMALIZE-NEXT: da analyze - none!
+; NORMALIZE-NEXT: Src: store i64 0, ptr %arrayidx, align 8 --> Dst: %0 = load i64, ptr %arrayidx7, align 8
+; NORMALIZE-NEXT: da analyze - normalized - anti [<= <>]!
+; NORMALIZE-NEXT: Src: store i64 0, ptr %arrayidx, align 8 --> Dst: store i64 %0, ptr %B.addr.11, align 8
+; NORMALIZE-NEXT: da analyze - confused!
+; NORMALIZE-NEXT: Src: %0 = load i64, ptr %arrayidx7, align 8 --> Dst: %0 = load i64, ptr %arrayidx7, align 8
+; NORMALIZE-NEXT: da analyze - none!
+; NORMALIZE-NEXT: Src: %0 = load i64, ptr %arrayidx7, align 8 --> Dst: store i64 %0, ptr %B.addr.11, align 8
+; NORMALIZE-NEXT: da analyze - confused!
+; NORMALIZE-NEXT: Src: store i64 %0, ptr %B.addr.11, align 8 --> Dst: store i64 %0, ptr %B.addr.11, align 8
+; NORMALIZE-NEXT: da analyze - none!
+;
+; DELIN-LABEL: 'banerjee6'
+; DELIN-NEXT: Src: store i64 0, ptr %arrayidx, align 8 --> Dst: store i64 0, ptr %arrayidx, align 8
+; DELIN-NEXT: da analyze - none!
+; DELIN-NEXT: Src: store i64 0, ptr %arrayidx, align 8 --> Dst: %0 = load i64, ptr %arrayidx7, align 8
+; DELIN-NEXT: da analyze - flow [=> <>]!
+; DELIN-NEXT: Src: store i64 0, ptr %arrayidx, align 8 --> Dst: store i64 %0, ptr %B.addr.11, align 8
+; DELIN-NEXT: da analyze - confused!
+; DELIN-NEXT: Src: %0 = load i64, ptr %arrayidx7, align 8 --> Dst: %0 = load i64, ptr %arrayidx7, align 8
+; DELIN-NEXT: da analyze - none!
+; DELIN-NEXT: Src: %0 = load i64, ptr %arrayidx7, align 8 --> Dst: store i64 %0, ptr %B.addr.11, align 8
+; DELIN-NEXT: da analyze - confused!
+; DELIN-NEXT: Src: store i64 %0, ptr %B.addr.11, align 8 --> Dst: store i64 %0, ptr %B.addr.11, align 8
+; DELIN-NEXT: da analyze - none!
+;
entry:
br label %for.cond1.preheader
-; CHECK: 'Dependence Analysis' for function 'banerjee6':
-; CHECK: da analyze - none!
-; CHECK: da analyze - flow [=> <>]!
-; CHECK: da analyze - confused!
-; CHECK: da analyze - none!
-; CHECK: da analyze - confused!
-; CHECK: da analyze - none!
-
-; NORMALIZE: 'Dependence Analysis' for function 'banerjee6':
-; NORMALIZE: da analyze - none!
-; NORMALIZE: da analyze - normalized - anti [<= <>]!
-; NORMALIZE: da analyze - confused!
-; NORMALIZE: da analyze - none!
-; NORMALIZE: da analyze - confused!
-; NORMALIZE: da analyze - none!
-
-; DELIN: 'Dependence Analysis' for function 'banerjee6':
-; DELIN: da analyze - none!
-; DELIN: da analyze - flow [=> <>]!
-; DELIN: da analyze - confused!
-; DELIN: da analyze - none!
-; DELIN: da analyze - confused!
-; DELIN: da analyze - none!
-
for.cond1.preheader: ; preds = %entry, %for.inc8
%B.addr.04 = phi ptr [ %B, %entry ], [ %scevgep, %for.inc8 ]
%i.03 = phi i64 [ 0, %entry ], [ %inc9, %for.inc8 ]
@@ -500,33 +628,51 @@ for.end10: ; preds = %for.inc8
;; *B++ = A[10*i + j + 10];
define void @banerjee7(ptr %A, ptr %B, i64 %m, i64 %n) nounwind uwtable ssp {
+; CHECK-LABEL: 'banerjee7'
+; CHECK-NEXT: Src: store i64 0, ptr %arrayidx, align 8 --> Dst: store i64 0, ptr %arrayidx, align 8
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: store i64 0, ptr %arrayidx, align 8 --> Dst: %0 = load i64, ptr %arrayidx7, align 8
+; CHECK-NEXT: da analyze - flow [> <=]!
+; CHECK-NEXT: Src: store i64 0, ptr %arrayidx, align 8 --> Dst: store i64 %0, ptr %B.addr.11, align 8
+; CHECK-NEXT: da analyze - confused!
+; CHECK-NEXT: Src: %0 = load i64, ptr %arrayidx7, align 8 --> Dst: %0 = load i64, ptr %arrayidx7, align 8
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: %0 = load i64, ptr %arrayidx7, align 8 --> Dst: store i64 %0, ptr %B.addr.11, align 8
+; CHECK-NEXT: da analyze - confused!
+; CHECK-NEXT: Src: store i64 %0, ptr %B.addr.11, align 8 --> Dst: store i64 %0, ptr %B.addr.11, align 8
+; CHECK-NEXT: da analyze - none!
+;
+; NORMALIZE-LABEL: 'banerjee7'
+; NORMALIZE-NEXT: Src: store i64 0, ptr %arrayidx, align 8 --> Dst: store i64 0, ptr %arrayidx, align 8
+; NORMALIZE-NEXT: da analyze - none!
+; NORMALIZE-NEXT: Src: store i64 0, ptr %arrayidx, align 8 --> Dst: %0 = load i64, ptr %arrayidx7, align 8
+; NORMALIZE-NEXT: da analyze - normalized - anti [< =>]!
+; NORMALIZE-NEXT: Src: store i64 0, ptr %arrayidx, align 8 --> Dst: store i64 %0, ptr %B.addr.11, align 8
+; NORMALIZE-NEXT: da analyze - confused!
+; NORMALIZE-NEXT: Src: %0 = load i64, ptr %arrayidx7, align 8 --> Dst: %0 = load i64, ptr %arrayidx7, align 8
+; NORMALIZE-NEXT: da analyze - none!
+; NORMALIZE-NEXT: Src: %0 = load i64, ptr %arrayidx7, align 8 --> Dst: store i64 %0, ptr %B.addr.11, align 8
+; NORMALIZE-NEXT: da analyze - confused!
+; NORMALIZE-NEXT: Src: store i64 %0, ptr %B.addr.11, align 8 --> Dst: store i64 %0, ptr %B.addr.11, align 8
+; NORMALIZE-NEXT: da analyze - none!
+;
+; DELIN-LABEL: 'banerjee7'
+; DELIN-NEXT: Src: store i64 0, ptr %arrayidx, align 8 --> Dst: store i64 0, ptr %arrayidx, align 8
+; DELIN-NEXT: da analyze - none!
+; DELIN-NEXT: Src: store i64 0, ptr %arrayidx, align 8 --> Dst: %0 = load i64, ptr %arrayidx7, align 8
+; DELIN-NEXT: da analyze - flow [> <=]!
+; DELIN-NEXT: Src: store i64 0, ptr %arrayidx, align 8 --> Dst: store i64 %0, ptr %B.addr.11, align 8
+; DELIN-NEXT: da analyze - confused!
+; DELIN-NEXT: Src: %0 = load i64, ptr %arrayidx7, align 8 --> Dst: %0 = load i64, ptr %arrayidx7, align 8
+; DELIN-NEXT: da analyze - none!
+; DELIN-NEXT: Src: %0 = load i64, ptr %arrayidx7, align 8 --> Dst: store i64 %0, ptr %B.addr.11, align 8
+; DELIN-NEXT: da analyze - confused!
+; DELIN-NEXT: Src: store i64 %0, ptr %B.addr.11, align 8 --> Dst: store i64 %0, ptr %B.addr.11, align 8
+; DELIN-NEXT: da analyze - none!
+;
entry:
br label %for.cond1.preheader
-; CHECK: 'Dependence Analysis' for function 'banerjee7':
-; CHECK: da analyze - none!
-; CHECK: da analyze - flow [> <=]!
-; CHECK: da analyze - confused!
-; CHECK: da analyze - none!
-; CHECK: da analyze - confused!
-; CHECK: da analyze - none!
-
-; NORMALIZE: 'Dependence Analysis' for function 'banerjee7':
-; NORMALIZE: da analyze - none!
-; NORMALIZE: da analyze - normalized - anti [< =>]!
-; NORMALIZE: da analyze - confused!
-; NORMALIZE: da analyze - none!
-; NORMALIZE: da analyze - confused!
-; NORMALIZE: da analyze - none!
-
-; DELIN: 'Dependence Analysis' for function 'banerjee7':
-; DELIN: da analyze - none!
-; DELIN: da analyze - flow [> <=]!
-; DELIN: da analyze - confused!
-; DELIN: da analyze - none!
-; DELIN: da analyze - confused!
-; DELIN: da analyze - none!
-
for.cond1.preheader: ; preds = %entry, %for.inc8
%B.addr.04 = phi ptr [ %B, %entry ], [ %scevgep, %for.inc8 ]
%i.03 = phi i64 [ 0, %entry ], [ %inc9, %for.inc8 ]
@@ -567,33 +713,51 @@ for.end10: ; preds = %for.inc8
;; *B++ = A[10*i + j + 11];
define void @banerjee8(ptr %A, ptr %B, i64 %m, i64 %n) nounwind uwtable ssp {
+; CHECK-LABEL: 'banerjee8'
+; CHECK-NEXT: Src: store i64 0, ptr %arrayidx, align 8 --> Dst: store i64 0, ptr %arrayidx, align 8
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: store i64 0, ptr %arrayidx, align 8 --> Dst: %0 = load i64, ptr %arrayidx7, align 8
+; CHECK-NEXT: da analyze - flow [> <>]!
+; CHECK-NEXT: Src: store i64 0, ptr %arrayidx, align 8 --> Dst: store i64 %0, ptr %B.addr.11, align 8
+; CHECK-NEXT: da analyze - confused!
+; CHECK-NEXT: Src: %0 = load i64, ptr %arrayidx7, align 8 --> Dst: %0 = load i64, ptr %arrayidx7, align 8
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: %0 = load i64, ptr %arrayidx7, align 8 --> Dst: store i64 %0, ptr %B.addr.11, align 8
+; CHECK-NEXT: da analyze - confused!
+; CHECK-NEXT: Src: store i64 %0, ptr %B.addr.11, align 8 --> Dst: store i64 %0, ptr %B.addr.11, align 8
+; CHECK-NEXT: da analyze - none!
+;
+; NORMALIZE-LABEL: 'banerjee8'
+; NORMALIZE-NEXT: Src: store i64 0, ptr %arrayidx, align 8 --> Dst: store i64 0, ptr %arrayidx, align 8
+; NORMALIZE-NEXT: da analyze - none!
+; NORMALIZE-NEXT: Src: store i64 0, ptr %arrayidx, align 8 --> Dst: %0 = load i64, ptr %arrayidx7, align 8
+; NORMALIZE-NEXT: da analyze - normalized - anti [< <>]!
+; NORMALIZE-NEXT: Src: store i64 0, ptr %arrayidx, align 8 --> Dst: store i64 %0, ptr %B.addr.11, align 8
+; NORMALIZE-NEXT: da analyze - confused!
+; NORMALIZE-NEXT: Src: %0 = load i64, ptr %arrayidx7, align 8 --> Dst: %0 = load i64, ptr %arrayidx7, align 8
+; NORMALIZE-NEXT: da analyze - none!
+; NORMALIZE-NEXT: Src: %0 = load i64, ptr %arrayidx7, align 8 --> Dst: store i64 %0, ptr %B.addr.11, align 8
+; NORMALIZE-NEXT: da analyze - confused!
+; NORMALIZE-NEXT: Src: store i64 %0, ptr %B.addr.11, align 8 --> Dst: store i64 %0, ptr %B.addr.11, align 8
+; NORMALIZE-NEXT: da analyze - none!
+;
+; DELIN-LABEL: 'banerjee8'
+; DELIN-NEXT: Src: store i64 0, ptr %arrayidx, align 8 --> Dst: store i64 0, ptr %arrayidx, align 8
+; DELIN-NEXT: da analyze - none!
+; DELIN-NEXT: Src: store i64 0, ptr %arrayidx, align 8 --> Dst: %0 = load i64, ptr %arrayidx7, align 8
+; DELIN-NEXT: da analyze - flow [> <>]!
+; DELIN-NEXT: Src: store i64 0, ptr %arrayidx, align 8 --> Dst: store i64 %0, ptr %B.addr.11, align 8
+; DELIN-NEXT: da analyze - confused!
+; DELIN-NEXT: Src: %0 = load i64, ptr %arrayidx7, align 8 --> Dst: %0 = load i64, ptr %arrayidx7, align 8
+; DELIN-NEXT: da analyze - none!
+; DELIN-NEXT: Src: %0 = load i64, ptr %arrayidx7, align 8 --> Dst: store i64 %0, ptr %B.addr.11, align 8
+; DELIN-NEXT: da analyze - confused!
+; DELIN-NEXT: Src: store i64 %0, ptr %B.addr.11, align 8 --> Dst: store i64 %0, ptr %B.addr.11, align 8
+; DELIN-NEXT: da analyze - none!
+;
entry:
br label %for.cond1.preheader
-; CHECK: 'Dependence Analysis' for function 'banerjee8':
-; CHECK: da analyze - none!
-; CHECK: da analyze - flow [> <>]!
-; CHECK: da analyze - confused!
-; CHECK: da analyze - none!
-; CHECK: da analyze - confused!
-; CHECK: da analyze - none!
-
-; NORMALIZE: 'Dependence Analysis' for function 'banerjee8':
-; NORMALIZE: da analyze - none!
-; NORMALIZE: da analyze - normalized - anti [< <>]!
-; NORMALIZE: da analyze - confused!
-; NORMALIZE: da analyze - none!
-; NORMALIZE: da analyze - confused!
-; NORMALIZE: da analyze - none!
-
-; DELIN: 'Dependence Analysis' for function 'banerjee8':
-; DELIN: da analyze - none!
-; DELIN: da analyze - flow [> <>]!
-; DELIN: da analyze - confused!
-; DELIN: da analyze - none!
-; DELIN: da analyze - confused!
-; DELIN: da analyze - none!
-
for.cond1.preheader: ; preds = %entry, %for.inc8
%B.addr.04 = phi ptr [ %B, %entry ], [ %scevgep, %for.inc8 ]
%i.03 = phi i64 [ 0, %entry ], [ %inc9, %for.inc8 ]
@@ -634,33 +798,51 @@ for.end10: ; preds = %for.inc8
;; *B++ = A[i - 500*j + 11];
define void @banerjee9(ptr %A, ptr %B, i64 %m, i64 %n) nounwind uwtable ssp {
+; CHECK-LABEL: 'banerjee9'
+; CHECK-NEXT: Src: store i64 0, ptr %arrayidx, align 8 --> Dst: store i64 0, ptr %arrayidx, align 8
+; CHECK-NEXT: da analyze - output [* *]!
+; CHECK-NEXT: Src: store i64 0, ptr %arrayidx, align 8 --> Dst: %1 = load i64, ptr %arrayidx7, align 8
+; CHECK-NEXT: da analyze - flow [<= =|<]!
+; CHECK-NEXT: Src: store i64 0, ptr %arrayidx, align 8 --> Dst: store i64 %1, ptr %B.addr.11, align 8
+; CHECK-NEXT: da analyze - confused!
+; CHECK-NEXT: Src: %1 = load i64, ptr %arrayidx7, align 8 --> Dst: %1 = load i64, ptr %arrayidx7, align 8
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: %1 = load i64, ptr %arrayidx7, align 8 --> Dst: store i64 %1, ptr %B.addr.11, align 8
+; CHECK-NEXT: da analyze - confused!
+; CHECK-NEXT: Src: store i64 %1, ptr %B.addr.11, align 8 --> Dst: store i64 %1, ptr %B.addr.11, align 8
+; CHECK-NEXT: da analyze - none!
+;
+; NORMALIZE-LABEL: 'banerjee9'
+; NORMALIZE-NEXT: Src: store i64 0, ptr %arrayidx, align 8 --> Dst: store i64 0, ptr %arrayidx, align 8
+; NORMALIZE-NEXT: da analyze - output [* *]!
+; NORMALIZE-NEXT: Src: store i64 0, ptr %arrayidx, align 8 --> Dst: %1 = load i64, ptr %arrayidx7, align 8
+; NORMALIZE-NEXT: da analyze - flow [<= =|<]!
+; NORMALIZE-NEXT: Src: store i64 0, ptr %arrayidx, align 8 --> Dst: store i64 %1, ptr %B.addr.11, align 8
+; NORMALIZE-NEXT: da analyze - confused!
+; NORMALIZE-NEXT: Src: %1 = load i64, ptr %arrayidx7, align 8 --> Dst: %1 = load i64, ptr %arrayidx7, align 8
+; NORMALIZE-NEXT: da analyze - none!
+; NORMALIZE-NEXT: Src: %1 = load i64, ptr %arrayidx7, align 8 --> Dst: store i64 %1, ptr %B.addr.11, align 8
+; NORMALIZE-NEXT: da analyze - confused!
+; NORMALIZE-NEXT: Src: store i64 %1, ptr %B.addr.11, align 8 --> Dst: store i64 %1, ptr %B.addr.11, align 8
+; NORMALIZE-NEXT: da analyze - none!
+;
+; DELIN-LABEL: 'banerjee9'
+; DELIN-NEXT: Src: store i64 0, ptr %arrayidx, align 8 --> Dst: store i64 0, ptr %arrayidx, align 8
+; DELIN-NEXT: da analyze - output [* *]!
+; DELIN-NEXT: Src: store i64 0, ptr %arrayidx, align 8 --> Dst: %1 = load i64, ptr %arrayidx7, align 8
+; DELIN-NEXT: da analyze - flow [<= =|<]!
+; DELIN-NEXT: Src: store i64 0, ptr %arrayidx, align 8 --> Dst: store i64 %1, ptr %B.addr.11, align 8
+; DELIN-NEXT: da analyze - confused!
+; DELIN-NEXT: Src: %1 = load i64, ptr %arrayidx7, align 8 --> Dst: %1 = load i64, ptr %arrayidx7, align 8
+; DELIN-NEXT: da analyze - none!
+; DELIN-NEXT: Src: %1 = load i64, ptr %arrayidx7, align 8 --> Dst: store i64 %1, ptr %B.addr.11, align 8
+; DELIN-NEXT: da analyze - confused!
+; DELIN-NEXT: Src: store i64 %1, ptr %B.addr.11, align 8 --> Dst: store i64 %1, ptr %B.addr.11, align 8
+; DELIN-NEXT: da analyze - none!
+;
entry:
br label %for.cond1.preheader
-; CHECK: 'Dependence Analysis' for function 'banerjee9':
-; CHECK: da analyze - output [* *]!
-; CHECK: da analyze - flow [<= =|<]!
-; CHECK: da analyze - confused!
-; CHECK: da analyze - none!
-; CHECK: da analyze - confused!
-; CHECK: da analyze - none!
-
-; NORMALIZE: 'Dependence Analysis' for function 'banerjee9':
-; NORMALIZE: da analyze - output [* *]!
-; NORMALIZE: da analyze - flow [<= =|<]!
-; NORMALIZE: da analyze - confused!
-; NORMALIZE: da analyze - none!
-; NORMALIZE: da analyze - confused!
-; NORMALIZE: da analyze - none!
-
-; DELIN: 'Dependence Analysis' for function 'banerjee9':
-; DELIN: da analyze - output [* *]!
-; DELIN: da analyze - flow [<= =|<]!
-; DELIN: da analyze - confused!
-; DELIN: da analyze - none!
-; DELIN: da analyze - confused!
-; DELIN: da analyze - none!
-
for.cond1.preheader: ; preds = %entry, %for.inc8
%B.addr.04 = phi ptr [ %B, %entry ], [ %scevgep, %for.inc8 ]
%i.03 = phi i64 [ 0, %entry ], [ %inc9, %for.inc8 ]
@@ -702,33 +884,51 @@ for.end10: ; preds = %for.inc8
;; *B++ = A[i - 500*j + 11];
define void @banerjee10(ptr %A, ptr %B, i64 %m, i64 %n) nounwind uwtable ssp {
+; CHECK-LABEL: 'banerjee10'
+; CHECK-NEXT: Src: store i64 0, ptr %arrayidx, align 8 --> Dst: store i64 0, ptr %arrayidx, align 8
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: store i64 0, ptr %arrayidx, align 8 --> Dst: %1 = load i64, ptr %arrayidx6, align 8
+; CHECK-NEXT: da analyze - flow [<> =]!
+; CHECK-NEXT: Src: store i64 0, ptr %arrayidx, align 8 --> Dst: store i64 %1, ptr %B.addr.11, align 8
+; CHECK-NEXT: da analyze - confused!
+; CHECK-NEXT: Src: %1 = load i64, ptr %arrayidx6, align 8 --> Dst: %1 = load i64, ptr %arrayidx6, align 8
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: %1 = load i64, ptr %arrayidx6, align 8 --> Dst: store i64 %1, ptr %B.addr.11, align 8
+; CHECK-NEXT: da analyze - confused!
+; CHECK-NEXT: Src: store i64 %1, ptr %B.addr.11, align 8 --> Dst: store i64 %1, ptr %B.addr.11, align 8
+; CHECK-NEXT: da analyze - none!
+;
+; NORMALIZE-LABEL: 'banerjee10'
+; NORMALIZE-NEXT: Src: store i64 0, ptr %arrayidx, align 8 --> Dst: store i64 0, ptr %arrayidx, align 8
+; NORMALIZE-NEXT: da analyze - none!
+; NORMALIZE-NEXT: Src: store i64 0, ptr %arrayidx, align 8 --> Dst: %1 = load i64, ptr %arrayidx6, align 8
+; NORMALIZE-NEXT: da analyze - flow [<> =]!
+; NORMALIZE-NEXT: Src: store i64 0, ptr %arrayidx, align 8 --> Dst: store i64 %1, ptr %B.addr.11, align 8
+; NORMALIZE-NEXT: da analyze - confused!
+; NORMALIZE-NEXT: Src: %1 = load i64, ptr %arrayidx6, align 8 --> Dst: %1 = load i64, ptr %arrayidx6, align 8
+; NORMALIZE-NEXT: da analyze - none!
+; NORMALIZE-NEXT: Src: %1 = load i64, ptr %arrayidx6, align 8 --> Dst: store i64 %1, ptr %B.addr.11, align 8
+; NORMALIZE-NEXT: da analyze - confused!
+; NORMALIZE-NEXT: Src: store i64 %1, ptr %B.addr.11, align 8 --> Dst: store i64 %1, ptr %B.addr.11, align 8
+; NORMALIZE-NEXT: da analyze - none!
+;
+; DELIN-LABEL: 'banerjee10'
+; DELIN-NEXT: Src: store i64 0, ptr %arrayidx, align 8 --> Dst: store i64 0, ptr %arrayidx, align 8
+; DELIN-NEXT: da analyze - none!
+; DELIN-NEXT: Src: store i64 0, ptr %arrayidx, align 8 --> Dst: %1 = load i64, ptr %arrayidx6, align 8
+; DELIN-NEXT: da analyze - flow [<> =]!
+; DELIN-NEXT: Src: store i64 0, ptr %arrayidx, align 8 --> Dst: store i64 %1, ptr %B.addr.11, align 8
+; DELIN-NEXT: da analyze - confused!
+; DELIN-NEXT: Src: %1 = load i64, ptr %arrayidx6, align 8 --> Dst: %1 = load i64, ptr %arrayidx6, align 8
+; DELIN-NEXT: da analyze - none!
+; DELIN-NEXT: Src: %1 = load i64, ptr %arrayidx6, align 8 --> Dst: store i64 %1, ptr %B.addr.11, align 8
+; DELIN-NEXT: da analyze - confused!
+; DELIN-NEXT: Src: store i64 %1, ptr %B.addr.11, align 8 --> Dst: store i64 %1, ptr %B.addr.11, align 8
+; DELIN-NEXT: da analyze - none!
+;
entry:
br label %for.cond1.preheader
-; CHECK: 'Dependence Analysis' for function 'banerjee10':
-; CHECK: da analyze - none!
-; CHECK: da analyze - flow [<> =]!
-; CHECK: da analyze - confused!
-; CHECK: da analyze - none!
-; CHECK: da analyze - confused!
-; CHECK: da analyze - none!
-
-; NORMALIZE: 'Dependence Analysis' for function 'banerjee10':
-; NORMALIZE: da analyze - none!
-; NORMALIZE: da analyze - flow [<> =]!
-; NORMALIZE: da analyze - confused!
-; NORMALIZE: da analyze - none!
-; NORMALIZE: da analyze - confused!
-; NORMALIZE: da analyze - none!
-
-; DELIN: 'Dependence Analysis' for function 'banerjee10':
-; DELIN: da analyze - none!
-; DELIN: da analyze - flow [<> =]!
-; DELIN: da analyze - confused!
-; DELIN: da analyze - none!
-; DELIN: da analyze - confused!
-; DELIN: da analyze - none!
-
for.cond1.preheader: ; preds = %entry, %for.inc7
%B.addr.04 = phi ptr [ %B, %entry ], [ %scevgep, %for.inc7 ]
%i.03 = phi i64 [ 0, %entry ], [ %inc8, %for.inc7 ]
@@ -769,33 +969,51 @@ for.end9: ; preds = %for.inc7
;; *B++ = A[250*i - j + 11];
define void @banerjee11(ptr %A, ptr %B, i64 %m, i64 %n) nounwind uwtable ssp {
+; CHECK-LABEL: 'banerjee11'
+; CHECK-NEXT: Src: store i64 0, ptr %arrayidx, align 8 --> Dst: store i64 0, ptr %arrayidx, align 8
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: store i64 0, ptr %arrayidx, align 8 --> Dst: %0 = load i64, ptr %arrayidx6, align 8
+; CHECK-NEXT: da analyze - flow [<= <>]!
+; CHECK-NEXT: Src: store i64 0, ptr %arrayidx, align 8 --> Dst: store i64 %0, ptr %B.addr.11, align 8
+; CHECK-NEXT: da analyze - confused!
+; CHECK-NEXT: Src: %0 = load i64, ptr %arrayidx6, align 8 --> Dst: %0 = load i64, ptr %arrayidx6, align 8
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: %0 = load i64, ptr %arrayidx6, align 8 --> Dst: store i64 %0, ptr %B.addr.11, align 8
+; CHECK-NEXT: da analyze - confused!
+; CHECK-NEXT: Src: store i64 %0, ptr %B.addr.11, align 8 --> Dst: store i64 %0, ptr %B.addr.11, align 8
+; CHECK-NEXT: da analyze - none!
+;
+; NORMALIZE-LABEL: 'banerjee11'
+; NORMALIZE-NEXT: Src: store i64 0, ptr %arrayidx, align 8 --> Dst: store i64 0, ptr %arrayidx, align 8
+; NORMALIZE-NEXT: da analyze - none!
+; NORMALIZE-NEXT: Src: store i64 0, ptr %arrayidx, align 8 --> Dst: %0 = load i64, ptr %arrayidx6, align 8
+; NORMALIZE-NEXT: da analyze - flow [<= <>]!
+; NORMALIZE-NEXT: Src: store i64 0, ptr %arrayidx, align 8 --> Dst: store i64 %0, ptr %B.addr.11, align 8
+; NORMALIZE-NEXT: da analyze - confused!
+; NORMALIZE-NEXT: Src: %0 = load i64, ptr %arrayidx6, align 8 --> Dst: %0 = load i64, ptr %arrayidx6, align 8
+; NORMALIZE-NEXT: da analyze - none!
+; NORMALIZE-NEXT: Src: %0 = load i64, ptr %arrayidx6, align 8 --> Dst: store i64 %0, ptr %B.addr.11, align 8
+; NORMALIZE-NEXT: da analyze - confused!
+; NORMALIZE-NEXT: Src: store i64 %0, ptr %B.addr.11, align 8 --> Dst: store i64 %0, ptr %B.addr.11, align 8
+; NORMALIZE-NEXT: da analyze - none!
+;
+; DELIN-LABEL: 'banerjee11'
+; DELIN-NEXT: Src: store i64 0, ptr %arrayidx, align 8 --> Dst: store i64 0, ptr %arrayidx, align 8
+; DELIN-NEXT: da analyze - none!
+; DELIN-NEXT: Src: store i64 0, ptr %arrayidx, align 8 --> Dst: %0 = load i64, ptr %arrayidx6, align 8
+; DELIN-NEXT: da analyze - flow [<= <>]!
+; DELIN-NEXT: Src: store i64 0, ptr %arrayidx, align 8 --> Dst: store i64 %0, ptr %B.addr.11, align 8
+; DELIN-NEXT: da analyze - confused!
+; DELIN-NEXT: Src: %0 = load i64, ptr %arrayidx6, align 8 --> Dst: %0 = load i64, ptr %arrayidx6, align 8
+; DELIN-NEXT: da analyze - none!
+; DELIN-NEXT: Src: %0 = load i64, ptr %arrayidx6, align 8 --> Dst: store i64 %0, ptr %B.addr.11, align 8
+; DELIN-NEXT: da analyze - confused!
+; DELIN-NEXT: Src: store i64 %0, ptr %B.addr.11, align 8 --> Dst: store i64 %0, ptr %B.addr.11, align 8
+; DELIN-NEXT: da analyze - none!
+;
entry:
br label %for.cond1.preheader
-; CHECK: 'Dependence Analysis' for function 'banerjee11':
-; CHECK: da analyze - none!
-; CHECK: da analyze - flow [<= <>]!
-; CHECK: da analyze - confused!
-; CHECK: da analyze - none!
-; CHECK: da analyze - confused!
-; CHECK: da analyze - none!
-
-; NORMALIZE: 'Dependence Analysis' for function 'banerjee11':
-; NORMALIZE: da analyze - none!
-; NORMALIZE: da analyze - flow [<= <>]!
-; NORMALIZE: da analyze - confused!
-; NORMALIZE: da analyze - none!
-; NORMALIZE: da analyze - confused!
-; NORMALIZE: da analyze - none!
-
-; DELIN: 'Dependence Analysis' for function 'banerjee11':
-; DELIN: da analyze - none!
-; DELIN: da analyze - flow [<= <>]!
-; DELIN: da analyze - confused!
-; DELIN: da analyze - none!
-; DELIN: da analyze - confused!
-; DELIN: da analyze - none!
-
for.cond1.preheader: ; preds = %entry, %for.inc7
%B.addr.04 = phi ptr [ %B, %entry ], [ %scevgep, %for.inc7 ]
%i.03 = phi i64 [ 0, %entry ], [ %inc8, %for.inc7 ]
@@ -836,33 +1054,51 @@ for.end9: ; preds = %for.inc7
;; *B++ = A[100*i - j + 11];
define void @banerjee12(ptr %A, ptr %B, i64 %m, i64 %n) nounwind uwtable ssp {
+; CHECK-LABEL: 'banerjee12'
+; CHECK-NEXT: Src: store i64 0, ptr %arrayidx, align 8 --> Dst: store i64 0, ptr %arrayidx, align 8
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: store i64 0, ptr %arrayidx, align 8 --> Dst: %0 = load i64, ptr %arrayidx6, align 8
+; CHECK-NEXT: da analyze - flow [= <>]!
+; CHECK-NEXT: Src: store i64 0, ptr %arrayidx, align 8 --> Dst: store i64 %0, ptr %B.addr.11, align 8
+; CHECK-NEXT: da analyze - confused!
+; CHECK-NEXT: Src: %0 = load i64, ptr %arrayidx6, align 8 --> Dst: %0 = load i64, ptr %arrayidx6, align 8
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: %0 = load i64, ptr %arrayidx6, align 8 --> Dst: store i64 %0, ptr %B.addr.11, align 8
+; CHECK-NEXT: da analyze - confused!
+; CHECK-NEXT: Src: store i64 %0, ptr %B.addr.11, align 8 --> Dst: store i64 %0, ptr %B.addr.11, align 8
+; CHECK-NEXT: da analyze - none!
+;
+; NORMALIZE-LABEL: 'banerjee12'
+; NORMALIZE-NEXT: Src: store i64 0, ptr %arrayidx, align 8 --> Dst: store i64 0, ptr %arrayidx, align 8
+; NORMALIZE-NEXT: da analyze - none!
+; NORMALIZE-NEXT: Src: store i64 0, ptr %arrayidx, align 8 --> Dst: %0 = load i64, ptr %arrayidx6, align 8
+; NORMALIZE-NEXT: da analyze - flow [= <>]!
+; NORMALIZE-NEXT: Src: store i64 0, ptr %arrayidx, align 8 --> Dst: store i64 %0, ptr %B.addr.11, align 8
+; NORMALIZE-NEXT: da analyze - confused!
+; NORMALIZE-NEXT: Src: %0 = load i64, ptr %arrayidx6, align 8 --> Dst: %0 = load i64, ptr %arrayidx6, align 8
+; NORMALIZE-NEXT: da analyze - none!
+; NORMALIZE-NEXT: Src: %0 = load i64, ptr %arrayidx6, align 8 --> Dst: store i64 %0, ptr %B.addr.11, align 8
+; NORMALIZE-NEXT: da analyze - confused!
+; NORMALIZE-NEXT: Src: store i64 %0, ptr %B.addr.11, align 8 --> Dst: store i64 %0, ptr %B.addr.11, align 8
+; NORMALIZE-NEXT: da analyze - none!
+;
+; DELIN-LABEL: 'banerjee12'
+; DELIN-NEXT: Src: store i64 0, ptr %arrayidx, align 8 --> Dst: store i64 0, ptr %arrayidx, align 8
+; DELIN-NEXT: da analyze - none!
+; DELIN-NEXT: Src: store i64 0, ptr %arrayidx, align 8 --> Dst: %0 = load i64, ptr %arrayidx6, align 8
+; DELIN-NEXT: da analyze - flow [= <>]!
+; DELIN-NEXT: Src: store i64 0, ptr %arrayidx, align 8 --> Dst: store i64 %0, ptr %B.addr.11, align 8
+; DELIN-NEXT: da analyze - confused!
+; DELIN-NEXT: Src: %0 = load i64, ptr %arrayidx6, align 8 --> Dst: %0 = load i64, ptr %arrayidx6, align 8
+; DELIN-NEXT: da analyze - none!
+; DELIN-NEXT: Src: %0 = load i64, ptr %arrayidx6, align 8 --> Dst: store i64 %0, ptr %B.addr.11, align 8
+; DELIN-NEXT: da analyze - confused!
+; DELIN-NEXT: Src: store i64 %0, ptr %B.addr.11, align 8 --> Dst: store i64 %0, ptr %B.addr.11, align 8
+; DELIN-NEXT: da analyze - none!
+;
entry:
br label %for.cond1.preheader
-; CHECK: 'Dependence Analysis' for function 'banerjee12':
-; CHECK: da analyze - none!
-; CHECK: da analyze - flow [= <>]!
-; CHECK: da analyze - confused!
-; CHECK: da analyze - none!
-; CHECK: da analyze - confused!
-; CHECK: da analyze - none!
-
-; NORMALIZE: 'Dependence Analysis' for function 'banerjee12':
-; NORMALIZE: da analyze - none!
-; NORMALIZE: da analyze - flow [= <>]!
-; NORMALIZE: da analyze - confused!
-; NORMALIZE: da analyze - none!
-; NORMALIZE: da analyze - confused!
-; NORMALIZE: da analyze - none!
-
-; DELIN: 'Dependence Analysis' for function 'banerjee12':
-; DELIN: da analyze - none!
-; DELIN: da analyze - flow [= <>]!
-; DELIN: da analyze - confused!
-; DELIN: da analyze - none!
-; DELIN: da analyze - confused!
-; DELIN: da analyze - none!
-
for.cond1.preheader: ; preds = %entry, %for.inc7
%B.addr.04 = phi ptr [ %B, %entry ], [ %scevgep, %for.inc7 ]
%i.03 = phi i64 [ 0, %entry ], [ %inc8, %for.inc7 ]
diff --git a/llvm/test/Analysis/DependenceAnalysis/BasePtrBug.ll b/llvm/test/Analysis/DependenceAnalysis/BasePtrBug.ll
index 354ea5db72000d..81e461a5e092da 100644
--- a/llvm/test/Analysis/DependenceAnalysis/BasePtrBug.ll
+++ b/llvm/test/Analysis/DependenceAnalysis/BasePtrBug.ll
@@ -1,3 +1,4 @@
+; NOTE: Assertions have been autogenerated by utils/update_analyze_test_checks.py UTC_ARGS: --version 5
; RUN: opt < %s -disable-output "-passes=print<da>" -aa-pipeline=basic-aa 2>&1 \
; RUN: | FileCheck %s
@@ -12,10 +13,21 @@
; B[i] = top[i] + bot[i];
; }
-; CHECK-LABEL: test1
-; CHECK: da analyze - input [*|<]!
-
define void @test1(ptr nocapture %A, ptr nocapture %B, i32 %N) #0 {
+; CHECK-LABEL: 'test1'
+; CHECK-NEXT: Src: %0 = load i32, ptr %gep.0, align 4 --> Dst: %0 = load i32, ptr %gep.0, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: %0 = load i32, ptr %gep.0, align 4 --> Dst: %1 = load i32, ptr %gep.1, align 4
+; CHECK-NEXT: da analyze - input [*|<]!
+; CHECK-NEXT: Src: %0 = load i32, ptr %gep.0, align 4 --> Dst: store i32 %add, ptr %gep.B, align 4
+; CHECK-NEXT: da analyze - confused!
+; CHECK-NEXT: Src: %1 = load i32, ptr %gep.1, align 4 --> Dst: %1 = load i32, ptr %gep.1, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: %1 = load i32, ptr %gep.1, align 4 --> Dst: store i32 %add, ptr %gep.B, align 4
+; CHECK-NEXT: da analyze - confused!
+; CHECK-NEXT: Src: store i32 %add, ptr %gep.B, align 4 --> Dst: store i32 %add, ptr %gep.B, align 4
+; CHECK-NEXT: da analyze - none!
+;
entry:
%cmp9 = icmp sgt i32 %N, 0
br i1 %cmp9, label %for.body.lr.ph, label %for.end
@@ -50,10 +62,15 @@ for.end:
; }
; }
-; CHECK-LABEL: test2
-; CHECK: da analyze - consistent anti [1]!
-
define void @test2(ptr, i32) #3 {
+; CHECK-LABEL: 'test2'
+; CHECK-NEXT: Src: %10 = load i32, ptr %9, align 4 --> Dst: %10 = load i32, ptr %9, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: %10 = load i32, ptr %9, align 4 --> Dst: store i32 %10, ptr %12, align 4
+; CHECK-NEXT: da analyze - consistent anti [1]!
+; CHECK-NEXT: Src: store i32 %10, ptr %12, align 4 --> Dst: store i32 %10, ptr %12, align 4
+; CHECK-NEXT: da analyze - none!
+;
%3 = getelementptr inbounds i32, ptr %0, i64 1
br label %4
diff --git a/llvm/test/Analysis/DependenceAnalysis/Constraints.ll b/llvm/test/Analysis/DependenceAnalysis/Constraints.ll
index c3cebd325bdeb5..65dbcef153d19f 100644
--- a/llvm/test/Analysis/DependenceAnalysis/Constraints.ll
+++ b/llvm/test/Analysis/DependenceAnalysis/Constraints.ll
@@ -1,4 +1,6 @@
-; RUN: opt < %s -disable-output "-passes=print<da>" -aa-pipeline=basic-aa 2>&1
+; NOTE: Assertions have been autogenerated by utils/update_analyze_test_checks.py UTC_ARGS: --version 5
+; RUN: opt < %s -disable-output "-passes=print<da>" -aa-pipeline=basic-aa 2>&1 \
+; RUN: | FileCheck %s
;; Check that this code doesn't abort. Test case is reduced version of lnt Polybench benchmark test case dynprog.
target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
@@ -11,6 +13,140 @@ target triple = "x86_64-unknown-linux-gnu"
; Function Attrs: nounwind uwtable
define void @dep_constraint_crash_test(i32 %M, i32 %N) {
+; CHECK-LABEL: 'dep_constraint_crash_test'
+; CHECK-NEXT: Src: %out_l.promoted = load i32, ptr @out_l, align 4 --> Dst: %out_l.promoted = load i32, ptr @out_l, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: %out_l.promoted = load i32, ptr @out_l, align 4 --> Dst: store i32 0, ptr %13, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: %out_l.promoted = load i32, ptr @out_l, align 4 --> Dst: %18 = load i32, ptr %17, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: %out_l.promoted = load i32, ptr @out_l, align 4 --> Dst: %20 = load i32, ptr %19, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: %out_l.promoted = load i32, ptr @out_l, align 4 --> Dst: %23 = load i32, ptr %22, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: %out_l.promoted = load i32, ptr @out_l, align 4 --> Dst: store i32 %24, ptr %25, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: %out_l.promoted = load i32, ptr @out_l, align 4 --> Dst: %27 = load i32, ptr %26, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: %out_l.promoted = load i32, ptr @out_l, align 4 --> Dst: %29 = load i32, ptr %28, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: %out_l.promoted = load i32, ptr @out_l, align 4 --> Dst: store i32 %30, ptr %31, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: %out_l.promoted = load i32, ptr @out_l, align 4 --> Dst: %32 = load i32, ptr %6, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: %out_l.promoted = load i32, ptr @out_l, align 4 --> Dst: store i32 %33, ptr @out_l, align 4
+; CHECK-NEXT: da analyze - consistent anti [|<]!
+; CHECK-NEXT: Src: store i32 0, ptr %13, align 4 --> Dst: store i32 0, ptr %13, align 4
+; CHECK-NEXT: da analyze - output [S * *]!
+; CHECK-NEXT: Src: store i32 0, ptr %13, align 4 --> Dst: %18 = load i32, ptr %17, align 4
+; CHECK-NEXT: da analyze - flow [S * *|<]!
+; CHECK-NEXT: Src: store i32 0, ptr %13, align 4 --> Dst: %20 = load i32, ptr %19, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: store i32 0, ptr %13, align 4 --> Dst: %23 = load i32, ptr %22, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: store i32 0, ptr %13, align 4 --> Dst: store i32 %24, ptr %25, align 4
+; CHECK-NEXT: da analyze - output [S * *|<]!
+; CHECK-NEXT: Src: store i32 0, ptr %13, align 4 --> Dst: %27 = load i32, ptr %26, align 4
+; CHECK-NEXT: da analyze - flow [S * *|<]!
+; CHECK-NEXT: Src: store i32 0, ptr %13, align 4 --> Dst: %29 = load i32, ptr %28, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: store i32 0, ptr %13, align 4 --> Dst: store i32 %30, ptr %31, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: store i32 0, ptr %13, align 4 --> Dst: %32 = load i32, ptr %6, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: store i32 0, ptr %13, align 4 --> Dst: store i32 %33, ptr @out_l, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: %18 = load i32, ptr %17, align 4 --> Dst: %18 = load i32, ptr %17, align 4
+; CHECK-NEXT: da analyze - input [S * * *]!
+; CHECK-NEXT: Src: %18 = load i32, ptr %17, align 4 --> Dst: %20 = load i32, ptr %19, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: %18 = load i32, ptr %17, align 4 --> Dst: %23 = load i32, ptr %22, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: %18 = load i32, ptr %17, align 4 --> Dst: store i32 %24, ptr %25, align 4
+; CHECK-NEXT: da analyze - anti [S * * *|<]!
+; CHECK-NEXT: Src: %18 = load i32, ptr %17, align 4 --> Dst: %27 = load i32, ptr %26, align 4
+; CHECK-NEXT: da analyze - input [S * *|<]!
+; CHECK-NEXT: Src: %18 = load i32, ptr %17, align 4 --> Dst: %29 = load i32, ptr %28, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: %18 = load i32, ptr %17, align 4 --> Dst: store i32 %30, ptr %31, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: %18 = load i32, ptr %17, align 4 --> Dst: %32 = load i32, ptr %6, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: %18 = load i32, ptr %17, align 4 --> Dst: store i32 %33, ptr @out_l, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: %20 = load i32, ptr %19, align 4 --> Dst: %20 = load i32, ptr %19, align 4
+; CHECK-NEXT: da analyze - input [S * S *]!
+; CHECK-NEXT: Src: %20 = load i32, ptr %19, align 4 --> Dst: %23 = load i32, ptr %22, align 4
+; CHECK-NEXT: da analyze - input [S * * *|<]!
+; CHECK-NEXT: Src: %20 = load i32, ptr %19, align 4 --> Dst: store i32 %24, ptr %25, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: %20 = load i32, ptr %19, align 4 --> Dst: %27 = load i32, ptr %26, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: %20 = load i32, ptr %19, align 4 --> Dst: %29 = load i32, ptr %28, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: %20 = load i32, ptr %19, align 4 --> Dst: store i32 %30, ptr %31, align 4
+; CHECK-NEXT: da analyze - anti [S * *|<]!
+; CHECK-NEXT: Src: %20 = load i32, ptr %19, align 4 --> Dst: %32 = load i32, ptr %6, align 4
+; CHECK-NEXT: da analyze - input [S|<]!
+; CHECK-NEXT: Src: %20 = load i32, ptr %19, align 4 --> Dst: store i32 %33, ptr @out_l, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: %23 = load i32, ptr %22, align 4 --> Dst: %23 = load i32, ptr %22, align 4
+; CHECK-NEXT: da analyze - input [S * * *]!
+; CHECK-NEXT: Src: %23 = load i32, ptr %22, align 4 --> Dst: store i32 %24, ptr %25, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: %23 = load i32, ptr %22, align 4 --> Dst: %27 = load i32, ptr %26, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: %23 = load i32, ptr %22, align 4 --> Dst: %29 = load i32, ptr %28, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: %23 = load i32, ptr %22, align 4 --> Dst: store i32 %30, ptr %31, align 4
+; CHECK-NEXT: da analyze - anti [S * *|<]!
+; CHECK-NEXT: Src: %23 = load i32, ptr %22, align 4 --> Dst: %32 = load i32, ptr %6, align 4
+; CHECK-NEXT: da analyze - input [S|<]!
+; CHECK-NEXT: Src: %23 = load i32, ptr %22, align 4 --> Dst: store i32 %33, ptr @out_l, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: store i32 %24, ptr %25, align 4 --> Dst: store i32 %24, ptr %25, align 4
+; CHECK-NEXT: da analyze - output [S * * *]!
+; CHECK-NEXT: Src: store i32 %24, ptr %25, align 4 --> Dst: %27 = load i32, ptr %26, align 4
+; CHECK-NEXT: da analyze - flow [S * *|<]!
+; CHECK-NEXT: Src: store i32 %24, ptr %25, align 4 --> Dst: %29 = load i32, ptr %28, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: store i32 %24, ptr %25, align 4 --> Dst: store i32 %30, ptr %31, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: store i32 %24, ptr %25, align 4 --> Dst: %32 = load i32, ptr %6, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: store i32 %24, ptr %25, align 4 --> Dst: store i32 %33, ptr @out_l, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: %27 = load i32, ptr %26, align 4 --> Dst: %27 = load i32, ptr %26, align 4
+; CHECK-NEXT: da analyze - input [S * *]!
+; CHECK-NEXT: Src: %27 = load i32, ptr %26, align 4 --> Dst: %29 = load i32, ptr %28, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: %27 = load i32, ptr %26, align 4 --> Dst: store i32 %30, ptr %31, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: %27 = load i32, ptr %26, align 4 --> Dst: %32 = load i32, ptr %6, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: %27 = load i32, ptr %26, align 4 --> Dst: store i32 %33, ptr @out_l, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: %29 = load i32, ptr %28, align 4 --> Dst: %29 = load i32, ptr %28, align 4
+; CHECK-NEXT: da analyze - input [S * *]!
+; CHECK-NEXT: Src: %29 = load i32, ptr %28, align 4 --> Dst: store i32 %30, ptr %31, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: %29 = load i32, ptr %28, align 4 --> Dst: %32 = load i32, ptr %6, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: %29 = load i32, ptr %28, align 4 --> Dst: store i32 %33, ptr @out_l, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: store i32 %30, ptr %31, align 4 --> Dst: store i32 %30, ptr %31, align 4
+; CHECK-NEXT: da analyze - output [S * *]!
+; CHECK-NEXT: Src: store i32 %30, ptr %31, align 4 --> Dst: %32 = load i32, ptr %6, align 4
+; CHECK-NEXT: da analyze - flow [S|<]!
+; CHECK-NEXT: Src: store i32 %30, ptr %31, align 4 --> Dst: store i32 %33, ptr @out_l, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: %32 = load i32, ptr %6, align 4 --> Dst: %32 = load i32, ptr %6, align 4
+; CHECK-NEXT: da analyze - consistent input [S]!
+; CHECK-NEXT: Src: %32 = load i32, ptr %6, align 4 --> Dst: store i32 %33, ptr @out_l, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: store i32 %33, ptr @out_l, align 4 --> Dst: store i32 %33, ptr @out_l, align 4
+; CHECK-NEXT: da analyze - none!
+;
%1 = icmp sgt i32 %N, 0
br i1 %1, label %.preheader.lr.ph, label %35
diff --git a/llvm/test/Analysis/DependenceAnalysis/Coupled.ll b/llvm/test/Analysis/DependenceAnalysis/Coupled.ll
index 04ea6987e21a81..ff9f393f88152d 100644
--- a/llvm/test/Analysis/DependenceAnalysis/Coupled.ll
+++ b/llvm/test/Analysis/DependenceAnalysis/Coupled.ll
@@ -1,3 +1,4 @@
+; NOTE: Assertions have been autogenerated by utils/update_analyze_test_checks.py UTC_ARGS: --version 5
; RUN: opt < %s -disable-output "-passes=print<da>" -aa-pipeline=basic-aa 2>&1 \
; RUN: | FileCheck %s
@@ -10,17 +11,23 @@ target triple = "x86_64-apple-macosx10.6.0"
;; *B++ = A[i + 10][i + 9];
define void @couple0(ptr %A, ptr %B, i32 %n) nounwind uwtable ssp {
+; CHECK-LABEL: 'couple0'
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx1, align 4 --> Dst: store i32 %conv, ptr %arrayidx1, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx1, align 4 --> Dst: %0 = load i32, ptr %arrayidx4, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx1, align 4 --> Dst: store i32 %0, ptr %B.addr.01, align 4
+; CHECK-NEXT: da analyze - confused!
+; CHECK-NEXT: Src: %0 = load i32, ptr %arrayidx4, align 4 --> Dst: %0 = load i32, ptr %arrayidx4, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: %0 = load i32, ptr %arrayidx4, align 4 --> Dst: store i32 %0, ptr %B.addr.01, align 4
+; CHECK-NEXT: da analyze - confused!
+; CHECK-NEXT: Src: store i32 %0, ptr %B.addr.01, align 4 --> Dst: store i32 %0, ptr %B.addr.01, align 4
+; CHECK-NEXT: da analyze - none!
+;
entry:
br label %for.body
-; CHECK-LABEL: couple0
-; CHECK: da analyze - none!
-; CHECK: da analyze - none!
-; CHECK: da analyze - confused!
-; CHECK: da analyze - none!
-; CHECK: da analyze - confused!
-; CHECK: da analyze - none!
-
for.body: ; preds = %entry, %for.body
%i.02 = phi i64 [ 0, %entry ], [ %inc, %for.body ]
%B.addr.01 = phi ptr [ %B, %entry ], [ %incdec.ptr, %for.body ]
@@ -47,17 +54,23 @@ for.end: ; preds = %for.body
;; *B++ = A[i + 9][i + 9];
define void @couple1(ptr %A, ptr %B, i32 %n) nounwind uwtable ssp {
+; CHECK-LABEL: 'couple1'
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx1, align 4 --> Dst: store i32 %conv, ptr %arrayidx1, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx1, align 4 --> Dst: %0 = load i32, ptr %arrayidx4, align 4
+; CHECK-NEXT: da analyze - consistent flow [-9]!
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx1, align 4 --> Dst: store i32 %0, ptr %B.addr.01, align 4
+; CHECK-NEXT: da analyze - confused!
+; CHECK-NEXT: Src: %0 = load i32, ptr %arrayidx4, align 4 --> Dst: %0 = load i32, ptr %arrayidx4, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: %0 = load i32, ptr %arrayidx4, align 4 --> Dst: store i32 %0, ptr %B.addr.01, align 4
+; CHECK-NEXT: da analyze - confused!
+; CHECK-NEXT: Src: store i32 %0, ptr %B.addr.01, align 4 --> Dst: store i32 %0, ptr %B.addr.01, align 4
+; CHECK-NEXT: da analyze - none!
+;
entry:
br label %for.body
-; CHECK-LABEL: couple1
-; CHECK: da analyze - none!
-; CHECK: da analyze - consistent flow [-9]!
-; CHECK: da analyze - confused!
-; CHECK: da analyze - none!
-; CHECK: da analyze - confused!
-; CHECK: da analyze - none!
-
for.body: ; preds = %entry, %for.body
%i.02 = phi i64 [ 0, %entry ], [ %inc, %for.body ]
%B.addr.01 = phi ptr [ %B, %entry ], [ %incdec.ptr, %for.body ]
@@ -84,17 +97,23 @@ for.end: ; preds = %for.body
;; *B++ = A[i][i];
define void @couple2(ptr %A, ptr %B, i32 %n) nounwind uwtable ssp {
+; CHECK-LABEL: 'couple2'
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx3, align 4 --> Dst: store i32 %conv, ptr %arrayidx3, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx3, align 4 --> Dst: %0 = load i32, ptr %arrayidx5, align 4
+; CHECK-NEXT: da analyze - flow [*|<]!
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx3, align 4 --> Dst: store i32 %0, ptr %B.addr.01, align 4
+; CHECK-NEXT: da analyze - confused!
+; CHECK-NEXT: Src: %0 = load i32, ptr %arrayidx5, align 4 --> Dst: %0 = load i32, ptr %arrayidx5, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: %0 = load i32, ptr %arrayidx5, align 4 --> Dst: store i32 %0, ptr %B.addr.01, align 4
+; CHECK-NEXT: da analyze - confused!
+; CHECK-NEXT: Src: store i32 %0, ptr %B.addr.01, align 4 --> Dst: store i32 %0, ptr %B.addr.01, align 4
+; CHECK-NEXT: da analyze - none!
+;
entry:
br label %for.body
-; CHECK-LABEL: couple2
-; CHECK: da analyze - none!
-; CHECK: da analyze - flow [*|<]!
-; CHECK: da analyze - confused!
-; CHECK: da analyze - none!
-; CHECK: da analyze - confused!
-; CHECK: da analyze - none!
-
for.body: ; preds = %entry, %for.body
%i.02 = phi i64 [ 0, %entry ], [ %inc, %for.body ]
%B.addr.01 = phi ptr [ %B, %entry ], [ %incdec.ptr, %for.body ]
@@ -123,17 +142,23 @@ for.end: ; preds = %for.body
;; *B++ = A[i][i];
define void @couple3(ptr %A, ptr %B, i32 %n) nounwind uwtable ssp {
+; CHECK-LABEL: 'couple3'
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx3, align 4 --> Dst: store i32 %conv, ptr %arrayidx3, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx3, align 4 --> Dst: %0 = load i32, ptr %arrayidx5, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx3, align 4 --> Dst: store i32 %0, ptr %B.addr.01, align 4
+; CHECK-NEXT: da analyze - confused!
+; CHECK-NEXT: Src: %0 = load i32, ptr %arrayidx5, align 4 --> Dst: %0 = load i32, ptr %arrayidx5, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: %0 = load i32, ptr %arrayidx5, align 4 --> Dst: store i32 %0, ptr %B.addr.01, align 4
+; CHECK-NEXT: da analyze - confused!
+; CHECK-NEXT: Src: store i32 %0, ptr %B.addr.01, align 4 --> Dst: store i32 %0, ptr %B.addr.01, align 4
+; CHECK-NEXT: da analyze - none!
+;
entry:
br label %for.body
-; CHECK-LABEL: couple3
-; CHECK: da analyze - none!
-; CHECK: da analyze - none!
-; CHECK: da analyze - confused!
-; CHECK: da analyze - none!
-; CHECK: da analyze - confused!
-; CHECK: da analyze - none!
-
for.body: ; preds = %entry, %for.body
%i.02 = phi i64 [ 0, %entry ], [ %inc, %for.body ]
%B.addr.01 = phi ptr [ %B, %entry ], [ %incdec.ptr, %for.body ]
@@ -162,17 +187,23 @@ for.end: ; preds = %for.body
;; *B++ = A[i][i];
define void @couple4(ptr %A, ptr %B, i32 %n) nounwind uwtable ssp {
+; CHECK-LABEL: 'couple4'
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx4, align 4 --> Dst: store i32 %conv, ptr %arrayidx4, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx4, align 4 --> Dst: %0 = load i32, ptr %arrayidx6, align 4
+; CHECK-NEXT: da analyze - flow [*|<]!
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx4, align 4 --> Dst: store i32 %0, ptr %B.addr.01, align 4
+; CHECK-NEXT: da analyze - confused!
+; CHECK-NEXT: Src: %0 = load i32, ptr %arrayidx6, align 4 --> Dst: %0 = load i32, ptr %arrayidx6, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: %0 = load i32, ptr %arrayidx6, align 4 --> Dst: store i32 %0, ptr %B.addr.01, align 4
+; CHECK-NEXT: da analyze - confused!
+; CHECK-NEXT: Src: store i32 %0, ptr %B.addr.01, align 4 --> Dst: store i32 %0, ptr %B.addr.01, align 4
+; CHECK-NEXT: da analyze - none!
+;
entry:
br label %for.body
-; CHECK-LABEL: couple4
-; CHECK: da analyze - none!
-; CHECK: da analyze - flow [*|<]!
-; CHECK: da analyze - confused!
-; CHECK: da analyze - none!
-; CHECK: da analyze - confused!
-; CHECK: da analyze - none!
-
for.body: ; preds = %entry, %for.body
%i.02 = phi i64 [ 0, %entry ], [ %inc, %for.body ]
%B.addr.01 = phi ptr [ %B, %entry ], [ %incdec.ptr, %for.body ]
@@ -202,17 +233,23 @@ for.end: ; preds = %for.body
;; *B++ = A[i][i];
define void @couple5(ptr %A, ptr %B, i32 %n) nounwind uwtable ssp {
+; CHECK-LABEL: 'couple5'
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx5, align 4 --> Dst: store i32 %conv, ptr %arrayidx5, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx5, align 4 --> Dst: %0 = load i32, ptr %arrayidx7, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx5, align 4 --> Dst: store i32 %0, ptr %B.addr.01, align 4
+; CHECK-NEXT: da analyze - confused!
+; CHECK-NEXT: Src: %0 = load i32, ptr %arrayidx7, align 4 --> Dst: %0 = load i32, ptr %arrayidx7, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: %0 = load i32, ptr %arrayidx7, align 4 --> Dst: store i32 %0, ptr %B.addr.01, align 4
+; CHECK-NEXT: da analyze - confused!
+; CHECK-NEXT: Src: store i32 %0, ptr %B.addr.01, align 4 --> Dst: store i32 %0, ptr %B.addr.01, align 4
+; CHECK-NEXT: da analyze - none!
+;
entry:
br label %for.body
-; CHECK-LABEL: couple5
-; CHECK: da analyze - none!
-; CHECK: da analyze - none!
-; CHECK: da analyze - confused!
-; CHECK: da analyze - none!
-; CHECK: da analyze - confused!
-; CHECK: da analyze - none!
-
for.body: ; preds = %entry, %for.body
%i.02 = phi i64 [ 0, %entry ], [ %inc, %for.body ]
%B.addr.01 = phi ptr [ %B, %entry ], [ %incdec.ptr, %for.body ]
@@ -244,17 +281,23 @@ for.end: ; preds = %for.body
;; *B++ = A[i][i];
define void @couple6(ptr %A, ptr %B, i32 %n) nounwind uwtable ssp {
+; CHECK-LABEL: 'couple6'
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx1, align 4 --> Dst: store i32 %conv, ptr %arrayidx1, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx1, align 4 --> Dst: %0 = load i32, ptr %arrayidx3, align 4
+; CHECK-NEXT: da analyze - flow [=|<]!
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx1, align 4 --> Dst: store i32 %0, ptr %B.addr.01, align 4
+; CHECK-NEXT: da analyze - confused!
+; CHECK-NEXT: Src: %0 = load i32, ptr %arrayidx3, align 4 --> Dst: %0 = load i32, ptr %arrayidx3, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: %0 = load i32, ptr %arrayidx3, align 4 --> Dst: store i32 %0, ptr %B.addr.01, align 4
+; CHECK-NEXT: da analyze - confused!
+; CHECK-NEXT: Src: store i32 %0, ptr %B.addr.01, align 4 --> Dst: store i32 %0, ptr %B.addr.01, align 4
+; CHECK-NEXT: da analyze - none!
+;
entry:
br label %for.body
-; CHECK-LABEL: couple6
-; CHECK: da analyze - none!
-; CHECK: da analyze - flow [=|<]!
-; CHECK: da analyze - confused!
-; CHECK: da analyze - none!
-; CHECK: da analyze - confused!
-; CHECK: da analyze - none!
-
for.body: ; preds = %entry, %for.body
%i.02 = phi i64 [ 0, %entry ], [ %inc, %for.body ]
%B.addr.01 = phi ptr [ %B, %entry ], [ %incdec.ptr, %for.body ]
@@ -281,17 +324,23 @@ for.end: ; preds = %for.body
;; *B++ = A[i][i];
define void @couple7(ptr %A, ptr %B, i32 %n) nounwind uwtable ssp {
+; CHECK-LABEL: 'couple7'
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx1, align 4 --> Dst: store i32 %conv, ptr %arrayidx1, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx1, align 4 --> Dst: %0 = load i32, ptr %arrayidx3, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx1, align 4 --> Dst: store i32 %0, ptr %B.addr.01, align 4
+; CHECK-NEXT: da analyze - confused!
+; CHECK-NEXT: Src: %0 = load i32, ptr %arrayidx3, align 4 --> Dst: %0 = load i32, ptr %arrayidx3, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: %0 = load i32, ptr %arrayidx3, align 4 --> Dst: store i32 %0, ptr %B.addr.01, align 4
+; CHECK-NEXT: da analyze - confused!
+; CHECK-NEXT: Src: store i32 %0, ptr %B.addr.01, align 4 --> Dst: store i32 %0, ptr %B.addr.01, align 4
+; CHECK-NEXT: da analyze - none!
+;
entry:
br label %for.body
-; CHECK-LABEL: couple7
-; CHECK: da analyze - none!
-; CHECK: da analyze - none!
-; CHECK: da analyze - confused!
-; CHECK: da analyze - none!
-; CHECK: da analyze - confused!
-; CHECK: da analyze - none!
-
for.body: ; preds = %entry, %for.body
%i.02 = phi i64 [ 0, %entry ], [ %inc, %for.body ]
%B.addr.01 = phi ptr [ %B, %entry ], [ %incdec.ptr, %for.body ]
@@ -318,17 +367,23 @@ for.end: ; preds = %for.body
;; *B++ = A[i][i];
define void @couple8(ptr %A, ptr %B, i32 %n) nounwind uwtable ssp {
+; CHECK-LABEL: 'couple8'
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx2, align 4 --> Dst: store i32 %conv, ptr %arrayidx2, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx2, align 4 --> Dst: %0 = load i32, ptr %arrayidx4, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx2, align 4 --> Dst: store i32 %0, ptr %B.addr.01, align 4
+; CHECK-NEXT: da analyze - confused!
+; CHECK-NEXT: Src: %0 = load i32, ptr %arrayidx4, align 4 --> Dst: %0 = load i32, ptr %arrayidx4, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: %0 = load i32, ptr %arrayidx4, align 4 --> Dst: store i32 %0, ptr %B.addr.01, align 4
+; CHECK-NEXT: da analyze - confused!
+; CHECK-NEXT: Src: store i32 %0, ptr %B.addr.01, align 4 --> Dst: store i32 %0, ptr %B.addr.01, align 4
+; CHECK-NEXT: da analyze - none!
+;
entry:
br label %for.body
-; CHECK-LABEL: couple8
-; CHECK: da analyze - none!
-; CHECK: da analyze - none!
-; CHECK: da analyze - confused!
-; CHECK: da analyze - none!
-; CHECK: da analyze - confused!
-; CHECK: da analyze - none!
-
for.body: ; preds = %entry, %for.body
%i.02 = phi i64 [ 0, %entry ], [ %inc, %for.body ]
%B.addr.01 = phi ptr [ %B, %entry ], [ %incdec.ptr, %for.body ]
@@ -356,17 +411,23 @@ for.end: ; preds = %for.body
;; *B++ = A[i][i];
define void @couple9(ptr %A, ptr %B, i32 %n) nounwind uwtable ssp {
+; CHECK-LABEL: 'couple9'
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx2, align 4 --> Dst: store i32 %conv, ptr %arrayidx2, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx2, align 4 --> Dst: %0 = load i32, ptr %arrayidx4, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx2, align 4 --> Dst: store i32 %0, ptr %B.addr.01, align 4
+; CHECK-NEXT: da analyze - confused!
+; CHECK-NEXT: Src: %0 = load i32, ptr %arrayidx4, align 4 --> Dst: %0 = load i32, ptr %arrayidx4, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: %0 = load i32, ptr %arrayidx4, align 4 --> Dst: store i32 %0, ptr %B.addr.01, align 4
+; CHECK-NEXT: da analyze - confused!
+; CHECK-NEXT: Src: store i32 %0, ptr %B.addr.01, align 4 --> Dst: store i32 %0, ptr %B.addr.01, align 4
+; CHECK-NEXT: da analyze - none!
+;
entry:
br label %for.body
-; CHECK-LABEL: couple9
-; CHECK: da analyze - none!
-; CHECK: da analyze - none!
-; CHECK: da analyze - confused!
-; CHECK: da analyze - none!
-; CHECK: da analyze - confused!
-; CHECK: da analyze - none!
-
for.body: ; preds = %entry, %for.body
%i.02 = phi i64 [ 0, %entry ], [ %inc, %for.body ]
%B.addr.01 = phi ptr [ %B, %entry ], [ %incdec.ptr, %for.body ]
@@ -394,17 +455,23 @@ for.end: ; preds = %for.body
;; *B++ = A[i][i];
define void @couple10(ptr %A, ptr %B, i32 %n) nounwind uwtable ssp {
+; CHECK-LABEL: 'couple10'
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx2, align 4 --> Dst: store i32 %conv, ptr %arrayidx2, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx2, align 4 --> Dst: %0 = load i32, ptr %arrayidx4, align 4
+; CHECK-NEXT: da analyze - flow [>]!
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx2, align 4 --> Dst: store i32 %0, ptr %B.addr.01, align 4
+; CHECK-NEXT: da analyze - confused!
+; CHECK-NEXT: Src: %0 = load i32, ptr %arrayidx4, align 4 --> Dst: %0 = load i32, ptr %arrayidx4, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: %0 = load i32, ptr %arrayidx4, align 4 --> Dst: store i32 %0, ptr %B.addr.01, align 4
+; CHECK-NEXT: da analyze - confused!
+; CHECK-NEXT: Src: store i32 %0, ptr %B.addr.01, align 4 --> Dst: store i32 %0, ptr %B.addr.01, align 4
+; CHECK-NEXT: da analyze - none!
+;
entry:
br label %for.body
-; CHECK-LABEL: couple10
-; CHECK: da analyze - none!
-; CHECK: da analyze - flow [>]!
-; CHECK: da analyze - confused!
-; CHECK: da analyze - none!
-; CHECK: da analyze - confused!
-; CHECK: da analyze - none!
-
for.body: ; preds = %entry, %for.body
%i.02 = phi i64 [ 0, %entry ], [ %inc, %for.body ]
%B.addr.01 = phi ptr [ %B, %entry ], [ %incdec.ptr, %for.body ]
@@ -432,18 +499,24 @@ for.end: ; preds = %for.body
;; *B++ = A[i][i];
define void @couple11(ptr %A, ptr %B, i32 %n) nounwind uwtable ssp {
+; CHECK-LABEL: 'couple11'
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx2, align 4 --> Dst: store i32 %conv, ptr %arrayidx2, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx2, align 4 --> Dst: %0 = load i32, ptr %arrayidx4, align 4
+; CHECK-NEXT: da analyze - flow [=|<] splitable!
+; CHECK-NEXT: da analyze - split level = 1, iteration = 9!
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx2, align 4 --> Dst: store i32 %0, ptr %B.addr.01, align 4
+; CHECK-NEXT: da analyze - confused!
+; CHECK-NEXT: Src: %0 = load i32, ptr %arrayidx4, align 4 --> Dst: %0 = load i32, ptr %arrayidx4, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: %0 = load i32, ptr %arrayidx4, align 4 --> Dst: store i32 %0, ptr %B.addr.01, align 4
+; CHECK-NEXT: da analyze - confused!
+; CHECK-NEXT: Src: store i32 %0, ptr %B.addr.01, align 4 --> Dst: store i32 %0, ptr %B.addr.01, align 4
+; CHECK-NEXT: da analyze - none!
+;
entry:
br label %for.body
-; CHECK-LABEL: couple11
-; CHECK: da analyze - none!
-; CHECK: da analyze - flow [=|<] splitable!
-; CHECK: da analyze - split level = 1, iteration = 9!
-; CHECK: da analyze - confused!
-; CHECK: da analyze - none!
-; CHECK: da analyze - confused!
-; CHECK: da analyze - none!
-
for.body: ; preds = %entry, %for.body
%i.02 = phi i64 [ 0, %entry ], [ %inc, %for.body ]
%B.addr.01 = phi ptr [ %B, %entry ], [ %incdec.ptr, %for.body ]
@@ -471,18 +544,24 @@ for.end: ; preds = %for.body
;; *B++ = A[i][i];
define void @couple12(ptr %A, ptr %B, i32 %n) nounwind uwtable ssp {
+; CHECK-LABEL: 'couple12'
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx2, align 4 --> Dst: store i32 %conv, ptr %arrayidx2, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx2, align 4 --> Dst: %0 = load i32, ptr %arrayidx4, align 4
+; CHECK-NEXT: da analyze - flow [<] splitable!
+; CHECK-NEXT: da analyze - split level = 1, iteration = 11!
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx2, align 4 --> Dst: store i32 %0, ptr %B.addr.01, align 4
+; CHECK-NEXT: da analyze - confused!
+; CHECK-NEXT: Src: %0 = load i32, ptr %arrayidx4, align 4 --> Dst: %0 = load i32, ptr %arrayidx4, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: %0 = load i32, ptr %arrayidx4, align 4 --> Dst: store i32 %0, ptr %B.addr.01, align 4
+; CHECK-NEXT: da analyze - confused!
+; CHECK-NEXT: Src: store i32 %0, ptr %B.addr.01, align 4 --> Dst: store i32 %0, ptr %B.addr.01, align 4
+; CHECK-NEXT: da analyze - none!
+;
entry:
br label %for.body
-; CHECK-LABEL: couple12
-; CHECK: da analyze - none!
-; CHECK: da analyze - flow [<] splitable!
-; CHECK: da analyze - split level = 1, iteration = 11!
-; CHECK: da analyze - confused!
-; CHECK: da analyze - none!
-; CHECK: da analyze - confused!
-; CHECK: da analyze - none!
-
for.body: ; preds = %entry, %for.body
%i.02 = phi i64 [ 0, %entry ], [ %inc, %for.body ]
%B.addr.01 = phi ptr [ %B, %entry ], [ %incdec.ptr, %for.body ]
@@ -510,17 +589,23 @@ for.end: ; preds = %for.body
;; *B++ = A[i][i];
define void @couple13(ptr %A, ptr %B, i32 %n) nounwind uwtable ssp {
+; CHECK-LABEL: 'couple13'
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx2, align 4 --> Dst: store i32 %conv, ptr %arrayidx2, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx2, align 4 --> Dst: %0 = load i32, ptr %arrayidx4, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx2, align 4 --> Dst: store i32 %0, ptr %B.addr.01, align 4
+; CHECK-NEXT: da analyze - confused!
+; CHECK-NEXT: Src: %0 = load i32, ptr %arrayidx4, align 4 --> Dst: %0 = load i32, ptr %arrayidx4, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: %0 = load i32, ptr %arrayidx4, align 4 --> Dst: store i32 %0, ptr %B.addr.01, align 4
+; CHECK-NEXT: da analyze - confused!
+; CHECK-NEXT: Src: store i32 %0, ptr %B.addr.01, align 4 --> Dst: store i32 %0, ptr %B.addr.01, align 4
+; CHECK-NEXT: da analyze - none!
+;
entry:
br label %for.body
-; CHECK-LABEL: couple13
-; CHECK: da analyze - none!
-; CHECK: da analyze - none!
-; CHECK: da analyze - confused!
-; CHECK: da analyze - none!
-; CHECK: da analyze - confused!
-; CHECK: da analyze - none!
-
for.body: ; preds = %entry, %for.body
%i.02 = phi i64 [ 0, %entry ], [ %inc, %for.body ]
%B.addr.01 = phi ptr [ %B, %entry ], [ %incdec.ptr, %for.body ]
@@ -547,17 +632,23 @@ for.end: ; preds = %for.body
;; *B++ = A[i][i][i];
define void @couple14(ptr %A, ptr %B, i32 %n) nounwind uwtable ssp {
+; CHECK-LABEL: 'couple14'
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx3, align 4 --> Dst: store i32 %conv, ptr %arrayidx3, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx3, align 4 --> Dst: %0 = load i32, ptr %arrayidx6, align 4
+; CHECK-NEXT: da analyze - flow [=|<]!
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx3, align 4 --> Dst: store i32 %0, ptr %B.addr.01, align 4
+; CHECK-NEXT: da analyze - confused!
+; CHECK-NEXT: Src: %0 = load i32, ptr %arrayidx6, align 4 --> Dst: %0 = load i32, ptr %arrayidx6, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: %0 = load i32, ptr %arrayidx6, align 4 --> Dst: store i32 %0, ptr %B.addr.01, align 4
+; CHECK-NEXT: da analyze - confused!
+; CHECK-NEXT: Src: store i32 %0, ptr %B.addr.01, align 4 --> Dst: store i32 %0, ptr %B.addr.01, align 4
+; CHECK-NEXT: da analyze - none!
+;
entry:
br label %for.body
-; CHECK-LABEL: couple14
-; CHECK: da analyze - none!
-; CHECK: da analyze - flow [=|<]!
-; CHECK: da analyze - confused!
-; CHECK: da analyze - none!
-; CHECK: da analyze - confused!
-; CHECK: da analyze - none!
-
for.body: ; preds = %entry, %for.body
%i.02 = phi i64 [ 0, %entry ], [ %inc, %for.body ]
%B.addr.01 = phi ptr [ %B, %entry ], [ %incdec.ptr, %for.body ]
@@ -585,17 +676,23 @@ for.end: ; preds = %for.body
;; *B++ = A[i][i][i];
define void @couple15(ptr %A, ptr %B, i32 %n) nounwind uwtable ssp {
+; CHECK-LABEL: 'couple15'
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx3, align 4 --> Dst: store i32 %conv, ptr %arrayidx3, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx3, align 4 --> Dst: %0 = load i32, ptr %arrayidx6, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx3, align 4 --> Dst: store i32 %0, ptr %B.addr.01, align 4
+; CHECK-NEXT: da analyze - confused!
+; CHECK-NEXT: Src: %0 = load i32, ptr %arrayidx6, align 4 --> Dst: %0 = load i32, ptr %arrayidx6, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: %0 = load i32, ptr %arrayidx6, align 4 --> Dst: store i32 %0, ptr %B.addr.01, align 4
+; CHECK-NEXT: da analyze - confused!
+; CHECK-NEXT: Src: store i32 %0, ptr %B.addr.01, align 4 --> Dst: store i32 %0, ptr %B.addr.01, align 4
+; CHECK-NEXT: da analyze - none!
+;
entry:
br label %for.body
-; CHECK-LABEL: couple15
-; CHECK: da analyze - none!
-; CHECK: da analyze - none!
-; CHECK: da analyze - confused!
-; CHECK: da analyze - none!
-; CHECK: da analyze - confused!
-; CHECK: da analyze - none!
-
for.body: ; preds = %entry, %for.body
%i.02 = phi i64 [ 0, %entry ], [ %inc, %for.body ]
%B.addr.01 = phi ptr [ %B, %entry ], [ %incdec.ptr, %for.body ]
@@ -623,15 +720,18 @@ for.end: ; preds = %for.body
;; A[M*N + M*i + j] = 2;
define void @couple_weakzerosiv(ptr noalias nocapture %A, i64 %N, i64 %M) {
+; CHECK-LABEL: 'couple_weakzerosiv'
+; CHECK-NEXT: Src: store i32 1, ptr %arrayidx.us, align 4 --> Dst: store i32 1, ptr %arrayidx.us, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: store i32 1, ptr %arrayidx.us, align 4 --> Dst: store i32 2, ptr %arrayidx9.us, align 4
+; CHECK-NEXT: da analyze - output [p>]!
+; CHECK-NEXT: Src: store i32 2, ptr %arrayidx9.us, align 4 --> Dst: store i32 2, ptr %arrayidx9.us, align 4
+; CHECK-NEXT: da analyze - none!
+;
entry:
%cmp29 = icmp sgt i64 %N, 0
br i1 %cmp29, label %for.body.lr.ph, label %for.cond.cleanup
-; CHECK-LABEL: couple_weakzerosiv
-; CHECK: da analyze - none!
-; CHECK: da analyze - output [p>]!
-; CHECK: da analyze - none!
-
for.body.lr.ph: ; preds = %entry
%mul = mul nsw i64 %M, %N
br label %for.body.us
diff --git a/llvm/test/Analysis/DependenceAnalysis/DADelin.ll b/llvm/test/Analysis/DependenceAnalysis/DADelin.ll
index 73260910c3873d..b2e4959a7812ec 100644
--- a/llvm/test/Analysis/DependenceAnalysis/DADelin.ll
+++ b/llvm/test/Analysis/DependenceAnalysis/DADelin.ll
@@ -1,19 +1,24 @@
+; NOTE: Assertions have been autogenerated by utils/update_analyze_test_checks.py UTC_ARGS: --version 5
; RUN: opt < %s -disable-output "-passes=print<da>" -aa-pipeline=basic-aa 2>&1 \
; RUN: | FileCheck %s
target datalayout = "e-m:e-p:32:32-i64:64-v128:64:128-a:0:32-n32-S64"
target triple = "thumbv8m.main-arm-none-eabi"
-; CHECK-LABEL: t1
;; for (int i = 0; i < n; i++)
;; for (int j = 0; j < m; j++)
;; for (int k = 0; k < o; k++)
;; = A[i*m*o + j*o + k]
;; A[i*m*o + j*o + k] =
define void @t1(i32 %n, i32 %m, i32 %o, ptr nocapture %A) {
-; CHECK: da analyze - none!
-; CHECK: da analyze - consistent anti [0 0 0|<]!
-; CHECK: da analyze - none!
+; CHECK-LABEL: 't1'
+; CHECK-NEXT: Src: %0 = load i32, ptr %arrayidx, align 4 --> Dst: %0 = load i32, ptr %arrayidx, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: %0 = load i32, ptr %arrayidx, align 4 --> Dst: store i32 %add12, ptr %arrayidx, align 4
+; CHECK-NEXT: da analyze - consistent anti [0 0 0|<]!
+; CHECK-NEXT: Src: store i32 %add12, ptr %arrayidx, align 4 --> Dst: store i32 %add12, ptr %arrayidx, align 4
+; CHECK-NEXT: da analyze - none!
+;
entry:
%cmp49 = icmp sgt i32 %n, 0
br i1 %cmp49, label %for.cond1.preheader.lr.ph, label %for.cond.cleanup
@@ -65,16 +70,20 @@ for.cond.cleanup: ; preds = %for.cond.cleanup3,
ret void
}
-; CHECK-LABEL: t2
;; for (int i = 0; i < n; i++)
;; for (int j = 0; j < m; j++)
;; for (int k = 0; k < o; k++)
;; = A[i*m*o + j*o + k]
;; A[i*m*o + j*o + k + 1] =
define void @t2(i32 %n, i32 %m, i32 %o, ptr nocapture %A) {
-; CHECK: da analyze - none!
-; CHECK: da analyze - anti [* * *|<]!
-; CHECK: da analyze - output [* * *]!
+; CHECK-LABEL: 't2'
+; CHECK-NEXT: Src: %0 = load i32, ptr %arrayidx, align 4 --> Dst: %0 = load i32, ptr %arrayidx, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: %0 = load i32, ptr %arrayidx, align 4 --> Dst: store i32 %add12, ptr %arrayidx2, align 4
+; CHECK-NEXT: da analyze - anti [* * *|<]!
+; CHECK-NEXT: Src: store i32 %add12, ptr %arrayidx2, align 4 --> Dst: store i32 %add12, ptr %arrayidx2, align 4
+; CHECK-NEXT: da analyze - output [* * *]!
+;
entry:
%cmp49 = icmp sgt i32 %n, 0
br i1 %cmp49, label %for.cond1.preheader.lr.ph, label %for.cond.cleanup
@@ -128,16 +137,20 @@ for.cond.cleanup: ; preds = %for.cond.cleanup3,
ret void
}
-; CHECK-LABEL: t3
;; for (int i = 0; i < n; i++)
;; for (int j = 0; j < m; j++)
;; for (int k = 0; k < o; k++)
;; = A[i*m*o + j*o + k]
;; A[i*m*o + j*o + k - 1] =
define void @t3(i32 %n, i32 %m, i32 %o, ptr nocapture %A) {
-; CHECK: da analyze - none!
-; CHECK: da analyze - anti [* * *|<]!
-; CHECK: da analyze - output [* * *]!
+; CHECK-LABEL: 't3'
+; CHECK-NEXT: Src: %0 = load i32, ptr %arrayidx, align 4 --> Dst: %0 = load i32, ptr %arrayidx, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: %0 = load i32, ptr %arrayidx, align 4 --> Dst: store i32 %add12, ptr %arrayidx2, align 4
+; CHECK-NEXT: da analyze - anti [* * *|<]!
+; CHECK-NEXT: Src: store i32 %add12, ptr %arrayidx2, align 4 --> Dst: store i32 %add12, ptr %arrayidx2, align 4
+; CHECK-NEXT: da analyze - output [* * *]!
+;
entry:
%cmp49 = icmp sgt i32 %n, 0
br i1 %cmp49, label %for.cond1.preheader.lr.ph, label %for.cond.cleanup
@@ -191,16 +204,20 @@ for.cond.cleanup: ; preds = %for.cond.cleanup3,
ret void
}
-; CHECK-LABEL: t4
;; for (int i = 0; i < n; i++)
;; for (int j = 0; j < m; j++)
;; for (int k = 0; k < o; k++)
;; = A[i*m*o + j*o + k]
;; A[i*m*o + j*o + k + o] =
define void @t4(i32 %n, i32 %m, i32 %o, ptr nocapture %A) {
-; CHECK: da analyze - none!
-; CHECK: da analyze - anti [* * *|<]!
-; CHECK: da analyze - output [* * *]!
+; CHECK-LABEL: 't4'
+; CHECK-NEXT: Src: %0 = load i32, ptr %arrayidx, align 4 --> Dst: %0 = load i32, ptr %arrayidx, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: %0 = load i32, ptr %arrayidx, align 4 --> Dst: store i32 %add12, ptr %arrayidx2, align 4
+; CHECK-NEXT: da analyze - anti [* * *|<]!
+; CHECK-NEXT: Src: store i32 %add12, ptr %arrayidx2, align 4 --> Dst: store i32 %add12, ptr %arrayidx2, align 4
+; CHECK-NEXT: da analyze - output [* * *]!
+;
entry:
%cmp49 = icmp sgt i32 %n, 0
br i1 %cmp49, label %for.cond1.preheader.lr.ph, label %for.cond.cleanup
@@ -254,16 +271,20 @@ for.cond.cleanup: ; preds = %for.cond.cleanup3,
ret void
}
-; CHECK-LABEL: t5
;; for (int i = 0; i < n; i++)
;; for (int j = 0; j < m; j++)
;; for (int k = 0; k < o; k++)
;; = A[i*m*o + j*o + k]
;; A[i*m*o + j*o + k - o] =
define void @t5(i32 %n, i32 %m, i32 %o, ptr nocapture %A) {
-; CHECK: da analyze - none!
-; CHECK: da analyze - anti [* * *|<]!
-; CHECK: da analyze - output [* * *]!
+; CHECK-LABEL: 't5'
+; CHECK-NEXT: Src: %0 = load i32, ptr %arrayidx, align 4 --> Dst: %0 = load i32, ptr %arrayidx, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: %0 = load i32, ptr %arrayidx, align 4 --> Dst: store i32 %add12, ptr %arrayidx2, align 4
+; CHECK-NEXT: da analyze - anti [* * *|<]!
+; CHECK-NEXT: Src: store i32 %add12, ptr %arrayidx2, align 4 --> Dst: store i32 %add12, ptr %arrayidx2, align 4
+; CHECK-NEXT: da analyze - output [* * *]!
+;
entry:
%cmp49 = icmp sgt i32 %n, 0
br i1 %cmp49, label %for.cond1.preheader.lr.ph, label %for.cond.cleanup
@@ -317,16 +338,20 @@ for.cond.cleanup: ; preds = %for.cond.cleanup3,
ret void
}
-; CHECK-LABEL: t6
;; for (int i = 0; i < n; i++)
;; for (int j = 0; j < m; j++)
;; for (int k = 0; k < o; k++)
;; = A[i*m*o + j*o + k]
;; A[i*m*o + j*o + k + m*o] =
define void @t6(i32 %n, i32 %m, i32 %o, ptr nocapture %A) {
-; CHECK: da analyze - none!
-; CHECK: da analyze - consistent anti [-1 0 0]!
-; CHECK: da analyze - none!
+; CHECK-LABEL: 't6'
+; CHECK-NEXT: Src: %0 = load i32, ptr %arrayidx, align 4 --> Dst: %0 = load i32, ptr %arrayidx, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: %0 = load i32, ptr %arrayidx, align 4 --> Dst: store i32 %add12, ptr %arrayidx2, align 4
+; CHECK-NEXT: da analyze - consistent anti [-1 0 0]!
+; CHECK-NEXT: Src: store i32 %add12, ptr %arrayidx2, align 4 --> Dst: store i32 %add12, ptr %arrayidx2, align 4
+; CHECK-NEXT: da analyze - none!
+;
entry:
%cmp49 = icmp sgt i32 %n, 0
br i1 %cmp49, label %for.cond1.preheader.lr.ph, label %for.cond.cleanup
@@ -381,16 +406,20 @@ for.cond.cleanup: ; preds = %for.cond.cleanup3,
ret void
}
-; CHECK-LABEL: t7
;; for (int i = 0; i < n; i++)
;; for (int j = 0; j < m; j++)
;; for (int k = 0; k < o; k++)
;; = A[i*m*o + j*o + k]
;; A[i*m*o + j*o + k - m*o] =
define void @t7(i32 %n, i32 %m, i32 %o, ptr nocapture %A) {
-; CHECK: da analyze - none!
-; CHECK: da analyze - consistent anti [1 0 0]!
-; CHECK: da analyze - none!
+; CHECK-LABEL: 't7'
+; CHECK-NEXT: Src: %0 = load i32, ptr %arrayidx, align 4 --> Dst: %0 = load i32, ptr %arrayidx, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: %0 = load i32, ptr %arrayidx, align 4 --> Dst: store i32 %add12, ptr %arrayidx2, align 4
+; CHECK-NEXT: da analyze - consistent anti [1 0 0]!
+; CHECK-NEXT: Src: store i32 %add12, ptr %arrayidx2, align 4 --> Dst: store i32 %add12, ptr %arrayidx2, align 4
+; CHECK-NEXT: da analyze - none!
+;
entry:
%cmp49 = icmp sgt i32 %n, 0
br i1 %cmp49, label %for.cond1.preheader.lr.ph, label %for.cond.cleanup
@@ -445,16 +474,20 @@ for.cond.cleanup: ; preds = %for.cond.cleanup3,
ret void
}
-; CHECK-LABEL: t8
;; for (int i = 0; i < n; i++)
;; for (int j = 0; j < m; j++)
;; for (int k = 1; k < o; k++)
;; = A[i*m*o + j*o + k]
;; A[i*m*o + j*o + k - 1] =
define void @t8(i32 %n, i32 %m, i32 %o, ptr nocapture %A) {
-; CHECK: da analyze - none!
-; CHECK: da analyze - consistent anti [0 0 1]!
-; CHECK: da analyze - none!
+; CHECK-LABEL: 't8'
+; CHECK-NEXT: Src: %0 = load i32, ptr %arrayidx, align 4 --> Dst: %0 = load i32, ptr %arrayidx, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: %0 = load i32, ptr %arrayidx, align 4 --> Dst: store i32 %add12, ptr %arrayidx2, align 4
+; CHECK-NEXT: da analyze - consistent anti [0 0 1]!
+; CHECK-NEXT: Src: store i32 %add12, ptr %arrayidx2, align 4 --> Dst: store i32 %add12, ptr %arrayidx2, align 4
+; CHECK-NEXT: da analyze - none!
+;
entry:
%cmp49 = icmp sgt i32 %n, 0
br i1 %cmp49, label %for.cond1.preheader.lr.ph, label %for.cond.cleanup
@@ -509,11 +542,15 @@ for.cond.cleanup: ; preds = %for.cond.cleanup3,
}
-; CHECK-LABEL: test_sizes
define double @test_sizes(i16 %h, i16 %N, ptr nocapture %array) {
-; CHECK: da analyze - consistent input [0 S]!
-; CHECK: da analyze - anti [* *|<]!
-; CHECK: da analyze - output [* *]!
+; CHECK-LABEL: 'test_sizes'
+; CHECK-NEXT: Src: %2 = load i16, ptr %arrayidx, align 4 --> Dst: %2 = load i16, ptr %arrayidx, align 4
+; CHECK-NEXT: da analyze - consistent input [0 S]!
+; CHECK-NEXT: Src: %2 = load i16, ptr %arrayidx, align 4 --> Dst: store i16 %add6, ptr %arrayidx8, align 4
+; CHECK-NEXT: da analyze - anti [* *|<]!
+; CHECK-NEXT: Src: store i16 %add6, ptr %arrayidx8, align 4 --> Dst: store i16 %add6, ptr %arrayidx8, align 4
+; CHECK-NEXT: da analyze - output [* *]!
+;
entry:
%cmp28 = icmp sgt i16 %N, 1
br i1 %cmp28, label %for.body.lr.ph, label %for.end12
@@ -557,11 +594,15 @@ for.end12: ; preds = %for.inc10, %entry
}
-; CHECK-LABEL: nonnegative
define void @nonnegative(ptr nocapture %A, i32 %N) {
-; CHECK: da analyze - none!
-; CHECK: da analyze - consistent output [0 0|<]!
-; CHECK: da analyze - none!
+; CHECK-LABEL: 'nonnegative'
+; CHECK-NEXT: Src: store i32 1, ptr %arrayidx, align 4 --> Dst: store i32 1, ptr %arrayidx, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: store i32 1, ptr %arrayidx, align 4 --> Dst: store i32 2, ptr %arrayidx, align 4
+; CHECK-NEXT: da analyze - consistent output [0 0|<]!
+; CHECK-NEXT: Src: store i32 2, ptr %arrayidx, align 4 --> Dst: store i32 2, ptr %arrayidx, align 4
+; CHECK-NEXT: da analyze - none!
+;
entry:
%cmp44 = icmp eq i32 %N, 0
br i1 %cmp44, label %exit, label %for.outer
diff --git a/llvm/test/Analysis/DependenceAnalysis/Dump.ll b/llvm/test/Analysis/DependenceAnalysis/Dump.ll
index 264b97899b0d2f..d80871e2a50eeb 100644
--- a/llvm/test/Analysis/DependenceAnalysis/Dump.ll
+++ b/llvm/test/Analysis/DependenceAnalysis/Dump.ll
@@ -1,3 +1,4 @@
+; NOTE: Assertions have been autogenerated by utils/update_analyze_test_checks.py UTC_ARGS: --version 5
; RUN: opt < %s -disable-output "-passes=print<da>" -aa-pipeline=basic-aa 2>&1 \
; RUN: | FileCheck %s
@@ -12,16 +13,15 @@
;; }
;; }
-; CHECK-LABEL: foo
-
-; CHECK: Src: store float %conv, ptr %arrayidx, align 4 --> Dst: store float %conv, ptr %arrayidx, align 4
-; CHECK-NEXT: da analyze - none!
-; CHECK-NEXT: Src: store float %conv, ptr %arrayidx, align 4 --> Dst: call void @bar(ptr %A)
-; CHECK-NEXT: da analyze - confused!
-; CHECK-NEXT: Src: call void @bar(ptr %A) --> Dst: call void @bar(ptr %A)
-; CHECK-NEXT: da analyze - confused!
-
define void @foo(ptr noalias %A, i32 signext %n) {
+; CHECK-LABEL: 'foo'
+; CHECK-NEXT: Src: store float %conv, ptr %arrayidx, align 4 --> Dst: store float %conv, ptr %arrayidx, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: store float %conv, ptr %arrayidx, align 4 --> Dst: call void @bar(ptr %A)
+; CHECK-NEXT: da analyze - confused!
+; CHECK-NEXT: Src: call void @bar(ptr %A) --> Dst: call void @bar(ptr %A)
+; CHECK-NEXT: da analyze - confused!
+;
entry:
%cmp1 = icmp slt i32 0, %n
br i1 %cmp1, label %for.body.lr.ph, label %for.end
diff --git a/llvm/test/Analysis/DependenceAnalysis/ExactRDIV.ll b/llvm/test/Analysis/DependenceAnalysis/ExactRDIV.ll
index 4aa2458dcd8cd6..b5ece141216864 100644
--- a/llvm/test/Analysis/DependenceAnalysis/ExactRDIV.ll
+++ b/llvm/test/Analysis/DependenceAnalysis/ExactRDIV.ll
@@ -1,3 +1,4 @@
+; NOTE: Assertions have been autogenerated by utils/update_analyze_test_checks.py UTC_ARGS: --version 5
; RUN: opt < %s -disable-output "-passes=print<da>" -aa-pipeline=basic-aa 2>&1 \
; RUN: | FileCheck %s
@@ -12,16 +13,23 @@ target triple = "x86_64-apple-macosx10.6.0"
;; *B++ = A[2*j + 1];
define void @rdiv0(ptr %A, ptr %B) nounwind uwtable ssp {
+; CHECK-LABEL: 'rdiv0'
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx, align 4 --> Dst: store i32 %conv, ptr %arrayidx, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx, align 4 --> Dst: %0 = load i32, ptr %arrayidx7, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx, align 4 --> Dst: store i32 %0, ptr %B.addr.01, align 4
+; CHECK-NEXT: da analyze - confused!
+; CHECK-NEXT: Src: %0 = load i32, ptr %arrayidx7, align 4 --> Dst: %0 = load i32, ptr %arrayidx7, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: %0 = load i32, ptr %arrayidx7, align 4 --> Dst: store i32 %0, ptr %B.addr.01, align 4
+; CHECK-NEXT: da analyze - confused!
+; CHECK-NEXT: Src: store i32 %0, ptr %B.addr.01, align 4 --> Dst: store i32 %0, ptr %B.addr.01, align 4
+; CHECK-NEXT: da analyze - none!
+;
entry:
br label %for.body
-; CHECK: da analyze - none!
-; CHECK: da analyze - none!
-; CHECK: da analyze - confused!
-; CHECK: da analyze - none!
-; CHECK: da analyze - confused!
-; CHECK: da analyze - none!
-
for.body: ; preds = %entry, %for.body
%i.03 = phi i64 [ 0, %entry ], [ %inc, %for.body ]
%conv = trunc i64 %i.03 to i32
@@ -60,16 +68,23 @@ for.end10: ; preds = %for.body4
;; *B++ = A[j];
define void @rdiv1(ptr %A, ptr %B) nounwind uwtable ssp {
+; CHECK-LABEL: 'rdiv1'
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx, align 4 --> Dst: store i32 %conv, ptr %arrayidx, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx, align 4 --> Dst: %0 = load i32, ptr %arrayidx5, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx, align 4 --> Dst: store i32 %0, ptr %B.addr.01, align 4
+; CHECK-NEXT: da analyze - confused!
+; CHECK-NEXT: Src: %0 = load i32, ptr %arrayidx5, align 4 --> Dst: %0 = load i32, ptr %arrayidx5, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: %0 = load i32, ptr %arrayidx5, align 4 --> Dst: store i32 %0, ptr %B.addr.01, align 4
+; CHECK-NEXT: da analyze - confused!
+; CHECK-NEXT: Src: store i32 %0, ptr %B.addr.01, align 4 --> Dst: store i32 %0, ptr %B.addr.01, align 4
+; CHECK-NEXT: da analyze - none!
+;
entry:
br label %for.body
-; CHECK: da analyze - none!
-; CHECK: da analyze - none!
-; CHECK: da analyze - confused!
-; CHECK: da analyze - none!
-; CHECK: da analyze - confused!
-; CHECK: da analyze - none!
-
for.body: ; preds = %entry, %for.body
%i.03 = phi i64 [ 0, %entry ], [ %inc, %for.body ]
%conv = trunc i64 %i.03 to i32
@@ -106,16 +121,23 @@ for.end8: ; preds = %for.body4
;; *B++ = A[j];
define void @rdiv2(ptr %A, ptr %B) nounwind uwtable ssp {
+; CHECK-LABEL: 'rdiv2'
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx, align 4 --> Dst: store i32 %conv, ptr %arrayidx, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx, align 4 --> Dst: %0 = load i32, ptr %arrayidx5, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx, align 4 --> Dst: store i32 %0, ptr %B.addr.01, align 4
+; CHECK-NEXT: da analyze - confused!
+; CHECK-NEXT: Src: %0 = load i32, ptr %arrayidx5, align 4 --> Dst: %0 = load i32, ptr %arrayidx5, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: %0 = load i32, ptr %arrayidx5, align 4 --> Dst: store i32 %0, ptr %B.addr.01, align 4
+; CHECK-NEXT: da analyze - confused!
+; CHECK-NEXT: Src: store i32 %0, ptr %B.addr.01, align 4 --> Dst: store i32 %0, ptr %B.addr.01, align 4
+; CHECK-NEXT: da analyze - none!
+;
entry:
br label %for.body
-; CHECK: da analyze - none!
-; CHECK: da analyze - none!
-; CHECK: da analyze - confused!
-; CHECK: da analyze - none!
-; CHECK: da analyze - confused!
-; CHECK: da analyze - none!
-
for.body: ; preds = %entry, %for.body
%i.03 = phi i64 [ 0, %entry ], [ %inc, %for.body ]
%conv = trunc i64 %i.03 to i32
@@ -152,16 +174,23 @@ for.end8: ; preds = %for.body4
;; *B++ = A[j];
define void @rdiv3(ptr %A, ptr %B) nounwind uwtable ssp {
+; CHECK-LABEL: 'rdiv3'
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx, align 4 --> Dst: store i32 %conv, ptr %arrayidx, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx, align 4 --> Dst: %0 = load i32, ptr %arrayidx5, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx, align 4 --> Dst: store i32 %0, ptr %B.addr.01, align 4
+; CHECK-NEXT: da analyze - confused!
+; CHECK-NEXT: Src: %0 = load i32, ptr %arrayidx5, align 4 --> Dst: %0 = load i32, ptr %arrayidx5, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: %0 = load i32, ptr %arrayidx5, align 4 --> Dst: store i32 %0, ptr %B.addr.01, align 4
+; CHECK-NEXT: da analyze - confused!
+; CHECK-NEXT: Src: store i32 %0, ptr %B.addr.01, align 4 --> Dst: store i32 %0, ptr %B.addr.01, align 4
+; CHECK-NEXT: da analyze - none!
+;
entry:
br label %for.body
-; CHECK: da analyze - none!
-; CHECK: da analyze - none!
-; CHECK: da analyze - confused!
-; CHECK: da analyze - none!
-; CHECK: da analyze - confused!
-; CHECK: da analyze - none!
-
for.body: ; preds = %entry, %for.body
%i.03 = phi i64 [ 0, %entry ], [ %inc, %for.body ]
%conv = trunc i64 %i.03 to i32
@@ -198,16 +227,23 @@ for.end8: ; preds = %for.body4
;; *B++ = A[j];
define void @rdiv4(ptr %A, ptr %B) nounwind uwtable ssp {
+; CHECK-LABEL: 'rdiv4'
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx, align 4 --> Dst: store i32 %conv, ptr %arrayidx, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx, align 4 --> Dst: %0 = load i32, ptr %arrayidx5, align 4
+; CHECK-NEXT: da analyze - flow [|<]!
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx, align 4 --> Dst: store i32 %0, ptr %B.addr.01, align 4
+; CHECK-NEXT: da analyze - confused!
+; CHECK-NEXT: Src: %0 = load i32, ptr %arrayidx5, align 4 --> Dst: %0 = load i32, ptr %arrayidx5, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: %0 = load i32, ptr %arrayidx5, align 4 --> Dst: store i32 %0, ptr %B.addr.01, align 4
+; CHECK-NEXT: da analyze - confused!
+; CHECK-NEXT: Src: store i32 %0, ptr %B.addr.01, align 4 --> Dst: store i32 %0, ptr %B.addr.01, align 4
+; CHECK-NEXT: da analyze - none!
+;
entry:
br label %for.body
-; CHECK: da analyze - none!
-; CHECK: da analyze - flow [|<]!
-; CHECK: da analyze - confused!
-; CHECK: da analyze - none!
-; CHECK: da analyze - confused!
-; CHECK: da analyze - none!
-
for.body: ; preds = %entry, %for.body
%i.03 = phi i64 [ 0, %entry ], [ %inc, %for.body ]
%conv = trunc i64 %i.03 to i32
@@ -244,16 +280,23 @@ for.end8: ; preds = %for.body4
;; *B++ = A[-j];
define void @rdiv5(ptr %A, ptr %B) nounwind uwtable ssp {
+; CHECK-LABEL: 'rdiv5'
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx, align 4 --> Dst: store i32 %conv, ptr %arrayidx, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx, align 4 --> Dst: %0 = load i32, ptr %arrayidx5, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx, align 4 --> Dst: store i32 %0, ptr %B.addr.01, align 4
+; CHECK-NEXT: da analyze - confused!
+; CHECK-NEXT: Src: %0 = load i32, ptr %arrayidx5, align 4 --> Dst: %0 = load i32, ptr %arrayidx5, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: %0 = load i32, ptr %arrayidx5, align 4 --> Dst: store i32 %0, ptr %B.addr.01, align 4
+; CHECK-NEXT: da analyze - confused!
+; CHECK-NEXT: Src: store i32 %0, ptr %B.addr.01, align 4 --> Dst: store i32 %0, ptr %B.addr.01, align 4
+; CHECK-NEXT: da analyze - none!
+;
entry:
br label %for.body
-; CHECK: da analyze - none!
-; CHECK: da analyze - none!
-; CHECK: da analyze - confused!
-; CHECK: da analyze - none!
-; CHECK: da analyze - confused!
-; CHECK: da analyze - none!
-
for.body: ; preds = %entry, %for.body
%i.03 = phi i64 [ 0, %entry ], [ %inc, %for.body ]
%conv = trunc i64 %i.03 to i32
@@ -291,16 +334,23 @@ for.end8: ; preds = %for.body4
;; *B++ = A[-j];
define void @rdiv6(ptr %A, ptr %B) nounwind uwtable ssp {
+; CHECK-LABEL: 'rdiv6'
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx, align 4 --> Dst: store i32 %conv, ptr %arrayidx, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx, align 4 --> Dst: %0 = load i32, ptr %arrayidx5, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx, align 4 --> Dst: store i32 %0, ptr %B.addr.01, align 4
+; CHECK-NEXT: da analyze - confused!
+; CHECK-NEXT: Src: %0 = load i32, ptr %arrayidx5, align 4 --> Dst: %0 = load i32, ptr %arrayidx5, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: %0 = load i32, ptr %arrayidx5, align 4 --> Dst: store i32 %0, ptr %B.addr.01, align 4
+; CHECK-NEXT: da analyze - confused!
+; CHECK-NEXT: Src: store i32 %0, ptr %B.addr.01, align 4 --> Dst: store i32 %0, ptr %B.addr.01, align 4
+; CHECK-NEXT: da analyze - none!
+;
entry:
br label %for.body
-; CHECK: da analyze - none!
-; CHECK: da analyze - none!
-; CHECK: da analyze - confused!
-; CHECK: da analyze - none!
-; CHECK: da analyze - confused!
-; CHECK: da analyze - none!
-
for.body: ; preds = %entry, %for.body
%i.03 = phi i64 [ 0, %entry ], [ %inc, %for.body ]
%conv = trunc i64 %i.03 to i32
@@ -338,16 +388,23 @@ for.end8: ; preds = %for.body4
;; *B++ = A[-j];
define void @rdiv7(ptr %A, ptr %B) nounwind uwtable ssp {
+; CHECK-LABEL: 'rdiv7'
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx, align 4 --> Dst: store i32 %conv, ptr %arrayidx, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx, align 4 --> Dst: %0 = load i32, ptr %arrayidx5, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx, align 4 --> Dst: store i32 %0, ptr %B.addr.01, align 4
+; CHECK-NEXT: da analyze - confused!
+; CHECK-NEXT: Src: %0 = load i32, ptr %arrayidx5, align 4 --> Dst: %0 = load i32, ptr %arrayidx5, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: %0 = load i32, ptr %arrayidx5, align 4 --> Dst: store i32 %0, ptr %B.addr.01, align 4
+; CHECK-NEXT: da analyze - confused!
+; CHECK-NEXT: Src: store i32 %0, ptr %B.addr.01, align 4 --> Dst: store i32 %0, ptr %B.addr.01, align 4
+; CHECK-NEXT: da analyze - none!
+;
entry:
br label %for.body
-; CHECK: da analyze - none!
-; CHECK: da analyze - none!
-; CHECK: da analyze - confused!
-; CHECK: da analyze - none!
-; CHECK: da analyze - confused!
-; CHECK: da analyze - none!
-
for.body: ; preds = %entry, %for.body
%i.03 = phi i64 [ 0, %entry ], [ %inc, %for.body ]
%conv = trunc i64 %i.03 to i32
@@ -385,16 +442,23 @@ for.end8: ; preds = %for.body4
;; *B++ = A[-j];
define void @rdiv8(ptr %A, ptr %B) nounwind uwtable ssp {
+; CHECK-LABEL: 'rdiv8'
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx, align 4 --> Dst: store i32 %conv, ptr %arrayidx, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx, align 4 --> Dst: %0 = load i32, ptr %arrayidx5, align 4
+; CHECK-NEXT: da analyze - flow [|<]!
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx, align 4 --> Dst: store i32 %0, ptr %B.addr.01, align 4
+; CHECK-NEXT: da analyze - confused!
+; CHECK-NEXT: Src: %0 = load i32, ptr %arrayidx5, align 4 --> Dst: %0 = load i32, ptr %arrayidx5, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: %0 = load i32, ptr %arrayidx5, align 4 --> Dst: store i32 %0, ptr %B.addr.01, align 4
+; CHECK-NEXT: da analyze - confused!
+; CHECK-NEXT: Src: store i32 %0, ptr %B.addr.01, align 4 --> Dst: store i32 %0, ptr %B.addr.01, align 4
+; CHECK-NEXT: da analyze - none!
+;
entry:
br label %for.body
-; CHECK: da analyze - none!
-; CHECK: da analyze - flow [|<]!
-; CHECK: da analyze - confused!
-; CHECK: da analyze - none!
-; CHECK: da analyze - confused!
-; CHECK: da analyze - none!
-
for.body: ; preds = %entry, %for.body
%i.03 = phi i64 [ 0, %entry ], [ %inc, %for.body ]
%conv = trunc i64 %i.03 to i32
@@ -432,16 +496,23 @@ for.end8: ; preds = %for.body4
;; *B++ = A[45];
define void @rdiv9(ptr %A, ptr %B) nounwind uwtable ssp {
+; CHECK-LABEL: 'rdiv9'
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx, align 4 --> Dst: store i32 %conv, ptr %arrayidx, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx, align 4 --> Dst: %0 = load i32, ptr %arrayidx4, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx, align 4 --> Dst: store i32 %0, ptr %B.addr.11, align 4
+; CHECK-NEXT: da analyze - confused!
+; CHECK-NEXT: Src: %0 = load i32, ptr %arrayidx4, align 4 --> Dst: %0 = load i32, ptr %arrayidx4, align 4
+; CHECK-NEXT: da analyze - consistent input [S S]!
+; CHECK-NEXT: Src: %0 = load i32, ptr %arrayidx4, align 4 --> Dst: store i32 %0, ptr %B.addr.11, align 4
+; CHECK-NEXT: da analyze - confused!
+; CHECK-NEXT: Src: store i32 %0, ptr %B.addr.11, align 4 --> Dst: store i32 %0, ptr %B.addr.11, align 4
+; CHECK-NEXT: da analyze - none!
+;
entry:
br label %for.cond1.preheader
-; CHECK: da analyze - none!
-; CHECK: da analyze - none!
-; CHECK: da analyze - confused!
-; CHECK: da analyze - consistent input [S S]!
-; CHECK: da analyze - confused!
-; CHECK: da analyze - none!
-
for.cond1.preheader: ; preds = %entry, %for.inc5
%B.addr.04 = phi ptr [ %B, %entry ], [ %scevgep, %for.inc5 ]
%i.03 = phi i64 [ 0, %entry ], [ %inc6, %for.inc5 ]
@@ -481,16 +552,23 @@ for.end7: ; preds = %for.inc5
;; *B++ = A[45];
define void @rdiv10(ptr %A, ptr %B) nounwind uwtable ssp {
+; CHECK-LABEL: 'rdiv10'
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx, align 4 --> Dst: store i32 %conv, ptr %arrayidx, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx, align 4 --> Dst: %0 = load i32, ptr %arrayidx4, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx, align 4 --> Dst: store i32 %0, ptr %B.addr.11, align 4
+; CHECK-NEXT: da analyze - confused!
+; CHECK-NEXT: Src: %0 = load i32, ptr %arrayidx4, align 4 --> Dst: %0 = load i32, ptr %arrayidx4, align 4
+; CHECK-NEXT: da analyze - consistent input [S S]!
+; CHECK-NEXT: Src: %0 = load i32, ptr %arrayidx4, align 4 --> Dst: store i32 %0, ptr %B.addr.11, align 4
+; CHECK-NEXT: da analyze - confused!
+; CHECK-NEXT: Src: store i32 %0, ptr %B.addr.11, align 4 --> Dst: store i32 %0, ptr %B.addr.11, align 4
+; CHECK-NEXT: da analyze - none!
+;
entry:
br label %for.cond1.preheader
-; CHECK: da analyze - none!
-; CHECK: da analyze - none!
-; CHECK: da analyze - confused!
-; CHECK: da analyze - consistent input [S S]!
-; CHECK: da analyze - confused!
-; CHECK: da analyze - none!
-
for.cond1.preheader: ; preds = %entry, %for.inc5
%B.addr.04 = phi ptr [ %B, %entry ], [ %scevgep, %for.inc5 ]
%i.03 = phi i64 [ 0, %entry ], [ %inc6, %for.inc5 ]
@@ -529,16 +607,23 @@ for.end7: ; preds = %for.inc5
;; *B++ = A[45];
define void @rdiv11(ptr %A, ptr %B) nounwind uwtable ssp {
+; CHECK-LABEL: 'rdiv11'
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx, align 4 --> Dst: store i32 %conv, ptr %arrayidx, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx, align 4 --> Dst: %0 = load i32, ptr %arrayidx4, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx, align 4 --> Dst: store i32 %0, ptr %B.addr.11, align 4
+; CHECK-NEXT: da analyze - confused!
+; CHECK-NEXT: Src: %0 = load i32, ptr %arrayidx4, align 4 --> Dst: %0 = load i32, ptr %arrayidx4, align 4
+; CHECK-NEXT: da analyze - consistent input [S S]!
+; CHECK-NEXT: Src: %0 = load i32, ptr %arrayidx4, align 4 --> Dst: store i32 %0, ptr %B.addr.11, align 4
+; CHECK-NEXT: da analyze - confused!
+; CHECK-NEXT: Src: store i32 %0, ptr %B.addr.11, align 4 --> Dst: store i32 %0, ptr %B.addr.11, align 4
+; CHECK-NEXT: da analyze - none!
+;
entry:
br label %for.cond1.preheader
-; CHECK: da analyze - none!
-; CHECK: da analyze - none!
-; CHECK: da analyze - confused!
-; CHECK: da analyze - consistent input [S S]!
-; CHECK: da analyze - confused!
-; CHECK: da analyze - none!
-
for.cond1.preheader: ; preds = %entry, %for.inc5
%B.addr.04 = phi ptr [ %B, %entry ], [ %scevgep, %for.inc5 ]
%i.03 = phi i64 [ 0, %entry ], [ %inc6, %for.inc5 ]
@@ -577,16 +662,23 @@ for.end7: ; preds = %for.inc5
;; *B++ = A[45];
define void @rdiv12(ptr %A, ptr %B) nounwind uwtable ssp {
+; CHECK-LABEL: 'rdiv12'
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx, align 4 --> Dst: store i32 %conv, ptr %arrayidx, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx, align 4 --> Dst: %0 = load i32, ptr %arrayidx4, align 4
+; CHECK-NEXT: da analyze - flow [* *|<]!
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx, align 4 --> Dst: store i32 %0, ptr %B.addr.11, align 4
+; CHECK-NEXT: da analyze - confused!
+; CHECK-NEXT: Src: %0 = load i32, ptr %arrayidx4, align 4 --> Dst: %0 = load i32, ptr %arrayidx4, align 4
+; CHECK-NEXT: da analyze - consistent input [S S]!
+; CHECK-NEXT: Src: %0 = load i32, ptr %arrayidx4, align 4 --> Dst: store i32 %0, ptr %B.addr.11, align 4
+; CHECK-NEXT: da analyze - confused!
+; CHECK-NEXT: Src: store i32 %0, ptr %B.addr.11, align 4 --> Dst: store i32 %0, ptr %B.addr.11, align 4
+; CHECK-NEXT: da analyze - none!
+;
entry:
br label %for.cond1.preheader
-; CHECK: da analyze - none!
-; CHECK: da analyze - flow [* *|<]!
-; CHECK: da analyze - confused!
-; CHECK: da analyze - consistent input [S S]!
-; CHECK: da analyze - confused!
-; CHECK: da analyze - none!
-
for.cond1.preheader: ; preds = %entry, %for.inc5
%B.addr.04 = phi ptr [ %B, %entry ], [ %scevgep, %for.inc5 ]
%i.03 = phi i64 [ 0, %entry ], [ %inc6, %for.inc5 ]
diff --git a/llvm/test/Analysis/DependenceAnalysis/ExactSIV.ll b/llvm/test/Analysis/DependenceAnalysis/ExactSIV.ll
index 7822e61cf3aa0d..b6b44ad4bfc53b 100644
--- a/llvm/test/Analysis/DependenceAnalysis/ExactSIV.ll
+++ b/llvm/test/Analysis/DependenceAnalysis/ExactSIV.ll
@@ -1,3 +1,4 @@
+; NOTE: Assertions have been autogenerated by utils/update_analyze_test_checks.py UTC_ARGS: --version 5
; RUN: opt < %s -disable-output "-passes=print<da>" -aa-pipeline=basic-aa 2>&1 \
; RUN: | FileCheck %s
@@ -10,17 +11,23 @@ target triple = "x86_64-apple-macosx10.6.0"
;; *B++ = A[2*i + 1];
define void @exact0(ptr %A, ptr %B) nounwind uwtable ssp {
+; CHECK-LABEL: 'exact0'
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx, align 4 --> Dst: store i32 %conv, ptr %arrayidx, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx, align 4 --> Dst: %0 = load i32, ptr %arrayidx2, align 4
+; CHECK-NEXT: da analyze - flow [<=|<]!
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx, align 4 --> Dst: store i32 %0, ptr %B.addr.01, align 4
+; CHECK-NEXT: da analyze - confused!
+; CHECK-NEXT: Src: %0 = load i32, ptr %arrayidx2, align 4 --> Dst: %0 = load i32, ptr %arrayidx2, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: %0 = load i32, ptr %arrayidx2, align 4 --> Dst: store i32 %0, ptr %B.addr.01, align 4
+; CHECK-NEXT: da analyze - confused!
+; CHECK-NEXT: Src: store i32 %0, ptr %B.addr.01, align 4 --> Dst: store i32 %0, ptr %B.addr.01, align 4
+; CHECK-NEXT: da analyze - none!
+;
entry:
br label %for.body
-; CHECK-LABEL: exact0
-; CHECK: da analyze - none!
-; CHECK: da analyze - flow [<=|<]!
-; CHECK: da analyze - confused!
-; CHECK: da analyze - none!
-; CHECK: da analyze - confused!
-; CHECK: da analyze - none!
-
for.body: ; preds = %entry, %for.body
%i.02 = phi i64 [ 0, %entry ], [ %inc, %for.body ]
%B.addr.01 = phi ptr [ %B, %entry ], [ %incdec.ptr, %for.body ]
@@ -48,17 +55,23 @@ for.end: ; preds = %for.body
;; *B++ = A[2*i + 1];
define void @exact1(ptr %A, ptr %B) nounwind uwtable ssp {
+; CHECK-LABEL: 'exact1'
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx, align 4 --> Dst: store i32 %conv, ptr %arrayidx, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx, align 4 --> Dst: %0 = load i32, ptr %arrayidx3, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx, align 4 --> Dst: store i32 %0, ptr %B.addr.01, align 4
+; CHECK-NEXT: da analyze - confused!
+; CHECK-NEXT: Src: %0 = load i32, ptr %arrayidx3, align 4 --> Dst: %0 = load i32, ptr %arrayidx3, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: %0 = load i32, ptr %arrayidx3, align 4 --> Dst: store i32 %0, ptr %B.addr.01, align 4
+; CHECK-NEXT: da analyze - confused!
+; CHECK-NEXT: Src: store i32 %0, ptr %B.addr.01, align 4 --> Dst: store i32 %0, ptr %B.addr.01, align 4
+; CHECK-NEXT: da analyze - none!
+;
entry:
br label %for.body
-; CHECK-LABEL: exact1
-; CHECK: da analyze - none!
-; CHECK: da analyze - none!
-; CHECK: da analyze - confused!
-; CHECK: da analyze - none!
-; CHECK: da analyze - confused!
-; CHECK: da analyze - none!
-
for.body: ; preds = %entry, %for.body
%i.02 = phi i64 [ 0, %entry ], [ %inc, %for.body ]
%B.addr.01 = phi ptr [ %B, %entry ], [ %incdec.ptr, %for.body ]
@@ -87,17 +100,23 @@ for.end: ; preds = %for.body
;; *B++ = A[i + 60];
define void @exact2(ptr %A, ptr %B) nounwind uwtable ssp {
+; CHECK-LABEL: 'exact2'
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx, align 4 --> Dst: store i32 %conv, ptr %arrayidx, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx, align 4 --> Dst: %0 = load i32, ptr %arrayidx1, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx, align 4 --> Dst: store i32 %0, ptr %B.addr.01, align 4
+; CHECK-NEXT: da analyze - confused!
+; CHECK-NEXT: Src: %0 = load i32, ptr %arrayidx1, align 4 --> Dst: %0 = load i32, ptr %arrayidx1, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: %0 = load i32, ptr %arrayidx1, align 4 --> Dst: store i32 %0, ptr %B.addr.01, align 4
+; CHECK-NEXT: da analyze - confused!
+; CHECK-NEXT: Src: store i32 %0, ptr %B.addr.01, align 4 --> Dst: store i32 %0, ptr %B.addr.01, align 4
+; CHECK-NEXT: da analyze - none!
+;
entry:
br label %for.body
-; CHECK-LABEL: exact2
-; CHECK: da analyze - none!
-; CHECK: da analyze - none!
-; CHECK: da analyze - confused!
-; CHECK: da analyze - none!
-; CHECK: da analyze - confused!
-; CHECK: da analyze - none!
-
for.body: ; preds = %entry, %for.body
%i.02 = phi i64 [ 0, %entry ], [ %inc, %for.body ]
%B.addr.01 = phi ptr [ %B, %entry ], [ %incdec.ptr, %for.body ]
@@ -124,17 +143,23 @@ for.end: ; preds = %for.body
;; *B++ = A[i + 60];
define void @exact3(ptr %A, ptr %B) nounwind uwtable ssp {
+; CHECK-LABEL: 'exact3'
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx, align 4 --> Dst: store i32 %conv, ptr %arrayidx, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx, align 4 --> Dst: %0 = load i32, ptr %arrayidx1, align 4
+; CHECK-NEXT: da analyze - flow [>]!
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx, align 4 --> Dst: store i32 %0, ptr %B.addr.01, align 4
+; CHECK-NEXT: da analyze - confused!
+; CHECK-NEXT: Src: %0 = load i32, ptr %arrayidx1, align 4 --> Dst: %0 = load i32, ptr %arrayidx1, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: %0 = load i32, ptr %arrayidx1, align 4 --> Dst: store i32 %0, ptr %B.addr.01, align 4
+; CHECK-NEXT: da analyze - confused!
+; CHECK-NEXT: Src: store i32 %0, ptr %B.addr.01, align 4 --> Dst: store i32 %0, ptr %B.addr.01, align 4
+; CHECK-NEXT: da analyze - none!
+;
entry:
br label %for.body
-; CHECK-LABEL: exact3
-; CHECK: da analyze - none!
-; CHECK: da analyze - flow [>]!
-; CHECK: da analyze - confused!
-; CHECK: da analyze - none!
-; CHECK: da analyze - confused!
-; CHECK: da analyze - none!
-
for.body: ; preds = %entry, %for.body
%i.02 = phi i64 [ 0, %entry ], [ %inc, %for.body ]
%B.addr.01 = phi ptr [ %B, %entry ], [ %incdec.ptr, %for.body ]
@@ -161,17 +186,23 @@ for.end: ; preds = %for.body
;; *B++ = A[i + 60];
define void @exact4(ptr %A, ptr %B) nounwind uwtable ssp {
+; CHECK-LABEL: 'exact4'
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx, align 4 --> Dst: store i32 %conv, ptr %arrayidx, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx, align 4 --> Dst: %0 = load i32, ptr %arrayidx1, align 4
+; CHECK-NEXT: da analyze - flow [>]!
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx, align 4 --> Dst: store i32 %0, ptr %B.addr.01, align 4
+; CHECK-NEXT: da analyze - confused!
+; CHECK-NEXT: Src: %0 = load i32, ptr %arrayidx1, align 4 --> Dst: %0 = load i32, ptr %arrayidx1, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: %0 = load i32, ptr %arrayidx1, align 4 --> Dst: store i32 %0, ptr %B.addr.01, align 4
+; CHECK-NEXT: da analyze - confused!
+; CHECK-NEXT: Src: store i32 %0, ptr %B.addr.01, align 4 --> Dst: store i32 %0, ptr %B.addr.01, align 4
+; CHECK-NEXT: da analyze - none!
+;
entry:
br label %for.body
-; CHECK-LABEL: exact4
-; CHECK: da analyze - none!
-; CHECK: da analyze - flow [>]!
-; CHECK: da analyze - confused!
-; CHECK: da analyze - none!
-; CHECK: da analyze - confused!
-; CHECK: da analyze - none!
-
for.body: ; preds = %entry, %for.body
%i.02 = phi i64 [ 0, %entry ], [ %inc, %for.body ]
%B.addr.01 = phi ptr [ %B, %entry ], [ %incdec.ptr, %for.body ]
@@ -198,17 +229,23 @@ for.end: ; preds = %for.body
;; *B++ = A[i + 60];
define void @exact5(ptr %A, ptr %B) nounwind uwtable ssp {
+; CHECK-LABEL: 'exact5'
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx, align 4 --> Dst: store i32 %conv, ptr %arrayidx, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx, align 4 --> Dst: %0 = load i32, ptr %arrayidx1, align 4
+; CHECK-NEXT: da analyze - flow [=>|<]!
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx, align 4 --> Dst: store i32 %0, ptr %B.addr.01, align 4
+; CHECK-NEXT: da analyze - confused!
+; CHECK-NEXT: Src: %0 = load i32, ptr %arrayidx1, align 4 --> Dst: %0 = load i32, ptr %arrayidx1, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: %0 = load i32, ptr %arrayidx1, align 4 --> Dst: store i32 %0, ptr %B.addr.01, align 4
+; CHECK-NEXT: da analyze - confused!
+; CHECK-NEXT: Src: store i32 %0, ptr %B.addr.01, align 4 --> Dst: store i32 %0, ptr %B.addr.01, align 4
+; CHECK-NEXT: da analyze - none!
+;
entry:
br label %for.body
-; CHECK-LABEL: exact5
-; CHECK: da analyze - none!
-; CHECK: da analyze - flow [=>|<]!
-; CHECK: da analyze - confused!
-; CHECK: da analyze - none!
-; CHECK: da analyze - confused!
-; CHECK: da analyze - none!
-
for.body: ; preds = %entry, %for.body
%i.02 = phi i64 [ 0, %entry ], [ %inc, %for.body ]
%B.addr.01 = phi ptr [ %B, %entry ], [ %incdec.ptr, %for.body ]
@@ -235,17 +272,23 @@ for.end: ; preds = %for.body
;; *B++ = A[i + 60];
define void @exact6(ptr %A, ptr %B) nounwind uwtable ssp {
+; CHECK-LABEL: 'exact6'
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx, align 4 --> Dst: store i32 %conv, ptr %arrayidx, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx, align 4 --> Dst: %0 = load i32, ptr %arrayidx1, align 4
+; CHECK-NEXT: da analyze - flow [=>|<]!
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx, align 4 --> Dst: store i32 %0, ptr %B.addr.01, align 4
+; CHECK-NEXT: da analyze - confused!
+; CHECK-NEXT: Src: %0 = load i32, ptr %arrayidx1, align 4 --> Dst: %0 = load i32, ptr %arrayidx1, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: %0 = load i32, ptr %arrayidx1, align 4 --> Dst: store i32 %0, ptr %B.addr.01, align 4
+; CHECK-NEXT: da analyze - confused!
+; CHECK-NEXT: Src: store i32 %0, ptr %B.addr.01, align 4 --> Dst: store i32 %0, ptr %B.addr.01, align 4
+; CHECK-NEXT: da analyze - none!
+;
entry:
br label %for.body
-; CHECK-LABEL: exact6
-; CHECK: da analyze - none!
-; CHECK: da analyze - flow [=>|<]!
-; CHECK: da analyze - confused!
-; CHECK: da analyze - none!
-; CHECK: da analyze - confused!
-; CHECK: da analyze - none!
-
for.body: ; preds = %entry, %for.body
%i.02 = phi i64 [ 0, %entry ], [ %inc, %for.body ]
%B.addr.01 = phi ptr [ %B, %entry ], [ %incdec.ptr, %for.body ]
@@ -272,17 +315,23 @@ for.end: ; preds = %for.body
;; *B++ = A[i + 60];
define void @exact7(ptr %A, ptr %B) nounwind uwtable ssp {
+; CHECK-LABEL: 'exact7'
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx, align 4 --> Dst: store i32 %conv, ptr %arrayidx, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx, align 4 --> Dst: %0 = load i32, ptr %arrayidx1, align 4
+; CHECK-NEXT: da analyze - flow [*|<]!
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx, align 4 --> Dst: store i32 %0, ptr %B.addr.01, align 4
+; CHECK-NEXT: da analyze - confused!
+; CHECK-NEXT: Src: %0 = load i32, ptr %arrayidx1, align 4 --> Dst: %0 = load i32, ptr %arrayidx1, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: %0 = load i32, ptr %arrayidx1, align 4 --> Dst: store i32 %0, ptr %B.addr.01, align 4
+; CHECK-NEXT: da analyze - confused!
+; CHECK-NEXT: Src: store i32 %0, ptr %B.addr.01, align 4 --> Dst: store i32 %0, ptr %B.addr.01, align 4
+; CHECK-NEXT: da analyze - none!
+;
entry:
br label %for.body
-; CHECK-LABEL: exact7
-; CHECK: da analyze - none!
-; CHECK: da analyze - flow [*|<]!
-; CHECK: da analyze - confused!
-; CHECK: da analyze - none!
-; CHECK: da analyze - confused!
-; CHECK: da analyze - none!
-
for.body: ; preds = %entry, %for.body
%i.02 = phi i64 [ 0, %entry ], [ %inc, %for.body ]
%B.addr.01 = phi ptr [ %B, %entry ], [ %incdec.ptr, %for.body ]
@@ -309,17 +358,23 @@ for.end: ; preds = %for.body
;; *B++ = A[-i - 60];
define void @exact8(ptr %A, ptr %B) nounwind uwtable ssp {
+; CHECK-LABEL: 'exact8'
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx, align 4 --> Dst: store i32 %conv, ptr %arrayidx, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx, align 4 --> Dst: %0 = load i32, ptr %arrayidx2, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx, align 4 --> Dst: store i32 %0, ptr %B.addr.01, align 4
+; CHECK-NEXT: da analyze - confused!
+; CHECK-NEXT: Src: %0 = load i32, ptr %arrayidx2, align 4 --> Dst: %0 = load i32, ptr %arrayidx2, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: %0 = load i32, ptr %arrayidx2, align 4 --> Dst: store i32 %0, ptr %B.addr.01, align 4
+; CHECK-NEXT: da analyze - confused!
+; CHECK-NEXT: Src: store i32 %0, ptr %B.addr.01, align 4 --> Dst: store i32 %0, ptr %B.addr.01, align 4
+; CHECK-NEXT: da analyze - none!
+;
entry:
br label %for.body
-; CHECK-LABEL: exact8
-; CHECK: da analyze - none!
-; CHECK: da analyze - none!
-; CHECK: da analyze - confused!
-; CHECK: da analyze - none!
-; CHECK: da analyze - confused!
-; CHECK: da analyze - none!
-
for.body: ; preds = %entry, %for.body
%i.02 = phi i64 [ 0, %entry ], [ %inc, %for.body ]
%B.addr.01 = phi ptr [ %B, %entry ], [ %incdec.ptr, %for.body ]
@@ -346,17 +401,23 @@ for.end: ; preds = %for.body
;; *B++ = A[-i - 60];
define void @exact9(ptr %A, ptr %B) nounwind uwtable ssp {
+; CHECK-LABEL: 'exact9'
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx, align 4 --> Dst: store i32 %conv, ptr %arrayidx, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx, align 4 --> Dst: %0 = load i32, ptr %arrayidx2, align 4
+; CHECK-NEXT: da analyze - flow [>]!
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx, align 4 --> Dst: store i32 %0, ptr %B.addr.01, align 4
+; CHECK-NEXT: da analyze - confused!
+; CHECK-NEXT: Src: %0 = load i32, ptr %arrayidx2, align 4 --> Dst: %0 = load i32, ptr %arrayidx2, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: %0 = load i32, ptr %arrayidx2, align 4 --> Dst: store i32 %0, ptr %B.addr.01, align 4
+; CHECK-NEXT: da analyze - confused!
+; CHECK-NEXT: Src: store i32 %0, ptr %B.addr.01, align 4 --> Dst: store i32 %0, ptr %B.addr.01, align 4
+; CHECK-NEXT: da analyze - none!
+;
entry:
br label %for.body
-; CHECK-LABEL: exact9
-; CHECK: da analyze - none!
-; CHECK: da analyze - flow [>]!
-; CHECK: da analyze - confused!
-; CHECK: da analyze - none!
-; CHECK: da analyze - confused!
-; CHECK: da analyze - none!
-
for.body: ; preds = %entry, %for.body
%i.02 = phi i64 [ 0, %entry ], [ %inc, %for.body ]
%B.addr.01 = phi ptr [ %B, %entry ], [ %incdec.ptr, %for.body ]
@@ -383,17 +444,23 @@ for.end: ; preds = %for.body
;; *B++ = A[-i - 60];
define void @exact10(ptr %A, ptr %B) nounwind uwtable ssp {
+; CHECK-LABEL: 'exact10'
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx, align 4 --> Dst: store i32 %conv, ptr %arrayidx, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx, align 4 --> Dst: %0 = load i32, ptr %arrayidx2, align 4
+; CHECK-NEXT: da analyze - flow [>]!
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx, align 4 --> Dst: store i32 %0, ptr %B.addr.01, align 4
+; CHECK-NEXT: da analyze - confused!
+; CHECK-NEXT: Src: %0 = load i32, ptr %arrayidx2, align 4 --> Dst: %0 = load i32, ptr %arrayidx2, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: %0 = load i32, ptr %arrayidx2, align 4 --> Dst: store i32 %0, ptr %B.addr.01, align 4
+; CHECK-NEXT: da analyze - confused!
+; CHECK-NEXT: Src: store i32 %0, ptr %B.addr.01, align 4 --> Dst: store i32 %0, ptr %B.addr.01, align 4
+; CHECK-NEXT: da analyze - none!
+;
entry:
br label %for.body
-; CHECK-LABEL: exact10
-; CHECK: da analyze - none!
-; CHECK: da analyze - flow [>]!
-; CHECK: da analyze - confused!
-; CHECK: da analyze - none!
-; CHECK: da analyze - confused!
-; CHECK: da analyze - none!
-
for.body: ; preds = %entry, %for.body
%i.02 = phi i64 [ 0, %entry ], [ %inc, %for.body ]
%B.addr.01 = phi ptr [ %B, %entry ], [ %incdec.ptr, %for.body ]
@@ -420,17 +487,23 @@ for.end: ; preds = %for.body
;; *B++ = A[-i - 60];
define void @exact11(ptr %A, ptr %B) nounwind uwtable ssp {
+; CHECK-LABEL: 'exact11'
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx, align 4 --> Dst: store i32 %conv, ptr %arrayidx, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx, align 4 --> Dst: %0 = load i32, ptr %arrayidx2, align 4
+; CHECK-NEXT: da analyze - flow [=>|<]!
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx, align 4 --> Dst: store i32 %0, ptr %B.addr.01, align 4
+; CHECK-NEXT: da analyze - confused!
+; CHECK-NEXT: Src: %0 = load i32, ptr %arrayidx2, align 4 --> Dst: %0 = load i32, ptr %arrayidx2, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: %0 = load i32, ptr %arrayidx2, align 4 --> Dst: store i32 %0, ptr %B.addr.01, align 4
+; CHECK-NEXT: da analyze - confused!
+; CHECK-NEXT: Src: store i32 %0, ptr %B.addr.01, align 4 --> Dst: store i32 %0, ptr %B.addr.01, align 4
+; CHECK-NEXT: da analyze - none!
+;
entry:
br label %for.body
-; CHECK-LABEL: exact11
-; CHECK: da analyze - none!
-; CHECK: da analyze - flow [=>|<]!
-; CHECK: da analyze - confused!
-; CHECK: da analyze - none!
-; CHECK: da analyze - confused!
-; CHECK: da analyze - none!
-
for.body: ; preds = %entry, %for.body
%i.02 = phi i64 [ 0, %entry ], [ %inc, %for.body ]
%B.addr.01 = phi ptr [ %B, %entry ], [ %incdec.ptr, %for.body ]
@@ -457,17 +530,23 @@ for.end: ; preds = %for.body
;; *B++ = A[-i - 60];
define void @exact12(ptr %A, ptr %B) nounwind uwtable ssp {
+; CHECK-LABEL: 'exact12'
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx, align 4 --> Dst: store i32 %conv, ptr %arrayidx, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx, align 4 --> Dst: %0 = load i32, ptr %arrayidx2, align 4
+; CHECK-NEXT: da analyze - flow [=>|<]!
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx, align 4 --> Dst: store i32 %0, ptr %B.addr.01, align 4
+; CHECK-NEXT: da analyze - confused!
+; CHECK-NEXT: Src: %0 = load i32, ptr %arrayidx2, align 4 --> Dst: %0 = load i32, ptr %arrayidx2, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: %0 = load i32, ptr %arrayidx2, align 4 --> Dst: store i32 %0, ptr %B.addr.01, align 4
+; CHECK-NEXT: da analyze - confused!
+; CHECK-NEXT: Src: store i32 %0, ptr %B.addr.01, align 4 --> Dst: store i32 %0, ptr %B.addr.01, align 4
+; CHECK-NEXT: da analyze - none!
+;
entry:
br label %for.body
-; CHECK-LABEL: exact12
-; CHECK: da analyze - none!
-; CHECK: da analyze - flow [=>|<]!
-; CHECK: da analyze - confused!
-; CHECK: da analyze - none!
-; CHECK: da analyze - confused!
-; CHECK: da analyze - none!
-
for.body: ; preds = %entry, %for.body
%i.02 = phi i64 [ 0, %entry ], [ %inc, %for.body ]
%B.addr.01 = phi ptr [ %B, %entry ], [ %incdec.ptr, %for.body ]
@@ -494,17 +573,23 @@ for.end: ; preds = %for.body
;; *B++ = A[-i - 60];
define void @exact13(ptr %A, ptr %B) nounwind uwtable ssp {
+; CHECK-LABEL: 'exact13'
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx, align 4 --> Dst: store i32 %conv, ptr %arrayidx, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx, align 4 --> Dst: %0 = load i32, ptr %arrayidx2, align 4
+; CHECK-NEXT: da analyze - flow [*|<]!
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx, align 4 --> Dst: store i32 %0, ptr %B.addr.01, align 4
+; CHECK-NEXT: da analyze - confused!
+; CHECK-NEXT: Src: %0 = load i32, ptr %arrayidx2, align 4 --> Dst: %0 = load i32, ptr %arrayidx2, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: %0 = load i32, ptr %arrayidx2, align 4 --> Dst: store i32 %0, ptr %B.addr.01, align 4
+; CHECK-NEXT: da analyze - confused!
+; CHECK-NEXT: Src: store i32 %0, ptr %B.addr.01, align 4 --> Dst: store i32 %0, ptr %B.addr.01, align 4
+; CHECK-NEXT: da analyze - none!
+;
entry:
br label %for.body
-; CHECK-LABEL: exact13
-; CHECK: da analyze - none!
-; CHECK: da analyze - flow [*|<]!
-; CHECK: da analyze - confused!
-; CHECK: da analyze - none!
-; CHECK: da analyze - confused!
-; CHECK: da analyze - none!
-
for.body: ; preds = %entry, %for.body
%i.02 = phi i64 [ 0, %entry ], [ %inc, %for.body ]
%B.addr.01 = phi ptr [ %B, %entry ], [ %incdec.ptr, %for.body ]
diff --git a/llvm/test/Analysis/DependenceAnalysis/GCD.ll b/llvm/test/Analysis/DependenceAnalysis/GCD.ll
index f4890a269606b5..c0e1362c82b50a 100644
--- a/llvm/test/Analysis/DependenceAnalysis/GCD.ll
+++ b/llvm/test/Analysis/DependenceAnalysis/GCD.ll
@@ -1,5 +1,6 @@
+; NOTE: Assertions have been autogenerated by utils/update_analyze_test_checks.py UTC_ARGS: --version 5
; RUN: opt < %s -disable-output "-passes=print<da>" -aa-pipeline=basic-aa 2>&1 \
-; RUN: | FileCheck %s -check-prefix=DELIN
+; RUN: | 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-S128"
target triple = "x86_64-apple-macosx10.6.0"
@@ -12,17 +13,23 @@ target triple = "x86_64-apple-macosx10.6.0"
;; *B++ = A[6*i + 8*j];
define void @gcd0(ptr %A, ptr %B) nounwind uwtable ssp {
+; CHECK-LABEL: 'gcd0'
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx, align 4 --> Dst: store i32 %conv, ptr %arrayidx, align 4
+; CHECK-NEXT: da analyze - output [* *]!
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx, align 4 --> Dst: %0 = load i32, ptr %arrayidx7, align 4
+; CHECK-NEXT: da analyze - flow [=> *|<]!
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx, align 4 --> Dst: store i32 %0, ptr %B.addr.11, align 4
+; CHECK-NEXT: da analyze - confused!
+; CHECK-NEXT: Src: %0 = load i32, ptr %arrayidx7, align 4 --> Dst: %0 = load i32, ptr %arrayidx7, align 4
+; CHECK-NEXT: da analyze - input [* *]!
+; CHECK-NEXT: Src: %0 = load i32, ptr %arrayidx7, align 4 --> Dst: store i32 %0, ptr %B.addr.11, align 4
+; CHECK-NEXT: da analyze - confused!
+; CHECK-NEXT: Src: store i32 %0, ptr %B.addr.11, align 4 --> Dst: store i32 %0, ptr %B.addr.11, align 4
+; CHECK-NEXT: da analyze - none!
+;
entry:
br label %for.cond1.preheader
-; DELIN-LABEL: gcd0
-; DELIN: da analyze - output [* *]!
-; DELIN: da analyze - flow [=> *|<]!
-; DELIN: da analyze - confused!
-; DELIN: da analyze - input [* *]!
-; DELIN: da analyze - confused!
-; DELIN: da analyze - none!
-
for.cond1.preheader: ; preds = %entry, %for.inc8
%B.addr.04 = phi ptr [ %B, %entry ], [ %scevgep, %for.inc8 ]
%i.03 = phi i64 [ 0, %entry ], [ %inc9, %for.inc8 ]
@@ -65,17 +72,23 @@ for.end10: ; preds = %for.inc8
;; *B++ = A[6*i + 8*j + 1];
define void @gcd1(ptr %A, ptr %B) nounwind uwtable ssp {
+; CHECK-LABEL: 'gcd1'
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx, align 4 --> Dst: store i32 %conv, ptr %arrayidx, align 4
+; CHECK-NEXT: da analyze - output [* *]!
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx, align 4 --> Dst: %0 = load i32, ptr %arrayidx8, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx, align 4 --> Dst: store i32 %0, ptr %B.addr.11, align 4
+; CHECK-NEXT: da analyze - confused!
+; CHECK-NEXT: Src: %0 = load i32, ptr %arrayidx8, align 4 --> Dst: %0 = load i32, ptr %arrayidx8, align 4
+; CHECK-NEXT: da analyze - input [* *]!
+; CHECK-NEXT: Src: %0 = load i32, ptr %arrayidx8, align 4 --> Dst: store i32 %0, ptr %B.addr.11, align 4
+; CHECK-NEXT: da analyze - confused!
+; CHECK-NEXT: Src: store i32 %0, ptr %B.addr.11, align 4 --> Dst: store i32 %0, ptr %B.addr.11, align 4
+; CHECK-NEXT: da analyze - none!
+;
entry:
br label %for.cond1.preheader
-; DELIN-LABEL: gcd1
-; DELIN: da analyze - output [* *]!
-; DELIN: da analyze - none!
-; DELIN: da analyze - confused!
-; DELIN: da analyze - input [* *]!
-; DELIN: da analyze - confused!
-; DELIN: da analyze - none!
-
for.cond1.preheader: ; preds = %entry, %for.inc9
%B.addr.04 = phi ptr [ %B, %entry ], [ %scevgep, %for.inc9 ]
%i.03 = phi i64 [ 0, %entry ], [ %inc10, %for.inc9 ]
@@ -119,17 +132,23 @@ for.end11: ; preds = %for.inc9
;; *B++ = A[6*i + 8*j];
define void @gcd2(ptr %A, ptr %B) nounwind uwtable ssp {
+; CHECK-LABEL: 'gcd2'
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx, align 4 --> Dst: store i32 %conv, ptr %arrayidx, align 4
+; CHECK-NEXT: da analyze - output [* *]!
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx, align 4 --> Dst: %0 = load i32, ptr %arrayidx8, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx, align 4 --> Dst: store i32 %0, ptr %B.addr.11, align 4
+; CHECK-NEXT: da analyze - confused!
+; CHECK-NEXT: Src: %0 = load i32, ptr %arrayidx8, align 4 --> Dst: %0 = load i32, ptr %arrayidx8, align 4
+; CHECK-NEXT: da analyze - input [* *]!
+; CHECK-NEXT: Src: %0 = load i32, ptr %arrayidx8, align 4 --> Dst: store i32 %0, ptr %B.addr.11, align 4
+; CHECK-NEXT: da analyze - confused!
+; CHECK-NEXT: Src: store i32 %0, ptr %B.addr.11, align 4 --> Dst: store i32 %0, ptr %B.addr.11, align 4
+; CHECK-NEXT: da analyze - none!
+;
entry:
br label %for.cond1.preheader
-; DELIN-LABEL: gcd2
-; DELIN: da analyze - output [* *]!
-; DELIN: da analyze - none!
-; DELIN: da analyze - confused!
-; DELIN: da analyze - input [* *]!
-; DELIN: da analyze - confused!
-; DELIN: da analyze - none!
-
for.cond1.preheader: ; preds = %entry, %for.inc9
%B.addr.04 = phi ptr [ %B, %entry ], [ %scevgep, %for.inc9 ]
%i.03 = phi i64 [ 0, %entry ], [ %inc10, %for.inc9 ]
@@ -173,17 +192,23 @@ for.end11: ; preds = %for.inc9
;; *B++ = A[i + 2*j - 1];
define void @gcd3(ptr %A, ptr %B) nounwind uwtable ssp {
+; CHECK-LABEL: 'gcd3'
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx, align 4 --> Dst: store i32 %conv, ptr %arrayidx, align 4
+; CHECK-NEXT: da analyze - output [* *]!
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx, align 4 --> Dst: %0 = load i32, ptr %arrayidx6, align 4
+; CHECK-NEXT: da analyze - flow [<> *]!
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx, align 4 --> Dst: store i32 %0, ptr %B.addr.11, align 4
+; CHECK-NEXT: da analyze - confused!
+; CHECK-NEXT: Src: %0 = load i32, ptr %arrayidx6, align 4 --> Dst: %0 = load i32, ptr %arrayidx6, align 4
+; CHECK-NEXT: da analyze - input [* *]!
+; CHECK-NEXT: Src: %0 = load i32, ptr %arrayidx6, align 4 --> Dst: store i32 %0, ptr %B.addr.11, align 4
+; CHECK-NEXT: da analyze - confused!
+; CHECK-NEXT: Src: store i32 %0, ptr %B.addr.11, align 4 --> Dst: store i32 %0, ptr %B.addr.11, align 4
+; CHECK-NEXT: da analyze - none!
+;
entry:
br label %for.cond1.preheader
-; DELIN-LABEL: gcd3
-; DELIN: da analyze - output [* *]!
-; DELIN: da analyze - flow [<> *]!
-; DELIN: da analyze - confused!
-; DELIN: da analyze - input [* *]!
-; DELIN: da analyze - confused!
-; DELIN: da analyze - none!
-
for.cond1.preheader: ; preds = %entry, %for.inc7
%B.addr.04 = phi ptr [ %B, %entry ], [ %scevgep, %for.inc7 ]
%i.03 = phi i64 [ 0, %entry ], [ %inc8, %for.inc7 ]
@@ -225,17 +250,23 @@ for.end9: ; preds = %for.inc7
;; *B++ = A[15*i + 20*j*M - 21*N*M + 4];
define void @gcd4(ptr %A, ptr %B, i64 %M, i64 %N) nounwind uwtable ssp {
+; CHECK-LABEL: 'gcd4'
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx, align 4 --> Dst: store i32 %conv, ptr %arrayidx, align 4
+; CHECK-NEXT: da analyze - output [* *]!
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx, align 4 --> Dst: %0 = load i32, ptr %arrayidx16, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx, align 4 --> Dst: store i32 %0, ptr %B.addr.11, align 4
+; CHECK-NEXT: da analyze - confused!
+; CHECK-NEXT: Src: %0 = load i32, ptr %arrayidx16, align 4 --> Dst: %0 = load i32, ptr %arrayidx16, align 4
+; CHECK-NEXT: da analyze - input [* *]!
+; CHECK-NEXT: Src: %0 = load i32, ptr %arrayidx16, align 4 --> Dst: store i32 %0, ptr %B.addr.11, align 4
+; CHECK-NEXT: da analyze - confused!
+; CHECK-NEXT: Src: store i32 %0, ptr %B.addr.11, align 4 --> Dst: store i32 %0, ptr %B.addr.11, align 4
+; CHECK-NEXT: da analyze - none!
+;
entry:
br label %for.cond1.preheader
-; DELIN-LABEL: gcd4
-; DELIN: da analyze - output [* *]!
-; DELIN: da analyze - none!
-; DELIN: da analyze - confused!
-; DELIN: da analyze - input [* *]!
-; DELIN: da analyze - confused!
-; DELIN: da analyze - none!
-
for.cond1.preheader: ; preds = %entry, %for.inc17
%B.addr.04 = phi ptr [ %B, %entry ], [ %scevgep, %for.inc17 ]
%i.03 = phi i64 [ 0, %entry ], [ %inc18, %for.inc17 ]
@@ -287,17 +318,23 @@ for.end19: ; preds = %for.inc17
;; *B++ = A[15*i + 20*j*M - 21*N*M + 5];
define void @gcd5(ptr %A, ptr %B, i64 %M, i64 %N) nounwind uwtable ssp {
+; CHECK-LABEL: 'gcd5'
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx, align 4 --> Dst: store i32 %conv, ptr %arrayidx, align 4
+; CHECK-NEXT: da analyze - output [* *]!
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx, align 4 --> Dst: %0 = load i32, ptr %arrayidx16, align 4
+; CHECK-NEXT: da analyze - flow [<> *]!
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx, align 4 --> Dst: store i32 %0, ptr %B.addr.11, align 4
+; CHECK-NEXT: da analyze - confused!
+; CHECK-NEXT: Src: %0 = load i32, ptr %arrayidx16, align 4 --> Dst: %0 = load i32, ptr %arrayidx16, align 4
+; CHECK-NEXT: da analyze - input [* *]!
+; CHECK-NEXT: Src: %0 = load i32, ptr %arrayidx16, align 4 --> Dst: store i32 %0, ptr %B.addr.11, align 4
+; CHECK-NEXT: da analyze - confused!
+; CHECK-NEXT: Src: store i32 %0, ptr %B.addr.11, align 4 --> Dst: store i32 %0, ptr %B.addr.11, align 4
+; CHECK-NEXT: da analyze - none!
+;
entry:
br label %for.cond1.preheader
-; DELIN-LABEL: gcd5
-; DELIN: da analyze - output [* *]!
-; DELIN: da analyze - flow [<> *]!
-; DELIN: da analyze - confused!
-; DELIN: da analyze - input [* *]!
-; DELIN: da analyze - confused!
-; DELIN: da analyze - none!
-
for.cond1.preheader: ; preds = %entry, %for.inc17
%B.addr.04 = phi ptr [ %B, %entry ], [ %scevgep, %for.inc17 ]
%i.03 = phi i64 [ 0, %entry ], [ %inc18, %for.inc17 ]
@@ -349,18 +386,24 @@ for.end19: ; preds = %for.inc17
;; *B++ = A[8*i][6*j + 1];
define void @gcd6(i64 %n, ptr %A, ptr %B) nounwind uwtable ssp {
+; CHECK-LABEL: 'gcd6'
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx5, align 4 --> Dst: store i32 %conv, ptr %arrayidx5, align 4
+; CHECK-NEXT: da analyze - output [* *]!
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx5, align 4 --> Dst: %2 = load i32, ptr %arrayidx9, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx5, align 4 --> Dst: store i32 %2, ptr %B.addr.12, align 4
+; CHECK-NEXT: da analyze - confused!
+; CHECK-NEXT: Src: %2 = load i32, ptr %arrayidx9, align 4 --> Dst: %2 = load i32, ptr %arrayidx9, align 4
+; CHECK-NEXT: da analyze - input [* *]!
+; CHECK-NEXT: Src: %2 = load i32, ptr %arrayidx9, align 4 --> Dst: store i32 %2, ptr %B.addr.12, align 4
+; CHECK-NEXT: da analyze - confused!
+; CHECK-NEXT: Src: store i32 %2, ptr %B.addr.12, align 4 --> Dst: store i32 %2, ptr %B.addr.12, align 4
+; CHECK-NEXT: da analyze - output [* *]!
+;
entry:
%cmp4 = icmp sgt i64 %n, 0
br i1 %cmp4, label %for.cond1.preheader.preheader, label %for.end12
-; DELIN-LABEL: gcd6
-; DELIN: da analyze - output [* *]!
-; DELIN: da analyze - none!
-; DELIN: da analyze - confused!
-; DELIN: da analyze - input [* *]!
-; DELIN: da analyze - confused!
-; DELIN: da analyze - output [* *]!
-
for.cond1.preheader.preheader: ; preds = %entry
br label %for.cond1.preheader
@@ -420,19 +463,25 @@ for.end12: ; preds = %for.end12.loopexit,
;; *B++ = A[8*i][6*j + 1];
define void @gcd7(i32 %n, ptr %A, ptr %B) nounwind uwtable ssp {
+; CHECK-LABEL: 'gcd7'
+; CHECK-NEXT: Src: store i32 %7, ptr %arrayidx6, align 4 --> Dst: store i32 %7, ptr %arrayidx6, align 4
+; CHECK-NEXT: da analyze - output [* *]!
+; CHECK-NEXT: Src: store i32 %7, ptr %arrayidx6, align 4 --> Dst: %11 = load i32, ptr %arrayidx12, align 4
+; CHECK-NEXT: da analyze - flow [* *|<]!
+; CHECK-NEXT: Src: store i32 %7, ptr %arrayidx6, align 4 --> Dst: store i32 %11, ptr %B.addr.12, align 4
+; CHECK-NEXT: da analyze - confused!
+; CHECK-NEXT: Src: %11 = load i32, ptr %arrayidx12, align 4 --> Dst: %11 = load i32, ptr %arrayidx12, align 4
+; CHECK-NEXT: da analyze - input [* *]!
+; CHECK-NEXT: Src: %11 = load i32, ptr %arrayidx12, align 4 --> Dst: store i32 %11, ptr %B.addr.12, align 4
+; CHECK-NEXT: da analyze - confused!
+; CHECK-NEXT: Src: store i32 %11, ptr %B.addr.12, align 4 --> Dst: store i32 %11, ptr %B.addr.12, align 4
+; CHECK-NEXT: da analyze - output [* *]!
+;
entry:
%0 = zext i32 %n to i64
%cmp4 = icmp sgt i32 %n, 0
br i1 %cmp4, label %for.cond1.preheader.preheader, label %for.end15
-; DELIN-LABEL: gcd7
-; DELIN: da analyze - output [* *]!
-; DELIN: da analyze - flow [* *|<]!
-; DELIN: da analyze - confused!
-; DELIN: da analyze - input [* *]!
-; DELIN: da analyze - confused!
-; DELIN: da analyze - output [* *]!
-
for.cond1.preheader.preheader: ; preds = %entry
br label %for.cond1.preheader
@@ -505,18 +554,24 @@ for.end15: ; preds = %for.end15.loopexit,
;; *B++ = A[n*8*i + 6*j + 1];
define void @gcd8(i32 %n, ptr %A, ptr %B) nounwind uwtable ssp {
+; CHECK-LABEL: 'gcd8'
+; CHECK-NEXT: Src: store i32 %i.06, ptr %arrayidx, align 4 --> Dst: store i32 %i.06, ptr %arrayidx, align 4
+; CHECK-NEXT: da analyze - output [* *]!
+; CHECK-NEXT: Src: store i32 %i.06, ptr %arrayidx, align 4 --> Dst: %5 = load i32, ptr %arrayidx12, align 4
+; CHECK-NEXT: da analyze - flow [* *|<]!
+; CHECK-NEXT: Src: store i32 %i.06, ptr %arrayidx, align 4 --> Dst: store i32 %5, ptr %B.addr.12, align 4
+; CHECK-NEXT: da analyze - confused!
+; CHECK-NEXT: Src: %5 = load i32, ptr %arrayidx12, align 4 --> Dst: %5 = load i32, ptr %arrayidx12, align 4
+; CHECK-NEXT: da analyze - input [* *]!
+; CHECK-NEXT: Src: %5 = load i32, ptr %arrayidx12, align 4 --> Dst: store i32 %5, ptr %B.addr.12, align 4
+; CHECK-NEXT: da analyze - confused!
+; CHECK-NEXT: Src: store i32 %5, ptr %B.addr.12, align 4 --> Dst: store i32 %5, ptr %B.addr.12, align 4
+; CHECK-NEXT: da analyze - output [* *]!
+;
entry:
%cmp4 = icmp sgt i32 %n, 0
br i1 %cmp4, label %for.cond1.preheader.preheader, label %for.end15
-; DELIN-LABEL: gcd8
-; DELIN: da analyze - output [* *]!
-; DELIN: da analyze - flow [* *|<]!
-; DELIN: da analyze - confused!
-; DELIN: da analyze - input [* *]!
-; DELIN: da analyze - confused!
-; DELIN: da analyze - output [* *]!
-
for.cond1.preheader.preheader: ; preds = %entry
br label %for.cond1.preheader
@@ -583,19 +638,25 @@ for.end15: ; preds = %for.end15.loopexit,
;; *B++ = A[8*i][6*j + 1];
define void @gcd9(i32 %n, ptr %A, ptr %B) nounwind uwtable ssp {
+; CHECK-LABEL: 'gcd9'
+; CHECK-NEXT: Src: store i32 %7, ptr %arrayidx6, align 4 --> Dst: store i32 %7, ptr %arrayidx6, align 4
+; CHECK-NEXT: da analyze - output [* *]!
+; CHECK-NEXT: Src: store i32 %7, ptr %arrayidx6, align 4 --> Dst: %11 = load i32, ptr %arrayidx12, align 4
+; CHECK-NEXT: da analyze - flow [* *|<]!
+; CHECK-NEXT: Src: store i32 %7, ptr %arrayidx6, align 4 --> Dst: store i32 %11, ptr %B.addr.12, align 4
+; CHECK-NEXT: da analyze - confused!
+; CHECK-NEXT: Src: %11 = load i32, ptr %arrayidx12, align 4 --> Dst: %11 = load i32, ptr %arrayidx12, align 4
+; CHECK-NEXT: da analyze - input [* *]!
+; CHECK-NEXT: Src: %11 = load i32, ptr %arrayidx12, align 4 --> Dst: store i32 %11, ptr %B.addr.12, align 4
+; CHECK-NEXT: da analyze - confused!
+; CHECK-NEXT: Src: store i32 %11, ptr %B.addr.12, align 4 --> Dst: store i32 %11, ptr %B.addr.12, align 4
+; CHECK-NEXT: da analyze - output [* *]!
+;
entry:
%0 = zext i32 %n to i64
%cmp4 = icmp eq i32 %n, 0
br i1 %cmp4, label %for.end15, label %for.cond1.preheader.preheader
-; DELIN-LABEL: gcd9
-; DELIN: da analyze - output [* *]!
-; DELIN: da analyze - flow [* *|<]!
-; DELIN: da analyze - confused!
-; DELIN: da analyze - input [* *]!
-; DELIN: da analyze - confused!
-; DELIN: da analyze - output [* *]!
-
for.cond1.preheader.preheader: ; preds = %entry
br label %for.cond1.preheader
diff --git a/llvm/test/Analysis/DependenceAnalysis/Invariant.ll b/llvm/test/Analysis/DependenceAnalysis/Invariant.ll
index 40fe0de0e2350b..1d8c51e475ae8f 100644
--- a/llvm/test/Analysis/DependenceAnalysis/Invariant.ll
+++ b/llvm/test/Analysis/DependenceAnalysis/Invariant.ll
@@ -1,3 +1,4 @@
+; NOTE: Assertions have been autogenerated by utils/update_analyze_test_checks.py UTC_ARGS: --version 5
; RUN: opt < %s -disable-output "-passes=print<da>" -aa-pipeline=basic-aa 2>&1 \
; RUN: | FileCheck %s
@@ -15,12 +16,15 @@
; return res;
; }
-; CHECK-LABEL: foo
-; CHECK: da analyze - consistent input [S 0]!
-; CHECK: da analyze - input [* 0|<]!
-; CHECK: da analyze - none!
-
define float @foo(float %g, ptr %rr) nounwind {
+; CHECK-LABEL: 'foo'
+; CHECK-NEXT: Src: %0 = load float, ptr %arrayidx4, align 4 --> Dst: %0 = load float, ptr %arrayidx4, align 4
+; CHECK-NEXT: da analyze - consistent input [S 0]!
+; CHECK-NEXT: Src: %0 = load float, ptr %arrayidx4, align 4 --> Dst: %1 = load float, ptr %arrayidx6, align 4
+; CHECK-NEXT: da analyze - input [* 0|<]!
+; CHECK-NEXT: Src: %1 = load float, ptr %arrayidx6, align 4 --> Dst: %1 = load float, ptr %arrayidx6, align 4
+; CHECK-NEXT: da analyze - none!
+;
entry:
br label %for.cond1.preheader
diff --git a/llvm/test/Analysis/DependenceAnalysis/MIVCheckConst.ll b/llvm/test/Analysis/DependenceAnalysis/MIVCheckConst.ll
index e33dca9d89c825..b0f2d0f5ea0dce 100644
--- a/llvm/test/Analysis/DependenceAnalysis/MIVCheckConst.ll
+++ b/llvm/test/Analysis/DependenceAnalysis/MIVCheckConst.ll
@@ -1,4 +1,5 @@
-; RUN: opt < %s -passes="print<da>"
+; NOTE: Assertions have been autogenerated by utils/update_analyze_test_checks.py UTC_ARGS: --version 5
+; RUN: opt < %s -disable-output -passes="print<da>" 2>&1 | FileCheck %s
; Test that the dependence analysis pass does seg-fault due to a null pointer
; dereference. The code in gcdMIVTest requires a null check for the result of
@@ -30,6 +31,20 @@ target datalayout = "e-m:e-p:32:32-i1:32-i64:64-a:0-v32:32-n16:32"
%21 = type { [416 x i32] }
define void @test(ptr %A, i1 %arg) #0 align 2 {
+; CHECK-LABEL: 'test'
+; CHECK-NEXT: Src: %v1 = load i32, ptr undef, align 4 --> Dst: %v1 = load i32, ptr undef, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: %v1 = load i32, ptr undef, align 4 --> Dst: %v27 = load <32 x i32>, ptr %v25, align 256
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: %v1 = load i32, ptr undef, align 4 --> Dst: %v32 = load <32 x i32>, ptr %v30, align 128
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: %v27 = load <32 x i32>, ptr %v25, align 256 --> Dst: %v27 = load <32 x i32>, ptr %v25, align 256
+; CHECK-NEXT: da analyze - consistent input [0 S S]!
+; CHECK-NEXT: Src: %v27 = load <32 x i32>, ptr %v25, align 256 --> Dst: %v32 = load <32 x i32>, ptr %v30, align 128
+; CHECK-NEXT: da analyze - input [* S S|<]!
+; CHECK-NEXT: Src: %v32 = load <32 x i32>, ptr %v30, align 128 --> Dst: %v32 = load <32 x i32>, ptr %v30, align 128
+; CHECK-NEXT: da analyze - consistent input [0 S S]!
+;
entry:
%v1 = load i32, ptr undef, align 4
br label %bb13
diff --git a/llvm/test/Analysis/DependenceAnalysis/MIVMaxLevelThreshold.ll b/llvm/test/Analysis/DependenceAnalysis/MIVMaxLevelThreshold.ll
index 69c7def57fbd6c..c56f7f34f7d4b0 100644
--- a/llvm/test/Analysis/DependenceAnalysis/MIVMaxLevelThreshold.ll
+++ b/llvm/test/Analysis/DependenceAnalysis/MIVMaxLevelThreshold.ll
@@ -1,4 +1,6 @@
-; RUN: opt < %s -aa-pipeline=default -passes='print<da>' -da-miv-max-level-threshold=2
+; NOTE: Assertions have been autogenerated by utils/update_analyze_test_checks.py UTC_ARGS: --version 5
+; RUN: opt < %s -disable-output -aa-pipeline=default -passes='print<da>' \
+; RUN: -da-miv-max-level-threshold=2 2>&1 | FileCheck %s
;; Check to make sure when MIV tests reach a maximum depth level
;; threshold, the resulting dependence is conservatively correct.
@@ -9,14 +11,21 @@
;; A[i+j+k] = A[i-j+k] + B[i+j+k];
-; CHECK: Src: %2 = load float, float* %arrayidx, align 4 --> Dst: %5 = load float, float* %arrayidx12, align 4
-; CHECK-NEXT: da analyze - none!
-; CHECK: Src: %2 = load float, float* %arrayidx, align 4 --> Dst: store float %add13, float* %arrayidx17, align 4
-; CHECK-NEXT: da analyze - anti [* * *|<]!
-; CHECK: Src: %5 = load float, float* %arrayidx12, align 4 --> Dst: store float %add13, float* %arrayidx17, align 4
-; CHECK-NEXT: da analyze - none!
-
define void @foo(ptr noalias %A, ptr noalias %B, i32 signext %m, i32 signext %n, i32 signext %o) {
+; CHECK-LABEL: 'foo'
+; CHECK-NEXT: Src: %2 = load float, ptr %arrayidx, align 4 --> Dst: %2 = load float, ptr %arrayidx, align 4
+; CHECK-NEXT: da analyze - input [* * *]!
+; CHECK-NEXT: Src: %2 = load float, ptr %arrayidx, align 4 --> Dst: %5 = load float, ptr %arrayidx12, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: %2 = load float, ptr %arrayidx, align 4 --> Dst: store float %add13, ptr %arrayidx17, align 4
+; CHECK-NEXT: da analyze - anti [* * *|<]!
+; CHECK-NEXT: Src: %5 = load float, ptr %arrayidx12, align 4 --> Dst: %5 = load float, ptr %arrayidx12, align 4
+; CHECK-NEXT: da analyze - input [* * *]!
+; CHECK-NEXT: Src: %5 = load float, ptr %arrayidx12, align 4 --> Dst: store float %add13, ptr %arrayidx17, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: store float %add13, ptr %arrayidx17, align 4 --> Dst: store float %add13, ptr %arrayidx17, align 4
+; CHECK-NEXT: da analyze - output [* * *]!
+;
entry:
%cmp5 = icmp sgt i32 %n, 0
br i1 %cmp5, label %for.body.preheader, label %for.end23
diff --git a/llvm/test/Analysis/DependenceAnalysis/MismatchingNestLevels.ll b/llvm/test/Analysis/DependenceAnalysis/MismatchingNestLevels.ll
index 6f203115c5a7ab..ed7f087e98b00b 100644
--- a/llvm/test/Analysis/DependenceAnalysis/MismatchingNestLevels.ll
+++ b/llvm/test/Analysis/DependenceAnalysis/MismatchingNestLevels.ll
@@ -1,3 +1,4 @@
+; NOTE: Assertions have been autogenerated by utils/update_analyze_test_checks.py UTC_ARGS: --version 5
; RUN: opt < %s -disable-output "-passes=print<da>" -aa-pipeline=basic-aa 2>&1 | FileCheck %s
;; void test1(long n, double *A) {
@@ -8,15 +9,15 @@
;; A[i] = i;
;; }
-; CHECK-LABEL: 'Dependence Analysis' for function 'test1':
-; CHECK: Src: store double %conv, ptr %arrayidx, align 8 --> Dst: store double %conv, ptr %arrayidx, align 8
+define void @test1(i64 noundef %n, ptr nocapture noundef writeonly %A) {
+; CHECK-LABEL: 'test1'
+; CHECK-NEXT: Src: store double %conv, ptr %arrayidx, align 8 --> Dst: store double %conv, ptr %arrayidx, align 8
; CHECK-NEXT: da analyze - none!
-; CHECK: Src: store double %conv, ptr %arrayidx, align 8 --> Dst: store double %conv2, ptr %arrayidx3, align 8
+; CHECK-NEXT: Src: store double %conv, ptr %arrayidx, align 8 --> Dst: store double %conv2, ptr %arrayidx3, align 8
; CHECK-NEXT: da analyze - output [|<]!
-; CHECK: Src: store double %conv2, ptr %arrayidx3, align 8 --> Dst: store double %conv2, ptr %arrayidx3, align 8
+; CHECK-NEXT: Src: store double %conv2, ptr %arrayidx3, align 8 --> Dst: store double %conv2, ptr %arrayidx3, align 8
; CHECK-NEXT: da analyze - none!
-
-define void @test1(i64 noundef %n, ptr nocapture noundef writeonly %A) {
+;
entry:
%mul1 = mul nsw i64 %n, %n
br label %for.body
@@ -53,11 +54,21 @@ for.end: ; preds = %for.body
;;
;; Make sure we can detect depnendence between A[i][j] and A[i][k] conservatively and without crashing.
-; CHECK-LABEL: 'Dependence Analysis' for function 'test2':
-; CHECK: Src: store float 1.230000e+02, ptr %arrayidx7, align 4 --> Dst: store float %conv13, ptr %arrayidx17, align 4
-; CHECK-NEXT: da analyze - output [*|<]!
-
define dso_local void @test2(i32 noundef zeroext %n, ptr noundef %A, ptr noalias noundef %B) #0 {
+; CHECK-LABEL: 'test2'
+; CHECK-NEXT: Src: store i32 %conv5, ptr %arrayidx, align 4 --> Dst: store i32 %conv5, ptr %arrayidx, align 4
+; CHECK-NEXT: da analyze - consistent output [S 0]!
+; CHECK-NEXT: Src: store i32 %conv5, ptr %arrayidx, align 4 --> Dst: store float 1.230000e+02, ptr %arrayidx7, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: store i32 %conv5, ptr %arrayidx, align 4 --> Dst: store float %conv13, ptr %arrayidx17, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: store float 1.230000e+02, ptr %arrayidx7, align 4 --> Dst: store float 1.230000e+02, ptr %arrayidx7, align 4
+; CHECK-NEXT: da analyze - output [*]!
+; CHECK-NEXT: Src: store float 1.230000e+02, ptr %arrayidx7, align 4 --> Dst: store float %conv13, ptr %arrayidx17, align 4
+; CHECK-NEXT: da analyze - output [*|<]!
+; CHECK-NEXT: Src: store float %conv13, ptr %arrayidx17, align 4 --> Dst: store float %conv13, ptr %arrayidx17, align 4
+; CHECK-NEXT: da analyze - none!
+;
entry:
%add = add i32 %n, 1
%0 = zext i32 %add to i64
@@ -124,11 +135,15 @@ for.end23: ; preds = %for.inc21
;;
;; Make sure we can detect depnendence between A[i] and A[s] conservatively and without crashing.
-; CHECK-LABEL: 'Dependence Analysis' for function 'test3':
-; CHECK: Src: store double 0.000000e+00, ptr %arrayidx, align 8 --> Dst: store double 1.000000e+00, ptr %arrayidx21, align 8
-; CHECK-NEXT: da analyze - output [*|<]!
-
define void @test3(i32 noundef %n, ptr noalias noundef %A, ptr noalias noundef %B) {
+; CHECK-LABEL: 'test3'
+; CHECK-NEXT: Src: store double 0.000000e+00, ptr %arrayidx, align 8 --> Dst: store double 0.000000e+00, ptr %arrayidx, align 8
+; CHECK-NEXT: da analyze - output [* S]!
+; CHECK-NEXT: Src: store double 0.000000e+00, ptr %arrayidx, align 8 --> Dst: store double 1.000000e+00, ptr %arrayidx21, align 8
+; CHECK-NEXT: da analyze - output [*|<]!
+; CHECK-NEXT: Src: store double 1.000000e+00, ptr %arrayidx21, align 8 --> Dst: store double 1.000000e+00, ptr %arrayidx21, align 8
+; CHECK-NEXT: da analyze - none!
+;
entry:
br label %for.i
diff --git a/llvm/test/Analysis/DependenceAnalysis/NonAffineExpr.ll b/llvm/test/Analysis/DependenceAnalysis/NonAffineExpr.ll
index 6837d451667b93..d983bd49d49d60 100644
--- a/llvm/test/Analysis/DependenceAnalysis/NonAffineExpr.ll
+++ b/llvm/test/Analysis/DependenceAnalysis/NonAffineExpr.ll
@@ -1,13 +1,19 @@
-; RUN: opt < %s -disable-output "-passes=print<da>" -aa-pipeline=basic-aa 2>&1
-;
-; CHECK: da analyze - consistent input [S S]!
-; CHECK: da analyze - confused!
-; CHECK: da analyze - input [* *]!
-;
+; NOTE: Assertions have been autogenerated by utils/update_analyze_test_checks.py UTC_ARGS: --version 5
+; RUN: opt < %s -disable-output "-passes=print<da>" -aa-pipeline=basic-aa 2>&1 \
+; RUN: | FileCheck %s
+
target datalayout = "e-m:e-p:32:32-i64:64-v128:64:128-a:0:32-n8:16:32-S64"
target triple = "thumbv7--linux-gnueabi"
define void @f(ptr %a, i32 %n, i1 %arg) align 2 {
+; CHECK-LABEL: 'f'
+; CHECK-NEXT: Src: %t.2 = load ptr, ptr %a, align 4 --> Dst: %t.2 = load ptr, ptr %a, align 4
+; CHECK-NEXT: da analyze - consistent input [S S]!
+; CHECK-NEXT: Src: %t.2 = load ptr, ptr %a, align 4 --> Dst: %t.4 = load i32, ptr %t.3, align 4
+; CHECK-NEXT: da analyze - confused!
+; CHECK-NEXT: Src: %t.4 = load i32, ptr %t.3, align 4 --> Dst: %t.4 = load i32, ptr %t.3, align 4
+; CHECK-NEXT: da analyze - input [* *]!
+;
for.preheader:
%t.0 = ashr exact i32 %n, 3
br label %for.body.1
diff --git a/llvm/test/Analysis/DependenceAnalysis/NonCanonicalizedSubscript.ll b/llvm/test/Analysis/DependenceAnalysis/NonCanonicalizedSubscript.ll
index 1ce54873b3b8b7..f0cd2fd4cd9308 100644
--- a/llvm/test/Analysis/DependenceAnalysis/NonCanonicalizedSubscript.ll
+++ b/llvm/test/Analysis/DependenceAnalysis/NonCanonicalizedSubscript.ll
@@ -1,5 +1,6 @@
+; NOTE: Assertions have been autogenerated by utils/update_analyze_test_checks.py UTC_ARGS: --version 5
; RUN: opt < %s -disable-output "-passes=print<da>" -aa-pipeline=basic-aa 2>&1 \
-; RUN: | FileCheck %s -check-prefix=DELIN
+; RUN: | 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-S128"
target triple = "x86_64-apple-macosx10.6.0"
@@ -13,14 +14,18 @@ target triple = "x86_64-apple-macosx10.6.0"
; other subscript. DependenceAnalysis before the fix crashed due to this
; mismatch.
define void @i32_subscript(ptr %a, ptr %b) {
-; DELIN-LABEL: 'Dependence Analysis' for function 'i32_subscript'
+; CHECK-LABEL: 'i32_subscript'
+; CHECK-NEXT: Src: %0 = load i32, ptr %a.addr, align 4 --> Dst: %0 = load i32, ptr %a.addr, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: %0 = load i32, ptr %a.addr, align 4 --> Dst: store i32 %1, ptr %a.addr.2, align 4
+; CHECK-NEXT: da analyze - anti [=|<]!
+; CHECK-NEXT: Src: store i32 %1, ptr %a.addr.2, align 4 --> Dst: store i32 %1, ptr %a.addr.2, align 4
+; CHECK-NEXT: da analyze - none!
+;
entry:
br label %for.body
for.body:
-; DELIN: da analyze - none!
-; DELIN: da analyze - anti [=|<]!
-; DELIN: da analyze - none!
%i = phi i64 [ 0, %entry ], [ %i.inc, %for.body ]
%a.addr = getelementptr [100 x [100 x i32]], ptr %a, i64 0, i64 %i, i64 %i
%a.addr.2 = getelementptr [100 x [100 x i32]], ptr %a, i64 0, i64 %i, i32 5
@@ -48,13 +53,17 @@ for.end:
; Function Attrs: nounwind uwtable
define void @coupled_miv_type_mismatch(i32 %n) #0 {
-; DELIN-LABEL: 'Dependence Analysis' for function 'coupled_miv_type_mismatch'
+; CHECK-LABEL: 'coupled_miv_type_mismatch'
+; CHECK-NEXT: Src: %2 = load i32, ptr %arrayidx5, align 4 --> Dst: %2 = load i32, ptr %arrayidx5, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: %2 = load i32, ptr %arrayidx5, align 4 --> Dst: store i32 %add6, ptr %arrayidx10, align 4
+; CHECK-NEXT: da analyze - consistent anti [1 -2]!
+; CHECK-NEXT: Src: store i32 %add6, ptr %arrayidx10, align 4 --> Dst: store i32 %add6, ptr %arrayidx10, align 4
+; CHECK-NEXT: da analyze - none!
+;
entry:
br label %for.cond
-; DELIN: da analyze - none!
-; DELIN: da analyze - consistent anti [1 -2]!
-; DELIN: da analyze - none!
for.cond: ; preds = %for.inc11, %entry
%indvars.iv11 = phi i64 [ %indvars.iv.next12, %for.inc11 ], [ 1, %entry ]
%exitcond14 = icmp ne i64 %indvars.iv11, 10000
diff --git a/llvm/test/Analysis/DependenceAnalysis/PR21585.ll b/llvm/test/Analysis/DependenceAnalysis/PR21585.ll
index 34c5317bce4c59..0d59e107b9c35c 100644
--- a/llvm/test/Analysis/DependenceAnalysis/PR21585.ll
+++ b/llvm/test/Analysis/DependenceAnalysis/PR21585.ll
@@ -1,6 +1,15 @@
+; NOTE: Assertions have been autogenerated by utils/update_analyze_test_checks.py UTC_ARGS: --version 5
; RUN: opt < %s -disable-output "-passes=print<da>" \
; RUN: "-aa-pipeline=basic-aa,globals-aa" 2>&1 | FileCheck %s
define void @i32_subscript(ptr %a) {
+; CHECK-LABEL: 'i32_subscript'
+; CHECK-NEXT: Src: %0 = load i32, ptr %a.addr, align 4 --> Dst: %0 = load i32, ptr %a.addr, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: %0 = load i32, ptr %a.addr, align 4 --> Dst: store i32 %1, ptr %a.addr.2, align 4
+; CHECK-NEXT: da analyze - anti [*|<]!
+; CHECK-NEXT: Src: store i32 %1, ptr %a.addr.2, align 4 --> Dst: store i32 %1, ptr %a.addr.2, align 4
+; CHECK-NEXT: da analyze - consistent output [S]!
+;
entry:
br label %for.body
@@ -19,10 +28,6 @@ for.body:
for.end:
ret void
}
-; CHECK: none
-; CHECK: anti
-; CHECK: output
-
; Test for a bug, which caused an assert in ScalarEvolution because
; the Dependence Analyzer attempted to zero extend a type to a smaller
@@ -36,6 +41,14 @@ for.end:
@g = common global i32 0, align 4
define void @t(ptr noalias %a, i32 %n) nounwind {
+; CHECK-LABEL: 't'
+; CHECK-NEXT: Src: %0 = load i32, ptr @g, align 4 --> Dst: %0 = load i32, ptr @g, align 4
+; CHECK-NEXT: da analyze - consistent input [S]!
+; CHECK-NEXT: Src: %0 = load i32, ptr @g, align 4 --> Dst: store i32 %0, ptr %arrayidx, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: store i32 %0, ptr %arrayidx, align 4 --> Dst: store i32 %0, ptr %arrayidx, align 4
+; CHECK-NEXT: da analyze - output [*]!
+;
entry:
%cmp1 = icmp eq i32 %n, 0
br i1 %cmp1, label %for.end, label %for.body
@@ -53,11 +66,16 @@ for.body:
for.end:
ret void
}
-; CHECK: input
-; CHECK: none
-; CHECK: output
define void @i16_wrap(ptr %a) {
+; CHECK-LABEL: 'i16_wrap'
+; CHECK-NEXT: Src: %0 = load i64, ptr %idx, align 4 --> Dst: %0 = load i64, ptr %idx, align 4
+; CHECK-NEXT: da analyze - input [*]!
+; CHECK-NEXT: Src: %0 = load i64, ptr %idx, align 4 --> Dst: store i64 %1, ptr %idx, align 4
+; CHECK-NEXT: da analyze - anti [*|<]!
+; CHECK-NEXT: Src: store i64 %1, ptr %idx, align 4 --> Dst: store i64 %1, ptr %idx, align 4
+; CHECK-NEXT: da analyze - output [*]!
+;
entry:
br label %for.body
for.body:
@@ -76,11 +94,16 @@ for.inc:
for.end:
ret void
}
-; CHECK: input
-; CHECK: anti
-; CHECK: output
define void @i8_stride_wrap(ptr noalias %a, ptr noalias %b) {
+; CHECK-LABEL: 'i8_stride_wrap'
+; CHECK-NEXT: Src: %0 = load i32, ptr %idx, align 4 --> Dst: %0 = load i32, ptr %idx, align 4
+; CHECK-NEXT: da analyze - consistent input [S]!
+; CHECK-NEXT: Src: %0 = load i32, ptr %idx, align 4 --> Dst: store i32 %1, ptr %idx.2, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: store i32 %1, ptr %idx.2, align 4 --> Dst: store i32 %1, ptr %idx.2, align 4
+; CHECK-NEXT: da analyze - none!
+;
entry:
br label %for.body
for.body:
@@ -101,6 +124,3 @@ for.inc:
for.end:
ret void
}
-; CHECK: input
-; CHECK: none
-; CHECK: none
diff --git a/llvm/test/Analysis/DependenceAnalysis/Preliminary.ll b/llvm/test/Analysis/DependenceAnalysis/Preliminary.ll
index ee0b50d479249c..4ab87771417e54 100644
--- a/llvm/test/Analysis/DependenceAnalysis/Preliminary.ll
+++ b/llvm/test/Analysis/DependenceAnalysis/Preliminary.ll
@@ -1,3 +1,4 @@
+; NOTE: Assertions have been autogenerated by utils/update_analyze_test_checks.py UTC_ARGS: --version 5
; RUN: opt < %s -disable-output "-passes=print<da>" -aa-pipeline=basic-aa 2>&1 \
; RUN: | FileCheck %s
@@ -10,14 +11,16 @@ target triple = "x86_64-apple-macosx10.6.0"
;; return B[1];
define i32 @p0(i32 %n, ptr %A, ptr %B) nounwind uwtable ssp {
+; CHECK-LABEL: 'p0'
+; CHECK-NEXT: Src: store i32 %n, ptr %A, align 4 --> Dst: store i32 %n, ptr %A, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: store i32 %n, ptr %A, align 4 --> Dst: %0 = load i32, ptr %arrayidx1, align 4
+; CHECK-NEXT: da analyze - confused!
+; CHECK-NEXT: Src: %0 = load i32, ptr %arrayidx1, align 4 --> Dst: %0 = load i32, ptr %arrayidx1, align 4
+; CHECK-NEXT: da analyze - none!
+;
entry:
store i32 %n, ptr %A, align 4
-
-; CHECK-LABEL: p0
-; CHECK: da analyze - none!
-; CHECK: da analyze - confused!
-; CHECK: da analyze - none!
-
%arrayidx1 = getelementptr inbounds i32, ptr %B, i64 1
%0 = load i32, ptr %arrayidx1, align 4
ret i32 %0
@@ -29,14 +32,16 @@ entry:
;; return B[1];
define i32 @p1(i32 %n, ptr noalias %A, ptr noalias %B) nounwind uwtable ssp {
+; CHECK-LABEL: 'p1'
+; CHECK-NEXT: Src: store i32 %n, ptr %A, align 4 --> Dst: store i32 %n, ptr %A, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: store i32 %n, ptr %A, align 4 --> Dst: %0 = load i32, ptr %arrayidx1, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: %0 = load i32, ptr %arrayidx1, align 4 --> Dst: %0 = load i32, ptr %arrayidx1, align 4
+; CHECK-NEXT: da analyze - none!
+;
entry:
store i32 %n, ptr %A, align 4
-
-; CHECK-LABEL: p1
-; CHECK: da analyze - none!
-; CHECK: da analyze - none!
-; CHECK: da analyze - none!
-
%arrayidx1 = getelementptr inbounds i32, ptr %B, i64 1
%0 = load i32, ptr %arrayidx1, align 4
ret i32 %0
@@ -52,18 +57,24 @@ entry:
;; *B++ = A[i + 3][j + 2][k + 1];
define void @p2(i64 %n, ptr %A, ptr %B) nounwind uwtable ssp {
+; CHECK-LABEL: 'p2'
+; CHECK-NEXT: Src: store i64 %i.011, ptr %arrayidx8, align 8 --> Dst: store i64 %i.011, ptr %arrayidx8, align 8
+; CHECK-NEXT: da analyze - output [* * *]!
+; CHECK-NEXT: Src: store i64 %i.011, ptr %arrayidx8, align 8 --> Dst: %0 = load i64, ptr %arrayidx17, align 8
+; CHECK-NEXT: da analyze - flow [* *|<]!
+; CHECK-NEXT: Src: store i64 %i.011, ptr %arrayidx8, align 8 --> Dst: store i64 %0, ptr %B.addr.24, align 8
+; CHECK-NEXT: da analyze - confused!
+; CHECK-NEXT: Src: %0 = load i64, ptr %arrayidx17, align 8 --> Dst: %0 = load i64, ptr %arrayidx17, align 8
+; CHECK-NEXT: da analyze - input [* * *]!
+; CHECK-NEXT: Src: %0 = load i64, ptr %arrayidx17, align 8 --> Dst: store i64 %0, ptr %B.addr.24, align 8
+; CHECK-NEXT: da analyze - confused!
+; CHECK-NEXT: Src: store i64 %0, ptr %B.addr.24, align 8 --> Dst: store i64 %0, ptr %B.addr.24, align 8
+; CHECK-NEXT: da analyze - output [* * *]!
+;
entry:
%cmp10 = icmp sgt i64 %n, 0
br i1 %cmp10, label %for.cond1.preheader.preheader, label %for.end26
-; CHECK-LABEL: p2
-; CHECK: da analyze - output [* * *]!
-; CHECK: da analyze - flow [* *|<]!
-; CHECK: da analyze - confused!
-; CHECK: da analyze - input [* * *]!
-; CHECK: da analyze - confused!
-; CHECK: da analyze - output [* * *]!
-
for.cond1.preheader.preheader: ; preds = %entry
br label %for.cond1.preheader
@@ -425,18 +436,24 @@ for.end26: ; preds = %for.end26.loopexit,
;; *B++ = A[i];
define void @p4(ptr %A, ptr %B, i64 %n) nounwind uwtable ssp {
+; CHECK-LABEL: 'p4'
+; CHECK-NEXT: Src: store i32 %conv2, ptr %arrayidx, align 4 --> Dst: store i32 %conv2, ptr %arrayidx, align 4
+; CHECK-NEXT: da analyze - output [*]!
+; CHECK-NEXT: Src: store i32 %conv2, ptr %arrayidx, align 4 --> Dst: %0 = load i32, ptr %arrayidx5, align 4
+; CHECK-NEXT: da analyze - flow [*|<]!
+; CHECK-NEXT: Src: store i32 %conv2, ptr %arrayidx, align 4 --> Dst: store i32 %0, ptr %B.addr.02, align 4
+; CHECK-NEXT: da analyze - confused!
+; CHECK-NEXT: Src: %0 = load i32, ptr %arrayidx5, align 4 --> Dst: %0 = load i32, ptr %arrayidx5, align 4
+; CHECK-NEXT: da analyze - input [*]!
+; CHECK-NEXT: Src: %0 = load i32, ptr %arrayidx5, align 4 --> Dst: store i32 %0, ptr %B.addr.02, align 4
+; CHECK-NEXT: da analyze - confused!
+; CHECK-NEXT: Src: store i32 %0, ptr %B.addr.02, align 4 --> Dst: store i32 %0, ptr %B.addr.02, align 4
+; CHECK-NEXT: da analyze - none!
+;
entry:
%cmp1 = icmp sgt i64 %n, 0
br i1 %cmp1, label %for.body.preheader, label %for.end
-; CHECK-LABEL: p4
-; CHECK: da analyze - output [*]!
-; CHECK: da analyze - flow [*|<]!
-; CHECK: da analyze - confused!
-; CHECK: da analyze - input [*]!
-; CHECK: da analyze - confused!
-; CHECK: da analyze - none!
-
for.body.preheader: ; preds = %entry
br label %for.body
@@ -472,18 +489,24 @@ for.end: ; preds = %for.end.loopexit, %
;; *B++ = A[i];
define void @p5(ptr %A, ptr %B, i64 %n) nounwind uwtable ssp {
+; CHECK-LABEL: 'p5'
+; CHECK-NEXT: Src: store i32 %conv2, ptr %arrayidx, align 4 --> Dst: store i32 %conv2, ptr %arrayidx, align 4
+; CHECK-NEXT: da analyze - output [*]!
+; CHECK-NEXT: Src: store i32 %conv2, ptr %arrayidx, align 4 --> Dst: %0 = load i32, ptr %arrayidx5, align 4
+; CHECK-NEXT: da analyze - flow [*|<]!
+; CHECK-NEXT: Src: store i32 %conv2, ptr %arrayidx, align 4 --> Dst: store i32 %0, ptr %B.addr.02, align 4
+; CHECK-NEXT: da analyze - confused!
+; CHECK-NEXT: Src: %0 = load i32, ptr %arrayidx5, align 4 --> Dst: %0 = load i32, ptr %arrayidx5, align 4
+; CHECK-NEXT: da analyze - input [*]!
+; CHECK-NEXT: Src: %0 = load i32, ptr %arrayidx5, align 4 --> Dst: store i32 %0, ptr %B.addr.02, align 4
+; CHECK-NEXT: da analyze - confused!
+; CHECK-NEXT: Src: store i32 %0, ptr %B.addr.02, align 4 --> Dst: store i32 %0, ptr %B.addr.02, align 4
+; CHECK-NEXT: da analyze - none!
+;
entry:
%cmp1 = icmp sgt i64 %n, 0
br i1 %cmp1, label %for.body.preheader, label %for.end
-; CHECK-LABEL: p5
-; CHECK: da analyze - output [*]!
-; CHECK: da analyze - flow [*|<]!
-; CHECK: da analyze - confused!
-; CHECK: da analyze - input [*]!
-; CHECK: da analyze - confused!
-; CHECK: da analyze - none!
-
for.body.preheader: ; preds = %entry
br label %for.body
@@ -519,18 +542,24 @@ for.end: ; preds = %for.end.loopexit, %
;; *B++ = A[i];
define void @p6(ptr %A, ptr %B, i64 %n) nounwind uwtable ssp {
+; CHECK-LABEL: 'p6'
+; CHECK-NEXT: Src: store i32 %1, ptr %arrayidx, align 4 --> Dst: store i32 %1, ptr %arrayidx, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: store i32 %1, ptr %arrayidx, align 4 --> Dst: %2 = load i32, ptr %arrayidx3, align 4
+; CHECK-NEXT: da analyze - consistent flow [2]!
+; CHECK-NEXT: Src: store i32 %1, ptr %arrayidx, align 4 --> Dst: store i32 %2, ptr %B.addr.02, align 4
+; CHECK-NEXT: da analyze - confused!
+; CHECK-NEXT: Src: %2 = load i32, ptr %arrayidx3, align 4 --> Dst: %2 = load i32, ptr %arrayidx3, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: %2 = load i32, ptr %arrayidx3, align 4 --> Dst: store i32 %2, ptr %B.addr.02, align 4
+; CHECK-NEXT: da analyze - confused!
+; CHECK-NEXT: Src: store i32 %2, ptr %B.addr.02, align 4 --> Dst: store i32 %2, ptr %B.addr.02, align 4
+; CHECK-NEXT: da analyze - none!
+;
entry:
%cmp1 = icmp sgt i64 %n, 0
br i1 %cmp1, label %for.body.preheader, label %for.end
-; CHECK-LABEL: p6
-; CHECK: da analyze - none!
-; CHECK: da analyze - consistent flow [2]!
-; CHECK: da analyze - confused!
-; CHECK: da analyze - none!
-; CHECK: da analyze - confused!
-; CHECK: da analyze - none!
-
for.body.preheader: ; preds = %entry
br label %for.body
@@ -562,18 +591,23 @@ for.end: ; preds = %for.end.loopexit, %
;; *B = A[n + 1];
define void @p7(ptr %A, ptr %B, i8 signext %n) nounwind uwtable ssp {
+; CHECK-LABEL: 'p7'
+; CHECK-NEXT: Src: store i32 0, ptr %arrayidx, align 4 --> Dst: store i32 0, ptr %arrayidx, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: store i32 0, ptr %arrayidx, align 4 --> Dst: %0 = load i32, ptr %arrayidx2, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: store i32 0, ptr %arrayidx, align 4 --> Dst: store i32 %0, ptr %B, align 4
+; CHECK-NEXT: da analyze - confused!
+; CHECK-NEXT: Src: %0 = load i32, ptr %arrayidx2, align 4 --> Dst: %0 = load i32, ptr %arrayidx2, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: %0 = load i32, ptr %arrayidx2, align 4 --> Dst: store i32 %0, ptr %B, align 4
+; CHECK-NEXT: da analyze - confused!
+; CHECK-NEXT: Src: store i32 %0, ptr %B, align 4 --> Dst: store i32 %0, ptr %B, align 4
+; CHECK-NEXT: da analyze - none!
+;
entry:
%idxprom = sext i8 %n to i64
%arrayidx = getelementptr inbounds i32, ptr %A, i64 %idxprom
-
-; CHECK-LABEL: p7
-; CHECK: da analyze - none!
-; CHECK: da analyze - none!
-; CHECK: da analyze - confused!
-; CHECK: da analyze - none!
-; CHECK: da analyze - confused!
-; CHECK: da analyze - none!
-
store i32 0, ptr %arrayidx, align 4
%conv = sext i8 %n to i64
%add = add i64 %conv, 1
@@ -589,19 +623,24 @@ entry:
;; *B = A[n + 1];
define void @p8(ptr %A, ptr %B, i16 signext %n) nounwind uwtable ssp {
+; CHECK-LABEL: 'p8'
+; CHECK-NEXT: Src: store i32 0, ptr %arrayidx, align 4 --> Dst: store i32 0, ptr %arrayidx, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: store i32 0, ptr %arrayidx, align 4 --> Dst: %0 = load i32, ptr %arrayidx2, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: store i32 0, ptr %arrayidx, align 4 --> Dst: store i32 %0, ptr %B, align 4
+; CHECK-NEXT: da analyze - confused!
+; CHECK-NEXT: Src: %0 = load i32, ptr %arrayidx2, align 4 --> Dst: %0 = load i32, ptr %arrayidx2, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: %0 = load i32, ptr %arrayidx2, align 4 --> Dst: store i32 %0, ptr %B, align 4
+; CHECK-NEXT: da analyze - confused!
+; CHECK-NEXT: Src: store i32 %0, ptr %B, align 4 --> Dst: store i32 %0, ptr %B, align 4
+; CHECK-NEXT: da analyze - none!
+;
entry:
%idxprom = sext i16 %n to i64
%arrayidx = getelementptr inbounds i32, ptr %A, i64 %idxprom
store i32 0, ptr %arrayidx, align 4
-
-; CHECK-LABEL: p8
-; CHECK: da analyze - none!
-; CHECK: da analyze - none!
-; CHECK: da analyze - confused!
-; CHECK: da analyze - none!
-; CHECK: da analyze - confused!
-; CHECK: da analyze - none!
-
%conv = sext i16 %n to i64
%add = add i64 %conv, 1
%arrayidx2 = getelementptr inbounds i32, ptr %A, i64 %add
@@ -616,19 +655,24 @@ entry:
;; *B = A[n + 1];
define void @p9(ptr %A, ptr %B, i32 %n) nounwind uwtable ssp {
+; CHECK-LABEL: 'p9'
+; CHECK-NEXT: Src: store i32 0, ptr %arrayidx, align 4 --> Dst: store i32 0, ptr %arrayidx, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: store i32 0, ptr %arrayidx, align 4 --> Dst: %0 = load i32, ptr %arrayidx2, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: store i32 0, ptr %arrayidx, align 4 --> Dst: store i32 %0, ptr %B, align 4
+; CHECK-NEXT: da analyze - confused!
+; CHECK-NEXT: Src: %0 = load i32, ptr %arrayidx2, align 4 --> Dst: %0 = load i32, ptr %arrayidx2, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: %0 = load i32, ptr %arrayidx2, align 4 --> Dst: store i32 %0, ptr %B, align 4
+; CHECK-NEXT: da analyze - confused!
+; CHECK-NEXT: Src: store i32 %0, ptr %B, align 4 --> Dst: store i32 %0, ptr %B, align 4
+; CHECK-NEXT: da analyze - none!
+;
entry:
%idxprom = sext i32 %n to i64
%arrayidx = getelementptr inbounds i32, ptr %A, i64 %idxprom
store i32 0, ptr %arrayidx, align 4
-
-; CHECK-LABEL: p9
-; CHECK: da analyze - none!
-; CHECK: da analyze - none!
-; CHECK: da analyze - confused!
-; CHECK: da analyze - none!
-; CHECK: da analyze - confused!
-; CHECK: da analyze - none!
-
%add = add nsw i32 %n, 1
%idxprom1 = sext i32 %add to i64
%arrayidx2 = getelementptr inbounds i32, ptr %A, i64 %idxprom1
@@ -643,19 +687,24 @@ entry:
;; *B = A[n + 1];
define void @p10(ptr %A, ptr %B, i32 %n) nounwind uwtable ssp {
+; CHECK-LABEL: 'p10'
+; CHECK-NEXT: Src: store i32 0, ptr %arrayidx, align 4 --> Dst: store i32 0, ptr %arrayidx, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: store i32 0, ptr %arrayidx, align 4 --> Dst: %0 = load i32, ptr %arrayidx2, align 4
+; CHECK-NEXT: da analyze - flow [|<]!
+; CHECK-NEXT: Src: store i32 0, ptr %arrayidx, align 4 --> Dst: store i32 %0, ptr %B, align 4
+; CHECK-NEXT: da analyze - confused!
+; CHECK-NEXT: Src: %0 = load i32, ptr %arrayidx2, align 4 --> Dst: %0 = load i32, ptr %arrayidx2, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: %0 = load i32, ptr %arrayidx2, align 4 --> Dst: store i32 %0, ptr %B, align 4
+; CHECK-NEXT: da analyze - confused!
+; CHECK-NEXT: Src: store i32 %0, ptr %B, align 4 --> Dst: store i32 %0, ptr %B, align 4
+; CHECK-NEXT: da analyze - none!
+;
entry:
%idxprom = zext i32 %n to i64
%arrayidx = getelementptr inbounds i32, ptr %A, i64 %idxprom
store i32 0, ptr %arrayidx, align 4
-
-; CHECK-LABEL: p10
-; CHECK: da analyze - none!
-; CHECK: da analyze - flow [|<]!
-; CHECK: da analyze - confused!
-; CHECK: da analyze - none!
-; CHECK: da analyze - confused!
-; CHECK: da analyze - none!
-
%add = add i32 %n, 1
%idxprom1 = zext i32 %add to i64
%arrayidx2 = getelementptr inbounds i32, ptr %A, i64 %idxprom1
@@ -676,6 +725,14 @@ entry:
%struct.S = type { i32 }
define void @foo(ptr %s, i32 %size) nounwind uwtable ssp {
+; CHECK-LABEL: 'foo'
+; CHECK-NEXT: Src: %1 = load i32, ptr %0, align 4 --> Dst: %1 = load i32, ptr %0, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: %1 = load i32, ptr %0, align 4 --> Dst: store i32 %1, ptr %i.02, align 4
+; CHECK-NEXT: da analyze - consistent anti [1]!
+; CHECK-NEXT: Src: store i32 %1, ptr %i.02, align 4 --> Dst: store i32 %1, ptr %i.02, align 4
+; CHECK-NEXT: da analyze - none!
+;
entry:
%idx.ext = zext i32 %size to i64
%add.ptr.sum = add i64 %idx.ext, -1
@@ -683,11 +740,6 @@ entry:
%cmp1 = icmp eq i64 %add.ptr.sum, 0
br i1 %cmp1, label %while.end, label %while.body.preheader
-; CHECK-LABEL: foo
-; CHECK: da analyze - none!
-; CHECK: da analyze - consistent anti [1]!
-; CHECK: da analyze - none!
-
while.body.preheader: ; preds = %entry
br label %while.body
diff --git a/llvm/test/Analysis/DependenceAnalysis/PreliminaryNoValidityCheckFixedSize.ll b/llvm/test/Analysis/DependenceAnalysis/PreliminaryNoValidityCheckFixedSize.ll
index b4660d5b1d5468..404018707c0a54 100644
--- a/llvm/test/Analysis/DependenceAnalysis/PreliminaryNoValidityCheckFixedSize.ll
+++ b/llvm/test/Analysis/DependenceAnalysis/PreliminaryNoValidityCheckFixedSize.ll
@@ -1,3 +1,4 @@
+; NOTE: Assertions have been autogenerated by utils/update_analyze_test_checks.py UTC_ARGS: --version 5
; RUN: opt < %s -disable-output "-passes=print<da>" -aa-pipeline=basic-aa 2>&1 \
; RUN: -da-disable-delinearization-checks | FileCheck %s
; RUN: opt < %s -disable-output "-passes=print<da>" -aa-pipeline=basic-aa 2>&1 \
@@ -15,26 +16,38 @@ target triple = "x86_64-apple-macosx10.6.0"
;; *B++ = A[i + 3][j + 2][k + 1];
define void @p2(i64 %n, ptr %A, ptr %B) nounwind uwtable ssp {
+; CHECK-LABEL: 'p2'
+; CHECK-NEXT: Src: store i64 %i.011, ptr %arrayidx8, align 8 --> Dst: store i64 %i.011, ptr %arrayidx8, align 8
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: store i64 %i.011, ptr %arrayidx8, align 8 --> Dst: %0 = load i64, ptr %arrayidx17, align 8
+; CHECK-NEXT: da analyze - flow [-3 -2]!
+; CHECK-NEXT: Src: store i64 %i.011, ptr %arrayidx8, align 8 --> Dst: store i64 %0, ptr %B.addr.24, align 8
+; CHECK-NEXT: da analyze - confused!
+; CHECK-NEXT: Src: %0 = load i64, ptr %arrayidx17, align 8 --> Dst: %0 = load i64, ptr %arrayidx17, align 8
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: %0 = load i64, ptr %arrayidx17, align 8 --> Dst: store i64 %0, ptr %B.addr.24, align 8
+; CHECK-NEXT: da analyze - confused!
+; CHECK-NEXT: Src: store i64 %0, ptr %B.addr.24, align 8 --> Dst: store i64 %0, ptr %B.addr.24, align 8
+; CHECK-NEXT: da analyze - output [* * *]!
+;
+; LIN-LABEL: 'p2'
+; LIN-NEXT: Src: store i64 %i.011, ptr %arrayidx8, align 8 --> Dst: store i64 %i.011, ptr %arrayidx8, align 8
+; LIN-NEXT: da analyze - output [* * *]!
+; LIN-NEXT: Src: store i64 %i.011, ptr %arrayidx8, align 8 --> Dst: %0 = load i64, ptr %arrayidx17, align 8
+; LIN-NEXT: da analyze - flow [* *|<]!
+; LIN-NEXT: Src: store i64 %i.011, ptr %arrayidx8, align 8 --> Dst: store i64 %0, ptr %B.addr.24, align 8
+; LIN-NEXT: da analyze - confused!
+; LIN-NEXT: Src: %0 = load i64, ptr %arrayidx17, align 8 --> Dst: %0 = load i64, ptr %arrayidx17, align 8
+; LIN-NEXT: da analyze - input [* * *]!
+; LIN-NEXT: Src: %0 = load i64, ptr %arrayidx17, align 8 --> Dst: store i64 %0, ptr %B.addr.24, align 8
+; LIN-NEXT: da analyze - confused!
+; LIN-NEXT: Src: store i64 %0, ptr %B.addr.24, align 8 --> Dst: store i64 %0, ptr %B.addr.24, align 8
+; LIN-NEXT: da analyze - output [* * *]!
+;
entry:
%cmp10 = icmp sgt i64 %n, 0
br i1 %cmp10, label %for.cond1.preheader.preheader, label %for.end26
-; CHECK-LABEL: p2
-; CHECK: da analyze - none!
-; CHECK: da analyze - flow [-3 -2]!
-; CHECK: da analyze - confused!
-; CHECK: da analyze - none!
-; CHECK: da analyze - confused!
-; CHECK: da analyze - output [* * *]!
-
-; LIN-LABEL: p2
-; LIN: da analyze - output [* * *]!
-; LIN: da analyze - flow [* *|<]!
-; LIN: da analyze - confused!
-; LIN: da analyze - input [* * *]!
-; LIN: da analyze - confused!
-; LIN: da analyze - output [* * *]!
-
for.cond1.preheader.preheader: ; preds = %entry
br label %for.cond1.preheader
diff --git a/llvm/test/Analysis/DependenceAnalysis/Propagating.ll b/llvm/test/Analysis/DependenceAnalysis/Propagating.ll
index 6ceffc6cad40bf..866f515baeafba 100644
--- a/llvm/test/Analysis/DependenceAnalysis/Propagating.ll
+++ b/llvm/test/Analysis/DependenceAnalysis/Propagating.ll
@@ -1,3 +1,4 @@
+; NOTE: Assertions have been autogenerated by utils/update_analyze_test_checks.py UTC_ARGS: --version 5
; RUN: opt < %s -disable-output "-passes=print<da>" -aa-pipeline=basic-aa 2>&1 \
; RUN: | FileCheck %s
@@ -11,17 +12,23 @@ target triple = "x86_64-apple-macosx10.6.0"
;; *B++ = A[i][i + j];
define void @prop0(ptr %A, ptr %B, i32 %n) nounwind uwtable ssp {
+; CHECK-LABEL: 'prop0'
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx5, align 4 --> Dst: store i32 %conv, ptr %arrayidx5, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx5, align 4 --> Dst: %0 = load i32, ptr %arrayidx8, align 4
+; CHECK-NEXT: da analyze - flow [< >]!
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx5, align 4 --> Dst: store i32 %0, ptr %B.addr.11, align 4
+; CHECK-NEXT: da analyze - confused!
+; CHECK-NEXT: Src: %0 = load i32, ptr %arrayidx8, align 4 --> Dst: %0 = load i32, ptr %arrayidx8, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: %0 = load i32, ptr %arrayidx8, align 4 --> Dst: store i32 %0, ptr %B.addr.11, align 4
+; CHECK-NEXT: da analyze - confused!
+; CHECK-NEXT: Src: store i32 %0, ptr %B.addr.11, align 4 --> Dst: store i32 %0, ptr %B.addr.11, align 4
+; CHECK-NEXT: da analyze - none!
+;
entry:
br label %for.cond1.preheader
-; CHECK-LABEL: prop0
-; CHECK: da analyze - none!
-; CHECK: da analyze - flow [< >]!
-; CHECK: da analyze - confused!
-; CHECK: da analyze - none!
-; CHECK: da analyze - confused!
-; CHECK: da analyze - none!
-
for.cond1.preheader: ; preds = %entry, %for.inc9
%B.addr.04 = phi ptr [ %B, %entry ], [ %scevgep, %for.inc9 ]
%i.03 = phi i64 [ 0, %entry ], [ %inc10, %for.inc9 ]
@@ -62,17 +69,23 @@ for.end11: ; preds = %for.inc9
;; *B++ = A[j - i][i][j + k];
define void @prop1(ptr %A, ptr %B, i32 %n) nounwind uwtable ssp {
+; CHECK-LABEL: 'prop1'
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx9, align 4 --> Dst: store i32 %conv, ptr %arrayidx9, align 4
+; CHECK-NEXT: da analyze - output [* * *]!
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx9, align 4 --> Dst: %0 = load i32, ptr %arrayidx14, align 4
+; CHECK-NEXT: da analyze - flow [<> <> *]!
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx9, align 4 --> Dst: store i32 %0, ptr %B.addr.21, align 4
+; CHECK-NEXT: da analyze - confused!
+; CHECK-NEXT: Src: %0 = load i32, ptr %arrayidx14, align 4 --> Dst: %0 = load i32, ptr %arrayidx14, align 4
+; CHECK-NEXT: da analyze - input [* * *]!
+; CHECK-NEXT: Src: %0 = load i32, ptr %arrayidx14, align 4 --> Dst: store i32 %0, ptr %B.addr.21, align 4
+; CHECK-NEXT: da analyze - confused!
+; CHECK-NEXT: Src: store i32 %0, ptr %B.addr.21, align 4 --> Dst: store i32 %0, ptr %B.addr.21, align 4
+; CHECK-NEXT: da analyze - none!
+;
entry:
br label %for.cond1.preheader
-; CHECK-LABEL: prop1
-; CHECK: da analyze - output [* * *]!
-; CHECK: da analyze - flow [<> <> *]!
-; CHECK: da analyze - confused!
-; CHECK: da analyze - input [* * *]!
-; CHECK: da analyze - confused!
-; CHECK: da analyze - none!
-
for.cond1.preheader: ; preds = %entry, %for.inc18
%B.addr.06 = phi ptr [ %B, %entry ], [ %scevgep7, %for.inc18 ]
%i.05 = phi i64 [ 0, %entry ], [ %inc19, %for.inc18 ]
@@ -126,17 +139,23 @@ for.end20: ; preds = %for.inc18
;; *B++ = A[i][i + j + 110];
define void @prop2(ptr %A, ptr %B, i32 %n) nounwind uwtable ssp {
+; CHECK-LABEL: 'prop2'
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx4, align 4 --> Dst: store i32 %conv, ptr %arrayidx4, align 4
+; CHECK-NEXT: da analyze - consistent output [0 S]!
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx4, align 4 --> Dst: %0 = load i32, ptr %arrayidx7, align 4
+; CHECK-NEXT: da analyze - flow [> *]!
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx4, align 4 --> Dst: store i32 %0, ptr %B.addr.11, align 4
+; CHECK-NEXT: da analyze - confused!
+; CHECK-NEXT: Src: %0 = load i32, ptr %arrayidx7, align 4 --> Dst: %0 = load i32, ptr %arrayidx7, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: %0 = load i32, ptr %arrayidx7, align 4 --> Dst: store i32 %0, ptr %B.addr.11, align 4
+; CHECK-NEXT: da analyze - confused!
+; CHECK-NEXT: Src: store i32 %0, ptr %B.addr.11, align 4 --> Dst: store i32 %0, ptr %B.addr.11, align 4
+; CHECK-NEXT: da analyze - none!
+;
entry:
br label %for.cond1.preheader
-; CHECK-LABEL: prop2
-; CHECK: da analyze - consistent output [0 S]!
-; CHECK: da analyze - flow [> *]!
-; CHECK: da analyze - confused!
-; CHECK: da analyze - none!
-; CHECK: da analyze - confused!
-; CHECK: da analyze - none!
-
for.cond1.preheader: ; preds = %entry, %for.inc8
%B.addr.04 = phi ptr [ %B, %entry ], [ %scevgep, %for.inc8 ]
%i.03 = phi i64 [ 0, %entry ], [ %inc9, %for.inc8 ]
@@ -177,17 +196,23 @@ for.end10: ; preds = %for.inc8
;; *B++ = A[i][2*j - i + 5];
define void @prop3(ptr %A, ptr %B, i32 %n) nounwind uwtable ssp {
+; CHECK-LABEL: 'prop3'
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx4, align 4 --> Dst: store i32 %conv, ptr %arrayidx4, align 4
+; CHECK-NEXT: da analyze - output [* *]!
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx4, align 4 --> Dst: %0 = load i32, ptr %arrayidx8, align 4
+; CHECK-NEXT: da analyze - flow [<> *]!
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx4, align 4 --> Dst: store i32 %0, ptr %B.addr.11, align 4
+; CHECK-NEXT: da analyze - confused!
+; CHECK-NEXT: Src: %0 = load i32, ptr %arrayidx8, align 4 --> Dst: %0 = load i32, ptr %arrayidx8, align 4
+; CHECK-NEXT: da analyze - input [* *]!
+; CHECK-NEXT: Src: %0 = load i32, ptr %arrayidx8, align 4 --> Dst: store i32 %0, ptr %B.addr.11, align 4
+; CHECK-NEXT: da analyze - confused!
+; CHECK-NEXT: Src: store i32 %0, ptr %B.addr.11, align 4 --> Dst: store i32 %0, ptr %B.addr.11, align 4
+; CHECK-NEXT: da analyze - none!
+;
entry:
br label %for.cond1.preheader
-; CHECK-LABEL: prop3
-; CHECK: da analyze - output [* *]!
-; CHECK: da analyze - flow [<> *]!
-; CHECK: da analyze - confused!
-; CHECK: da analyze - input [* *]!
-; CHECK: da analyze - confused!
-; CHECK: da analyze - none!
-
for.cond1.preheader: ; preds = %entry, %for.inc9
%B.addr.04 = phi ptr [ %B, %entry ], [ %scevgep, %for.inc9 ]
%i.03 = phi i64 [ 0, %entry ], [ %inc10, %for.inc9 ]
@@ -229,17 +254,23 @@ for.end11: ; preds = %for.inc9
;; *B++ = A[i][2*i + j];
define void @prop4(ptr %A, ptr %B, i32 %n) nounwind uwtable ssp {
+; CHECK-LABEL: 'prop4'
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx6, align 4 --> Dst: store i32 %conv, ptr %arrayidx6, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx6, align 4 --> Dst: %0 = load i32, ptr %arrayidx10, align 4
+; CHECK-NEXT: da analyze - flow [< <>]!
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx6, align 4 --> Dst: store i32 %0, ptr %B.addr.11, align 4
+; CHECK-NEXT: da analyze - confused!
+; CHECK-NEXT: Src: %0 = load i32, ptr %arrayidx10, align 4 --> Dst: %0 = load i32, ptr %arrayidx10, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: %0 = load i32, ptr %arrayidx10, align 4 --> Dst: store i32 %0, ptr %B.addr.11, align 4
+; CHECK-NEXT: da analyze - confused!
+; CHECK-NEXT: Src: store i32 %0, ptr %B.addr.11, align 4 --> Dst: store i32 %0, ptr %B.addr.11, align 4
+; CHECK-NEXT: da analyze - none!
+;
entry:
br label %for.cond1.preheader
-; CHECK-LABEL: prop4
-; CHECK: da analyze - none!
-; CHECK: da analyze - flow [< <>]!
-; CHECK: da analyze - confused!
-; CHECK: da analyze - none!
-; CHECK: da analyze - confused!
-; CHECK: da analyze - none!
-
for.cond1.preheader: ; preds = %entry, %for.inc11
%B.addr.04 = phi ptr [ %B, %entry ], [ %scevgep, %for.inc11 ]
%i.03 = phi i64 [ 0, %entry ], [ %inc12, %for.inc11 ]
@@ -282,17 +313,23 @@ for.end13: ; preds = %for.inc11
;; *B++ = A[i][i][3*i + j];
define void @prop5(ptr %A, ptr %B, i32 %n) nounwind uwtable ssp {
+; CHECK-LABEL: 'prop5'
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx7, align 4 --> Dst: store i32 %conv, ptr %arrayidx7, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx7, align 4 --> Dst: %0 = load i32, ptr %arrayidx12, align 4
+; CHECK-NEXT: da analyze - flow [* *|<]!
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx7, align 4 --> Dst: store i32 %0, ptr %B.addr.11, align 4
+; CHECK-NEXT: da analyze - confused!
+; CHECK-NEXT: Src: %0 = load i32, ptr %arrayidx12, align 4 --> Dst: %0 = load i32, ptr %arrayidx12, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: %0 = load i32, ptr %arrayidx12, align 4 --> Dst: store i32 %0, ptr %B.addr.11, align 4
+; CHECK-NEXT: da analyze - confused!
+; CHECK-NEXT: Src: store i32 %0, ptr %B.addr.11, align 4 --> Dst: store i32 %0, ptr %B.addr.11, align 4
+; CHECK-NEXT: da analyze - none!
+;
entry:
br label %for.cond1.preheader
-; CHECK-LABEL: prop5
-; CHECK: da analyze - none!
-; CHECK: da analyze - flow [* *|<]!
-; CHECK: da analyze - confused!
-; CHECK: da analyze - none!
-; CHECK: da analyze - confused!
-; CHECK: da analyze - none!
-
for.cond1.preheader: ; preds = %entry, %for.inc13
%B.addr.04 = phi ptr [ %B, %entry ], [ %scevgep, %for.inc13 ]
%i.03 = phi i64 [ 0, %entry ], [ %inc14, %for.inc13 ]
@@ -336,17 +373,23 @@ for.end15: ; preds = %for.inc13
;; *B++ = A[2*i][8*i + j];
define void @prop6(ptr %A, ptr %B, i32 %n) nounwind uwtable ssp {
+; CHECK-LABEL: 'prop6'
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx6, align 4 --> Dst: store i32 %conv, ptr %arrayidx6, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx6, align 4 --> Dst: %0 = load i32, ptr %arrayidx11, align 4
+; CHECK-NEXT: da analyze - flow [=> <>]!
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx6, align 4 --> Dst: store i32 %0, ptr %B.addr.11, align 4
+; CHECK-NEXT: da analyze - confused!
+; CHECK-NEXT: Src: %0 = load i32, ptr %arrayidx11, align 4 --> Dst: %0 = load i32, ptr %arrayidx11, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: %0 = load i32, ptr %arrayidx11, align 4 --> Dst: store i32 %0, ptr %B.addr.11, align 4
+; CHECK-NEXT: da analyze - confused!
+; CHECK-NEXT: Src: store i32 %0, ptr %B.addr.11, align 4 --> Dst: store i32 %0, ptr %B.addr.11, align 4
+; CHECK-NEXT: da analyze - none!
+;
entry:
br label %for.cond1.preheader
-; CHECK-LABEL: prop6
-; CHECK: da analyze - none!
-; CHECK: da analyze - flow [=> <>]!
-; CHECK: da analyze - confused!
-; CHECK: da analyze - none!
-; CHECK: da analyze - confused!
-; CHECK: da analyze - none!
-
for.cond1.preheader: ; preds = %entry, %for.inc12
%B.addr.04 = phi ptr [ %B, %entry ], [ %scevgep, %for.inc12 ]
%i.03 = phi i64 [ 0, %entry ], [ %inc13, %for.inc12 ]
@@ -390,17 +433,23 @@ for.end14: ; preds = %for.inc12
;; *B++ = A[-2*i + 20][5*i + j];
define void @prop7(ptr %A, ptr %B, i32 %n) nounwind uwtable ssp {
+; CHECK-LABEL: 'prop7'
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx7, align 4 --> Dst: store i32 %conv, ptr %arrayidx7, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx7, align 4 --> Dst: %0 = load i32, ptr %arrayidx13, align 4
+; CHECK-NEXT: da analyze - flow [* <>]!
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx7, align 4 --> Dst: store i32 %0, ptr %B.addr.11, align 4
+; CHECK-NEXT: da analyze - confused!
+; CHECK-NEXT: Src: %0 = load i32, ptr %arrayidx13, align 4 --> Dst: %0 = load i32, ptr %arrayidx13, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: %0 = load i32, ptr %arrayidx13, align 4 --> Dst: store i32 %0, ptr %B.addr.11, align 4
+; CHECK-NEXT: da analyze - confused!
+; CHECK-NEXT: Src: store i32 %0, ptr %B.addr.11, align 4 --> Dst: store i32 %0, ptr %B.addr.11, align 4
+; CHECK-NEXT: da analyze - none!
+;
entry:
br label %for.cond1.preheader
-; CHECK-LABEL: prop7
-; CHECK: da analyze - none!
-; CHECK: da analyze - flow [* <>]!
-; CHECK: da analyze - confused!
-; CHECK: da analyze - none!
-; CHECK: da analyze - confused!
-; CHECK: da analyze - none!
-
for.cond1.preheader: ; preds = %entry, %for.inc14
%B.addr.04 = phi ptr [ %B, %entry ], [ %scevgep, %for.inc14 ]
%i.03 = phi i64 [ 0, %entry ], [ %inc15, %for.inc14 ]
@@ -446,17 +495,23 @@ for.end16: ; preds = %for.inc14
;; *B++ = A[-2*i + 4][5*i + j];
define void @prop8(ptr %A, ptr %B, i32 %n) nounwind uwtable ssp {
+; CHECK-LABEL: 'prop8'
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx4, align 4 --> Dst: store i32 %conv, ptr %arrayidx4, align 4
+; CHECK-NEXT: da analyze - consistent output [S 0]!
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx4, align 4 --> Dst: %0 = load i32, ptr %arrayidx9, align 4
+; CHECK-NEXT: da analyze - flow [=> <]!
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx4, align 4 --> Dst: store i32 %0, ptr %B.addr.11, align 4
+; CHECK-NEXT: da analyze - confused!
+; CHECK-NEXT: Src: %0 = load i32, ptr %arrayidx9, align 4 --> Dst: %0 = load i32, ptr %arrayidx9, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: %0 = load i32, ptr %arrayidx9, align 4 --> Dst: store i32 %0, ptr %B.addr.11, align 4
+; CHECK-NEXT: da analyze - confused!
+; CHECK-NEXT: Src: store i32 %0, ptr %B.addr.11, align 4 --> Dst: store i32 %0, ptr %B.addr.11, align 4
+; CHECK-NEXT: da analyze - none!
+;
entry:
br label %for.cond1.preheader
-; CHECK-LABEL: prop8
-; CHECK: da analyze - consistent output [S 0]!
-; CHECK: da analyze - flow [=> <]!
-; CHECK: da analyze - confused!
-; CHECK: da analyze - none!
-; CHECK: da analyze - confused!
-; CHECK: da analyze - none!
-
for.cond1.preheader: ; preds = %entry, %for.inc10
%B.addr.04 = phi ptr [ %B, %entry ], [ %scevgep, %for.inc10 ]
%i.03 = phi i64 [ 0, %entry ], [ %inc11, %for.inc10 ]
@@ -498,17 +553,23 @@ for.end12: ; preds = %for.inc10
;; *B++ = A[4][j];
define void @prop9(ptr %A, ptr %B, i32 %n) nounwind uwtable ssp {
+; CHECK-LABEL: 'prop9'
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx7, align 4 --> Dst: store i32 %conv, ptr %arrayidx7, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx7, align 4 --> Dst: %0 = load i32, ptr %arrayidx9, align 4
+; CHECK-NEXT: da analyze - flow [<= <]!
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx7, align 4 --> Dst: store i32 %0, ptr %B.addr.11, align 4
+; CHECK-NEXT: da analyze - confused!
+; CHECK-NEXT: Src: %0 = load i32, ptr %arrayidx9, align 4 --> Dst: %0 = load i32, ptr %arrayidx9, align 4
+; CHECK-NEXT: da analyze - consistent input [S 0]!
+; CHECK-NEXT: Src: %0 = load i32, ptr %arrayidx9, align 4 --> Dst: store i32 %0, ptr %B.addr.11, align 4
+; CHECK-NEXT: da analyze - confused!
+; CHECK-NEXT: Src: store i32 %0, ptr %B.addr.11, align 4 --> Dst: store i32 %0, ptr %B.addr.11, align 4
+; CHECK-NEXT: da analyze - none!
+;
entry:
br label %for.cond1.preheader
-; CHECK-LABEL: prop9
-; CHECK: da analyze - none!
-; CHECK: da analyze - flow [<= <]!
-; CHECK: da analyze - confused!
-; CHECK: da analyze - consistent input [S 0]!
-; CHECK: da analyze - confused!
-; CHECK: da analyze - none!
-
for.cond1.preheader: ; preds = %entry, %for.inc10
%B.addr.04 = phi ptr [ %B, %entry ], [ %scevgep, %for.inc10 ]
%i.03 = phi i64 [ 0, %entry ], [ %inc11, %for.inc10 ]
diff --git a/llvm/test/Analysis/DependenceAnalysis/Separability.ll b/llvm/test/Analysis/DependenceAnalysis/Separability.ll
index 14334d84576c82..2ed9cca4d1fc01 100644
--- a/llvm/test/Analysis/DependenceAnalysis/Separability.ll
+++ b/llvm/test/Analysis/DependenceAnalysis/Separability.ll
@@ -1,3 +1,4 @@
+; NOTE: Assertions have been autogenerated by utils/update_analyze_test_checks.py UTC_ARGS: --version 5
; RUN: opt < %s -disable-output "-passes=print<da>" -aa-pipeline=basic-aa 2>&1 \
; RUN: | FileCheck %s
@@ -13,16 +14,23 @@ target triple = "x86_64-apple-macosx10.6.0"
;; *B++ = A[10][i + 10][2*j - l];
define void @sep0(ptr %A, ptr %B, i32 %n) nounwind uwtable ssp {
+; CHECK-LABEL: 'sep0'
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx11, align 4 --> Dst: store i32 %conv, ptr %arrayidx11, align 4
+; CHECK-NEXT: da analyze - output [0 * * S]!
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx11, align 4 --> Dst: %0 = load i32, ptr %arrayidx15, align 4
+; CHECK-NEXT: da analyze - flow [* * * *|<]!
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx11, align 4 --> Dst: store i32 %0, ptr %B.addr.31, align 4
+; CHECK-NEXT: da analyze - confused!
+; CHECK-NEXT: Src: %0 = load i32, ptr %arrayidx15, align 4 --> Dst: %0 = load i32, ptr %arrayidx15, align 4
+; CHECK-NEXT: da analyze - input [* * S *]!
+; CHECK-NEXT: Src: %0 = load i32, ptr %arrayidx15, align 4 --> Dst: store i32 %0, ptr %B.addr.31, align 4
+; CHECK-NEXT: da analyze - confused!
+; CHECK-NEXT: Src: store i32 %0, ptr %B.addr.31, align 4 --> Dst: store i32 %0, ptr %B.addr.31, align 4
+; CHECK-NEXT: da analyze - none!
+;
entry:
br label %for.cond1.preheader
-; CHECK: da analyze - output [0 * * S]!
-; CHECK: da analyze - flow [* * * *|<]!
-; CHECK: da analyze - confused!
-; CHECK: da analyze - input [* * S *]!
-; CHECK: da analyze - confused!
-; CHECK: da analyze - none!
-
for.cond1.preheader: ; preds = %entry, %for.inc22
%B.addr.08 = phi ptr [ %B, %entry ], [ %scevgep11, %for.inc22 ]
%i.07 = phi i64 [ 0, %entry ], [ %inc23, %for.inc22 ]
@@ -88,16 +96,23 @@ for.end24: ; preds = %for.inc22
;; *B++ = A[10][i + 10][2*j - l];
define void @sep1(ptr %A, ptr %B, i32 %n) nounwind uwtable ssp {
+; CHECK-LABEL: 'sep1'
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx11, align 4 --> Dst: store i32 %conv, ptr %arrayidx11, align 4
+; CHECK-NEXT: da analyze - output [0 * * S]!
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx11, align 4 --> Dst: %0 = load i32, ptr %arrayidx15, align 4
+; CHECK-NEXT: da analyze - flow [* * * *|<]!
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx11, align 4 --> Dst: store i32 %0, ptr %B.addr.31, align 4
+; CHECK-NEXT: da analyze - confused!
+; CHECK-NEXT: Src: %0 = load i32, ptr %arrayidx15, align 4 --> Dst: %0 = load i32, ptr %arrayidx15, align 4
+; CHECK-NEXT: da analyze - input [* * S *]!
+; CHECK-NEXT: Src: %0 = load i32, ptr %arrayidx15, align 4 --> Dst: store i32 %0, ptr %B.addr.31, align 4
+; CHECK-NEXT: da analyze - confused!
+; CHECK-NEXT: Src: store i32 %0, ptr %B.addr.31, align 4 --> Dst: store i32 %0, ptr %B.addr.31, align 4
+; CHECK-NEXT: da analyze - none!
+;
entry:
br label %for.cond1.preheader
-; CHECK: da analyze - output [0 * * S]!
-; CHECK: da analyze - flow [* * * *|<]!
-; CHECK: da analyze - confused!
-; CHECK: da analyze - input [* * S *]!
-; CHECK: da analyze - confused!
-; CHECK: da analyze - none!
-
for.cond1.preheader: ; preds = %entry, %for.inc22
%B.addr.08 = phi ptr [ %B, %entry ], [ %scevgep11, %for.inc22 ]
%i.07 = phi i64 [ 0, %entry ], [ %inc23, %for.inc22 ]
@@ -163,16 +178,23 @@ for.end24: ; preds = %for.inc22
;; *B++ = A[10][i + 10][j + k][l + 10];
define void @sep2(ptr %A, ptr %B, i32 %n) nounwind uwtable ssp {
+; CHECK-LABEL: 'sep2'
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx12, align 4 --> Dst: store i32 %conv, ptr %arrayidx12, align 4
+; CHECK-NEXT: da analyze - consistent output [0 S 0 0]!
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx12, align 4 --> Dst: %0 = load i32, ptr %arrayidx19, align 4
+; CHECK-NEXT: da analyze - flow [> * * -10]!
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx12, align 4 --> Dst: store i32 %0, ptr %B.addr.31, align 4
+; CHECK-NEXT: da analyze - confused!
+; CHECK-NEXT: Src: %0 = load i32, ptr %arrayidx19, align 4 --> Dst: %0 = load i32, ptr %arrayidx19, align 4
+; CHECK-NEXT: da analyze - input [0 * * 0]!
+; CHECK-NEXT: Src: %0 = load i32, ptr %arrayidx19, align 4 --> Dst: store i32 %0, ptr %B.addr.31, align 4
+; CHECK-NEXT: da analyze - confused!
+; CHECK-NEXT: Src: store i32 %0, ptr %B.addr.31, align 4 --> Dst: store i32 %0, ptr %B.addr.31, align 4
+; CHECK-NEXT: da analyze - none!
+;
entry:
br label %for.cond1.preheader
-; CHECK: da analyze - consistent output [0 S 0 0]!
-; CHECK: da analyze - flow [> * * -10]!
-; CHECK: da analyze - confused!
-; CHECK: da analyze - input [0 * * 0]!
-; CHECK: da analyze - confused!
-; CHECK: da analyze - none!
-
for.cond1.preheader: ; preds = %entry, %for.inc26
%B.addr.08 = phi ptr [ %B, %entry ], [ %scevgep11, %for.inc26 ]
%i.07 = phi i64 [ 0, %entry ], [ %inc27, %for.inc26 ]
@@ -238,16 +260,23 @@ for.end28: ; preds = %for.inc26
;; *B++ = A[10][i + 10][j + k][l + 10];
define void @sep3(ptr %A, ptr %B, i32 %n) nounwind uwtable ssp {
+; CHECK-LABEL: 'sep3'
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx13, align 4 --> Dst: store i32 %conv, ptr %arrayidx13, align 4
+; CHECK-NEXT: da analyze - consistent output [0 S 0 0]!
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx13, align 4 --> Dst: %0 = load i32, ptr %arrayidx20, align 4
+; CHECK-NEXT: da analyze - flow [> * * *]!
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx13, align 4 --> Dst: store i32 %0, ptr %B.addr.31, align 4
+; CHECK-NEXT: da analyze - confused!
+; CHECK-NEXT: Src: %0 = load i32, ptr %arrayidx20, align 4 --> Dst: %0 = load i32, ptr %arrayidx20, align 4
+; CHECK-NEXT: da analyze - input [0 * * 0]!
+; CHECK-NEXT: Src: %0 = load i32, ptr %arrayidx20, align 4 --> Dst: store i32 %0, ptr %B.addr.31, align 4
+; CHECK-NEXT: da analyze - confused!
+; CHECK-NEXT: Src: store i32 %0, ptr %B.addr.31, align 4 --> Dst: store i32 %0, ptr %B.addr.31, align 4
+; CHECK-NEXT: da analyze - none!
+;
entry:
br label %for.cond1.preheader
-; CHECK: da analyze - consistent output [0 S 0 0]!
-; CHECK: da analyze - flow [> * * *]!
-; CHECK: da analyze - confused!
-; CHECK: da analyze - input [0 * * 0]!
-; CHECK: da analyze - confused!
-; CHECK: da analyze - none!
-
for.cond1.preheader: ; preds = %entry, %for.inc27
%B.addr.08 = phi ptr [ %B, %entry ], [ %scevgep11, %for.inc27 ]
%i.07 = phi i64 [ 0, %entry ], [ %inc28, %for.inc27 ]
diff --git a/llvm/test/Analysis/DependenceAnalysis/SimpleSIVNoValidityCheck.ll b/llvm/test/Analysis/DependenceAnalysis/SimpleSIVNoValidityCheck.ll
index 860795138c9834..4346507ba8f906 100644
--- a/llvm/test/Analysis/DependenceAnalysis/SimpleSIVNoValidityCheck.ll
+++ b/llvm/test/Analysis/DependenceAnalysis/SimpleSIVNoValidityCheck.ll
@@ -1,18 +1,9 @@
+; NOTE: Assertions have been autogenerated by utils/update_analyze_test_checks.py UTC_ARGS: --version 5
; RUN: opt < %s -disable-output -passes="print<da>" \
; RUN: -da-disable-delinearization-checks 2>&1 | FileCheck %s
; RUN: opt < %s -disable-output -passes="print<da>" \
; RUN: 2>&1 | FileCheck --check-prefix=LIN %s
-; CHECK-LABEL: t1
-; CHECK: da analyze - none!
-; CHECK: da analyze - consistent anti [1 -2]!
-; CHECK: da analyze - none!
-
-; LIN-LABEL: t1
-; LIN: da analyze - input [* *]!
-; LIN: da analyze - anti [* *|<]!
-; LIN: da analyze - output [* *]!
-
;; void t1(int n, int m, int a[][m]) {
;; for (int i = 0; i < n-1; ++i)
;; for (int j = 2; j < m; ++j)
@@ -20,6 +11,22 @@
;; }
define void @t1(i32 signext %n, i32 signext %m, ptr %a) {
+; CHECK-LABEL: 't1'
+; CHECK-NEXT: Src: %6 = load i32, ptr %arrayidx7, align 4 --> Dst: %6 = load i32, ptr %arrayidx7, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: %6 = load i32, ptr %arrayidx7, align 4 --> Dst: store i32 %6, ptr %arrayidx11, align 4
+; CHECK-NEXT: da analyze - consistent anti [1 -2]!
+; CHECK-NEXT: Src: store i32 %6, ptr %arrayidx11, align 4 --> Dst: store i32 %6, ptr %arrayidx11, align 4
+; CHECK-NEXT: da analyze - none!
+;
+; LIN-LABEL: 't1'
+; LIN-NEXT: Src: %6 = load i32, ptr %arrayidx7, align 4 --> Dst: %6 = load i32, ptr %arrayidx7, align 4
+; LIN-NEXT: da analyze - input [* *]!
+; LIN-NEXT: Src: %6 = load i32, ptr %arrayidx7, align 4 --> Dst: store i32 %6, ptr %arrayidx11, align 4
+; LIN-NEXT: da analyze - anti [* *|<]!
+; LIN-NEXT: Src: store i32 %6, ptr %arrayidx11, align 4 --> Dst: store i32 %6, ptr %arrayidx11, align 4
+; LIN-NEXT: da analyze - output [* *]!
+;
entry:
%0 = zext i32 %m to i64
%1 = sext i32 %m to i64
@@ -59,16 +66,6 @@ for.end14: ; preds = %entry, %for.inc12
ret void
}
-; CHECK-LABEL: t2
-; CHECK: da analyze - none!
-; CHECK: da analyze - consistent anti [1 -2 0 -3 2]!
-; CHECK: da analyze - none!
-
-; LIN-LABEL: t2
-; LIN: da analyze - input [* * * * *]!
-; LIN: da analyze - anti [* * * * *|<]!
-; LIN: da analyze - output [* * * * *]!
-
;; void t2(int n, int m, int a[][n][n][n][m]) {
;; for (int i1 = 0; i1 < n-1; ++i1)
;; for (int i2 = 2; i2 < n; ++i2)
@@ -79,6 +76,22 @@ for.end14: ; preds = %entry, %for.inc12
;; }
define void @t2(i32 signext %n, i32 signext %m, ptr %a) {
+; CHECK-LABEL: 't2'
+; CHECK-NEXT: Src: %21 = load i32, ptr %arrayidx28, align 4 --> Dst: %21 = load i32, ptr %arrayidx28, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: %21 = load i32, ptr %arrayidx28, align 4 --> Dst: store i32 %21, ptr %arrayidx38, align 4
+; CHECK-NEXT: da analyze - consistent anti [1 -2 0 -3 2]!
+; CHECK-NEXT: Src: store i32 %21, ptr %arrayidx38, align 4 --> Dst: store i32 %21, ptr %arrayidx38, align 4
+; CHECK-NEXT: da analyze - none!
+;
+; LIN-LABEL: 't2'
+; LIN-NEXT: Src: %21 = load i32, ptr %arrayidx28, align 4 --> Dst: %21 = load i32, ptr %arrayidx28, align 4
+; LIN-NEXT: da analyze - input [* * * * *]!
+; LIN-NEXT: Src: %21 = load i32, ptr %arrayidx28, align 4 --> Dst: store i32 %21, ptr %arrayidx38, align 4
+; LIN-NEXT: da analyze - anti [* * * * *|<]!
+; LIN-NEXT: Src: store i32 %21, ptr %arrayidx38, align 4 --> Dst: store i32 %21, ptr %arrayidx38, align 4
+; LIN-NEXT: da analyze - output [* * * * *]!
+;
entry:
%0 = zext i32 %n to i64
%1 = zext i32 %n to i64
@@ -185,16 +198,6 @@ for.end50: ; preds = %entry, %for.inc48
}
-; CHECK-LABEL: t3
-; CHECK: da analyze - none!
-; CHECK: da analyze - consistent anti [1 -2]!
-; CHECK: da analyze - none!
-
-; LIN-LABEL: t3
-; LIN: da analyze - input [* *]!
-; LIN: da analyze - anti [* *|<]!
-; LIN: da analyze - output [* *]!
-
;; // No sign or zero extension, but with compile-time unknown loop lower bound.
;; void t3(unsigned long long n, unsigned long long m, unsigned long long lb, float a[][m]) {
;; for (unsigned long long i = 0; i < n-1; ++i)
@@ -203,6 +206,22 @@ for.end50: ; preds = %entry, %for.inc48
;; }
define void @t3(i64 %n, i64 %m, i64 %lb, ptr %a) {
+; CHECK-LABEL: 't3'
+; CHECK-NEXT: Src: %2 = load i32, ptr %arrayidx6, align 4 --> Dst: %2 = load i32, ptr %arrayidx6, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: %2 = load i32, ptr %arrayidx6, align 4 --> Dst: store i32 %2, ptr %arrayidx8, align 4
+; CHECK-NEXT: da analyze - consistent anti [1 -2]!
+; CHECK-NEXT: Src: store i32 %2, ptr %arrayidx8, align 4 --> Dst: store i32 %2, ptr %arrayidx8, align 4
+; CHECK-NEXT: da analyze - none!
+;
+; LIN-LABEL: 't3'
+; LIN-NEXT: Src: %2 = load i32, ptr %arrayidx6, align 4 --> Dst: %2 = load i32, ptr %arrayidx6, align 4
+; LIN-NEXT: da analyze - input [* *]!
+; LIN-NEXT: Src: %2 = load i32, ptr %arrayidx6, align 4 --> Dst: store i32 %2, ptr %arrayidx8, align 4
+; LIN-NEXT: da analyze - anti [* *|<]!
+; LIN-NEXT: Src: store i32 %2, ptr %arrayidx8, align 4 --> Dst: store i32 %2, ptr %arrayidx8, align 4
+; LIN-NEXT: da analyze - output [* *]!
+;
entry:
%0 = add i64 %n, -1
%exitcond3 = icmp ne i64 0, %0
diff --git a/llvm/test/Analysis/DependenceAnalysis/SimpleSIVNoValidityCheckFixedSize.ll b/llvm/test/Analysis/DependenceAnalysis/SimpleSIVNoValidityCheckFixedSize.ll
index b8ed6ab916c459..c4948ebf9854b1 100644
--- a/llvm/test/Analysis/DependenceAnalysis/SimpleSIVNoValidityCheckFixedSize.ll
+++ b/llvm/test/Analysis/DependenceAnalysis/SimpleSIVNoValidityCheckFixedSize.ll
@@ -1,13 +1,9 @@
+; NOTE: Assertions have been autogenerated by utils/update_analyze_test_checks.py UTC_ARGS: --version 5
; RUN: opt < %s -disable-output -passes="print<da>" 2>&1 | FileCheck %s
; Note: exact results can be achived even if
; "-da-disable-delinearization-checks" is not used
-; CHECK-LABEL: t1
-; CHECK: da analyze - none!
-; CHECK: da analyze - consistent anti [1 -2]!
-; CHECK: da analyze - none!
-
;; #define N 1024
;; #define M 2048
;; void t1(int a[N][M]) {
@@ -18,6 +14,14 @@
;;
;; Note that there is a getelementptr with index 0, make sure we can analyze this case.
define void @t1(ptr %a) {
+; CHECK-LABEL: 't1'
+; CHECK-NEXT: Src: %2 = load i32, ptr %arrayidx6, align 4 --> Dst: %2 = load i32, ptr %arrayidx6, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: %2 = load i32, ptr %arrayidx6, align 4 --> Dst: store i32 %2, ptr %arrayidx10, align 4
+; CHECK-NEXT: da analyze - consistent anti [1 -2]!
+; CHECK-NEXT: Src: store i32 %2, ptr %arrayidx10, align 4 --> Dst: store i32 %2, ptr %arrayidx10, align 4
+; CHECK-NEXT: da analyze - none!
+;
entry:
br label %for.body
@@ -46,13 +50,24 @@ for.end13: ; preds = %for.inc11
ret void
}
-; CHECK-LABEL: t2
-; CHECK: da analyze - consistent anti [1 -2]!
-
;; Similar to @t1 but includes a call with a "returned" arg, make sure we can analyze
;; this case.
define void @t2(ptr %a) {
+; CHECK-LABEL: 't2'
+; CHECK-NEXT: Src: %2 = load i32, ptr %arrayidx6, align 4 --> Dst: %2 = load i32, ptr %arrayidx6, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: %2 = load i32, ptr %arrayidx6, align 4 --> Dst: %call = call ptr @func_with_returned_arg(ptr returned %a)
+; CHECK-NEXT: da analyze - confused!
+; CHECK-NEXT: Src: %2 = load i32, ptr %arrayidx6, align 4 --> Dst: store i32 %2, ptr %arrayidx10, align 4
+; CHECK-NEXT: da analyze - consistent anti [1 -2]!
+; CHECK-NEXT: Src: %call = call ptr @func_with_returned_arg(ptr returned %a) --> Dst: %call = call ptr @func_with_returned_arg(ptr returned %a)
+; CHECK-NEXT: da analyze - confused!
+; CHECK-NEXT: Src: %call = call ptr @func_with_returned_arg(ptr returned %a) --> Dst: store i32 %2, ptr %arrayidx10, align 4
+; CHECK-NEXT: da analyze - confused!
+; CHECK-NEXT: Src: store i32 %2, ptr %arrayidx10, align 4 --> Dst: store i32 %2, ptr %arrayidx10, align 4
+; CHECK-NEXT: da analyze - none!
+;
entry:
br label %for.body
@@ -84,11 +99,6 @@ for.end13: ; preds = %for.inc11
declare ptr @func_with_returned_arg(ptr returned %arg)
-; CHECK-LABEL: t3
-; CHECK: da analyze - none!
-; CHECK: da analyze - consistent anti [1 -2 0 -3 2]!
-; CHECK: da analyze - none!
-
;; #define N 1024
;; #define M 2048
;; void t2(int a[][N][N][N][M]) {
@@ -101,6 +111,14 @@ declare ptr @func_with_returned_arg(ptr returned %arg)
;; }
define void @t3(ptr %a) {
+; CHECK-LABEL: 't3'
+; CHECK-NEXT: Src: %4 = load i32, ptr %arrayidx26, align 4 --> Dst: %4 = load i32, ptr %arrayidx26, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: %4 = load i32, ptr %arrayidx26, align 4 --> Dst: store i32 %4, ptr %arrayidx36, align 4
+; CHECK-NEXT: da analyze - consistent anti [1 -2 0 -3 2]!
+; CHECK-NEXT: Src: store i32 %4, ptr %arrayidx36, align 4 --> Dst: store i32 %4, ptr %arrayidx36, align 4
+; CHECK-NEXT: da analyze - none!
+;
entry:
br label %for.body
diff --git a/llvm/test/Analysis/DependenceAnalysis/StrongSIV.ll b/llvm/test/Analysis/DependenceAnalysis/StrongSIV.ll
index 59bc406fd4bd55..44bd9b77279106 100644
--- a/llvm/test/Analysis/DependenceAnalysis/StrongSIV.ll
+++ b/llvm/test/Analysis/DependenceAnalysis/StrongSIV.ll
@@ -1,3 +1,4 @@
+; NOTE: Assertions have been autogenerated by utils/update_analyze_test_checks.py UTC_ARGS: --version 5
; RUN: opt < %s -disable-output "-passes=print<da>" -aa-pipeline=basic-aa 2>&1 \
; RUN: | FileCheck %s
@@ -10,17 +11,24 @@ target triple = "x86_64-apple-macosx10.6.0"
;; *B++ = A[i];
define void @strong0(ptr %A, ptr %B, i64 %n) nounwind uwtable ssp {
+; CHECK-LABEL: 'strong0'
+; CHECK-NEXT: Src: store i32 %1, ptr %arrayidx, align 4 --> Dst: store i32 %1, ptr %arrayidx, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: store i32 %1, ptr %arrayidx, align 4 --> Dst: %2 = load i32, ptr %arrayidx3, align 4
+; CHECK-NEXT: da analyze - consistent flow [2]!
+; CHECK-NEXT: Src: store i32 %1, ptr %arrayidx, align 4 --> Dst: store i32 %2, ptr %B.addr.02, align 4
+; CHECK-NEXT: da analyze - confused!
+; CHECK-NEXT: Src: %2 = load i32, ptr %arrayidx3, align 4 --> Dst: %2 = load i32, ptr %arrayidx3, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: %2 = load i32, ptr %arrayidx3, align 4 --> Dst: store i32 %2, ptr %B.addr.02, align 4
+; CHECK-NEXT: da analyze - confused!
+; CHECK-NEXT: Src: store i32 %2, ptr %B.addr.02, align 4 --> Dst: store i32 %2, ptr %B.addr.02, align 4
+; CHECK-NEXT: da analyze - none!
+;
entry:
%cmp1 = icmp sgt i64 %n, 0
br i1 %cmp1, label %for.body.preheader, label %for.end
-; CHECK: da analyze - none!
-; CHECK: da analyze - consistent flow [2]!
-; CHECK: da analyze - confused!
-; CHECK: da analyze - none!
-; CHECK: da analyze - confused!
-; CHECK: da analyze - none!
-
for.body.preheader: ; preds = %entry
br label %for.body
@@ -52,17 +60,24 @@ for.end: ; preds = %for.end.loopexit, %
;; *B++ = A[i];
define void @strong1(ptr %A, ptr %B, i32 %n) nounwind uwtable ssp {
+; CHECK-LABEL: 'strong1'
+; CHECK-NEXT: Src: store i32 %conv2, ptr %arrayidx, align 4 --> Dst: store i32 %conv2, ptr %arrayidx, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: store i32 %conv2, ptr %arrayidx, align 4 --> Dst: %1 = load i32, ptr %arrayidx3, align 4
+; CHECK-NEXT: da analyze - consistent flow [2]!
+; CHECK-NEXT: Src: store i32 %conv2, ptr %arrayidx, align 4 --> Dst: store i32 %1, ptr %B.addr.02, align 4
+; CHECK-NEXT: da analyze - confused!
+; CHECK-NEXT: Src: %1 = load i32, ptr %arrayidx3, align 4 --> Dst: %1 = load i32, ptr %arrayidx3, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: %1 = load i32, ptr %arrayidx3, align 4 --> Dst: store i32 %1, ptr %B.addr.02, align 4
+; CHECK-NEXT: da analyze - confused!
+; CHECK-NEXT: Src: store i32 %1, ptr %B.addr.02, align 4 --> Dst: store i32 %1, ptr %B.addr.02, align 4
+; CHECK-NEXT: da analyze - none!
+;
entry:
%cmp1 = icmp sgt i32 %n, 0
br i1 %cmp1, label %for.body.preheader, label %for.end
-; CHECK: da analyze - none!
-; CHECK: da analyze - consistent flow [2]!
-; CHECK: da analyze - confused!
-; CHECK: da analyze - none!
-; CHECK: da analyze - confused!
-; CHECK: da analyze - none!
-
for.body.preheader: ; preds = %entry
%0 = sext i32 %n to i64
br label %for.body
@@ -95,17 +110,24 @@ for.end: ; preds = %for.end.loopexit, %
;; *B++ = A[i];
define void @strong2(ptr %A, ptr %B, i64 %n) nounwind uwtable ssp {
+; CHECK-LABEL: 'strong2'
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx, align 4 --> Dst: store i32 %conv, ptr %arrayidx, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx, align 4 --> Dst: %0 = load i32, ptr %arrayidx1, align 4
+; CHECK-NEXT: da analyze - consistent flow [2]!
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx, align 4 --> Dst: store i32 %0, ptr %B.addr.02, align 4
+; CHECK-NEXT: da analyze - confused!
+; CHECK-NEXT: Src: %0 = load i32, ptr %arrayidx1, align 4 --> Dst: %0 = load i32, ptr %arrayidx1, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: %0 = load i32, ptr %arrayidx1, align 4 --> Dst: store i32 %0, ptr %B.addr.02, align 4
+; CHECK-NEXT: da analyze - confused!
+; CHECK-NEXT: Src: store i32 %0, ptr %B.addr.02, align 4 --> Dst: store i32 %0, ptr %B.addr.02, align 4
+; CHECK-NEXT: da analyze - none!
+;
entry:
%cmp1 = icmp eq i64 %n, 0
br i1 %cmp1, label %for.end, label %for.body.preheader
-; CHECK: da analyze - none!
-; CHECK: da analyze - consistent flow [2]!
-; CHECK: da analyze - confused!
-; CHECK: da analyze - none!
-; CHECK: da analyze - confused!
-; CHECK: da analyze - none!
-
for.body.preheader: ; preds = %entry
br label %for.body
@@ -137,17 +159,24 @@ for.end: ; preds = %for.end.loopexit, %
;; *B++ = A[i];
define void @strong3(ptr %A, ptr %B, i32 %n) nounwind uwtable ssp {
+; CHECK-LABEL: 'strong3'
+; CHECK-NEXT: Src: store i32 %1, ptr %arrayidx, align 4 --> Dst: store i32 %1, ptr %arrayidx, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: store i32 %1, ptr %arrayidx, align 4 --> Dst: %2 = load i32, ptr %arrayidx2, align 4
+; CHECK-NEXT: da analyze - consistent flow [2]!
+; CHECK-NEXT: Src: store i32 %1, ptr %arrayidx, align 4 --> Dst: store i32 %2, ptr %B.addr.02, align 4
+; CHECK-NEXT: da analyze - confused!
+; CHECK-NEXT: Src: %2 = load i32, ptr %arrayidx2, align 4 --> Dst: %2 = load i32, ptr %arrayidx2, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: %2 = load i32, ptr %arrayidx2, align 4 --> Dst: store i32 %2, ptr %B.addr.02, align 4
+; CHECK-NEXT: da analyze - confused!
+; CHECK-NEXT: Src: store i32 %2, ptr %B.addr.02, align 4 --> Dst: store i32 %2, ptr %B.addr.02, align 4
+; CHECK-NEXT: da analyze - none!
+;
entry:
%cmp1 = icmp sgt i32 %n, 0
br i1 %cmp1, label %for.body.preheader, label %for.end
-; CHECK: da analyze - none!
-; CHECK: da analyze - consistent flow [2]!
-; CHECK: da analyze - confused!
-; CHECK: da analyze - none!
-; CHECK: da analyze - confused!
-; CHECK: da analyze - none!
-
for.body.preheader: ; preds = %entry
br label %for.body
@@ -180,16 +209,23 @@ for.end: ; preds = %for.end.loopexit, %
;; *B++ = A[i];
define void @strong4(ptr %A, ptr %B, i64 %n) nounwind uwtable ssp {
+; CHECK-LABEL: 'strong4'
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx, align 4 --> Dst: store i32 %conv, ptr %arrayidx, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx, align 4 --> Dst: %0 = load i32, ptr %arrayidx1, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx, align 4 --> Dst: store i32 %0, ptr %B.addr.01, align 4
+; CHECK-NEXT: da analyze - confused!
+; CHECK-NEXT: Src: %0 = load i32, ptr %arrayidx1, align 4 --> Dst: %0 = load i32, ptr %arrayidx1, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: %0 = load i32, ptr %arrayidx1, align 4 --> Dst: store i32 %0, ptr %B.addr.01, align 4
+; CHECK-NEXT: da analyze - confused!
+; CHECK-NEXT: Src: store i32 %0, ptr %B.addr.01, align 4 --> Dst: store i32 %0, ptr %B.addr.01, align 4
+; CHECK-NEXT: da analyze - none!
+;
entry:
br label %for.body
-; CHECK: da analyze - none!
-; CHECK: da analyze - none!
-; CHECK: da analyze - confused!
-; CHECK: da analyze - none!
-; CHECK: da analyze - confused!
-; CHECK: da analyze - none!
-
for.body: ; preds = %entry, %for.body
%i.02 = phi i64 [ 0, %entry ], [ %inc, %for.body ]
%B.addr.01 = phi ptr [ %B, %entry ], [ %incdec.ptr, %for.body ]
@@ -215,16 +251,23 @@ for.end: ; preds = %for.body
;; *B++ = A[i];
define void @strong5(ptr %A, ptr %B, i64 %n) nounwind uwtable ssp {
+; CHECK-LABEL: 'strong5'
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx, align 4 --> Dst: store i32 %conv, ptr %arrayidx, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx, align 4 --> Dst: %0 = load i32, ptr %arrayidx1, align 4
+; CHECK-NEXT: da analyze - consistent flow [19]!
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx, align 4 --> Dst: store i32 %0, ptr %B.addr.01, align 4
+; CHECK-NEXT: da analyze - confused!
+; CHECK-NEXT: Src: %0 = load i32, ptr %arrayidx1, align 4 --> Dst: %0 = load i32, ptr %arrayidx1, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: %0 = load i32, ptr %arrayidx1, align 4 --> Dst: store i32 %0, ptr %B.addr.01, align 4
+; CHECK-NEXT: da analyze - confused!
+; CHECK-NEXT: Src: store i32 %0, ptr %B.addr.01, align 4 --> Dst: store i32 %0, ptr %B.addr.01, align 4
+; CHECK-NEXT: da analyze - none!
+;
entry:
br label %for.body
-; CHECK: da analyze - none!
-; CHECK: da analyze - consistent flow [19]!
-; CHECK: da analyze - confused!
-; CHECK: da analyze - none!
-; CHECK: da analyze - confused!
-; CHECK: da analyze - none!
-
for.body: ; preds = %entry, %for.body
%i.02 = phi i64 [ 0, %entry ], [ %inc, %for.body ]
%B.addr.01 = phi ptr [ %B, %entry ], [ %incdec.ptr, %for.body ]
@@ -250,16 +293,23 @@ for.end: ; preds = %for.body
;; *B++ = A[2*i];
define void @strong6(ptr %A, ptr %B, i64 %n) nounwind uwtable ssp {
+; CHECK-LABEL: 'strong6'
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx, align 4 --> Dst: store i32 %conv, ptr %arrayidx, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx, align 4 --> Dst: %0 = load i32, ptr %arrayidx2, align 4
+; CHECK-NEXT: da analyze - consistent flow [3]!
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx, align 4 --> Dst: store i32 %0, ptr %B.addr.01, align 4
+; CHECK-NEXT: da analyze - confused!
+; CHECK-NEXT: Src: %0 = load i32, ptr %arrayidx2, align 4 --> Dst: %0 = load i32, ptr %arrayidx2, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: %0 = load i32, ptr %arrayidx2, align 4 --> Dst: store i32 %0, ptr %B.addr.01, align 4
+; CHECK-NEXT: da analyze - confused!
+; CHECK-NEXT: Src: store i32 %0, ptr %B.addr.01, align 4 --> Dst: store i32 %0, ptr %B.addr.01, align 4
+; CHECK-NEXT: da analyze - none!
+;
entry:
br label %for.body
-; CHECK: da analyze - none!
-; CHECK: da analyze - consistent flow [3]!
-; CHECK: da analyze - confused!
-; CHECK: da analyze - none!
-; CHECK: da analyze - confused!
-; CHECK: da analyze - none!
-
for.body: ; preds = %entry, %for.body
%i.02 = phi i64 [ 0, %entry ], [ %inc, %for.body ]
%B.addr.01 = phi ptr [ %B, %entry ], [ %incdec.ptr, %for.body ]
@@ -287,16 +337,23 @@ for.end: ; preds = %for.body
;; *B++ = A[2*i];
define void @strong7(ptr %A, ptr %B, i64 %n) nounwind uwtable ssp {
+; CHECK-LABEL: 'strong7'
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx, align 4 --> Dst: store i32 %conv, ptr %arrayidx, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx, align 4 --> Dst: %0 = load i32, ptr %arrayidx2, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx, align 4 --> Dst: store i32 %0, ptr %B.addr.01, align 4
+; CHECK-NEXT: da analyze - confused!
+; CHECK-NEXT: Src: %0 = load i32, ptr %arrayidx2, align 4 --> Dst: %0 = load i32, ptr %arrayidx2, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: %0 = load i32, ptr %arrayidx2, align 4 --> Dst: store i32 %0, ptr %B.addr.01, align 4
+; CHECK-NEXT: da analyze - confused!
+; CHECK-NEXT: Src: store i32 %0, ptr %B.addr.01, align 4 --> Dst: store i32 %0, ptr %B.addr.01, align 4
+; CHECK-NEXT: da analyze - none!
+;
entry:
br label %for.body
-; CHECK: da analyze - none!
-; CHECK: da analyze - none!
-; CHECK: da analyze - confused!
-; CHECK: da analyze - none!
-; CHECK: da analyze - confused!
-; CHECK: da analyze - none!
-
for.body: ; preds = %entry, %for.body
%i.02 = phi i64 [ 0, %entry ], [ %inc, %for.body ]
%B.addr.01 = phi ptr [ %B, %entry ], [ %incdec.ptr, %for.body ]
@@ -324,16 +381,23 @@ for.end: ; preds = %for.body
;; *B++ = A[i];
define void @strong8(ptr %A, ptr %B, i64 %n) nounwind uwtable ssp {
+; CHECK-LABEL: 'strong8'
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx, align 4 --> Dst: store i32 %conv, ptr %arrayidx, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx, align 4 --> Dst: %0 = load i32, ptr %arrayidx1, align 4
+; CHECK-NEXT: da analyze - flow [*|<]!
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx, align 4 --> Dst: store i32 %0, ptr %B.addr.01, align 4
+; CHECK-NEXT: da analyze - confused!
+; CHECK-NEXT: Src: %0 = load i32, ptr %arrayidx1, align 4 --> Dst: %0 = load i32, ptr %arrayidx1, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: %0 = load i32, ptr %arrayidx1, align 4 --> Dst: store i32 %0, ptr %B.addr.01, align 4
+; CHECK-NEXT: da analyze - confused!
+; CHECK-NEXT: Src: store i32 %0, ptr %B.addr.01, align 4 --> Dst: store i32 %0, ptr %B.addr.01, align 4
+; CHECK-NEXT: da analyze - none!
+;
entry:
br label %for.body
-; CHECK: da analyze - none!
-; CHECK: da analyze - flow [*|<]!
-; CHECK: da analyze - confused!
-; CHECK: da analyze - none!
-; CHECK: da analyze - confused!
-; CHECK: da analyze - none!
-
for.body: ; preds = %entry, %for.body
%i.02 = phi i64 [ 0, %entry ], [ %inc, %for.body ]
%B.addr.01 = phi ptr [ %B, %entry ], [ %incdec.ptr, %for.body ]
@@ -359,17 +423,24 @@ for.end: ; preds = %for.body
;; *B++ = A[i + 2*n];
define void @strong9(ptr %A, ptr %B, i64 %n) nounwind uwtable ssp {
+; CHECK-LABEL: 'strong9'
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx, align 4 --> Dst: store i32 %conv, ptr %arrayidx, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx, align 4 --> Dst: %0 = load i32, ptr %arrayidx2, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx, align 4 --> Dst: store i32 %0, ptr %B.addr.02, align 4
+; CHECK-NEXT: da analyze - confused!
+; CHECK-NEXT: Src: %0 = load i32, ptr %arrayidx2, align 4 --> Dst: %0 = load i32, ptr %arrayidx2, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: %0 = load i32, ptr %arrayidx2, align 4 --> Dst: store i32 %0, ptr %B.addr.02, align 4
+; CHECK-NEXT: da analyze - confused!
+; CHECK-NEXT: Src: store i32 %0, ptr %B.addr.02, align 4 --> Dst: store i32 %0, ptr %B.addr.02, align 4
+; CHECK-NEXT: da analyze - none!
+;
entry:
%cmp1 = icmp eq i64 %n, 0
br i1 %cmp1, label %for.end, label %for.body.preheader
-; CHECK: da analyze - none!
-; CHECK: da analyze - none!
-; CHECK: da analyze - confused!
-; CHECK: da analyze - none!
-; CHECK: da analyze - confused!
-; CHECK: da analyze - none!
-
for.body.preheader: ; preds = %entry
br label %for.body
@@ -403,16 +474,23 @@ for.end: ; preds = %for.end.loopexit, %
;; *B++ = A[n*i + 5];
define void @strong10(ptr %A, ptr %B, i64 %n) nounwind uwtable ssp {
+; CHECK-LABEL: 'strong10'
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx, align 4 --> Dst: store i32 %conv, ptr %arrayidx, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx, align 4 --> Dst: %0 = load i32, ptr %arrayidx3, align 4
+; CHECK-NEXT: da analyze - consistent flow [0|<]!
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx, align 4 --> Dst: store i32 %0, ptr %B.addr.01, align 4
+; CHECK-NEXT: da analyze - confused!
+; CHECK-NEXT: Src: %0 = load i32, ptr %arrayidx3, align 4 --> Dst: %0 = load i32, ptr %arrayidx3, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: %0 = load i32, ptr %arrayidx3, align 4 --> Dst: store i32 %0, ptr %B.addr.01, align 4
+; CHECK-NEXT: da analyze - confused!
+; CHECK-NEXT: Src: store i32 %0, ptr %B.addr.01, align 4 --> Dst: store i32 %0, ptr %B.addr.01, align 4
+; CHECK-NEXT: da analyze - none!
+;
entry:
br label %for.body
-; CHECK: da analyze - none!
-; CHECK: da analyze - consistent flow [0|<]!
-; CHECK: da analyze - confused!
-; CHECK: da analyze - none!
-; CHECK: da analyze - confused!
-; CHECK: da analyze - none!
-
for.body: ; preds = %entry, %for.body
%i.02 = phi i64 [ 0, %entry ], [ %inc, %for.body ]
%B.addr.01 = phi ptr [ %B, %entry ], [ %incdec.ptr, %for.body ]
diff --git a/llvm/test/Analysis/DependenceAnalysis/SymbolicRDIV.ll b/llvm/test/Analysis/DependenceAnalysis/SymbolicRDIV.ll
index 238ab628e369e4..f64a7483d7b667 100644
--- a/llvm/test/Analysis/DependenceAnalysis/SymbolicRDIV.ll
+++ b/llvm/test/Analysis/DependenceAnalysis/SymbolicRDIV.ll
@@ -1,3 +1,4 @@
+; NOTE: Assertions have been autogenerated by utils/update_analyze_test_checks.py UTC_ARGS: --version 5
; RUN: opt < %s -disable-output "-passes=print<da>" -aa-pipeline=basic-aa 2>&1 \
; RUN: | FileCheck %s
@@ -12,18 +13,24 @@ target triple = "x86_64-apple-macosx10.6.0"
;; *B++ = A[3*j + 3*n1];
define void @symbolicrdiv0(ptr %A, ptr %B, i64 %n1, i64 %n2) nounwind uwtable ssp {
+; CHECK-LABEL: 'symbolicrdiv0'
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx, align 4 --> Dst: store i32 %conv, ptr %arrayidx, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx, align 4 --> Dst: %0 = load i32, ptr %arrayidx8, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx, align 4 --> Dst: store i32 %0, ptr %B.addr.02, align 4
+; CHECK-NEXT: da analyze - confused!
+; CHECK-NEXT: Src: %0 = load i32, ptr %arrayidx8, align 4 --> Dst: %0 = load i32, ptr %arrayidx8, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: %0 = load i32, ptr %arrayidx8, align 4 --> Dst: store i32 %0, ptr %B.addr.02, align 4
+; CHECK-NEXT: da analyze - confused!
+; CHECK-NEXT: Src: store i32 %0, ptr %B.addr.02, align 4 --> Dst: store i32 %0, ptr %B.addr.02, align 4
+; CHECK-NEXT: da analyze - none!
+;
entry:
%cmp4 = icmp eq i64 %n1, 0
br i1 %cmp4, label %for.cond1.preheader, label %for.body.preheader
-; CHECK: 'Dependence Analysis' for function 'symbolicrdiv0'
-; CHECK: da analyze - none!
-; CHECK: da analyze - none!
-; CHECK: da analyze - confused!
-; CHECK: da analyze - none!
-; CHECK: da analyze - confused!
-; CHECK: da analyze - none!
-
for.body.preheader: ; preds = %entry
br label %for.body
@@ -75,18 +82,24 @@ for.end11: ; preds = %for.end11.loopexit,
;; *B++ = A[3*j + 2*n2];
define void @symbolicrdiv1(ptr %A, ptr %B, i64 %n1, i64 %n2) nounwind uwtable ssp {
+; CHECK-LABEL: 'symbolicrdiv1'
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx, align 4 --> Dst: store i32 %conv, ptr %arrayidx, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx, align 4 --> Dst: %0 = load i32, ptr %arrayidx9, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx, align 4 --> Dst: store i32 %0, ptr %B.addr.02, align 4
+; CHECK-NEXT: da analyze - confused!
+; CHECK-NEXT: Src: %0 = load i32, ptr %arrayidx9, align 4 --> Dst: %0 = load i32, ptr %arrayidx9, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: %0 = load i32, ptr %arrayidx9, align 4 --> Dst: store i32 %0, ptr %B.addr.02, align 4
+; CHECK-NEXT: da analyze - confused!
+; CHECK-NEXT: Src: store i32 %0, ptr %B.addr.02, align 4 --> Dst: store i32 %0, ptr %B.addr.02, align 4
+; CHECK-NEXT: da analyze - none!
+;
entry:
%cmp4 = icmp eq i64 %n1, 0
br i1 %cmp4, label %for.cond2.preheader, label %for.body.preheader
-; CHECK: 'Dependence Analysis' for function 'symbolicrdiv1'
-; CHECK: da analyze - none!
-; CHECK: da analyze - none!
-; CHECK: da analyze - confused!
-; CHECK: da analyze - none!
-; CHECK: da analyze - confused!
-; CHECK: da analyze - none!
-
for.body.preheader: ; preds = %entry
br label %for.body
@@ -140,18 +153,24 @@ for.end12: ; preds = %for.end12.loopexit,
;; *B++ = A[-j + 2*n1];
define void @symbolicrdiv2(ptr %A, ptr %B, i64 %n1, i64 %n2) nounwind uwtable ssp {
+; CHECK-LABEL: 'symbolicrdiv2'
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx, align 4 --> Dst: store i32 %conv, ptr %arrayidx, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx, align 4 --> Dst: %0 = load i32, ptr %arrayidx7, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx, align 4 --> Dst: store i32 %0, ptr %B.addr.02, align 4
+; CHECK-NEXT: da analyze - confused!
+; CHECK-NEXT: Src: %0 = load i32, ptr %arrayidx7, align 4 --> Dst: %0 = load i32, ptr %arrayidx7, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: %0 = load i32, ptr %arrayidx7, align 4 --> Dst: store i32 %0, ptr %B.addr.02, align 4
+; CHECK-NEXT: da analyze - confused!
+; CHECK-NEXT: Src: store i32 %0, ptr %B.addr.02, align 4 --> Dst: store i32 %0, ptr %B.addr.02, align 4
+; CHECK-NEXT: da analyze - none!
+;
entry:
%cmp4 = icmp eq i64 %n1, 0
br i1 %cmp4, label %for.cond1.preheader, label %for.body.preheader
-; CHECK: 'Dependence Analysis' for function 'symbolicrdiv2'
-; CHECK: da analyze - none!
-; CHECK: da analyze - none!
-; CHECK: da analyze - confused!
-; CHECK: da analyze - none!
-; CHECK: da analyze - confused!
-; CHECK: da analyze - none!
-
for.body.preheader: ; preds = %entry
br label %for.body
@@ -203,18 +222,24 @@ for.end10: ; preds = %for.end10.loopexit,
;; *B++ = A[j - n1];
define void @symbolicrdiv3(ptr %A, ptr %B, i64 %n1, i64 %n2) nounwind uwtable ssp {
+; CHECK-LABEL: 'symbolicrdiv3'
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx, align 4 --> Dst: store i32 %conv, ptr %arrayidx, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx, align 4 --> Dst: %0 = load i32, ptr %arrayidx6, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx, align 4 --> Dst: store i32 %0, ptr %B.addr.02, align 4
+; CHECK-NEXT: da analyze - confused!
+; CHECK-NEXT: Src: %0 = load i32, ptr %arrayidx6, align 4 --> Dst: %0 = load i32, ptr %arrayidx6, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: %0 = load i32, ptr %arrayidx6, align 4 --> Dst: store i32 %0, ptr %B.addr.02, align 4
+; CHECK-NEXT: da analyze - confused!
+; CHECK-NEXT: Src: store i32 %0, ptr %B.addr.02, align 4 --> Dst: store i32 %0, ptr %B.addr.02, align 4
+; CHECK-NEXT: da analyze - none!
+;
entry:
%cmp4 = icmp eq i64 %n1, 0
br i1 %cmp4, label %for.cond1.preheader, label %for.body.preheader
-; CHECK: 'Dependence Analysis' for function 'symbolicrdiv3'
-; CHECK: da analyze - none!
-; CHECK: da analyze - none!
-; CHECK: da analyze - confused!
-; CHECK: da analyze - none!
-; CHECK: da analyze - confused!
-; CHECK: da analyze - none!
-
for.body.preheader: ; preds = %entry
br label %for.body
@@ -264,18 +289,24 @@ for.end9: ; preds = %for.end9.loopexit,
;; *B++ = A[-j + n1];
define void @symbolicrdiv4(ptr %A, ptr %B, i64 %n1, i64 %n2) nounwind uwtable ssp {
+; CHECK-LABEL: 'symbolicrdiv4'
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx, align 4 --> Dst: store i32 %conv, ptr %arrayidx, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx, align 4 --> Dst: %0 = load i32, ptr %arrayidx7, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx, align 4 --> Dst: store i32 %0, ptr %B.addr.02, align 4
+; CHECK-NEXT: da analyze - confused!
+; CHECK-NEXT: Src: %0 = load i32, ptr %arrayidx7, align 4 --> Dst: %0 = load i32, ptr %arrayidx7, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: %0 = load i32, ptr %arrayidx7, align 4 --> Dst: store i32 %0, ptr %B.addr.02, align 4
+; CHECK-NEXT: da analyze - confused!
+; CHECK-NEXT: Src: store i32 %0, ptr %B.addr.02, align 4 --> Dst: store i32 %0, ptr %B.addr.02, align 4
+; CHECK-NEXT: da analyze - none!
+;
entry:
%cmp4 = icmp eq i64 %n1, 0
br i1 %cmp4, label %for.cond1.preheader, label %for.body.preheader
-; CHECK: 'Dependence Analysis' for function 'symbolicrdiv4'
-; CHECK: da analyze - none!
-; CHECK: da analyze - none!
-; CHECK: da analyze - confused!
-; CHECK: da analyze - none!
-; CHECK: da analyze - confused!
-; CHECK: da analyze - none!
-
for.body.preheader: ; preds = %entry
br label %for.body
@@ -326,18 +357,24 @@ for.end10: ; preds = %for.end10.loopexit,
;; *B++ = A[-j + 2*n2];
define void @symbolicrdiv5(ptr %A, ptr %B, i64 %n1, i64 %n2) nounwind uwtable ssp {
+; CHECK-LABEL: 'symbolicrdiv5'
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx, align 4 --> Dst: store i32 %conv, ptr %arrayidx, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx, align 4 --> Dst: %0 = load i32, ptr %arrayidx7, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx, align 4 --> Dst: store i32 %0, ptr %B.addr.02, align 4
+; CHECK-NEXT: da analyze - confused!
+; CHECK-NEXT: Src: %0 = load i32, ptr %arrayidx7, align 4 --> Dst: %0 = load i32, ptr %arrayidx7, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: %0 = load i32, ptr %arrayidx7, align 4 --> Dst: store i32 %0, ptr %B.addr.02, align 4
+; CHECK-NEXT: da analyze - confused!
+; CHECK-NEXT: Src: store i32 %0, ptr %B.addr.02, align 4 --> Dst: store i32 %0, ptr %B.addr.02, align 4
+; CHECK-NEXT: da analyze - none!
+;
entry:
%cmp4 = icmp eq i64 %n1, 0
br i1 %cmp4, label %for.cond1.preheader, label %for.body.preheader
-; CHECK: 'Dependence Analysis' for function 'symbolicrdiv5'
-; CHECK: da analyze - none!
-; CHECK: da analyze - none!
-; CHECK: da analyze - confused!
-; CHECK: da analyze - none!
-; CHECK: da analyze - confused!
-; CHECK: da analyze - none!
-
for.body.preheader: ; preds = %entry
br label %for.body
@@ -388,18 +425,24 @@ for.end10: ; preds = %for.end10.loopexit,
;; *B++ = A[2*n2];
define void @symbolicrdiv6(ptr %A, ptr %B, i64 %n1, i64 %n2) nounwind uwtable ssp {
+; CHECK-LABEL: 'symbolicrdiv6'
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx, align 4 --> Dst: store i32 %conv, ptr %arrayidx, align 4
+; CHECK-NEXT: da analyze - output [* *]!
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx, align 4 --> Dst: %0 = load i32, ptr %arrayidx4, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx, align 4 --> Dst: store i32 %0, ptr %B.addr.12, align 4
+; CHECK-NEXT: da analyze - confused!
+; CHECK-NEXT: Src: %0 = load i32, ptr %arrayidx4, align 4 --> Dst: %0 = load i32, ptr %arrayidx4, align 4
+; CHECK-NEXT: da analyze - consistent input [S S]!
+; CHECK-NEXT: Src: %0 = load i32, ptr %arrayidx4, align 4 --> Dst: store i32 %0, ptr %B.addr.12, align 4
+; CHECK-NEXT: da analyze - confused!
+; CHECK-NEXT: Src: store i32 %0, ptr %B.addr.12, align 4 --> Dst: store i32 %0, ptr %B.addr.12, align 4
+; CHECK-NEXT: da analyze - output [* *]!
+;
entry:
%cmp4 = icmp eq i64 %n1, 0
br i1 %cmp4, label %for.end7, label %for.cond1.preheader.preheader
-; CHECK: 'Dependence Analysis' for function 'symbolicrdiv6'
-; CHECK: da analyze - output [* *]!
-; CHECK: da analyze - none!
-; CHECK: da analyze - confused!
-; CHECK: da analyze - consistent input [S S]!
-; CHECK: da analyze - confused!
-; CHECK: da analyze - output [* *]!
-
for.cond1.preheader.preheader: ; preds = %entry
br label %for.cond1.preheader
diff --git a/llvm/test/Analysis/DependenceAnalysis/SymbolicSIV.ll b/llvm/test/Analysis/DependenceAnalysis/SymbolicSIV.ll
index a995f7a3ad22bc..cdfaec76fa8922 100644
--- a/llvm/test/Analysis/DependenceAnalysis/SymbolicSIV.ll
+++ b/llvm/test/Analysis/DependenceAnalysis/SymbolicSIV.ll
@@ -1,3 +1,4 @@
+; NOTE: Assertions have been autogenerated by utils/update_analyze_test_checks.py UTC_ARGS: --version 5
; RUN: opt < %s -disable-output "-passes=print<da>" -aa-pipeline=basic-aa 2>&1 \
; RUN: | FileCheck %s
@@ -10,17 +11,24 @@ target triple = "x86_64-apple-macosx10.6.0"
;; *B++ = A[3*i + 3*n];
define void @symbolicsiv0(ptr %A, ptr %B, i64 %n) nounwind uwtable ssp {
+; CHECK-LABEL: 'symbolicsiv0'
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx, align 4 --> Dst: store i32 %conv, ptr %arrayidx, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx, align 4 --> Dst: %0 = load i32, ptr %arrayidx4, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx, align 4 --> Dst: store i32 %0, ptr %B.addr.02, align 4
+; CHECK-NEXT: da analyze - confused!
+; CHECK-NEXT: Src: %0 = load i32, ptr %arrayidx4, align 4 --> Dst: %0 = load i32, ptr %arrayidx4, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: %0 = load i32, ptr %arrayidx4, align 4 --> Dst: store i32 %0, ptr %B.addr.02, align 4
+; CHECK-NEXT: da analyze - confused!
+; CHECK-NEXT: Src: store i32 %0, ptr %B.addr.02, align 4 --> Dst: store i32 %0, ptr %B.addr.02, align 4
+; CHECK-NEXT: da analyze - none!
+;
entry:
%cmp1 = icmp eq i64 %n, 0
br i1 %cmp1, label %for.end, label %for.body.preheader
-; CHECK: da analyze - none!
-; CHECK: da analyze - none!
-; CHECK: da analyze - confused!
-; CHECK: da analyze - none!
-; CHECK: da analyze - confused!
-; CHECK: da analyze - none!
-
for.body.preheader: ; preds = %entry
br label %for.body
@@ -55,17 +63,24 @@ for.end: ; preds = %for.end.loopexit, %
;; *B++ = A[3*i + 2*n];
define void @symbolicsiv1(ptr %A, ptr %B, i64 %n) nounwind uwtable ssp {
+; CHECK-LABEL: 'symbolicsiv1'
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx, align 4 --> Dst: store i32 %conv, ptr %arrayidx, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx, align 4 --> Dst: %0 = load i32, ptr %arrayidx5, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx, align 4 --> Dst: store i32 %0, ptr %B.addr.02, align 4
+; CHECK-NEXT: da analyze - confused!
+; CHECK-NEXT: Src: %0 = load i32, ptr %arrayidx5, align 4 --> Dst: %0 = load i32, ptr %arrayidx5, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: %0 = load i32, ptr %arrayidx5, align 4 --> Dst: store i32 %0, ptr %B.addr.02, align 4
+; CHECK-NEXT: da analyze - confused!
+; CHECK-NEXT: Src: store i32 %0, ptr %B.addr.02, align 4 --> Dst: store i32 %0, ptr %B.addr.02, align 4
+; CHECK-NEXT: da analyze - none!
+;
entry:
%cmp1 = icmp eq i64 %n, 0
br i1 %cmp1, label %for.end, label %for.body.preheader
-; CHECK: da analyze - none!
-; CHECK: da analyze - none!
-; CHECK: da analyze - confused!
-; CHECK: da analyze - none!
-; CHECK: da analyze - confused!
-; CHECK: da analyze - none!
-
for.body.preheader: ; preds = %entry
br label %for.body
@@ -102,17 +117,24 @@ for.end: ; preds = %for.end.loopexit, %
;; *B++ = A[-i + 2*n];
define void @symbolicsiv2(ptr %A, ptr %B, i64 %n) nounwind uwtable ssp {
+; CHECK-LABEL: 'symbolicsiv2'
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx, align 4 --> Dst: store i32 %conv, ptr %arrayidx, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx, align 4 --> Dst: %0 = load i32, ptr %arrayidx3, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx, align 4 --> Dst: store i32 %0, ptr %B.addr.02, align 4
+; CHECK-NEXT: da analyze - confused!
+; CHECK-NEXT: Src: %0 = load i32, ptr %arrayidx3, align 4 --> Dst: %0 = load i32, ptr %arrayidx3, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: %0 = load i32, ptr %arrayidx3, align 4 --> Dst: store i32 %0, ptr %B.addr.02, align 4
+; CHECK-NEXT: da analyze - confused!
+; CHECK-NEXT: Src: store i32 %0, ptr %B.addr.02, align 4 --> Dst: store i32 %0, ptr %B.addr.02, align 4
+; CHECK-NEXT: da analyze - none!
+;
entry:
%cmp1 = icmp eq i64 %n, 0
br i1 %cmp1, label %for.end, label %for.body.preheader
-; CHECK: da analyze - none!
-; CHECK: da analyze - none!
-; CHECK: da analyze - confused!
-; CHECK: da analyze - none!
-; CHECK: da analyze - confused!
-; CHECK: da analyze - none!
-
for.body.preheader: ; preds = %entry
br label %for.body
@@ -147,17 +169,24 @@ for.end: ; preds = %for.end.loopexit, %
;; *B++ = A[i - 2*n];
define void @symbolicsiv3(ptr %A, ptr %B, i64 %n) nounwind uwtable ssp {
+; CHECK-LABEL: 'symbolicsiv3'
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx, align 4 --> Dst: store i32 %conv, ptr %arrayidx, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx, align 4 --> Dst: %0 = load i32, ptr %arrayidx3, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx, align 4 --> Dst: store i32 %0, ptr %B.addr.02, align 4
+; CHECK-NEXT: da analyze - confused!
+; CHECK-NEXT: Src: %0 = load i32, ptr %arrayidx3, align 4 --> Dst: %0 = load i32, ptr %arrayidx3, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: %0 = load i32, ptr %arrayidx3, align 4 --> Dst: store i32 %0, ptr %B.addr.02, align 4
+; CHECK-NEXT: da analyze - confused!
+; CHECK-NEXT: Src: store i32 %0, ptr %B.addr.02, align 4 --> Dst: store i32 %0, ptr %B.addr.02, align 4
+; CHECK-NEXT: da analyze - none!
+;
entry:
%cmp1 = icmp eq i64 %n, 0
br i1 %cmp1, label %for.end, label %for.body.preheader
-; CHECK: da analyze - none!
-; CHECK: da analyze - none!
-; CHECK: da analyze - confused!
-; CHECK: da analyze - none!
-; CHECK: da analyze - confused!
-; CHECK: da analyze - none!
-
for.body.preheader: ; preds = %entry
br label %for.body
@@ -193,17 +222,24 @@ for.end: ; preds = %for.end.loopexit, %
;; *B++ = A[-i + n];
define void @symbolicsiv4(ptr %A, ptr %B, i64 %n) nounwind uwtable ssp {
+; CHECK-LABEL: 'symbolicsiv4'
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx, align 4 --> Dst: store i32 %conv, ptr %arrayidx, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx, align 4 --> Dst: %0 = load i32, ptr %arrayidx3, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx, align 4 --> Dst: store i32 %0, ptr %B.addr.02, align 4
+; CHECK-NEXT: da analyze - confused!
+; CHECK-NEXT: Src: %0 = load i32, ptr %arrayidx3, align 4 --> Dst: %0 = load i32, ptr %arrayidx3, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: %0 = load i32, ptr %arrayidx3, align 4 --> Dst: store i32 %0, ptr %B.addr.02, align 4
+; CHECK-NEXT: da analyze - confused!
+; CHECK-NEXT: Src: store i32 %0, ptr %B.addr.02, align 4 --> Dst: store i32 %0, ptr %B.addr.02, align 4
+; CHECK-NEXT: da analyze - none!
+;
entry:
%cmp1 = icmp eq i64 %n, 0
br i1 %cmp1, label %for.end, label %for.body.preheader
-; CHECK: da analyze - none!
-; CHECK: da analyze - none!
-; CHECK: da analyze - confused!
-; CHECK: da analyze - none!
-; CHECK: da analyze - confused!
-; CHECK: da analyze - none!
-
for.body.preheader: ; preds = %entry
br label %for.body
@@ -238,17 +274,24 @@ for.end: ; preds = %for.end.loopexit, %
;; *B++ = A[-i - n];
define void @symbolicsiv5(ptr %A, ptr %B, i64 %n) nounwind uwtable ssp {
+; CHECK-LABEL: 'symbolicsiv5'
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx, align 4 --> Dst: store i32 %conv, ptr %arrayidx, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx, align 4 --> Dst: %0 = load i32, ptr %arrayidx4, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx, align 4 --> Dst: store i32 %0, ptr %B.addr.02, align 4
+; CHECK-NEXT: da analyze - confused!
+; CHECK-NEXT: Src: %0 = load i32, ptr %arrayidx4, align 4 --> Dst: %0 = load i32, ptr %arrayidx4, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: %0 = load i32, ptr %arrayidx4, align 4 --> Dst: store i32 %0, ptr %B.addr.02, align 4
+; CHECK-NEXT: da analyze - confused!
+; CHECK-NEXT: Src: store i32 %0, ptr %B.addr.02, align 4 --> Dst: store i32 %0, ptr %B.addr.02, align 4
+; CHECK-NEXT: da analyze - none!
+;
entry:
%cmp1 = icmp eq i64 %n, 0
br i1 %cmp1, label %for.end, label %for.body.preheader
-; CHECK: da analyze - none!
-; CHECK: da analyze - none!
-; CHECK: da analyze - confused!
-; CHECK: da analyze - none!
-; CHECK: da analyze - confused!
-; CHECK: da analyze - none!
-
for.body.preheader: ; preds = %entry
br label %for.body
@@ -285,18 +328,25 @@ for.end: ; preds = %for.end.loopexit, %
;; *B++ = A[-i];
define void @weaktest(ptr %A, ptr %B, i64 %n) nounwind uwtable ssp {
+; CHECK-LABEL: 'weaktest'
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx, align 4 --> Dst: store i32 %conv, ptr %arrayidx, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx, align 4 --> Dst: %0 = load i32, ptr %arrayidx2, align 4
+; CHECK-NEXT: da analyze - flow [*|<] splitable!
+; CHECK-NEXT: da analyze - split level = 1, iteration = ((0 smax (-4 + (-4 * %n))) /u 8)!
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx, align 4 --> Dst: store i32 %0, ptr %B.addr.02, align 4
+; CHECK-NEXT: da analyze - confused!
+; CHECK-NEXT: Src: %0 = load i32, ptr %arrayidx2, align 4 --> Dst: %0 = load i32, ptr %arrayidx2, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: %0 = load i32, ptr %arrayidx2, align 4 --> Dst: store i32 %0, ptr %B.addr.02, align 4
+; CHECK-NEXT: da analyze - confused!
+; CHECK-NEXT: Src: store i32 %0, ptr %B.addr.02, align 4 --> Dst: store i32 %0, ptr %B.addr.02, align 4
+; CHECK-NEXT: da analyze - none!
+;
entry:
%cmp1 = icmp eq i64 %n, 0
br i1 %cmp1, label %for.end, label %for.body.preheader
-; CHECK: da analyze - none!
-; CHECK: da analyze - flow [*|<] splitable!
-; CHECK: da analyze - split level = 1, iteration = ((0 smax (-4 + (-4 * %n))) /u 8)!
-; CHECK: da analyze - confused!
-; CHECK: da analyze - none!
-; CHECK: da analyze - confused!
-; CHECK: da analyze - none!
-
for.body.preheader: ; preds = %entry
br label %for.body
@@ -330,18 +380,24 @@ for.end: ; preds = %for.end.loopexit, %
;; *B++ = A[4*N*i + 3*M + 1];
define void @symbolicsiv6(ptr %A, ptr %B, i64 %n, i64 %N, i64 %M) nounwind uwtable ssp {
+; CHECK-LABEL: 'symbolicsiv6'
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx, align 4 --> Dst: store i32 %conv, ptr %arrayidx, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx, align 4 --> Dst: %0 = load i32, ptr %arrayidx7, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx, align 4 --> Dst: store i32 %0, ptr %B.addr.02, align 4
+; CHECK-NEXT: da analyze - confused!
+; CHECK-NEXT: Src: %0 = load i32, ptr %arrayidx7, align 4 --> Dst: %0 = load i32, ptr %arrayidx7, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: %0 = load i32, ptr %arrayidx7, align 4 --> Dst: store i32 %0, ptr %B.addr.02, align 4
+; CHECK-NEXT: da analyze - confused!
+; CHECK-NEXT: Src: store i32 %0, ptr %B.addr.02, align 4 --> Dst: store i32 %0, ptr %B.addr.02, align 4
+; CHECK-NEXT: da analyze - none!
+;
entry:
%cmp1 = icmp eq i64 %n, 0
br i1 %cmp1, label %for.end, label %for.body.preheader
-; CHECK-LABEL: symbolicsiv6
-; CHECK: da analyze - none!
-; CHECK: da analyze - none!
-; CHECK: da analyze - confused!
-; CHECK: da analyze - none!
-; CHECK: da analyze - confused!
-; CHECK: da analyze - none!
-
for.body.preheader: ; preds = %entry
br label %for.body
@@ -380,16 +436,23 @@ for.end: ; preds = %for.end.loopexit, %
;; *B++ = A[2*N*i - 3*M + 2];
define void @symbolicsiv7(ptr %A, ptr %B, i64 %n, i64 %N, i64 %M) nounwind uwtable ssp {
+; CHECK-LABEL: 'symbolicsiv7'
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx, align 4 --> Dst: store i32 %conv, ptr %arrayidx, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx, align 4 --> Dst: %1 = load i32, ptr %arrayidx6, align 4
+; CHECK-NEXT: da analyze - flow [<>]!
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx, align 4 --> Dst: store i32 %1, ptr %B.addr.02, align 4
+; CHECK-NEXT: da analyze - confused!
+; CHECK-NEXT: Src: %1 = load i32, ptr %arrayidx6, align 4 --> Dst: %1 = load i32, ptr %arrayidx6, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: %1 = load i32, ptr %arrayidx6, align 4 --> Dst: store i32 %1, ptr %B.addr.02, align 4
+; CHECK-NEXT: da analyze - confused!
+; CHECK-NEXT: Src: store i32 %1, ptr %B.addr.02, align 4 --> Dst: store i32 %1, ptr %B.addr.02, align 4
+; CHECK-NEXT: da analyze - none!
+;
entry:
%cmp1 = icmp eq i64 %n, 0
br i1 %cmp1, label %for.end, label %for.body.preheader
-; CHECK-LABEL: symbolicsiv7
-; CHECK: da analyze - none!
-; CHECK: da analyze - flow [<>]!
-; CHECK: da analyze - confused!
-; CHECK: da analyze - none!
-; CHECK: da analyze - confused!
-; CHECK: da analyze - none!
for.body.preheader: ; preds = %entry
br label %for.body
diff --git a/llvm/test/Analysis/DependenceAnalysis/UsefulGEP.ll b/llvm/test/Analysis/DependenceAnalysis/UsefulGEP.ll
index 2d0e0a39df3c5d..ccdd70160feab1 100644
--- a/llvm/test/Analysis/DependenceAnalysis/UsefulGEP.ll
+++ b/llvm/test/Analysis/DependenceAnalysis/UsefulGEP.ll
@@ -1,11 +1,13 @@
-; RUN: opt < %s -disable-output "-passes=print<da>" -aa-pipeline=basic-aa 2>&1
+; NOTE: Assertions have been autogenerated by utils/update_analyze_test_checks.py UTC_ARGS: --version 5
+; RUN: opt < %s -disable-output "-passes=print<da>" -aa-pipeline=basic-aa 2>&1 \
+; RUN: | FileCheck %s
;; Check this doesn't crash.
target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"
;; struct s {
;; int A[10][10];
-;; int C[10][10][10];
+;; int C[10][10][10];
;; } S;
;; void dep_constraint_crash_test(int k,int N) {
@@ -20,20 +22,28 @@ target triple = "x86_64-unknown-linux-gnu"
@S = common global %struct.s zeroinitializer
define void @dep_constraint_crash_test(i32 %k, i32 %N) {
+; CHECK-LABEL: 'dep_constraint_crash_test'
+; CHECK-NEXT: Src: %0 = load i32, ptr %arrayidx, align 4 --> Dst: %0 = load i32, ptr %arrayidx, align 4
+; CHECK-NEXT: da analyze - consistent input [S S]!
+; CHECK-NEXT: Src: %0 = load i32, ptr %arrayidx, align 4 --> Dst: store i32 %0, ptr @S, align 4
+; CHECK-NEXT: da analyze - anti [S S|<]!
+; CHECK-NEXT: Src: store i32 %0, ptr @S, align 4 --> Dst: store i32 %0, ptr @S, align 4
+; CHECK-NEXT: da analyze - consistent output [S S]!
+;
entry:
%cmp12 = icmp sgt i32 %N, 0
br i1 %cmp12, label %for.cond1.preheader.lr.ph, label %for.end6
-for.cond1.preheader.lr.ph:
+for.cond1.preheader.lr.ph:
%idxprom = sext i32 %k to i64
%arrayidx = getelementptr inbounds %struct.s, ptr @S, i64 0, i32 1, i64 0, i64 0, i64 %idxprom
br label %for.body3.preheader
-for.body3.preheader:
+for.body3.preheader:
%i.013 = phi i32 [ 0, %for.cond1.preheader.lr.ph ], [ %inc5, %for.inc4 ]
br label %for.body3
-for.body3:
+for.body3:
%j.011 = phi i32 [ %inc, %for.body3 ], [ 0, %for.body3.preheader ]
%0 = load i32, ptr %arrayidx
store i32 %0, ptr @S
@@ -41,11 +51,11 @@ for.body3:
%exitcond = icmp eq i32 %inc, %N
br i1 %exitcond, label %for.inc4, label %for.body3
-for.inc4:
+for.inc4:
%inc5 = add nuw nsw i32 %i.013, 1
%exitcond14 = icmp eq i32 %inc5, %N
br i1 %exitcond14, label %for.end6, label %for.body3.preheader
-for.end6:
+for.end6:
ret void
}
diff --git a/llvm/test/Analysis/DependenceAnalysis/WeakCrossingSIV.ll b/llvm/test/Analysis/DependenceAnalysis/WeakCrossingSIV.ll
index 774c37da3d3de8..cd044032e34f1f 100644
--- a/llvm/test/Analysis/DependenceAnalysis/WeakCrossingSIV.ll
+++ b/llvm/test/Analysis/DependenceAnalysis/WeakCrossingSIV.ll
@@ -1,3 +1,4 @@
+; NOTE: Assertions have been autogenerated by utils/update_analyze_test_checks.py UTC_ARGS: --version 5
; RUN: opt < %s -disable-output "-passes=print<da>" -aa-pipeline=basic-aa 2>&1 \
; RUN: | FileCheck %s
@@ -11,6 +12,20 @@ target triple = "x86_64-apple-macosx10.6.0"
;; *B++ = A[1 - n*i];
define void @weakcrossing0(ptr %A, ptr %B, i64 %n) nounwind uwtable ssp {
+; CHECK-LABEL: 'weakcrossing0'
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx, align 4 --> Dst: store i32 %conv, ptr %arrayidx, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx, align 4 --> Dst: %0 = load i32, ptr %arrayidx2, align 4
+; CHECK-NEXT: da analyze - flow [0|<]!
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx, align 4 --> Dst: store i32 %0, ptr %B.addr.02, align 4
+; CHECK-NEXT: da analyze - confused!
+; CHECK-NEXT: Src: %0 = load i32, ptr %arrayidx2, align 4 --> Dst: %0 = load i32, ptr %arrayidx2, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: %0 = load i32, ptr %arrayidx2, align 4 --> Dst: store i32 %0, ptr %B.addr.02, align 4
+; CHECK-NEXT: da analyze - confused!
+; CHECK-NEXT: Src: store i32 %0, ptr %B.addr.02, align 4 --> Dst: store i32 %0, ptr %B.addr.02, align 4
+; CHECK-NEXT: da analyze - none!
+;
entry:
%cmp1 = icmp eq i64 %n, 0
br i1 %cmp1, label %for.end, label %for.body.preheader
@@ -18,13 +33,6 @@ entry:
for.body.preheader: ; preds = %entry
br label %for.body
-; CHECK: da analyze - none!
-; CHECK: da analyze - flow [0|<]!
-; CHECK: da analyze - confused!
-; CHECK: da analyze - none!
-; CHECK: da analyze - confused!
-; CHECK: da analyze - none!
-
for.body: ; preds = %for.body.preheader, %for.body
%i.03 = phi i64 [ %inc, %for.body ], [ 0, %for.body.preheader ]
%B.addr.02 = phi ptr [ %incdec.ptr, %for.body ], [ %B, %for.body.preheader ]
@@ -56,18 +64,25 @@ for.end: ; preds = %for.end.loopexit, %
;; *B++ = A[1 + n - i];
define void @weakcrossing1(ptr %A, ptr %B, i64 %n) nounwind uwtable ssp {
+; CHECK-LABEL: 'weakcrossing1'
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx, align 4 --> Dst: store i32 %conv, ptr %arrayidx, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx, align 4 --> Dst: %0 = load i32, ptr %arrayidx2, align 4
+; CHECK-NEXT: da analyze - flow [<>] splitable!
+; CHECK-NEXT: da analyze - split level = 1, iteration = 0!
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx, align 4 --> Dst: store i32 %0, ptr %B.addr.02, align 4
+; CHECK-NEXT: da analyze - confused!
+; CHECK-NEXT: Src: %0 = load i32, ptr %arrayidx2, align 4 --> Dst: %0 = load i32, ptr %arrayidx2, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: %0 = load i32, ptr %arrayidx2, align 4 --> Dst: store i32 %0, ptr %B.addr.02, align 4
+; CHECK-NEXT: da analyze - confused!
+; CHECK-NEXT: Src: store i32 %0, ptr %B.addr.02, align 4 --> Dst: store i32 %0, ptr %B.addr.02, align 4
+; CHECK-NEXT: da analyze - none!
+;
entry:
%cmp1 = icmp eq i64 %n, 0
br i1 %cmp1, label %for.end, label %for.body.preheader
-; CHECK: da analyze - none!
-; CHECK: da analyze - flow [<>] splitable!
-; CHECK: da analyze - split level = 1, iteration = 0!
-; CHECK: da analyze - confused!
-; CHECK: da analyze - none!
-; CHECK: da analyze - confused!
-; CHECK: da analyze - none!
-
for.body.preheader: ; preds = %entry
br label %for.body
@@ -101,16 +116,23 @@ for.end: ; preds = %for.end.loopexit, %
;; *B++ = A[6 - i];
define void @weakcrossing2(ptr %A, ptr %B, i64 %n) nounwind uwtable ssp {
+; CHECK-LABEL: 'weakcrossing2'
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx, align 4 --> Dst: store i32 %conv, ptr %arrayidx, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx, align 4 --> Dst: %0 = load i32, ptr %arrayidx1, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx, align 4 --> Dst: store i32 %0, ptr %B.addr.01, align 4
+; CHECK-NEXT: da analyze - confused!
+; CHECK-NEXT: Src: %0 = load i32, ptr %arrayidx1, align 4 --> Dst: %0 = load i32, ptr %arrayidx1, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: %0 = load i32, ptr %arrayidx1, align 4 --> Dst: store i32 %0, ptr %B.addr.01, align 4
+; CHECK-NEXT: da analyze - confused!
+; CHECK-NEXT: Src: store i32 %0, ptr %B.addr.01, align 4 --> Dst: store i32 %0, ptr %B.addr.01, align 4
+; CHECK-NEXT: da analyze - none!
+;
entry:
br label %for.body
-; CHECK: da analyze - none!
-; CHECK: da analyze - none!
-; CHECK: da analyze - confused!
-; CHECK: da analyze - none!
-; CHECK: da analyze - confused!
-; CHECK: da analyze - none!
-
for.body: ; preds = %entry, %for.body
%i.02 = phi i64 [ 0, %entry ], [ %inc, %for.body ]
%B.addr.01 = phi ptr [ %B, %entry ], [ %incdec.ptr, %for.body ]
@@ -136,16 +158,23 @@ for.end: ; preds = %for.body
;; *B++ = A[6 - i];
define void @weakcrossing3(ptr %A, ptr %B, i64 %n) nounwind uwtable ssp {
+; CHECK-LABEL: 'weakcrossing3'
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx, align 4 --> Dst: store i32 %conv, ptr %arrayidx, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx, align 4 --> Dst: %0 = load i32, ptr %arrayidx1, align 4
+; CHECK-NEXT: da analyze - flow [0|<]!
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx, align 4 --> Dst: store i32 %0, ptr %B.addr.01, align 4
+; CHECK-NEXT: da analyze - confused!
+; CHECK-NEXT: Src: %0 = load i32, ptr %arrayidx1, align 4 --> Dst: %0 = load i32, ptr %arrayidx1, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: %0 = load i32, ptr %arrayidx1, align 4 --> Dst: store i32 %0, ptr %B.addr.01, align 4
+; CHECK-NEXT: da analyze - confused!
+; CHECK-NEXT: Src: store i32 %0, ptr %B.addr.01, align 4 --> Dst: store i32 %0, ptr %B.addr.01, align 4
+; CHECK-NEXT: da analyze - none!
+;
entry:
br label %for.body
-; CHECK: da analyze - none!
-; CHECK: da analyze - flow [0|<]!
-; CHECK: da analyze - confused!
-; CHECK: da analyze - none!
-; CHECK: da analyze - confused!
-; CHECK: da analyze - none!
-
for.body: ; preds = %entry, %for.body
%i.02 = phi i64 [ 0, %entry ], [ %inc, %for.body ]
%B.addr.01 = phi ptr [ %B, %entry ], [ %incdec.ptr, %for.body ]
@@ -171,16 +200,23 @@ for.end: ; preds = %for.body
;; *B++ = A[-6 - i];
define void @weakcrossing4(ptr %A, ptr %B, i64 %n) nounwind uwtable ssp {
+; CHECK-LABEL: 'weakcrossing4'
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx, align 4 --> Dst: store i32 %conv, ptr %arrayidx, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx, align 4 --> Dst: %0 = load i32, ptr %arrayidx1, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx, align 4 --> Dst: store i32 %0, ptr %B.addr.01, align 4
+; CHECK-NEXT: da analyze - confused!
+; CHECK-NEXT: Src: %0 = load i32, ptr %arrayidx1, align 4 --> Dst: %0 = load i32, ptr %arrayidx1, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: %0 = load i32, ptr %arrayidx1, align 4 --> Dst: store i32 %0, ptr %B.addr.01, align 4
+; CHECK-NEXT: da analyze - confused!
+; CHECK-NEXT: Src: store i32 %0, ptr %B.addr.01, align 4 --> Dst: store i32 %0, ptr %B.addr.01, align 4
+; CHECK-NEXT: da analyze - none!
+;
entry:
br label %for.body
-; CHECK: da analyze - none!
-; CHECK: da analyze - none!
-; CHECK: da analyze - confused!
-; CHECK: da analyze - none!
-; CHECK: da analyze - confused!
-; CHECK: da analyze - none!
-
for.body: ; preds = %entry, %for.body
%i.02 = phi i64 [ 0, %entry ], [ %inc, %for.body ]
%B.addr.01 = phi ptr [ %B, %entry ], [ %incdec.ptr, %for.body ]
@@ -206,17 +242,24 @@ for.end: ; preds = %for.body
;; *B++ = A[5 - 3*i];
define void @weakcrossing5(ptr %A, ptr %B, i64 %n) nounwind uwtable ssp {
+; CHECK-LABEL: 'weakcrossing5'
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx, align 4 --> Dst: store i32 %conv, ptr %arrayidx, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx, align 4 --> Dst: %1 = load i32, ptr %arrayidx2, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx, align 4 --> Dst: store i32 %1, ptr %B.addr.02, align 4
+; CHECK-NEXT: da analyze - confused!
+; CHECK-NEXT: Src: %1 = load i32, ptr %arrayidx2, align 4 --> Dst: %1 = load i32, ptr %arrayidx2, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: %1 = load i32, ptr %arrayidx2, align 4 --> Dst: store i32 %1, ptr %B.addr.02, align 4
+; CHECK-NEXT: da analyze - confused!
+; CHECK-NEXT: Src: store i32 %1, ptr %B.addr.02, align 4 --> Dst: store i32 %1, ptr %B.addr.02, align 4
+; CHECK-NEXT: da analyze - none!
+;
entry:
%cmp1 = icmp eq i64 %n, 0
br i1 %cmp1, label %for.end, label %for.body.preheader
-; CHECK: da analyze - none!
-; CHECK: da analyze - none!
-; CHECK: da analyze - confused!
-; CHECK: da analyze - none!
-; CHECK: da analyze - confused!
-; CHECK: da analyze - none!
-
for.body.preheader: ; preds = %entry
br label %for.body
@@ -250,17 +293,24 @@ for.end: ; preds = %for.end.loopexit, %
;; *B++ = A[5 - i];
define void @weakcrossing6(ptr %A, ptr %B, i64 %n) nounwind uwtable ssp {
+; CHECK-LABEL: 'weakcrossing6'
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx, align 4 --> Dst: store i32 %conv, ptr %arrayidx, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx, align 4 --> Dst: %0 = load i32, ptr %arrayidx1, align 4
+; CHECK-NEXT: da analyze - flow [<>] splitable!
+; CHECK-NEXT: da analyze - split level = 1, iteration = 2!
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx, align 4 --> Dst: store i32 %0, ptr %B.addr.01, align 4
+; CHECK-NEXT: da analyze - confused!
+; CHECK-NEXT: Src: %0 = load i32, ptr %arrayidx1, align 4 --> Dst: %0 = load i32, ptr %arrayidx1, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: %0 = load i32, ptr %arrayidx1, align 4 --> Dst: store i32 %0, ptr %B.addr.01, align 4
+; CHECK-NEXT: da analyze - confused!
+; CHECK-NEXT: Src: store i32 %0, ptr %B.addr.01, align 4 --> Dst: store i32 %0, ptr %B.addr.01, align 4
+; CHECK-NEXT: da analyze - none!
+;
entry:
br label %for.body
-; CHECK: da analyze - none!
-; CHECK: da analyze - flow [<>] splitable!
-; CHECK: da analyze - split level = 1, iteration = 2!
-; CHECK: da analyze - confused!
-; CHECK: da analyze - none!
-; CHECK: da analyze - confused!
-; CHECK: da analyze - none!
-
for.body: ; preds = %entry, %for.body
%i.02 = phi i64 [ 0, %entry ], [ %inc, %for.body ]
%B.addr.01 = phi ptr [ %B, %entry ], [ %incdec.ptr, %for.body ]
diff --git a/llvm/test/Analysis/DependenceAnalysis/WeakZeroDstSIV.ll b/llvm/test/Analysis/DependenceAnalysis/WeakZeroDstSIV.ll
index 63774ce57c9b78..71a5ed62b8e211 100644
--- a/llvm/test/Analysis/DependenceAnalysis/WeakZeroDstSIV.ll
+++ b/llvm/test/Analysis/DependenceAnalysis/WeakZeroDstSIV.ll
@@ -1,3 +1,4 @@
+; NOTE: Assertions have been autogenerated by utils/update_analyze_test_checks.py UTC_ARGS: --version 5
; RUN: opt < %s -disable-output "-passes=print<da>" -aa-pipeline=basic-aa 2>&1 \
; RUN: | FileCheck %s
@@ -11,14 +12,18 @@ target triple = "x86_64-apple-macosx10.6.0"
;; A[0] = 2;
define void @dstzero(ptr nocapture %A, i32 %N) {
+; CHECK-LABEL: 'dstzero'
+; CHECK-NEXT: Src: store i32 0, ptr %arrayidx, align 4 --> Dst: store i32 0, ptr %arrayidx, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: store i32 0, ptr %arrayidx, align 4 --> Dst: store i32 1, ptr %A, align 4
+; CHECK-NEXT: da analyze - output [p<=|<]!
+; CHECK-NEXT: Src: store i32 1, ptr %A, align 4 --> Dst: store i32 1, ptr %A, align 4
+; CHECK-NEXT: da analyze - consistent output [S]!
+;
entry:
%cmp6 = icmp sgt i32 %N, 0
br i1 %cmp6, label %for.body, label %for.cond.cleanup
-; CHECK: da analyze - none!
-; CHECK: da analyze - output [p<=|<]!
-; CHECK: da analyze - consistent output [S]!
-
for.body: ; preds = %entry, %for.body
%i.07 = phi i32 [ %add, %for.body ], [ 0, %entry ]
%arrayidx = getelementptr inbounds i32, ptr %A, i32 %i.07
@@ -40,16 +45,23 @@ for.cond.cleanup: ; preds = %for.body, %entry
;; *B++ = A[10];
define void @weakzerodst0(ptr %A, ptr %B, i64 %n) nounwind uwtable ssp {
+; CHECK-LABEL: 'weakzerodst0'
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx, align 4 --> Dst: store i32 %conv, ptr %arrayidx, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx, align 4 --> Dst: %0 = load i32, ptr %arrayidx1, align 4
+; CHECK-NEXT: da analyze - flow [p<=|<]!
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx, align 4 --> Dst: store i32 %0, ptr %B.addr.01, align 4
+; CHECK-NEXT: da analyze - confused!
+; CHECK-NEXT: Src: %0 = load i32, ptr %arrayidx1, align 4 --> Dst: %0 = load i32, ptr %arrayidx1, align 4
+; CHECK-NEXT: da analyze - consistent input [S]!
+; CHECK-NEXT: Src: %0 = load i32, ptr %arrayidx1, align 4 --> Dst: store i32 %0, ptr %B.addr.01, align 4
+; CHECK-NEXT: da analyze - confused!
+; CHECK-NEXT: Src: store i32 %0, ptr %B.addr.01, align 4 --> Dst: store i32 %0, ptr %B.addr.01, align 4
+; CHECK-NEXT: da analyze - none!
+;
entry:
br label %for.body
-; CHECK: da analyze - none!
-; CHECK: da analyze - flow [p<=|<]!
-; CHECK: da analyze - confused!
-; CHECK: da analyze - consistent input [S]!
-; CHECK: da analyze - confused!
-; CHECK: da analyze - none!
-
for.body: ; preds = %entry, %for.body
%i.02 = phi i64 [ 0, %entry ], [ %inc, %for.body ]
%B.addr.01 = phi ptr [ %B, %entry ], [ %incdec.ptr, %for.body ]
@@ -76,17 +88,24 @@ for.end: ; preds = %for.body
;; *B++ = A[10];
define void @weakzerodst1(ptr %A, ptr %B, i64 %n) nounwind uwtable ssp {
+; CHECK-LABEL: 'weakzerodst1'
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx, align 4 --> Dst: store i32 %conv, ptr %arrayidx, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx, align 4 --> Dst: %0 = load i32, ptr %arrayidx1, align 4
+; CHECK-NEXT: da analyze - flow [p<=|<]!
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx, align 4 --> Dst: store i32 %0, ptr %B.addr.02, align 4
+; CHECK-NEXT: da analyze - confused!
+; CHECK-NEXT: Src: %0 = load i32, ptr %arrayidx1, align 4 --> Dst: %0 = load i32, ptr %arrayidx1, align 4
+; CHECK-NEXT: da analyze - consistent input [S]!
+; CHECK-NEXT: Src: %0 = load i32, ptr %arrayidx1, align 4 --> Dst: store i32 %0, ptr %B.addr.02, align 4
+; CHECK-NEXT: da analyze - confused!
+; CHECK-NEXT: Src: store i32 %0, ptr %B.addr.02, align 4 --> Dst: store i32 %0, ptr %B.addr.02, align 4
+; CHECK-NEXT: da analyze - none!
+;
entry:
%cmp1 = icmp eq i64 %n, 0
br i1 %cmp1, label %for.end, label %for.body.preheader
-; CHECK: da analyze - none!
-; CHECK: da analyze - flow [p<=|<]!
-; CHECK: da analyze - confused!
-; CHECK: da analyze - consistent input [S]!
-; CHECK: da analyze - confused!
-; CHECK: da analyze - none!
-
for.body.preheader: ; preds = %entry
br label %for.body
@@ -119,16 +138,23 @@ for.end: ; preds = %for.end.loopexit, %
;; *B++ = A[10];
define void @weakzerodst2(ptr %A, ptr %B, i64 %n) nounwind uwtable ssp {
+; CHECK-LABEL: 'weakzerodst2'
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx, align 4 --> Dst: store i32 %conv, ptr %arrayidx, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx, align 4 --> Dst: %0 = load i32, ptr %arrayidx1, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx, align 4 --> Dst: store i32 %0, ptr %B.addr.01, align 4
+; CHECK-NEXT: da analyze - confused!
+; CHECK-NEXT: Src: %0 = load i32, ptr %arrayidx1, align 4 --> Dst: %0 = load i32, ptr %arrayidx1, align 4
+; CHECK-NEXT: da analyze - consistent input [S]!
+; CHECK-NEXT: Src: %0 = load i32, ptr %arrayidx1, align 4 --> Dst: store i32 %0, ptr %B.addr.01, align 4
+; CHECK-NEXT: da analyze - confused!
+; CHECK-NEXT: Src: store i32 %0, ptr %B.addr.01, align 4 --> Dst: store i32 %0, ptr %B.addr.01, align 4
+; CHECK-NEXT: da analyze - none!
+;
entry:
br label %for.body
-; CHECK: da analyze - none!
-; CHECK: da analyze - none!
-; CHECK: da analyze - confused!
-; CHECK: da analyze - consistent input [S]!
-; CHECK: da analyze - confused!
-; CHECK: da analyze - none!
-
for.body: ; preds = %entry, %for.body
%i.02 = phi i64 [ 0, %entry ], [ %inc, %for.body ]
%B.addr.01 = phi ptr [ %B, %entry ], [ %incdec.ptr, %for.body ]
@@ -154,16 +180,23 @@ for.end: ; preds = %for.body
;; *B++ = A[10];
define void @weakzerodst3(ptr %A, ptr %B, i64 %n) nounwind uwtable ssp {
+; CHECK-LABEL: 'weakzerodst3'
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx, align 4 --> Dst: store i32 %conv, ptr %arrayidx, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx, align 4 --> Dst: %0 = load i32, ptr %arrayidx1, align 4
+; CHECK-NEXT: da analyze - flow [=>p|<]!
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx, align 4 --> Dst: store i32 %0, ptr %B.addr.01, align 4
+; CHECK-NEXT: da analyze - confused!
+; CHECK-NEXT: Src: %0 = load i32, ptr %arrayidx1, align 4 --> Dst: %0 = load i32, ptr %arrayidx1, align 4
+; CHECK-NEXT: da analyze - consistent input [S]!
+; CHECK-NEXT: Src: %0 = load i32, ptr %arrayidx1, align 4 --> Dst: store i32 %0, ptr %B.addr.01, align 4
+; CHECK-NEXT: da analyze - confused!
+; CHECK-NEXT: Src: store i32 %0, ptr %B.addr.01, align 4 --> Dst: store i32 %0, ptr %B.addr.01, align 4
+; CHECK-NEXT: da analyze - none!
+;
entry:
br label %for.body
-; CHECK: da analyze - none!
-; CHECK: da analyze - flow [=>p|<]!
-; CHECK: da analyze - confused!
-; CHECK: da analyze - consistent input [S]!
-; CHECK: da analyze - confused!
-; CHECK: da analyze - none!
-
for.body: ; preds = %entry, %for.body
%i.02 = phi i64 [ 0, %entry ], [ %inc, %for.body ]
%B.addr.01 = phi ptr [ %B, %entry ], [ %incdec.ptr, %for.body ]
@@ -189,16 +222,23 @@ for.end: ; preds = %for.body
;; *B++ = A[10];
define void @weakzerodst4(ptr %A, ptr %B, i64 %n) nounwind uwtable ssp {
+; CHECK-LABEL: 'weakzerodst4'
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx, align 4 --> Dst: store i32 %conv, ptr %arrayidx, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx, align 4 --> Dst: %0 = load i32, ptr %arrayidx1, align 4
+; CHECK-NEXT: da analyze - flow [*|<]!
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx, align 4 --> Dst: store i32 %0, ptr %B.addr.01, align 4
+; CHECK-NEXT: da analyze - confused!
+; CHECK-NEXT: Src: %0 = load i32, ptr %arrayidx1, align 4 --> Dst: %0 = load i32, ptr %arrayidx1, align 4
+; CHECK-NEXT: da analyze - consistent input [S]!
+; CHECK-NEXT: Src: %0 = load i32, ptr %arrayidx1, align 4 --> Dst: store i32 %0, ptr %B.addr.01, align 4
+; CHECK-NEXT: da analyze - confused!
+; CHECK-NEXT: Src: store i32 %0, ptr %B.addr.01, align 4 --> Dst: store i32 %0, ptr %B.addr.01, align 4
+; CHECK-NEXT: da analyze - none!
+;
entry:
br label %for.body
-; CHECK: da analyze - none!
-; CHECK: da analyze - flow [*|<]!
-; CHECK: da analyze - confused!
-; CHECK: da analyze - consistent input [S]!
-; CHECK: da analyze - confused!
-; CHECK: da analyze - none!
-
for.body: ; preds = %entry, %for.body
%i.02 = phi i64 [ 0, %entry ], [ %inc, %for.body ]
%B.addr.01 = phi ptr [ %B, %entry ], [ %incdec.ptr, %for.body ]
@@ -224,16 +264,23 @@ for.end: ; preds = %for.body
;; *B++ = A[-10];
define void @weakzerodst5(ptr %A, ptr %B, i64 %n) nounwind uwtable ssp {
+; CHECK-LABEL: 'weakzerodst5'
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx, align 4 --> Dst: store i32 %conv, ptr %arrayidx, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx, align 4 --> Dst: %0 = load i32, ptr %arrayidx1, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx, align 4 --> Dst: store i32 %0, ptr %B.addr.01, align 4
+; CHECK-NEXT: da analyze - confused!
+; CHECK-NEXT: Src: %0 = load i32, ptr %arrayidx1, align 4 --> Dst: %0 = load i32, ptr %arrayidx1, align 4
+; CHECK-NEXT: da analyze - consistent input [S]!
+; CHECK-NEXT: Src: %0 = load i32, ptr %arrayidx1, align 4 --> Dst: store i32 %0, ptr %B.addr.01, align 4
+; CHECK-NEXT: da analyze - confused!
+; CHECK-NEXT: Src: store i32 %0, ptr %B.addr.01, align 4 --> Dst: store i32 %0, ptr %B.addr.01, align 4
+; CHECK-NEXT: da analyze - none!
+;
entry:
br label %for.body
-; CHECK: da analyze - none!
-; CHECK: da analyze - none!
-; CHECK: da analyze - confused!
-; CHECK: da analyze - consistent input [S]!
-; CHECK: da analyze - confused!
-; CHECK: da analyze - none!
-
for.body: ; preds = %entry, %for.body
%i.02 = phi i64 [ 0, %entry ], [ %inc, %for.body ]
%B.addr.01 = phi ptr [ %B, %entry ], [ %incdec.ptr, %for.body ]
@@ -259,17 +306,24 @@ for.end: ; preds = %for.body
;; *B++ = A[10];
define void @weakzerodst6(ptr %A, ptr %B, i64 %n) nounwind uwtable ssp {
+; CHECK-LABEL: 'weakzerodst6'
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx, align 4 --> Dst: store i32 %conv, ptr %arrayidx, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx, align 4 --> Dst: %0 = load i32, ptr %arrayidx1, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx, align 4 --> Dst: store i32 %0, ptr %B.addr.02, align 4
+; CHECK-NEXT: da analyze - confused!
+; CHECK-NEXT: Src: %0 = load i32, ptr %arrayidx1, align 4 --> Dst: %0 = load i32, ptr %arrayidx1, align 4
+; CHECK-NEXT: da analyze - consistent input [S]!
+; CHECK-NEXT: Src: %0 = load i32, ptr %arrayidx1, align 4 --> Dst: store i32 %0, ptr %B.addr.02, align 4
+; CHECK-NEXT: da analyze - confused!
+; CHECK-NEXT: Src: store i32 %0, ptr %B.addr.02, align 4 --> Dst: store i32 %0, ptr %B.addr.02, align 4
+; CHECK-NEXT: da analyze - none!
+;
entry:
%cmp1 = icmp eq i64 %n, 0
br i1 %cmp1, label %for.end, label %for.body.preheader
-; CHECK: da analyze - none!
-; CHECK: da analyze - none!
-; CHECK: da analyze - confused!
-; CHECK: da analyze - consistent input [S]!
-; CHECK: da analyze - confused!
-; CHECK: da analyze - none!
-
for.body.preheader: ; preds = %entry
br label %for.body
diff --git a/llvm/test/Analysis/DependenceAnalysis/WeakZeroSrcSIV.ll b/llvm/test/Analysis/DependenceAnalysis/WeakZeroSrcSIV.ll
index 8755faa36d4008..2ee1a37775f460 100644
--- a/llvm/test/Analysis/DependenceAnalysis/WeakZeroSrcSIV.ll
+++ b/llvm/test/Analysis/DependenceAnalysis/WeakZeroSrcSIV.ll
@@ -1,3 +1,4 @@
+; NOTE: Assertions have been autogenerated by utils/update_analyze_test_checks.py UTC_ARGS: --version 5
; RUN: opt < %s -disable-output "-passes=print<da>" -aa-pipeline=basic-aa 2>&1 \
; RUN: | FileCheck %s
@@ -11,14 +12,18 @@ target triple = "x86_64-apple-macosx10.6.0"
;; A[i] = 2;
define void @dstzero(ptr nocapture %A, i32 %N) {
+; CHECK-LABEL: 'dstzero'
+; CHECK-NEXT: Src: store i32 0, ptr %A, align 4 --> Dst: store i32 0, ptr %A, align 4
+; CHECK-NEXT: da analyze - consistent output [S]!
+; CHECK-NEXT: Src: store i32 0, ptr %A, align 4 --> Dst: store i32 1, ptr %arrayidx1, align 4
+; CHECK-NEXT: da analyze - output [p=>|<]!
+; CHECK-NEXT: Src: store i32 1, ptr %arrayidx1, align 4 --> Dst: store i32 1, ptr %arrayidx1, align 4
+; CHECK-NEXT: da analyze - none!
+;
entry:
%cmp6 = icmp sgt i32 %N, 0
br i1 %cmp6, label %for.body, label %for.cond.cleanup
-; CHECK: da analyze - consistent output [S]!
-; CHECK: da analyze - output [p=>|<]!
-; CHECK: da analyze - none!
-
for.body: ; preds = %entry, %for.body
%i.07 = phi i32 [ %add, %for.body ], [ 0, %entry ]
store i32 0, ptr %A, align 4
@@ -38,16 +43,23 @@ for.cond.cleanup: ; preds = %for.body, %entry
;; *B++ = A[2*i + 10];
define void @weakzerosrc0(ptr %A, ptr %B, i64 %n) nounwind uwtable ssp {
+; CHECK-LABEL: 'weakzerosrc0'
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx, align 4 --> Dst: store i32 %conv, ptr %arrayidx, align 4
+; CHECK-NEXT: da analyze - consistent output [S]!
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx, align 4 --> Dst: %0 = load i32, ptr %arrayidx1, align 4
+; CHECK-NEXT: da analyze - flow [p=>|<]!
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx, align 4 --> Dst: store i32 %0, ptr %B.addr.01, align 4
+; CHECK-NEXT: da analyze - confused!
+; CHECK-NEXT: Src: %0 = load i32, ptr %arrayidx1, align 4 --> Dst: %0 = load i32, ptr %arrayidx1, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: %0 = load i32, ptr %arrayidx1, align 4 --> Dst: store i32 %0, ptr %B.addr.01, align 4
+; CHECK-NEXT: da analyze - confused!
+; CHECK-NEXT: Src: store i32 %0, ptr %B.addr.01, align 4 --> Dst: store i32 %0, ptr %B.addr.01, align 4
+; CHECK-NEXT: da analyze - none!
+;
entry:
br label %for.body
-; CHECK: da analyze - consistent output [S]!
-; CHECK: da analyze - flow [p=>|<]!
-; CHECK: da analyze - confused!
-; CHECK: da analyze - none!
-; CHECK: da analyze - confused!
-; CHECK: da analyze - none!
-
for.body: ; preds = %entry, %for.body
%i.02 = phi i64 [ 0, %entry ], [ %inc, %for.body ]
%B.addr.01 = phi ptr [ %B, %entry ], [ %incdec.ptr, %for.body ]
@@ -74,17 +86,24 @@ for.end: ; preds = %for.body
;; *B++ = A[n*i + 10];
define void @weakzerosrc1(ptr %A, ptr %B, i64 %n) nounwind uwtable ssp {
+; CHECK-LABEL: 'weakzerosrc1'
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx, align 4 --> Dst: store i32 %conv, ptr %arrayidx, align 4
+; CHECK-NEXT: da analyze - consistent output [S]!
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx, align 4 --> Dst: %0 = load i32, ptr %arrayidx1, align 4
+; CHECK-NEXT: da analyze - flow [p=>|<]!
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx, align 4 --> Dst: store i32 %0, ptr %B.addr.02, align 4
+; CHECK-NEXT: da analyze - confused!
+; CHECK-NEXT: Src: %0 = load i32, ptr %arrayidx1, align 4 --> Dst: %0 = load i32, ptr %arrayidx1, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: %0 = load i32, ptr %arrayidx1, align 4 --> Dst: store i32 %0, ptr %B.addr.02, align 4
+; CHECK-NEXT: da analyze - confused!
+; CHECK-NEXT: Src: store i32 %0, ptr %B.addr.02, align 4 --> Dst: store i32 %0, ptr %B.addr.02, align 4
+; CHECK-NEXT: da analyze - none!
+;
entry:
%cmp1 = icmp eq i64 %n, 0
br i1 %cmp1, label %for.end, label %for.body.preheader
-; CHECK: da analyze - consistent output [S]!
-; CHECK: da analyze - flow [p=>|<]!
-; CHECK: da analyze - confused!
-; CHECK: da analyze - none!
-; CHECK: da analyze - confused!
-; CHECK: da analyze - none!
-
for.body.preheader: ; preds = %entry
br label %for.body
@@ -117,16 +136,23 @@ for.end: ; preds = %for.end.loopexit, %
;; *B++ = A[2*i];
define void @weakzerosrc2(ptr %A, ptr %B, i64 %n) nounwind uwtable ssp {
+; CHECK-LABEL: 'weakzerosrc2'
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx, align 4 --> Dst: store i32 %conv, ptr %arrayidx, align 4
+; CHECK-NEXT: da analyze - consistent output [S]!
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx, align 4 --> Dst: %0 = load i32, ptr %arrayidx1, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx, align 4 --> Dst: store i32 %0, ptr %B.addr.01, align 4
+; CHECK-NEXT: da analyze - confused!
+; CHECK-NEXT: Src: %0 = load i32, ptr %arrayidx1, align 4 --> Dst: %0 = load i32, ptr %arrayidx1, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: %0 = load i32, ptr %arrayidx1, align 4 --> Dst: store i32 %0, ptr %B.addr.01, align 4
+; CHECK-NEXT: da analyze - confused!
+; CHECK-NEXT: Src: store i32 %0, ptr %B.addr.01, align 4 --> Dst: store i32 %0, ptr %B.addr.01, align 4
+; CHECK-NEXT: da analyze - none!
+;
entry:
br label %for.body
-; CHECK: da analyze - consistent output [S]!
-; CHECK: da analyze - none!
-; CHECK: da analyze - confused!
-; CHECK: da analyze - none!
-; CHECK: da analyze - confused!
-; CHECK: da analyze - none!
-
for.body: ; preds = %entry, %for.body
%i.02 = phi i64 [ 0, %entry ], [ %inc, %for.body ]
%B.addr.01 = phi ptr [ %B, %entry ], [ %incdec.ptr, %for.body ]
@@ -152,16 +178,23 @@ for.end: ; preds = %for.body
;; *B++ = A[2*i];
define void @weakzerosrc3(ptr %A, ptr %B, i64 %n) nounwind uwtable ssp {
+; CHECK-LABEL: 'weakzerosrc3'
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx, align 4 --> Dst: store i32 %conv, ptr %arrayidx, align 4
+; CHECK-NEXT: da analyze - consistent output [S]!
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx, align 4 --> Dst: %0 = load i32, ptr %arrayidx1, align 4
+; CHECK-NEXT: da analyze - flow [<=p|<]!
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx, align 4 --> Dst: store i32 %0, ptr %B.addr.01, align 4
+; CHECK-NEXT: da analyze - confused!
+; CHECK-NEXT: Src: %0 = load i32, ptr %arrayidx1, align 4 --> Dst: %0 = load i32, ptr %arrayidx1, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: %0 = load i32, ptr %arrayidx1, align 4 --> Dst: store i32 %0, ptr %B.addr.01, align 4
+; CHECK-NEXT: da analyze - confused!
+; CHECK-NEXT: Src: store i32 %0, ptr %B.addr.01, align 4 --> Dst: store i32 %0, ptr %B.addr.01, align 4
+; CHECK-NEXT: da analyze - none!
+;
entry:
br label %for.body
-; CHECK: da analyze - consistent output [S]!
-; CHECK: da analyze - flow [<=p|<]!
-; CHECK: da analyze - confused!
-; CHECK: da analyze - none!
-; CHECK: da analyze - confused!
-; CHECK: da analyze - none!
-
for.body: ; preds = %entry, %for.body
%i.02 = phi i64 [ 0, %entry ], [ %inc, %for.body ]
%B.addr.01 = phi ptr [ %B, %entry ], [ %incdec.ptr, %for.body ]
@@ -187,16 +220,23 @@ for.end: ; preds = %for.body
;; *B++ = A[2*i];
define void @weakzerosrc4(ptr %A, ptr %B, i64 %n) nounwind uwtable ssp {
+; CHECK-LABEL: 'weakzerosrc4'
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx, align 4 --> Dst: store i32 %conv, ptr %arrayidx, align 4
+; CHECK-NEXT: da analyze - consistent output [S]!
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx, align 4 --> Dst: %0 = load i32, ptr %arrayidx1, align 4
+; CHECK-NEXT: da analyze - flow [*|<]!
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx, align 4 --> Dst: store i32 %0, ptr %B.addr.01, align 4
+; CHECK-NEXT: da analyze - confused!
+; CHECK-NEXT: Src: %0 = load i32, ptr %arrayidx1, align 4 --> Dst: %0 = load i32, ptr %arrayidx1, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: %0 = load i32, ptr %arrayidx1, align 4 --> Dst: store i32 %0, ptr %B.addr.01, align 4
+; CHECK-NEXT: da analyze - confused!
+; CHECK-NEXT: Src: store i32 %0, ptr %B.addr.01, align 4 --> Dst: store i32 %0, ptr %B.addr.01, align 4
+; CHECK-NEXT: da analyze - none!
+;
entry:
br label %for.body
-; CHECK: da analyze - consistent output [S]!
-; CHECK: da analyze - flow [*|<]!
-; CHECK: da analyze - confused!
-; CHECK: da analyze - none!
-; CHECK: da analyze - confused!
-; CHECK: da analyze - none!
-
for.body: ; preds = %entry, %for.body
%i.02 = phi i64 [ 0, %entry ], [ %inc, %for.body ]
%B.addr.01 = phi ptr [ %B, %entry ], [ %incdec.ptr, %for.body ]
@@ -222,16 +262,23 @@ for.end: ; preds = %for.body
;; *B++ = A[2*i];
define void @weakzerosrc5(ptr %A, ptr %B, i64 %n) nounwind uwtable ssp {
+; CHECK-LABEL: 'weakzerosrc5'
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx, align 4 --> Dst: store i32 %conv, ptr %arrayidx, align 4
+; CHECK-NEXT: da analyze - consistent output [S]!
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx, align 4 --> Dst: %0 = load i32, ptr %arrayidx1, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx, align 4 --> Dst: store i32 %0, ptr %B.addr.01, align 4
+; CHECK-NEXT: da analyze - confused!
+; CHECK-NEXT: Src: %0 = load i32, ptr %arrayidx1, align 4 --> Dst: %0 = load i32, ptr %arrayidx1, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: %0 = load i32, ptr %arrayidx1, align 4 --> Dst: store i32 %0, ptr %B.addr.01, align 4
+; CHECK-NEXT: da analyze - confused!
+; CHECK-NEXT: Src: store i32 %0, ptr %B.addr.01, align 4 --> Dst: store i32 %0, ptr %B.addr.01, align 4
+; CHECK-NEXT: da analyze - none!
+;
entry:
br label %for.body
-; CHECK: da analyze - consistent output [S]!
-; CHECK: da analyze - none!
-; CHECK: da analyze - confused!
-; CHECK: da analyze - none!
-; CHECK: da analyze - confused!
-; CHECK: da analyze - none!
-
for.body: ; preds = %entry, %for.body
%i.02 = phi i64 [ 0, %entry ], [ %inc, %for.body ]
%B.addr.01 = phi ptr [ %B, %entry ], [ %incdec.ptr, %for.body ]
@@ -257,17 +304,24 @@ for.end: ; preds = %for.body
;; *B++ = A[3*i];
define void @weakzerosrc6(ptr %A, ptr %B, i64 %n) nounwind uwtable ssp {
+; CHECK-LABEL: 'weakzerosrc6'
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx, align 4 --> Dst: store i32 %conv, ptr %arrayidx, align 4
+; CHECK-NEXT: da analyze - consistent output [S]!
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx, align 4 --> Dst: %0 = load i32, ptr %arrayidx1, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx, align 4 --> Dst: store i32 %0, ptr %B.addr.02, align 4
+; CHECK-NEXT: da analyze - confused!
+; CHECK-NEXT: Src: %0 = load i32, ptr %arrayidx1, align 4 --> Dst: %0 = load i32, ptr %arrayidx1, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: %0 = load i32, ptr %arrayidx1, align 4 --> Dst: store i32 %0, ptr %B.addr.02, align 4
+; CHECK-NEXT: da analyze - confused!
+; CHECK-NEXT: Src: store i32 %0, ptr %B.addr.02, align 4 --> Dst: store i32 %0, ptr %B.addr.02, align 4
+; CHECK-NEXT: da analyze - none!
+;
entry:
%cmp1 = icmp eq i64 %n, 0
br i1 %cmp1, label %for.end, label %for.body.preheader
-; CHECK: da analyze - consistent output [S]!
-; CHECK: da analyze - none!
-; CHECK: da analyze - confused!
-; CHECK: da analyze - none!
-; CHECK: da analyze - confused!
-; CHECK: da analyze - none!
-
for.body.preheader: ; preds = %entry
br label %for.body
diff --git a/llvm/test/Analysis/DependenceAnalysis/ZIV.ll b/llvm/test/Analysis/DependenceAnalysis/ZIV.ll
index cef88a0b3e6b14..d3d5da7bded522 100644
--- a/llvm/test/Analysis/DependenceAnalysis/ZIV.ll
+++ b/llvm/test/Analysis/DependenceAnalysis/ZIV.ll
@@ -1,3 +1,4 @@
+; NOTE: Assertions have been autogenerated by utils/update_analyze_test_checks.py UTC_ARGS: --version 5
; RUN: opt < %s -disable-output "-passes=print<da>" -aa-pipeline=basic-aa 2>&1 \
; RUN: | FileCheck %s
@@ -10,18 +11,24 @@ target triple = "x86_64-apple-macosx10.6.0"
;; *B = A[1 + n];
define void @z0(ptr %A, ptr %B, i64 %n) nounwind uwtable ssp {
+; CHECK-LABEL: 'z0'
+; CHECK-NEXT: Src: store i32 0, ptr %arrayidx, align 4 --> Dst: store i32 0, ptr %arrayidx, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: store i32 0, ptr %arrayidx, align 4 --> Dst: %0 = load i32, ptr %arrayidx2, align 4
+; CHECK-NEXT: da analyze - consistent flow [|<]!
+; CHECK-NEXT: Src: store i32 0, ptr %arrayidx, align 4 --> Dst: store i32 %0, ptr %B, align 4
+; CHECK-NEXT: da analyze - confused!
+; CHECK-NEXT: Src: %0 = load i32, ptr %arrayidx2, align 4 --> Dst: %0 = load i32, ptr %arrayidx2, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: %0 = load i32, ptr %arrayidx2, align 4 --> Dst: store i32 %0, ptr %B, align 4
+; CHECK-NEXT: da analyze - confused!
+; CHECK-NEXT: Src: store i32 %0, ptr %B, align 4 --> Dst: store i32 %0, ptr %B, align 4
+; CHECK-NEXT: da analyze - none!
+;
entry:
%add = add i64 %n, 1
%arrayidx = getelementptr inbounds i32, ptr %A, i64 %add
store i32 0, ptr %arrayidx, align 4
-
-; CHECK: da analyze - none!
-; CHECK: da analyze - consistent flow [|<]!
-; CHECK: da analyze - confused!
-; CHECK: da analyze - none!
-; CHECK: da analyze - confused!
-; CHECK: da analyze - none!
-
%add1 = add i64 %n, 1
%arrayidx2 = getelementptr inbounds i32, ptr %A, i64 %add1
%0 = load i32, ptr %arrayidx2, align 4
@@ -34,17 +41,23 @@ entry:
;; *B = A[n + 1];
define void @z1(ptr %A, ptr %B, i64 %n) nounwind uwtable ssp {
+; CHECK-LABEL: 'z1'
+; CHECK-NEXT: Src: store i32 0, ptr %arrayidx, align 4 --> Dst: store i32 0, ptr %arrayidx, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: store i32 0, ptr %arrayidx, align 4 --> Dst: %0 = load i32, ptr %arrayidx1, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: store i32 0, ptr %arrayidx, align 4 --> Dst: store i32 %0, ptr %B, align 4
+; CHECK-NEXT: da analyze - confused!
+; CHECK-NEXT: Src: %0 = load i32, ptr %arrayidx1, align 4 --> Dst: %0 = load i32, ptr %arrayidx1, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: %0 = load i32, ptr %arrayidx1, align 4 --> Dst: store i32 %0, ptr %B, align 4
+; CHECK-NEXT: da analyze - confused!
+; CHECK-NEXT: Src: store i32 %0, ptr %B, align 4 --> Dst: store i32 %0, ptr %B, align 4
+; CHECK-NEXT: da analyze - none!
+;
entry:
%arrayidx = getelementptr inbounds i32, ptr %A, i64 %n
store i32 0, ptr %arrayidx, align 4
-
-; CHECK: da analyze - none!
-; CHECK: da analyze - none!
-; CHECK: da analyze - confused!
-; CHECK: da analyze - none!
-; CHECK: da analyze - confused!
-; CHECK: da analyze - none!
-
%add = add i64 %n, 1
%arrayidx1 = getelementptr inbounds i32, ptr %A, i64 %add
%0 = load i32, ptr %arrayidx1, align 4
@@ -57,17 +70,23 @@ entry:
;; *B = A[m];
define void @z2(ptr %A, ptr %B, i64 %n, i64 %m) nounwind uwtable ssp {
+; CHECK-LABEL: 'z2'
+; CHECK-NEXT: Src: store i32 0, ptr %arrayidx, align 4 --> Dst: store i32 0, ptr %arrayidx, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: store i32 0, ptr %arrayidx, align 4 --> Dst: %0 = load i32, ptr %arrayidx1, align 4
+; CHECK-NEXT: da analyze - flow [|<]!
+; CHECK-NEXT: Src: store i32 0, ptr %arrayidx, align 4 --> Dst: store i32 %0, ptr %B, align 4
+; CHECK-NEXT: da analyze - confused!
+; CHECK-NEXT: Src: %0 = load i32, ptr %arrayidx1, align 4 --> Dst: %0 = load i32, ptr %arrayidx1, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: %0 = load i32, ptr %arrayidx1, align 4 --> Dst: store i32 %0, ptr %B, align 4
+; CHECK-NEXT: da analyze - confused!
+; CHECK-NEXT: Src: store i32 %0, ptr %B, align 4 --> Dst: store i32 %0, ptr %B, align 4
+; CHECK-NEXT: da analyze - none!
+;
entry:
%arrayidx = getelementptr inbounds i32, ptr %A, i64 %n
store i32 0, ptr %arrayidx, align 4
-
-; CHECK: da analyze - none!
-; CHECK: da analyze - flow [|<]!
-; CHECK: da analyze - confused!
-; CHECK: da analyze - none!
-; CHECK: da analyze - confused!
-; CHECK: da analyze - none!
-
%arrayidx1 = getelementptr inbounds i32, ptr %A, i64 %m
%0 = load i32, ptr %arrayidx1, align 4
store i32 %0, ptr %B, align 4
diff --git a/llvm/test/Analysis/DependenceAnalysis/lcssa.ll b/llvm/test/Analysis/DependenceAnalysis/lcssa.ll
index 1e65f87920258a..ffba9fcb98903f 100644
--- a/llvm/test/Analysis/DependenceAnalysis/lcssa.ll
+++ b/llvm/test/Analysis/DependenceAnalysis/lcssa.ll
@@ -1,10 +1,16 @@
+; NOTE: Assertions have been autogenerated by utils/update_analyze_test_checks.py UTC_ARGS: --version 5
; RUN: opt < %s -disable-output "-passes=print<da>" \
; RUN: "-aa-pipeline=basic-aa,tbaa" 2>&1 | FileCheck %s
-; CHECK: Src: %v = load i32, ptr %arrayidx1, align 4 --> Dst: store i32 %add, ptr %a.lcssa, align 4
-; CHECK-NEXT: da analyze - anti [*|<]!
-
define void @f(ptr %a, i32 %n, i64 %n2) {
+; CHECK-LABEL: 'f'
+; CHECK-NEXT: Src: %v = load i32, ptr %arrayidx1, align 4 --> Dst: %v = load i32, ptr %arrayidx1, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: %v = load i32, ptr %arrayidx1, align 4 --> Dst: store i32 %add, ptr %a.lcssa, align 4
+; CHECK-NEXT: da analyze - anti [*|<]!
+; CHECK-NEXT: Src: store i32 %add, ptr %a.lcssa, align 4 --> Dst: store i32 %add, ptr %a.lcssa, align 4
+; CHECK-NEXT: da analyze - consistent output [S]!
+;
entry:
br label %while.body
diff --git a/llvm/test/Analysis/DependenceAnalysis/new-pm-invalidation.ll b/llvm/test/Analysis/DependenceAnalysis/new-pm-invalidation.ll
index 37bd5243803d04..6db288f367ca35 100644
--- a/llvm/test/Analysis/DependenceAnalysis/new-pm-invalidation.ll
+++ b/llvm/test/Analysis/DependenceAnalysis/new-pm-invalidation.ll
@@ -1,15 +1,22 @@
+; NOTE: Assertions have been autogenerated by utils/update_analyze_test_checks.py UTC_ARGS: --version 5
; RUN: opt < %s -passes='require<da>,invalidate<scalar-evolution>,print<da>' \
; RUN: -disable-output -debug-pass-manager 2>&1 | FileCheck %s
-; CHECK: Running analysis: DependenceAnalysis on test_no_noalias
-; CHECK: Running analysis: ScalarEvolutionAnalysis on test_no_noalias
-; CHECK: Invalidating analysis: ScalarEvolutionAnalysis on test_no_noalias
-; CHECK: Invalidating analysis: DependenceAnalysis on test_no_noalias
-; CHECK: Running analysis: DependenceAnalysis on test_no_noalias
-; CHECK: da analyze - none!
-; CHECK: da analyze - confused!
-; CHECK: da analyze - none!
define void @test_no_noalias(ptr %A, ptr %B) {
+; CHECK-LABEL: 'test_no_noalias'
+; CHECK-NEXT: Running analysis: DependenceAnalysis on test_no_noalias
+; CHECK-NEXT: Running analysis: ScalarEvolutionAnalysis on test_no_noalias
+; CHECK-NEXT: Src: store i32 1, ptr %A, align 4 --> Dst: store i32 1, ptr %A, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: store i32 1, ptr %A, align 4 --> Dst: store i32 2, ptr %B, align 4
+; CHECK-NEXT: da analyze - confused!
+; CHECK-NEXT: Src: store i32 2, ptr %B, align 4 --> Dst: store i32 2, ptr %B, align 4
+; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Invalidating analysis: ScalarEvolutionAnalysis on test_no_noalias
+; CHECK-NEXT: Invalidating analysis: DependenceAnalysis on test_no_noalias
+; CHECK-NEXT: Running pass: VerifierPass on [module]
+; CHECK-NEXT: Running analysis: VerifierAnalysis on [module]
+;
store i32 1, ptr %A
store i32 2, ptr %B
ret void
diff --git a/llvm/utils/UpdateTestChecks/common.py b/llvm/utils/UpdateTestChecks/common.py
index b108a21dbc52b8..ead406a3abd318 100644
--- a/llvm/utils/UpdateTestChecks/common.py
+++ b/llvm/utils/UpdateTestChecks/common.py
@@ -35,6 +35,7 @@
SUPPORTED_ANALYSES = {
"Branch Probability Analysis",
"Cost Model Analysis",
+ "Dependence Analysis",
"Loop Access Analysis",
"Scalar Evolution Analysis",
}
>From 000e161e24c420add4fd1288c4cd912d96f492e7 Mon Sep 17 00:00:00 2001
From: Sebastian Pop <spop at nvidia.com>
Date: Sat, 18 Jan 2025 02:14:32 +0000
Subject: [PATCH 2/2] [DA] update test to not use undef
---
.../DependenceAnalysis/MIVCheckConst.ll | 22 +++++++++----------
1 file changed, 11 insertions(+), 11 deletions(-)
diff --git a/llvm/test/Analysis/DependenceAnalysis/MIVCheckConst.ll b/llvm/test/Analysis/DependenceAnalysis/MIVCheckConst.ll
index b0f2d0f5ea0dce..fa58a81d2355b2 100644
--- a/llvm/test/Analysis/DependenceAnalysis/MIVCheckConst.ll
+++ b/llvm/test/Analysis/DependenceAnalysis/MIVCheckConst.ll
@@ -30,14 +30,14 @@ target datalayout = "e-m:e-p:32:32-i1:32-i64:64-a:0-v32:32-n16:32"
%20 = type { [768 x i32] }
%21 = type { [416 x i32] }
-define void @test(ptr %A, i1 %arg) #0 align 2 {
+define void @test(ptr %A, ptr %B, i1 %arg, i32 %n, i32 %m) #0 align 2 {
; CHECK-LABEL: 'test'
-; CHECK-NEXT: Src: %v1 = load i32, ptr undef, align 4 --> Dst: %v1 = load i32, ptr undef, align 4
-; CHECK-NEXT: da analyze - none!
-; CHECK-NEXT: Src: %v1 = load i32, ptr undef, align 4 --> Dst: %v27 = load <32 x i32>, ptr %v25, align 256
-; CHECK-NEXT: da analyze - none!
-; CHECK-NEXT: Src: %v1 = load i32, ptr undef, align 4 --> Dst: %v32 = load <32 x i32>, ptr %v30, align 128
+; CHECK-NEXT: Src: %v1 = load i32, ptr %B, align 4 --> Dst: %v1 = load i32, ptr %B, align 4
; CHECK-NEXT: da analyze - none!
+; CHECK-NEXT: Src: %v1 = load i32, ptr %B, align 4 --> Dst: %v27 = load <32 x i32>, ptr %v25, align 256
+; CHECK-NEXT: da analyze - confused!
+; CHECK-NEXT: Src: %v1 = load i32, ptr %B, align 4 --> Dst: %v32 = load <32 x i32>, ptr %v30, align 128
+; CHECK-NEXT: da analyze - confused!
; CHECK-NEXT: Src: %v27 = load <32 x i32>, ptr %v25, align 256 --> Dst: %v27 = load <32 x i32>, ptr %v25, align 256
; CHECK-NEXT: da analyze - consistent input [0 S S]!
; CHECK-NEXT: Src: %v27 = load <32 x i32>, ptr %v25, align 256 --> Dst: %v32 = load <32 x i32>, ptr %v30, align 128
@@ -46,27 +46,27 @@ define void @test(ptr %A, i1 %arg) #0 align 2 {
; CHECK-NEXT: da analyze - consistent input [0 S S]!
;
entry:
- %v1 = load i32, ptr undef, align 4
+ %v1 = load i32, ptr %B, align 4
br label %bb13
bb13:
- %v2 = phi i32 [ undef, %entry ], [ %v39, %bb38 ]
+ %v2 = phi i32 [ 0, %entry ], [ %v39, %bb38 ]
br i1 %arg, label %bb15, label %bb38
bb15:
- %v3 = mul nsw i32 %v2, undef
+ %v3 = mul nsw i32 %v2, 2
br label %bb17
bb17:
br i1 %arg, label %bb21, label %bb37
bb21:
- %v22 = add nsw i32 undef, 1
+ %v22 = add nsw i32 %n, 1
%v23 = add i32 %v22, %v3
%v24 = mul nsw i32 %v23, %v1
%v25 = getelementptr inbounds %1, ptr %A, i32 0, i32 7, i32 1, i32 %v24
%v27 = load <32 x i32>, ptr %v25, align 256
- %v28 = add i32 undef, %v3
+ %v28 = add i32 %m, %v3
%v29 = mul nsw i32 %v28, 32
%v30 = getelementptr inbounds %1, ptr %A, i32 0, i32 7, i32 14, i32 %v29
%v32 = load <32 x i32>, ptr %v30, align 128
More information about the llvm-commits
mailing list