diff options
author | Chris Lattner <sabre@nondot.org> | 2009-12-06 01:47:24 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2009-12-06 01:47:24 +0000 |
commit | f616ee289591dc82776ce5644c8e536578b35302 (patch) | |
tree | af43ecd5992c81c2adce1b7c8e4b90cb62fe719c /test | |
parent | c595e6ca0a889ab51efe7a1c8109f8e96d9d4869 (diff) | |
download | external_llvm-f616ee289591dc82776ce5644c8e536578b35302.zip external_llvm-f616ee289591dc82776ce5644c8e536578b35302.tar.gz external_llvm-f616ee289591dc82776ce5644c8e536578b35302.tar.bz2 |
merge two tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90691 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test')
-rw-r--r-- | test/Transforms/GVN/rle-dominated.ll | 20 | ||||
-rw-r--r-- | test/Transforms/GVN/rle.ll | 25 |
2 files changed, 25 insertions, 20 deletions
diff --git a/test/Transforms/GVN/rle-dominated.ll b/test/Transforms/GVN/rle-dominated.ll deleted file mode 100644 index e86f592..0000000 --- a/test/Transforms/GVN/rle-dominated.ll +++ /dev/null @@ -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 -} diff --git a/test/Transforms/GVN/rle.ll b/test/Transforms/GVN/rle.ll index ef34a36..71eb194 100644 --- a/test/Transforms/GVN/rle.ll +++ b/test/Transforms/GVN/rle.ll @@ -279,6 +279,31 @@ Cont: ; 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 |