aboutsummaryrefslogtreecommitdiffstats
path: root/test/Analysis/LoadVN
diff options
context:
space:
mode:
Diffstat (limited to 'test/Analysis/LoadVN')
-rw-r--r--test/Analysis/LoadVN/RLE-Eliminate.ll25
-rw-r--r--test/Analysis/LoadVN/RLE-Preserve-Volatile.ll8
-rw-r--r--test/Analysis/LoadVN/RLE-Preserve.ll26
-rw-r--r--test/Analysis/LoadVN/call_cse.ll12
-rw-r--r--test/Analysis/LoadVN/call_pure_function.ll14
-rw-r--r--test/Analysis/LoadVN/casts.ll13
-rw-r--r--test/Analysis/LoadVN/dependent_loads.ll25
-rw-r--r--test/Analysis/LoadVN/dg.exp3
-rw-r--r--test/Analysis/LoadVN/undefined_load.ll14
9 files changed, 0 insertions, 140 deletions
diff --git a/test/Analysis/LoadVN/RLE-Eliminate.ll b/test/Analysis/LoadVN/RLE-Eliminate.ll
deleted file mode 100644
index ad9ba5e..0000000
--- a/test/Analysis/LoadVN/RLE-Eliminate.ll
+++ /dev/null
@@ -1,25 +0,0 @@
-; This testcase ensures that redundant loads are eliminated when they should
-; be. All RL variables (redundant loads) should be eliminated.
-;
-; RUN: llvm-as < %s | opt -load-vn -gcse | llvm-dis | not grep %RL
-;
-
-define i32 @test1(i32* %P) {
- %A = load i32* %P ; <i32> [#uses=1]
- %RL = load i32* %P ; <i32> [#uses=1]
- %C = add i32 %A, %RL ; <i32> [#uses=1]
- ret i32 %C
-}
-
-define i32 @test2(i32* %P) {
- %A = load i32* %P ; <i32> [#uses=1]
- br label %BB2
-
-BB2: ; preds = %0
- br label %BB3
-
-BB3: ; preds = %BB2
- %RL = load i32* %P ; <i32> [#uses=1]
- %B = add i32 %A, %RL ; <i32> [#uses=1]
- ret i32 %B
-}
diff --git a/test/Analysis/LoadVN/RLE-Preserve-Volatile.ll b/test/Analysis/LoadVN/RLE-Preserve-Volatile.ll
deleted file mode 100644
index 52968ea..0000000
--- a/test/Analysis/LoadVN/RLE-Preserve-Volatile.ll
+++ /dev/null
@@ -1,8 +0,0 @@
-; RUN: llvm-as < %s | opt -load-vn -gcse -instcombine | llvm-dis | grep sub
-
-define i32 @test(i32* %P) {
- %X = volatile load i32* %P ; <i32> [#uses=1]
- %Y = volatile load i32* %P ; <i32> [#uses=1]
- %Z = sub i32 %X, %Y ; <i32> [#uses=1]
- ret i32 %Z
-}
diff --git a/test/Analysis/LoadVN/RLE-Preserve.ll b/test/Analysis/LoadVN/RLE-Preserve.ll
deleted file mode 100644
index f2c0794..0000000
--- a/test/Analysis/LoadVN/RLE-Preserve.ll
+++ /dev/null
@@ -1,26 +0,0 @@
-; This testcase ensures that redundant loads are preserved when they are not
-; allowed to be eliminated.
-; RUN: llvm-as < %s | opt -load-vn -gcse | llvm-dis | grep sub
-;
-
-define i32 @test1(i32* %P) {
- %A = load i32* %P ; <i32> [#uses=1]
- store i32 1, i32* %P
- %B = load i32* %P ; <i32> [#uses=1]
- %C = sub i32 %A, %B ; <i32> [#uses=1]
- ret i32 %C
-}
-
-define i32 @test2(i32* %P) {
- %A = load i32* %P ; <i32> [#uses=1]
- br label %BB2
-
-BB2: ; preds = %0
- store i32 5, i32* %P
- br label %BB3
-
-BB3: ; preds = %BB2
- %B = load i32* %P ; <i32> [#uses=1]
- %C = sub i32 %A, %B ; <i32> [#uses=1]
- ret i32 %C
-}
diff --git a/test/Analysis/LoadVN/call_cse.ll b/test/Analysis/LoadVN/call_cse.ll
deleted file mode 100644
index b62300f..0000000
--- a/test/Analysis/LoadVN/call_cse.ll
+++ /dev/null
@@ -1,12 +0,0 @@
-; RUN: llvm-as < %s | opt -basicaa -load-vn -gcse -instcombine | llvm-dis | not grep sub
-
-declare i32 @strlen(i8*) readonly
-
-define i32 @test(i8* %P) {
- %X = call i32 @strlen( i8* %P ) readonly ; <i32> [#uses=2]
- %A = add i32 %X, 14 ; <i32> [#uses=1]
- %Y = call i32 @strlen( i8* %P ) readonly ; <i32> [#uses=1]
- %Z = sub i32 %X, %Y ; <i32> [#uses=1]
- %B = add i32 %A, %Z ; <i32> [#uses=1]
- ret i32 %B
-}
diff --git a/test/Analysis/LoadVN/call_pure_function.ll b/test/Analysis/LoadVN/call_pure_function.ll
deleted file mode 100644
index 8055c52..0000000
--- a/test/Analysis/LoadVN/call_pure_function.ll
+++ /dev/null
@@ -1,14 +0,0 @@
-; RUN: llvm-as < %s | opt -basicaa -load-vn -gcse -instcombine | llvm-dis | not grep sub
-
-declare i32 @strlen(i8*) readonly
-
-declare void @use(i32)
-
-define i8 @test(i8* %P, i8* %Q) {
- %A = load i8* %Q ; <i8> [#uses=1]
- %X = call i32 @strlen( i8* %P ) readonly ; <i32> [#uses=1]
- %B = load i8* %Q ; <i8> [#uses=1]
- call void @use( i32 %X )
- %C = sub i8 %A, %B ; <i8> [#uses=1]
- ret i8 %C
-}
diff --git a/test/Analysis/LoadVN/casts.ll b/test/Analysis/LoadVN/casts.ll
deleted file mode 100644
index 70e3fe5..0000000
--- a/test/Analysis/LoadVN/casts.ll
+++ /dev/null
@@ -1,13 +0,0 @@
-; Check to make sure that Value Numbering doesn't merge casts of different
-; flavors.
-; RUN: llvm-as < %s | opt -load-vn -gcse | llvm-dis | \
-; RUN: grep {\[sz\]ext} | count 2
-
-declare void @external(i32)
-
-define i32 @test_casts(i16 %x) {
- %a = sext i16 %x to i32 ; <i32> [#uses=1]
- %b = zext i16 %x to i32 ; <i32> [#uses=1]
- call void @external( i32 %a )
- ret i32 %b
-}
diff --git a/test/Analysis/LoadVN/dependent_loads.ll b/test/Analysis/LoadVN/dependent_loads.ll
deleted file mode 100644
index 1338a49..0000000
--- a/test/Analysis/LoadVN/dependent_loads.ll
+++ /dev/null
@@ -1,25 +0,0 @@
-; RUN: llvm-as < %s | opt -basicaa -load-vn -gcse -instcombine | \
-; RUN: llvm-dis | not grep sub
-
-%S = type { i32, i8 }
-
-define i8 @test(i8** %P) {
- %A = load i8** %P ; <i8*> [#uses=1]
- %B = load i8* %A ; <i8> [#uses=1]
- %X = load i8** %P ; <i8*> [#uses=1]
- %Y = load i8* %X ; <i8> [#uses=1]
- %R = sub i8 %B, %Y ; <i8> [#uses=1]
- ret i8 %R
-}
-
-define i8 @test1(%S** %P) {
- %A = load %S** %P ; <%S*> [#uses=1]
- %B = getelementptr %S* %A, i32 0, i32 1 ; <i8*> [#uses=1]
- %C = load i8* %B ; <i8> [#uses=1]
- %X = load %S** %P ; <%S*> [#uses=1]
- %Y = getelementptr %S* %X, i32 0, i32 1 ; <i8*> [#uses=1]
- %Z = load i8* %Y ; <i8> [#uses=1]
- %R = sub i8 %C, %Z ; <i8> [#uses=1]
- ret i8 %R
-}
-
diff --git a/test/Analysis/LoadVN/dg.exp b/test/Analysis/LoadVN/dg.exp
deleted file mode 100644
index f200589..0000000
--- a/test/Analysis/LoadVN/dg.exp
+++ /dev/null
@@ -1,3 +0,0 @@
-load_lib llvm.exp
-
-RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,c,cpp}]]
diff --git a/test/Analysis/LoadVN/undefined_load.ll b/test/Analysis/LoadVN/undefined_load.ll
deleted file mode 100644
index ba6049e..0000000
--- a/test/Analysis/LoadVN/undefined_load.ll
+++ /dev/null
@@ -1,14 +0,0 @@
-; RUN: llvm-as < %s | opt -load-vn -gcse | llvm-dis | not grep load
-; Test that loads of undefined memory are eliminated.
-
-define i32 @test1() {
- %X = malloc i32 ; <i32*> [#uses=1]
- %Y = load i32* %X ; <i32> [#uses=1]
- ret i32 %Y
-}
-
-define i32 @test2() {
- %X = alloca i32 ; <i32*> [#uses=1]
- %Y = load i32* %X ; <i32> [#uses=1]
- ret i32 %Y
-}