aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2003-06-28 23:52:34 +0000
committerChris Lattner <sabre@nondot.org>2003-06-28 23:52:34 +0000
commit9e762d0cd14604b5b9568c7ae5184a69d1207836 (patch)
tree5cd25bba088239f73b08d6e30674e41bf97b7453
parent202f2eab90a7f1dc5cd219874f7f3ad3ae89ea95 (diff)
New testcase
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6969 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--test/Analysis/DSGraph/mustalias.ll17
1 files changed, 17 insertions, 0 deletions
diff --git a/test/Analysis/DSGraph/mustalias.ll b/test/Analysis/DSGraph/mustalias.ll
new file mode 100644
index 0000000000..349377cd3d
--- /dev/null
+++ b/test/Analysis/DSGraph/mustalias.ll
@@ -0,0 +1,17 @@
+; Test that ds-aa is returning must-alias information when it can.
+
+; RUN: as < %s | opt -no-aa -ds-aa -load-vn -gcse | dis | not grep load
+
+%X = global int 20
+
+implementation
+
+int* %id(int* %P) { ret int* %P }
+
+int %main() {
+ store int 0, int* %X
+ %XP = call int* %id(int* %X)
+ %A = load int* %XP ; Should eliminate load!
+ ret int %A
+}
+