Have some testcases
[oota-llvm.git] / test / Analysis / GlobalsModRef / modreftest.ll
diff --git a/test/Analysis/GlobalsModRef/modreftest.ll b/test/Analysis/GlobalsModRef/modreftest.ll
new file mode 100644 (file)
index 0000000..a08eef1
--- /dev/null
@@ -0,0 +1,13 @@
+; RUN: llvm-as < %s | opt -globalsmodref-aa -load-vn -gcse | llvm-dis | not grep load
+%X = internal global int 4
+
+int %test(int *%P) {
+  store int 12,  int* %X
+  call void %doesnotmodX()
+  %V = load int* %X
+  ret int %V
+}
+
+void %doesnotmodX() {
+  ret void
+}