mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-14 16:33:28 +00:00
Test the mod/ref analysis in DSA.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12333 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
4230f40add
commit
a24653cdfc
13
test/Analysis/DSGraph/2004-03-10-ElimLoad.ll
Normal file
13
test/Analysis/DSGraph/2004-03-10-ElimLoad.ll
Normal file
@ -0,0 +1,13 @@
|
||||
; RUN: llvm-as < %s | opt -ds-aa -load-vn -gcse -instcombine | llvm-dis | not grep sub
|
||||
|
||||
void %bar(int* %p) {
|
||||
ret void
|
||||
}
|
||||
|
||||
int %foo(int* %a) {
|
||||
%b = load int* %a
|
||||
call void %bar(int* %a)
|
||||
%d = load int* %a
|
||||
%e = sub int %b, %d
|
||||
ret int %e
|
||||
}
|
14
test/Analysis/DSGraph/2004-03-10-NoElimLoad.ll
Normal file
14
test/Analysis/DSGraph/2004-03-10-NoElimLoad.ll
Normal file
@ -0,0 +1,14 @@
|
||||
; RUN: llvm-as < %s | opt -ds-aa -load-vn -gcse -instcombine | llvm-dis | grep sub
|
||||
|
||||
void %bar(int* %p) {
|
||||
store int 15, int* %p
|
||||
ret void
|
||||
}
|
||||
|
||||
int %foo(int* %a) {
|
||||
%b = load int* %a
|
||||
call void %bar(int* %a)
|
||||
%d = load int* %a
|
||||
%e = sub int %b, %d
|
||||
ret int %e
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user