1 ; RUN: llc -verify-machineinstrs < %s -mtriple=powerpc64le-unknown-unknown -mcpu=pwr9 | FileCheck %s --check-prefixes=CHECK,CHECK64
2 ; RUN: llc -verify-machineinstrs < %s -mtriple=powerpc-ibm-aix-xcoff -mcpu=pwr9 -mattr=-altivec | FileCheck %s --check-prefixes=CHECK,CHECK32
3 ; RUN: llc -verify-machineinstrs < %s -mtriple=powerpc64-ibm-aix-xcoff -mcpu=pwr9 -mattr=-altivec | FileCheck %s --check-prefixes=CHECK,CHECK64
5 define signext i32 @shrinkwrapme(i32 signext %a, i32 signext %lim) {
7 %cmp5 = icmp sgt i32 %lim, 0
8 br i1 %cmp5, label %for.body.preheader, label %for.cond.cleanup
10 for.body.preheader: ; preds = %entry
13 for.cond.cleanup.loopexit: ; preds = %for.body
14 br label %for.cond.cleanup
16 for.cond.cleanup: ; preds = %for.cond.cleanup.loopexit, %entry
17 %Ret.0.lcssa = phi i32 [ 0, %entry ], [ %0, %for.cond.cleanup.loopexit ]
20 for.body: ; preds = %for.body.preheader, %for.body
21 %i.07 = phi i32 [ %inc, %for.body ], [ 0, %for.body.preheader ]
22 %Ret.06 = phi i32 [ %0, %for.body ], [ 0, %for.body.preheader ]
23 %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 %Ret.06)
24 %inc = add nuw nsw i32 %i.07, 1
25 %exitcond = icmp eq i32 %inc, %lim
26 br i1 %exitcond, label %for.cond.cleanup.loopexit, label %for.body
28 ; CHECK-LABEL: {{[\.]?}}shrinkwrapme:
32 ; CHECK64-COUNT-18: std
34 ; CHECK32-COUNT-18: stw
36 ; CHECK: blt 0, {{.*}}BB0_3
41 ; CHECK: bdnz {{.*}}BB0_2
42 ; CHECK-NEXT: b {{.*}}BB0_4
48 ; CHECK64-COUNT-18: ld
50 ; CHECK32-COUNT-18: lwz