New testcase. DSE should delete all of the DEAD instructions.
llvm-svn: 15253
This commit is contained in:
parent
aa05a6e5a1
commit
0a0fc220cc
|
@ -0,0 +1,15 @@
|
|||
; RUN: llvm-as < %s | opt -dse | llvm-dis | not grep DEAD
|
||||
|
||||
declare void %ext()
|
||||
|
||||
int* %caller() {
|
||||
%P = malloc int
|
||||
%DEAD = load int* %P
|
||||
%DEAD2 = add int %DEAD, 1
|
||||
store int %DEAD2, int* %P ;; dead store
|
||||
|
||||
call void %ext() ; Can not clobber *P
|
||||
|
||||
store int 0, int* %P
|
||||
ret int* %P
|
||||
}
|
Loading…
Reference in New Issue