diff options
| author | Dimitry Andric <dim@FreeBSD.org> | 2012-12-02 13:10:19 +0000 |
|---|---|---|
| committer | Dimitry Andric <dim@FreeBSD.org> | 2012-12-02 13:10:19 +0000 |
| commit | 522600a229b950314b5f4af84eba4f3e8a0ffea1 (patch) | |
| tree | 32b4679ab4b8f28e5228daafc65e9dc436935353 /test/CodeGen/Mips/mips64-sret.ll | |
| parent | 902a7b529820e6a0aa85f98f21afaeb1805a22f8 (diff) | |
Notes
Diffstat (limited to 'test/CodeGen/Mips/mips64-sret.ll')
| -rw-r--r-- | test/CodeGen/Mips/mips64-sret.ll | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/test/CodeGen/Mips/mips64-sret.ll b/test/CodeGen/Mips/mips64-sret.ll new file mode 100644 index 0000000000000..e26b0223b447f --- /dev/null +++ b/test/CodeGen/Mips/mips64-sret.ll @@ -0,0 +1,16 @@ +; RUN: llc -march=mips64el -mcpu=mips64r2 -mattr=n64 -O3 < %s | FileCheck %s + +%struct.S = type { [8 x i32] } + +@g = common global %struct.S zeroinitializer, align 4 + +define void @f(%struct.S* noalias sret %agg.result) nounwind { +entry: +; CHECK: daddu $2, $zero, $4 + + %0 = bitcast %struct.S* %agg.result to i8* + call void @llvm.memcpy.p0i8.p0i8.i64(i8* %0, i8* bitcast (%struct.S* @g to i8*), i64 32, i32 4, i1 false) + ret void +} + +declare void @llvm.memcpy.p0i8.p0i8.i64(i8* nocapture, i8* nocapture, i64, i32, i1) nounwind |
