diff options
| author | Dan Gohman <gohman@apple.com> | 2008-08-04 23:30:41 +0000 |
|---|---|---|
| committer | Dan Gohman <gohman@apple.com> | 2008-08-04 23:30:41 +0000 |
| commit | 6e023e63cd06d18a68b845e7a7bcf087d0304fcc (patch) | |
| tree | 3498a393d8ea05ed67bcb220d972bd8af7cac9d4 /llvm/test/CodeGen/Generic | |
| parent | 8ef79ebd5fac932810857b12a178d7c15ff64b0d (diff) | |
| download | bcm5719-llvm-6e023e63cd06d18a68b845e7a7bcf087d0304fcc.tar.gz bcm5719-llvm-6e023e63cd06d18a68b845e7a7bcf087d0304fcc.zip | |
Fix SDISel lowering of zeroinitializer and undef to use ComputeValueVTs.
This allows it to work correctly on nested aggregate values.
This fixes PR2625.
llvm-svn: 54330
Diffstat (limited to 'llvm/test/CodeGen/Generic')
| -rw-r--r-- | llvm/test/CodeGen/Generic/pr2625.ll | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/Generic/pr2625.ll b/llvm/test/CodeGen/Generic/pr2625.ll new file mode 100644 index 00000000000..c1f585de737 --- /dev/null +++ b/llvm/test/CodeGen/Generic/pr2625.ll @@ -0,0 +1,17 @@ +; RUN: llvm-as < %s | llc +; PR2625 + +define i32 @main({ i32, { i32 } }*) { +entry: + %state = alloca { i32, { i32 } }* ; <{ i32, { i32 } }**> [#uses=2] + store { i32, { i32 } }* %0, { i32, { i32 } }** %state + %retval = alloca i32 ; <i32*> [#uses=2] + store i32 0, i32* %retval + load { i32, { i32 } }** %state ; <{ i32, { i32 } }*>:1 [#uses=1] + store { i32, { i32 } } zeroinitializer, { i32, { i32 } }* %1 + br label %return + +return: ; preds = %entry + load i32* %retval ; <i32>:2 [#uses=1] + ret i32 %2 +} |

