After a custom inserter, in a block which has constant instructions,
[oota-llvm.git] / test / Transforms / DeadStoreElimination / context-sensitive.ll
1 ; RUN: opt < %s -dse -S | not grep DEAD
2 target datalayout = "E-p:64:64:64-a0:0:8-f32:32:32-f64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-v64:64:64-v128:128:128"
3
4 declare void @ext()
5
6 define i32* @caller() {
7         %P = malloc i32         ; <i32*> [#uses=4]
8         %DEAD = load i32* %P            ; <i32> [#uses=1]
9         %DEAD2 = add i32 %DEAD, 1               ; <i32> [#uses=1]
10         store i32 %DEAD2, i32* %P
11         call void @ext( )
12         store i32 0, i32* %P
13         ret i32* %P
14 }
15