mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-26 21:32:10 +00:00
New testcase that basicaa should be able to handle
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8614 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
bb37a69bfc
commit
4acad5c9e7
12
test/Analysis/BasicAA/2003-09-19-LocalArgument.ll
Normal file
12
test/Analysis/BasicAA/2003-09-19-LocalArgument.ll
Normal file
@ -0,0 +1,12 @@
|
||||
; In this test, a local alloca cannot alias an incoming argument.
|
||||
|
||||
; RUN: llvm-as < %s | opt -load-vn -gcse -instcombine | llvm-dis | not grep sub
|
||||
|
||||
int %test(int* %P) {
|
||||
%X = alloca int
|
||||
%V1 = load int* %P
|
||||
store int 0, int* %X
|
||||
%V2 = load int* %P
|
||||
%Diff = sub int %V1, %V2
|
||||
ret int %Diff
|
||||
}
|
12
test/Transforms/BasicAA/2003-09-19-LocalArgument.ll
Normal file
12
test/Transforms/BasicAA/2003-09-19-LocalArgument.ll
Normal file
@ -0,0 +1,12 @@
|
||||
; In this test, a local alloca cannot alias an incoming argument.
|
||||
|
||||
; RUN: llvm-as < %s | opt -load-vn -gcse -instcombine | llvm-dis | not grep sub
|
||||
|
||||
int %test(int* %P) {
|
||||
%X = alloca int
|
||||
%V1 = load int* %P
|
||||
store int 0, int* %X
|
||||
%V2 = load int* %P
|
||||
%Diff = sub int %V1, %V2
|
||||
ret int %Diff
|
||||
}
|
Loading…
Reference in New Issue
Block a user