37 lines · plain
1;RUN: llc -mtriple=sparc < %s | FileCheck %s2 3%struct.foo_t = type { i32, i32, i32 }4 5define weak void @make_foo(ptr noalias sret(%struct.foo_t) %agg.result, i32 %a, i32 %b, i32 %c) nounwind {6entry:7;CHECK-LABEL: make_foo:8;CHECK: ld [%sp+64], {{.+}}9;CHECK: jmp %o7+1210 %0 = getelementptr inbounds %struct.foo_t, ptr %agg.result, i32 0, i32 011 store i32 %a, ptr %0, align 412 %1 = getelementptr inbounds %struct.foo_t, ptr %agg.result, i32 0, i32 113 store i32 %b, ptr %1, align 414 %2 = getelementptr inbounds %struct.foo_t, ptr %agg.result, i32 0, i32 215 store i32 %c, ptr %2, align 416 ret void17}18 19define i32 @test() nounwind {20entry:21;CHECK-LABEL: test:22;CHECK: call make_foo23;CHECK: st {{.+}}, [%sp+64]24;CHECK: unimp 1225 %f = alloca %struct.foo_t, align 826 call void @make_foo(ptr noalias sret(%struct.foo_t) %f, i32 10, i32 20, i32 30) nounwind27 %0 = getelementptr inbounds %struct.foo_t, ptr %f, i32 0, i32 028 %1 = load i32, ptr %0, align 829 %2 = getelementptr inbounds %struct.foo_t, ptr %f, i32 0, i32 130 %3 = load i32, ptr %2, align 431 %4 = getelementptr inbounds %struct.foo_t, ptr %f, i32 0, i32 232 %5 = load i32, ptr %4, align 833 %6 = add nsw i32 %3, %134 %7 = add nsw i32 %6, %535 ret i32 %736}37