new testcase for a -basicaa bug that Alkis found with Java.
authorChris Lattner <sabre@nondot.org>
Wed, 9 Mar 2005 16:29:22 +0000 (16:29 +0000)
committerChris Lattner <sabre@nondot.org>
Wed, 9 Mar 2005 16:29:22 +0000 (16:29 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20530 91177308-0d34-0410-b5e6-96231b3b80d8

test/Analysis/BasicAA/2005-03-09-BrokenBasicAA.ll [new file with mode: 0644]

diff --git a/test/Analysis/BasicAA/2005-03-09-BrokenBasicAA.ll b/test/Analysis/BasicAA/2005-03-09-BrokenBasicAA.ll
new file mode 100644 (file)
index 0000000..7560143
--- /dev/null
@@ -0,0 +1,14 @@
+; RUN: llvm-as < %s | opt -basicaa -load-vn -gcse -instcombine | llvm-dis | grep 'load int\* %A'
+
+declare double* %useit(int*)
+
+int %foo(uint %Amt) {
+       %A = malloc int, uint %Amt
+       %P = call double*  %useit(int* %A)
+
+       %X = load int* %A
+       store double 0.0, double* %P
+       %Y = load int* %A
+       %Z = sub int %X, %Y
+       ret int %Z
+}