1 ; RUN: llc -verify-machineinstrs -mtriple=powerpc64le-unknown-linux-gnu < %s | FileCheck %s -check-prefix=COLDCC
3 define signext i32 @caller(i32 signext %a, i32 signext %b, i32 signext %cold) {
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, %cold
7 %tobool = icmp eq i32 %cold, 0
8 br i1 %tobool, label %if.end, label %if.then
10 if.then: ; preds = %entry
11 %mul1 = mul nsw i32 %mul, %cold
12 %mul2 = mul nsw i32 %b, %a
13 %call = tail call coldcc signext i32 @callee(i32 signext %a, i32 signext %b)
14 %add = add i32 %mul2, %a
15 %add3 = add i32 %add, %mul
16 %add4 = add i32 %add3, %mul1
17 %add5 = add i32 %add4, %call
20 if.end: ; preds = %entry, %if.then
21 %f.0 = phi i32 [ %add5, %if.then ], [ %0, %entry ]
25 define internal coldcc signext i32 @callee(i32 signext %a, i32 signext %b) local_unnamed_addr #0 {
28 ; 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)
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, 3
41 %add = add i32 %1, %mul
42 %sub = add i32 %add, %0
46 attributes #0 = { noinline }