[llvm-commits] [llvm] r90691 - in /llvm/trunk/test/Transforms/GVN: rle-dominated.ll rle.ll
Chris Lattner
sabre at nondot.org
Sat Dec 5 17:47:24 PST 2009
Author: lattner
Date: Sat Dec 5 19:47:24 2009
New Revision: 90691
URL: http://llvm.org/viewvc/llvm-project?rev=90691&view=rev
Log:
merge two tests.
Removed:
llvm/trunk/test/Transforms/GVN/rle-dominated.ll
Modified:
llvm/trunk/test/Transforms/GVN/rle.ll
Removed: llvm/trunk/test/Transforms/GVN/rle-dominated.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/GVN/rle-dominated.ll?rev=90690&view=auto
==============================================================================
--- llvm/trunk/test/Transforms/GVN/rle-dominated.ll (original)
+++ llvm/trunk/test/Transforms/GVN/rle-dominated.ll (removed)
@@ -1,20 +0,0 @@
-; RUN: opt < %s -gvn -S | grep load | count 2
-
-define i32 @main(i32** %p) {
-block1:
- %z = load i32** %p
- br i1 true, label %block2, label %block3
-
-block2:
- %a = load i32** %p
- br label %block4
-
-block3:
- %b = load i32** %p
- br label %block4
-
-block4:
- %c = load i32** %p
- %d = load i32* %c
- ret i32 %d
-}
Modified: llvm/trunk/test/Transforms/GVN/rle.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/GVN/rle.ll?rev=90691&r1=90690&r2=90691&view=diff
==============================================================================
--- llvm/trunk/test/Transforms/GVN/rle.ll (original)
+++ llvm/trunk/test/Transforms/GVN/rle.ll Sat Dec 5 19:47:24 2009
@@ -279,6 +279,31 @@
; CHECK: ret i8 %A
}
+define i32 @chained_load(i32** %p) {
+block1:
+ %z = load i32** %p
+ br i1 true, label %block2, label %block3
+
+block2:
+ %a = load i32** %p
+ br label %block4
+
+block3:
+ %b = load i32** %p
+ br label %block4
+
+block4:
+ %c = load i32** %p
+ %d = load i32* %c
+ ret i32 %d
+
+; CHECK: @chained_load
+; CHECK: %z = load i32** %p
+; CHECK-NOT: load
+; CHECK: %d = load i32* %z
+; CHECK-NEXT: ret i32 %d
+}
+
declare i1 @cond() readonly
declare i1 @cond2() readonly
More information about the llvm-commits
mailing list