51 lines · plain
1; RUN: llc -mtriple=sparc -O0 <%s2; RUN: llc -mtriple=sparc <%s | FileCheck %s --check-prefix=V83; RUN: llc -mtriple=sparcv9 <%s | FileCheck %s --check-prefix=V94 5; V8-LABEL: test6; V8: save %sp7; V8: call foo8; V8-NEXT: nop9; V8: call bar10; V8-NEXT: nop11; V8: ret12; V8-NEXT: restore13 14; V9-LABEL: test15; V9: save %sp16; V9: call foo17; V9-NEXT: nop18; V9: call bar19; V9-NEXT: nop20; V9: ret21; V9-NEXT: restore22 23define void @test() #0 {24entry:25 %0 = tail call i32 (...) @foo() nounwind26 tail call void (...) @bar() nounwind27 ret void28}29 30declare i32 @foo(...)31 32declare void @bar(...)33 34; V8-LABEL: test_tail_call_with_return35; V8: mov %o7, %g136; V8-NEXT: call foo37; V8-NEXT: mov %g1, %o738 39; V9-LABEL: test_tail_call_with_return40; V9: mov %o7, %g141; V9-NEXT: call foo42; V9-NEXT: mov %g1, %o743 44define i32 @test_tail_call_with_return() nounwind {45entry:46 %0 = tail call i32 (...) @foo() nounwind47 ret i32 %048}49 50attributes #0 = { nounwind "disable-tail-calls"="true" }51