diff options
| author | Nick Lewycky <nicholas@mxc.ca> | 2009-11-10 06:46:40 +0000 |
|---|---|---|
| committer | Nick Lewycky <nicholas@mxc.ca> | 2009-11-10 06:46:40 +0000 |
| commit | 9027147fb133eb02bbecb957c64834cb1856c883 (patch) | |
| tree | 45faef13f7815e38ef5c6faa47215faacf3f639f /llvm/test/Transforms/DeadStoreElimination/partial-overwrite.ll | |
| parent | cbd18fc93d2d85e74492345af9cbcc7772d86145 (diff) | |
| download | bcm5719-llvm-9027147fb133eb02bbecb957c64834cb1856c883.tar.gz bcm5719-llvm-9027147fb133eb02bbecb957c64834cb1856c883.zip | |
Reapply r86359, "Teach dead store elimination that certain intrinsics write to
memory just like a store" with bug fixed (partial-overwrite.ll is the
regression test).
llvm-svn: 86667
Diffstat (limited to 'llvm/test/Transforms/DeadStoreElimination/partial-overwrite.ll')
| -rw-r--r-- | llvm/test/Transforms/DeadStoreElimination/partial-overwrite.ll | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/llvm/test/Transforms/DeadStoreElimination/partial-overwrite.ll b/llvm/test/Transforms/DeadStoreElimination/partial-overwrite.ll new file mode 100644 index 00000000000..048d4645fcc --- /dev/null +++ b/llvm/test/Transforms/DeadStoreElimination/partial-overwrite.ll @@ -0,0 +1,14 @@ +; RUN: opt -dse -S %s | FileCheck %s +; Note that we could do better by merging the two stores into one. + +target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128" +target triple = "x86_64-unknown-linux-gnu" + +define void @test(i32* %P) { + store i32 0, i32* %P +; CHECK: store i32 + %Q = bitcast i32* %P to i16* + store i16 1, i16* %Q +; CHECK: store i16 + ret void +} |

