diff options
author | Dan Gohman <gohman@apple.com> | 2008-06-09 21:26:13 +0000 |
---|---|---|
committer | Dan Gohman <gohman@apple.com> | 2008-06-09 21:26:13 +0000 |
commit | 27ae953278dba7074903d71442c34f57b9a551f6 (patch) | |
tree | 9fc72231bf7a164da30a3a6e5c794ef3e8ed0267 /llvm/test | |
parent | 6001b91d8efa39c6d4d95fad39707918d162ffa2 (diff) | |
download | bcm5719-llvm-27ae953278dba7074903d71442c34f57b9a551f6.tar.gz bcm5719-llvm-27ae953278dba7074903d71442c34f57b9a551f6.zip |
Re-apply 52002, allowing the verifier to accept non-MRV struct return
types on functions, with adjustments so that it accepts both
new-style aggregate returns and old-style MRV returns, including those
with only a single member.
llvm-svn: 52157
Diffstat (limited to 'llvm/test')
-rw-r--r-- | llvm/test/Assembler/aggregate-constant-values.ll | 27 | ||||
-rw-r--r-- | llvm/test/Assembler/aggregate-return-single-value.ll | 14 |
2 files changed, 41 insertions, 0 deletions
diff --git a/llvm/test/Assembler/aggregate-constant-values.ll b/llvm/test/Assembler/aggregate-constant-values.ll new file mode 100644 index 00000000000..a37d03ebb38 --- /dev/null +++ b/llvm/test/Assembler/aggregate-constant-values.ll @@ -0,0 +1,27 @@ +; RUN: llvm-as < %s | llvm-dis | grep 7 | count 3 + +define void @foo({i32, i32}* %x) nounwind { + store {i32, i32}{i32 7, i32 9}, {i32, i32}* %x + ret void +} +define void @foo_empty({}* %x) nounwind { + store {}{}, {}* %x + ret void +} +define void @bar([2 x i32]* %x) nounwind { + store [2 x i32][i32 7, i32 9], [2 x i32]* %x + ret void +} +define void @bar_empty([0 x i32]* %x) nounwind { + store [0 x i32][], [0 x i32]* %x + ret void +} +define void @qux(<{i32, i32}>* %x) nounwind { + store <{i32, i32}><{i32 7, i32 9}>, <{i32, i32}>* %x + ret void +} +define void @qux_empty(<{}>* %x) nounwind { + store <{}><{}>, <{}>* %x + ret void +} + diff --git a/llvm/test/Assembler/aggregate-return-single-value.ll b/llvm/test/Assembler/aggregate-return-single-value.ll new file mode 100644 index 00000000000..02fb59f8a0a --- /dev/null +++ b/llvm/test/Assembler/aggregate-return-single-value.ll @@ -0,0 +1,14 @@ +; RUN: llvm-as < %s | llvm-dis + +define { i32 } @fooa() nounwind { + ret i32 0 +} +define { i32 } @foob() nounwind { + ret {i32}{ i32 0 } +} +define [1 x i32] @fooc() nounwind { + ret i32 0 +} +define [1 x i32] @food() nounwind { + ret [1 x i32][ i32 0 ] +} |