mirror of
https://github.com/RPCS3/llvm.git
synced 2024-12-13 23:18:58 +00:00
New testcase. DSE should delete all of the DEAD instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15253 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
db5b80a7f2
commit
cbb4b574c0
15
test/Transforms/DeadStoreElimination/context-sensitive.llx
Normal file
15
test/Transforms/DeadStoreElimination/context-sensitive.llx
Normal file
@ -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
Block a user