diff options
author | Chris Lattner <sabre@nondot.org> | 2011-01-03 04:17:24 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2011-01-03 04:17:24 +0000 |
commit | 75637154c38da0243c51f4338137a78849808e50 (patch) | |
tree | baf9b13be119d4b1b1b25c6c6c0b3a662dcc6f31 /test/Transforms/EarlyCSE | |
parent | 53eeba586dac8a25db63fe02a00ef10feb8b3925 (diff) | |
download | external_llvm-75637154c38da0243c51f4338137a78849808e50.zip external_llvm-75637154c38da0243c51f4338137a78849808e50.tar.gz external_llvm-75637154c38da0243c51f4338137a78849808e50.tar.bz2 |
earlycse can do trivial with-a-block dead store
elimination as well. This deletes 60 stores in 176.gcc
that largely come from bitfield code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122736 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Transforms/EarlyCSE')
-rw-r--r-- | test/Transforms/EarlyCSE/basic.ll | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/test/Transforms/EarlyCSE/basic.ll b/test/Transforms/EarlyCSE/basic.ll index 5599a1c..bc152e7 100644 --- a/test/Transforms/EarlyCSE/basic.ll +++ b/test/Transforms/EarlyCSE/basic.ll @@ -96,3 +96,13 @@ define i32 @test6(i32 *%P) { ret i32 %V1 ; CHECK: ret i32 42 } + +;; Trivial dead store elimination. +; CHECK: @test7 +define void @test7(i32 *%P) { + store i32 42, i32* %P + store i32 45, i32* %P + ret void + ; CHECK-NEXT: store i32 45 + ; CHECK-NEXT: ret void +} |