mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-04-02 10:33:53 +00:00
New testacse for information exposed by the 'tail' call marker.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21795 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
37c121acf4
commit
20fad44ede
16
test/Analysis/BasicAA/tailcall-modref.ll
Normal file
16
test/Analysis/BasicAA/tailcall-modref.ll
Normal file
@ -0,0 +1,16 @@
|
||||
; RUN: llvm-as < %s | opt -basicaa -load-vn -gcse -instcombine | llvm-dis | grep 'ret int 0'
|
||||
declare void %foo(int*)
|
||||
declare void %bar()
|
||||
|
||||
int %test() {
|
||||
%A = alloca int
|
||||
call void %foo(int* %A)
|
||||
|
||||
%X = load int* %A
|
||||
tail call void %bar() ;; Cannot modify *%A because it's on the stack.
|
||||
%Y = load int* %A
|
||||
%Z = sub int %X, %Y
|
||||
ret int %Z
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user