1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc < %s -mtriple=powerpc64le-unknown-linux-gnu -verify-machineinstrs\
3 ; RUN: -mcpu=pwr9 --ppc-enable-pipeliner --pipeliner-force-ii=15 2>&1 | FileCheck %s
5 define void @phi2(i32, i32, ptr) local_unnamed_addr {
8 ; CHECK-NEXT: divw 8, 3, 4
10 ; CHECK-NEXT: li 6, 48
12 ; CHECK-NEXT: bdz .LBB0_4
13 ; CHECK-NEXT: # %bb.1:
14 ; CHECK-NEXT: divw 9, 8, 4
15 ; CHECK-NEXT: mullw 7, 8, 4
16 ; CHECK-NEXT: sub 3, 3, 7
17 ; CHECK-NEXT: cmplwi 3, 10
18 ; CHECK-NEXT: isellt 7, 6, 5
19 ; CHECK-NEXT: add 3, 7, 3
20 ; CHECK-NEXT: stbu 3, -1(7)
22 ; CHECK-NEXT: bdz .LBB0_3
23 ; CHECK-NEXT: .p2align 4
24 ; CHECK-NEXT: .LBB0_2:
26 ; CHECK-NEXT: mullw 9, 9, 4
27 ; CHECK-NEXT: divw 10, 3, 4
28 ; CHECK-NEXT: sub 8, 8, 9
29 ; CHECK-NEXT: cmplwi 8, 10
30 ; CHECK-NEXT: isellt 9, 6, 5
31 ; CHECK-NEXT: add 8, 9, 8
32 ; CHECK-NEXT: mr 9, 10
33 ; CHECK-NEXT: stbu 8, -1(7)
35 ; CHECK-NEXT: bdnz .LBB0_2
36 ; CHECK-NEXT: .LBB0_3:
38 ; CHECK-NEXT: b .LBB0_5
39 ; CHECK-NEXT: .LBB0_4:
40 ; CHECK-NEXT: # implicit-def: $x7
41 ; CHECK-NEXT: .LBB0_5:
42 ; CHECK-NEXT: mullw 4, 8, 4
43 ; CHECK-NEXT: sub 3, 3, 4
44 ; CHECK-NEXT: cmplwi 3, 10
45 ; CHECK-NEXT: isellt 4, 6, 5
46 ; CHECK-NEXT: add 3, 4, 3
47 ; CHECK-NEXT: stbu 3, -1(7)
52 %5 = phi i64 [ %7, %4 ], [ undef, %3 ]
53 %6 = phi i32 [ %8, %4 ], [ %0, %3 ]
54 %7 = add nsw i64 %5, -1
56 %9 = mul nsw i32 %8, %1
57 %10 = sub nsw i32 %6, %9
58 %11 = icmp ult i32 %10, 10
59 %12 = trunc i32 %10 to i8
60 %13 = select i1 %11, i8 48, i8 55
62 %15 = getelementptr inbounds i8, ptr %2, i64 %7
63 store i8 %14, ptr %15, align 1
64 %16 = icmp sgt i64 %5, 1
65 br i1 %16, label %4, label %17