Have some testcases

llvm-svn: 15258
This commit is contained in:
Chris Lattner 2004-07-27 06:26:08 +00:00
parent cf146d4e6e
commit e30d3c8292
2 changed files with 22 additions and 0 deletions

View File

@ -0,0 +1,9 @@
; 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 7, int* %P
store int 12, int* %X ;; cannot alias P, X's addr isn't taken
%V = load int* %P
ret int %V
}

View File

@ -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
}