73 lines · plain
1;RUN: llc -mtriple=sparc < %s | FileCheck %s2;RUN: llc -mtriple=sparcv9 < %s | FileCheck %s --check-prefix=V93 4 5%0 = type { [32 x i32] }6%struct.jmpbuf_env = type { i32, i32, [1 x %struct.__jmp_buf_tag], i32 }7%struct.__jmp_buf_tag = type { [3 x i32], i32, %0 }8 9@jenv = common unnamed_addr global ptr null10@.cst = private unnamed_addr constant [30 x i8] c"in bar with jmp_buf's id: %d\0A\00", align 6411 12; CHECK-LABEL: foo13; CHECK-DAG: st {{.+}}, [%i0]14; CHECK-DAG: st {{.+}}, [%i0+4]15; CHECK: call _setjmp16; CHECK: ld [%fp+{{.+}}], %[[R:[gilo][0-7]]]17; CHECK: st %o0, [%[[R]]+{{.+}}]18 19; V9-LABEL: foo20; V9-DAG: st {{.+}}, [%i0]21; V9-DAG: st {{.+}}, [%i0+4]22; V9: call _setjmp23; V9: ldx [%fp+{{.+}}], %[[R:[gilo][0-7]]]24; V9: st %o0, [%[[R]]+{{.+}}]25 26; Function Attrs: nounwind27define i32 @foo(ptr byval(%struct.jmpbuf_env) %inbuf) #0 {28entry:29 %0 = getelementptr inbounds %struct.jmpbuf_env, ptr %inbuf, i32 0, i32 030 store i32 0, ptr %0, align 4, !tbaa !431 %1 = getelementptr inbounds %struct.jmpbuf_env, ptr %inbuf, i32 0, i32 132 store i32 1, ptr %1, align 4, !tbaa !433 %2 = getelementptr inbounds %struct.jmpbuf_env, ptr %inbuf, i32 0, i32 2, i32 034 %3 = call i32 @_setjmp(ptr %2) #235 %4 = getelementptr inbounds %struct.jmpbuf_env, ptr %inbuf, i32 0, i32 336 store i32 %3, ptr %4, align 4, !tbaa !437 store ptr %inbuf, ptr @jenv, align 4, !tbaa !338 %5 = load i32, ptr %1, align 4, !tbaa !439 %6 = icmp eq i32 %5, 140 %7 = icmp eq i32 %3, 041 %or.cond = and i1 %6, %742 br i1 %or.cond, label %"4.i", label %bar.exit43 44"4.i": ; preds = %entry45 call void @longjmp(ptr %2, i32 0) #146 unreachable47 48bar.exit: ; preds = %entry49 %8 = load i32, ptr %0, align 4, !tbaa !450 %9 = call i32 (ptr, ...) @printf(ptr noalias @.cst, i32 %8) #051 ret i32 052}53 54; Function Attrs: nounwind returns_twice55declare i32 @_setjmp(ptr) #256 57; Function Attrs: noreturn nounwind58declare void @longjmp(ptr, i32) #159 60; Function Attrs: nounwind61declare i32 @printf(ptr nocapture, ...) #062 63 64attributes #0 = { nounwind }65attributes #1 = { noreturn nounwind }66attributes #2 = { nounwind returns_twice }67 68!0 = !{!"alias set 6: struct.jmpbuf_env*", !1}69!1 = !{!1}70!2 = !{!"alias set 3: int", !1}71!3 = !{!0, !0, i64 0}72!4 = !{!2, !2, i64 0}73