xref: /llvm-project/llvm/test/CodeGen/PowerPC/sms-iterator.ll (revision a701b7e368b70688bb4b84dafcaa43fa7c9a3649)
1; REQUIRES: asserts
2; RUN: llc < %s -mtriple=powerpc64le-unknown-linux-gnu -verify-machineinstrs\
3; RUN:       -mcpu=pwr9 --ppc-enable-pipeliner -debug-only=pipeliner -disable-cgp-delete-phis 2>&1 \
4; RUN:       >/dev/null | FileCheck %s
5
6%0 = type { i32, [16 x double] }
7
8; CHECK: MII = 3 MAX_II = 13 (rec=3, res=2)
9
10define dso_local fastcc double @_ZN3povL9polysolveEiPdS0_() unnamed_addr #0 {
11  br label %1
12
131:                                                ; preds = %1, %0
14  br i1 undef, label %2, label %1
15
162:                                                ; preds = %1
17  br i1 undef, label %14, label %3
18
193:                                                ; preds = %3, %2
20  %4 = phi i64 [ %7, %3 ], [ undef, %2 ]
21  %5 = phi double [ %11, %3 ], [ undef, %2 ]
22  %6 = phi i64 [ %12, %3 ], [ undef, %2 ]
23  %7 = add nsw i64 %4, -1
24  %8 = fmul fast double %5, 1.000000e+07
25  %9 = getelementptr inbounds %0, ptr null, i64 1, i32 1, i64 %7
26  %10 = load double, ptr %9, align 8
27  %11 = fadd fast double %10, %8
28  %12 = add i64 %6, -1
29  %13 = icmp eq i64 %12, 0
30  br i1 %13, label %14, label %3
31
3214:                                               ; preds = %3, %2
33  %15 = phi double [ undef, %2 ], [ %11, %3 ]
34  %16 = fmul fast double %15, undef
35  ret double %16
36}
37