mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-08-18 12:29:21 +00:00
that it found to be broken. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36009 91177308-0d34-0410-b5e6-96231b3b80d8
18 lines
368 B
LLVM
18 lines
368 B
LLVM
; RUN: llvm-upgrade < %s | llvm-as | opt -basicaa -load-vn -gcse -instcombine |\
|
|
; RUN: llvm-dis | grep {ret i32 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
|
|
}
|
|
|
|
|