New testcase
authorChris Lattner <sabre@nondot.org>
Sun, 29 Jun 2003 01:03:53 +0000 (01:03 +0000)
committerChris Lattner <sabre@nondot.org>
Sun, 29 Jun 2003 01:03:53 +0000 (01:03 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6975 91177308-0d34-0410-b5e6-96231b3b80d8

test/Analysis/DSGraph/incompletenode.ll [new file with mode: 0644]

diff --git a/test/Analysis/DSGraph/incompletenode.ll b/test/Analysis/DSGraph/incompletenode.ll
new file mode 100644 (file)
index 0000000..44934a2
--- /dev/null
@@ -0,0 +1,23 @@
+; This test is failing because the globals X and Y are marked incomplete
+; in the TD graph for %test
+
+; RUN: as < %s | opt -no-aa -ds-aa -load-vn -gcse | dis | not grep seteq
+
+%X = internal global int 20
+%Y = internal global int* null
+
+implementation
+
+bool %test(int** %P) { 
+  %A = load int** %P              ;; We know P == Y!
+  %B = load int** %Y              ;; B = A
+  %c = seteq int* %A, %B          ;; Always true
+  ret bool %c
+}
+
+int %main() {
+       store int* %X, int** %Y
+       call bool %test(int** %Y)
+       ret int 0
+}
+