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 2>&1 | FileCheck %s
5 %0 = type { double, double, double, i32, i32 }
6 declare ptr @malloc() local_unnamed_addr
8 define void @phi3(ptr) nounwind {
12 ; CHECK-NEXT: std 29, -24(1) # 8-byte Folded Spill
13 ; CHECK-NEXT: std 30, -16(1) # 8-byte Folded Spill
14 ; CHECK-NEXT: stdu 1, -64(1)
15 ; CHECK-NEXT: std 0, 80(1)
16 ; CHECK-NEXT: mr 30, 3
17 ; CHECK-NEXT: bl malloc
19 ; CHECK-NEXT: mr 29, 3
20 ; CHECK-NEXT: bl malloc
22 ; CHECK-NEXT: addi 7, 30, -4
24 ; CHECK-NEXT: addi 4, 29, -8
26 ; CHECK-NEXT: lwzu 8, 4(7)
27 ; CHECK-NEXT: bdz .LBB0_5
28 ; CHECK-NEXT: # %bb.1:
29 ; CHECK-NEXT: extswsli 6, 5, 5
30 ; CHECK-NEXT: add 5, 8, 5
31 ; CHECK-NEXT: lwzu 8, 4(7)
32 ; CHECK-NEXT: bdz .LBB0_4
33 ; CHECK-NEXT: # %bb.2:
34 ; CHECK-NEXT: add 6, 3, 6
35 ; CHECK-NEXT: stdu 6, 8(4)
36 ; CHECK-NEXT: extswsli 6, 5, 5
37 ; CHECK-NEXT: add 5, 8, 5
38 ; CHECK-NEXT: lwzu 8, 4(7)
39 ; CHECK-NEXT: bdz .LBB0_4
40 ; CHECK-NEXT: .p2align 5
41 ; CHECK-NEXT: .LBB0_3:
42 ; CHECK-NEXT: add 9, 3, 6
43 ; CHECK-NEXT: extswsli 6, 5, 5
44 ; CHECK-NEXT: add 5, 8, 5
45 ; CHECK-NEXT: lwzu 8, 4(7)
46 ; CHECK-NEXT: stdu 9, 8(4)
47 ; CHECK-NEXT: bdnz .LBB0_3
48 ; CHECK-NEXT: .LBB0_4:
49 ; CHECK-NEXT: add 6, 3, 6
50 ; CHECK-NEXT: stdu 6, 8(4)
51 ; CHECK-NEXT: .LBB0_5:
52 ; CHECK-NEXT: extswsli 5, 5, 5
53 ; CHECK-NEXT: add 3, 3, 5
54 ; CHECK-NEXT: stdu 3, 8(4)
55 ; CHECK-NEXT: addi 1, 1, 64
56 ; CHECK-NEXT: ld 0, 16(1)
57 ; CHECK-NEXT: ld 30, -16(1) # 8-byte Folded Reload
58 ; CHECK-NEXT: ld 29, -24(1) # 8-byte Folded Reload
61 %2 = tail call noalias ptr @malloc()
62 %3 = bitcast ptr %2 to ptr
63 %4 = tail call noalias ptr @malloc()
64 %5 = bitcast ptr %4 to ptr
68 %7 = phi i64 [ %16, %6 ], [ 0, %1 ]
69 %8 = phi i32 [ %15, %6 ], [ 0, %1 ]
70 %9 = phi i64 [ %17, %6 ], [ undef, %1 ]
71 %10 = sext i32 %8 to i64
72 %11 = getelementptr inbounds %0, ptr %5, i64 %10
73 %12 = getelementptr inbounds ptr, ptr %3, i64 %7
74 store ptr %11, ptr %12, align 8
75 %13 = getelementptr inbounds i32, ptr %0, i64 %7
76 %14 = load i32, ptr %13, align 4
77 %15 = add nsw i32 %14, %8
78 %16 = add nuw nsw i64 %7, 1
80 %18 = icmp eq i64 %17, 0
81 br i1 %18, label %19, label %6