47 lines · plain
1; RUN: llc -verify-machineinstrs -mtriple=powerpc64le-unknown-linux-gnu < %s | FileCheck %s -check-prefix=COLDCC2 3define signext i32 @caller(i32 signext %a, i32 signext %b, i32 signext %cold) {4entry:5 %0 = tail call i32 asm "add $0, $1, $2", "=r,r,r,~{r14},~{r15},~{r16},~{r17},~{r18},~{r19},~{r20},~{r21},~{r22},~{r23},~{r24},~{r25},~{r26},~{r27},~{r28},~{r29},~{r30},~{r31}"(i32 %a, i32 %b)6 %mul = mul nsw i32 %0, %cold7 %tobool = icmp eq i32 %cold, 08 br i1 %tobool, label %if.end, label %if.then9 10if.then: ; preds = %entry11 %mul1 = mul nsw i32 %mul, %cold12 %mul2 = mul nsw i32 %b, %a13 %call = tail call coldcc signext i32 @callee(i32 signext %a, i32 signext %b)14 %add = add i32 %mul2, %a15 %add3 = add i32 %add, %mul16 %add4 = add i32 %add3, %mul117 %add5 = add i32 %add4, %call18 br label %if.end19 20if.end: ; preds = %entry, %if.then21 %f.0 = phi i32 [ %add5, %if.then ], [ %0, %entry ]22 ret i32 %f.023}24 25define internal coldcc signext i32 @callee(i32 signext %a, i32 signext %b) local_unnamed_addr #0 {26entry:27; COLDCC: @callee28; COLDCC: std 6, -8(1)29; COLDCC: std 7, -16(1)30; COLDCC: std 8, -24(1)31; COLDCC: std 9, -32(1)32; COLDCC: std 10, -40(1)33; COLDCC: ld 10, -40(1)34; COLDCC: ld 9, -32(1)35; COLDCC: ld 8, -24(1)36; COLDCC: ld 7, -16(1)37; COLDCC: ld 6, -8(1)38 %0 = tail call i32 asm "add $0, $1, $2", "=r,r,r,~{r6},~{r7},~{r8},~{r9},~{r10}"(i32 %a, i32 %b)39 %mul = mul nsw i32 %a, 340 %1 = mul i32 %b, -541 %add = add i32 %1, %mul42 %sub = add i32 %add, %043 ret i32 %sub44}45 46attributes #0 = { noinline }47