mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-08-17 21:29:20 +00:00
add a simple case where instcombine can detect and remove a dead alloca
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33230 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
b5282dcf47
commit
8d14221224
@ -12,3 +12,16 @@ void %test() {
|
||||
call void(...)* %use({}* %Z)
|
||||
ret void
|
||||
}
|
||||
|
||||
void %test2() {
|
||||
%A = alloca int ;; dead.
|
||||
store int 123, int* %A
|
||||
ret void
|
||||
}
|
||||
|
||||
void %test3() {
|
||||
%A = alloca {int} ;; dead.
|
||||
%B = getelementptr {int}* %A, int 0, uint 0
|
||||
store int 123, int* %B
|
||||
ret void
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user