diff options
Diffstat (limited to 'test/Transforms/DeadStoreElimination/free.ll')
-rw-r--r-- | test/Transforms/DeadStoreElimination/free.ll | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/test/Transforms/DeadStoreElimination/free.ll b/test/Transforms/DeadStoreElimination/free.ll new file mode 100644 index 0000000..8b81ee3 --- /dev/null +++ b/test/Transforms/DeadStoreElimination/free.ll @@ -0,0 +1,15 @@ +; RUN: opt < %s -dse -S | not grep DEAD + +define void @test(i32* %Q, i32* %P) { + %DEAD = load i32* %Q ; <i32> [#uses=1] + store i32 %DEAD, i32* %P + free i32* %P + ret void +} + +define void @test2({i32, i32}* %P) { + %Q = getelementptr {i32, i32} *%P, i32 0, i32 1 + store i32 4, i32* %Q + free {i32,i32}* %P + ret void +} |