summaryrefslogtreecommitdiffstats
path: root/llvm/test/Analysis/DependenceAnalysis/WeakZeroDstSIV.ll
diff options
context:
space:
mode:
authorDavid Green <david.green@arm.com>2018-05-31 14:55:29 +0000
committerDavid Green <david.green@arm.com>2018-05-31 14:55:29 +0000
commit2911b3a07a7b087fc9f3793c5a4bb2c719457306 (patch)
treedd5290ebeff8f0a93ac7172ce2fda62a5f445841 /llvm/test/Analysis/DependenceAnalysis/WeakZeroDstSIV.ll
parent6995821e900d3dfa08a8b8f5be3ce4ce70fb3629 (diff)
downloadbcm5719-llvm-2911b3a07a7b087fc9f3793c5a4bb2c719457306.tar.gz
bcm5719-llvm-2911b3a07a7b087fc9f3793c5a4bb2c719457306.zip
[DA] Fix direction vectors for weakZeroSrcSIV
Both weakZeroSrcSIV and weakZeroDstSIV are currently giving the same direction vectors. Fix weakZeroSrcSIVtest by flipping the directions it gives. Differential Revision: https://reviews.llvm.org/D46678 llvm-svn: 333658
Diffstat (limited to 'llvm/test/Analysis/DependenceAnalysis/WeakZeroDstSIV.ll')
-rw-r--r--llvm/test/Analysis/DependenceAnalysis/WeakZeroDstSIV.ll29
1 files changed, 29 insertions, 0 deletions
diff --git a/llvm/test/Analysis/DependenceAnalysis/WeakZeroDstSIV.ll b/llvm/test/Analysis/DependenceAnalysis/WeakZeroDstSIV.ll
index 8adb7f7b32d..128eb47018a 100644
--- a/llvm/test/Analysis/DependenceAnalysis/WeakZeroDstSIV.ll
+++ b/llvm/test/Analysis/DependenceAnalysis/WeakZeroDstSIV.ll
@@ -5,6 +5,35 @@ target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f3
target triple = "x86_64-apple-macosx10.6.0"
+;; for (int i = 0; i < N; i++) {
+;; A[i] = 1;
+;; A[0] = 2;
+
+define void @dstzero(i32* nocapture %A, i32 %N) {
+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, i32* %A, i32 %i.07
+ store i32 0, i32* %arrayidx, align 4
+ store i32 1, i32* %A, align 4
+ %add = add nuw nsw i32 %i.07, 1
+ %exitcond = icmp eq i32 %add, %N
+ br i1 %exitcond, label %for.cond.cleanup, label %for.body
+
+for.cond.cleanup: ; preds = %for.body, %entry
+ ret void
+}
+
+
+
+
;; for (long unsigned i = 0; i < 30; i++) {
;; A[2*i + 10] = i;
;; *B++ = A[10];
OpenPOWER on IntegriCloud