36 lines · plain
1; Test proper insertion of mcount instrumentation2;3; RUN: llc < %s -mtriple=s390x-linux-gnu -verify-machineinstrs -o - | FileCheck %s4;5; CHECK: # %bb.0:6; CHECK-NEXT: stg %r14, 8(%r15)7; CHECK-NEXT: brasl %r14, mcount@PLT8; CHECK-NEXT: lg %r14, 8(%r15)9define dso_local signext i32 @fib(i32 noundef signext %n) #0 {10entry:11 %n.addr = alloca i32, align 412 store i32 %n, ptr %n.addr, align 413 %0 = load i32, ptr %n.addr, align 414 %cmp = icmp sle i32 %0, 115 br i1 %cmp, label %cond.true, label %cond.false16 17cond.true: ; preds = %entry18 br label %cond.end19 20cond.false: ; preds = %entry21 %1 = load i32, ptr %n.addr, align 422 %sub = sub nsw i32 %1, 123 %call = call signext i32 @fib(i32 noundef signext %sub)24 %2 = load i32, ptr %n.addr, align 425 %sub1 = sub nsw i32 %2, 226 %call2 = call signext i32 @fib(i32 noundef signext %sub1)27 %add = add nsw i32 %call, %call228 br label %cond.end29 30cond.end: ; preds = %cond.false, %cond.true31 %cond = phi i32 [ 1, %cond.true ], [ %add, %cond.false ]32 ret i32 %cond33}34 35attributes #0 = { "instrument-function-entry-inlined"="mcount" }36