summaryrefslogtreecommitdiff
path: root/test/Analysis/TypeBasedAliasAnalysis
diff options
context:
space:
mode:
authorChad Rosier <mcrosier@codeaurora.org>2014-11-14 21:09:13 +0000
committerChad Rosier <mcrosier@codeaurora.org>2014-11-14 21:09:13 +0000
commit1523db7c64186226317a9e5baecfbde8eb04c580 (patch)
tree0bd66f062b03f6884d56074e0cd5c970cc01e49b /test/Analysis/TypeBasedAliasAnalysis
parent6536b834f864aed3abb866718457602e4f4336cb (diff)
Reapply r221924: "[GVN] Perform Scalar PRE on gep indices that feed loads before
doing Load PRE" This commit updates the failing test in Analysis/TypeBasedAliasAnalysis/gvn-nonlocal-type-mismatch.ll The failing test is sensitive to the order in which we process loads. This version turns on the RPO traversal instead of the while DT traversal in GVN. The new test code is functionally same just the order of loads that are eliminated is swapped. This new version also fixes an issue where GVN splits a critical edge and potentially invalidate the RPO/DT iterator. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222039 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Analysis/TypeBasedAliasAnalysis')
-rw-r--r--test/Analysis/TypeBasedAliasAnalysis/gvn-nonlocal-type-mismatch.ll14
1 files changed, 7 insertions, 7 deletions
diff --git a/test/Analysis/TypeBasedAliasAnalysis/gvn-nonlocal-type-mismatch.ll b/test/Analysis/TypeBasedAliasAnalysis/gvn-nonlocal-type-mismatch.ll
index 90e1abbb673..07bbad2fcda 100644
--- a/test/Analysis/TypeBasedAliasAnalysis/gvn-nonlocal-type-mismatch.ll
+++ b/test/Analysis/TypeBasedAliasAnalysis/gvn-nonlocal-type-mismatch.ll
@@ -46,12 +46,12 @@ entry:
br i1 %c, label %if.else, label %if.then
if.then:
- %t = load i32* %p, !tbaa !4
+ %t = load i32* %p, !tbaa !3
store i32 %t, i32* %q
ret void
if.else:
- %u = load i32* %p, !tbaa !3
+ %u = load i32* %p, !tbaa !4
store i32 %u, i32* %q
ret void
}
@@ -61,11 +61,11 @@ if.else:
; CHECK: @watch_out_for_another_type_change
; CHECK: if.then:
-; CHECK: %t = load i32* %p
-; CHECK: store i32 %t, i32* %q
+; CHECK: store i32 0, i32* %q
; CHECK: ret void
; CHECK: if.else:
-; CHECK: store i32 0, i32* %q
+; CHECK: %u = load i32* %p
+; CHECK: store i32 %u, i32* %q
define void @watch_out_for_another_type_change(i1 %c, i32* %p, i32* %p1, i32* %q) nounwind {
entry:
@@ -74,12 +74,12 @@ entry:
br i1 %c, label %if.else, label %if.then
if.then:
- %t = load i32* %p, !tbaa !3
+ %t = load i32* %p, !tbaa !4
store i32 %t, i32* %q
ret void
if.else:
- %u = load i32* %p, !tbaa !4
+ %u = load i32* %p, !tbaa !3
store i32 %u, i32* %q
ret void
}