new testcase
authorChris Lattner <sabre@nondot.org>
Sun, 11 Apr 2004 16:47:15 +0000 (16:47 +0000)
committerChris Lattner <sabre@nondot.org>
Sun, 11 Apr 2004 16:47:15 +0000 (16:47 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12832 91177308-0d34-0410-b5e6-96231b3b80d8

test/Analysis/LoadVN/dependent_loads.ll [new file with mode: 0644]

diff --git a/test/Analysis/LoadVN/dependent_loads.ll b/test/Analysis/LoadVN/dependent_loads.ll
new file mode 100644 (file)
index 0000000..97c6e95
--- /dev/null
@@ -0,0 +1,12 @@
+; RUN: llvm-as < %s | opt -basicaa -load-vn -gcse -instcombine | llvm-dis | not grep sub
+
+sbyte %test(sbyte** %P) {
+       %A = load sbyte** %P
+       %B = load sbyte* %A
+
+       %X = load sbyte** %P
+       %Y = load sbyte* %X
+
+       %R = sub sbyte %B, %Y
+       ret sbyte %R
+}