diff options
| author | Owen Anderson <resistor@mac.com> | 2008-01-25 10:10:33 +0000 |
|---|---|---|
| committer | Owen Anderson <resistor@mac.com> | 2008-01-25 10:10:33 +0000 |
| commit | e3c36f67580f0963abdf696a26690facb0791ce0 (patch) | |
| tree | 46a0bf68c06c563faed90f7d64869c00a9ab98e4 /test/Transforms | |
| parent | bc2458408a68cc798ca1d54f8fdc2a7966165b41 (diff) | |
DeadStoreElimination can treat byval parameters as if there were alloca's for the purpose of removing end-of-function stores.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46351 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Transforms')
| -rw-r--r-- | test/Transforms/DeadStoreElimination/byval.ll | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/test/Transforms/DeadStoreElimination/byval.ll b/test/Transforms/DeadStoreElimination/byval.ll new file mode 100644 index 0000000000..08f69a40c5 --- /dev/null +++ b/test/Transforms/DeadStoreElimination/byval.ll @@ -0,0 +1,10 @@ +; RUN: llvm-as < %s | opt -dse | llvm-dis | not grep store + +%struct.x = type { i32, i32, i32, i32 } + +define i32 @foo(%struct.x* byval %a) nounwind { +entry: + %tmp2 = getelementptr %struct.x* %a, i32 0, i32 0 + store i32 1, i32* %tmp2, align 4 + ret i32 1 +} |
