1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc -mtriple=powerpc64-unknown-linux-gnu -mcpu=pwr9 < %s | FileCheck %s
4 define void @f(i8*, i8*, i64*) {
5 ; Check we don't assert and this is not a Hardware Loop
8 ; CHECK-NEXT: cmpld 3, 4
10 ; CHECK-NEXT: # %bb.1:
11 ; CHECK-NEXT: ld 6, 8(5)
12 ; CHECK-NEXT: not 3, 3
13 ; CHECK-NEXT: add 3, 3, 4
15 ; CHECK-NEXT: .p2align 5
16 ; CHECK-NEXT: .LBB0_2: #
17 ; CHECK-NEXT: sldi 6, 6, 4
18 ; CHECK-NEXT: cmplwi 4, 14
19 ; CHECK-NEXT: addi 7, 4, 1
20 ; CHECK-NEXT: bc 12, 1, .LBB0_4
21 ; CHECK-NEXT: # %bb.3: #
22 ; CHECK-NEXT: cmpd 3, 4
24 ; CHECK-NEXT: bc 4, 2, .LBB0_2
25 ; CHECK-NEXT: .LBB0_4:
26 ; CHECK-NEXT: std 6, 8(5)
29 %4 = icmp eq i8* %0, %1
30 br i1 %4, label %9, label %5
33 %6 = getelementptr inbounds i64, i64* %2, i64 1
34 %7 = load i64, i64* %6, align 8
38 store i64 %14, i64* %6, align 8
45 %11 = phi i64 [ %7, %5 ], [ %14, %10 ]
46 %12 = phi i32 [ 0, %5 ], [ %15, %10 ]
47 %13 = phi i8* [ %0, %5 ], [ %16, %10 ]
48 %14 = shl nsw i64 %11, 4
49 %15 = add nuw nsw i32 %12, 1
50 %16 = getelementptr inbounds i8, i8* %13, i64 1
51 %17 = icmp ugt i32 %12, 14
52 %18 = icmp eq i8* %16, %1
54 br i1 %19, label %8, label %10