From 58269b973256bf2436cac0f047aa277fe4bc01dd Mon Sep 17 00:00:00 2001 From: Venkatraman Govindaraju Date: Mon, 21 Feb 2011 03:42:44 +0000 Subject: Generate correct Sparc32 ABI compliant code for functions that return a struct. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@126108 91177308-0d34-0410-b5e6-96231b3b80d8 --- test/CodeGen/SPARC/2011-01-19-DelaySlot.ll | 6 +++--- test/CodeGen/SPARC/2011-01-22-SRet.ll | 3 ++- 2 files changed, 5 insertions(+), 4 deletions(-) (limited to 'test/CodeGen/SPARC') diff --git a/test/CodeGen/SPARC/2011-01-19-DelaySlot.ll b/test/CodeGen/SPARC/2011-01-19-DelaySlot.ll index bc27e987a1..71fdb4e0d6 100644 --- a/test/CodeGen/SPARC/2011-01-19-DelaySlot.ll +++ b/test/CodeGen/SPARC/2011-01-19-DelaySlot.ll @@ -7,7 +7,7 @@ entry: ; CHECK: test ; CHECK: call bar ; CHECK-NOT: nop -; CHECK: ret +; CHECK: jmp ; CHECK-NEXT: restore %0 = tail call i32 @bar(i32 %a) nounwind ret i32 %0 @@ -18,7 +18,7 @@ entry: ; CHECK: test_jmpl ; CHECK: call ; CHECK-NOT: nop -; CHECK: ret +; CHECK: jmp ; CHECK-NEXT: restore %0 = tail call i32 %f(i32 %a, i32 %b) nounwind ret i32 %0 @@ -47,7 +47,7 @@ bb: ; preds = %entry, %bb bb5: ; preds = %bb, %entry %a_addr.1.lcssa = phi i32 [ %a, %entry ], [ %a_addr.0, %bb ] -;CHECK: ret +;CHECK: jmp ;CHECK-NEXT: restore ret i32 %a_addr.1.lcssa } diff --git a/test/CodeGen/SPARC/2011-01-22-SRet.ll b/test/CodeGen/SPARC/2011-01-22-SRet.ll index 2f684b009c..506d3a8f87 100644 --- a/test/CodeGen/SPARC/2011-01-22-SRet.ll +++ b/test/CodeGen/SPARC/2011-01-22-SRet.ll @@ -7,7 +7,7 @@ entry: ;CHECK: make_foo ;CHECK: ld [%fp+64], {{.+}} ;CHECK: or {{.+}}, {{.+}}, %i0 -;CHECK: ret +;CHECK: jmp %i7+12 %0 = getelementptr inbounds %struct.foo_t* %agg.result, i32 0, i32 0 store i32 %a, i32* %0, align 4 %1 = getelementptr inbounds %struct.foo_t* %agg.result, i32 0, i32 1 @@ -22,6 +22,7 @@ entry: ;CHECK: test ;CHECK: st {{.+}}, [%sp+64] ;CHECK: make_foo +;CHECK: unimp 12 %f = alloca %struct.foo_t, align 8 call void @make_foo(%struct.foo_t* noalias sret %f, i32 10, i32 20, i32 30) nounwind %0 = getelementptr inbounds %struct.foo_t* %f, i32 0, i32 0 -- cgit v1.2.3-18-g5258