1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc -verify-machineinstrs -mtriple=powerpc64le-unknown-unknown < %s | \
3 ; RUN: FileCheck %s --implicit-check-not=mtctr --implicit-check-not=bdnz
6 ; No CTR loop due to frem (since it is always a call).
7 define void @test() nounwind comdat {
11 ; CHECK-NEXT: std 29, -24(1) # 8-byte Folded Spill
12 ; CHECK-NEXT: std 30, -16(1) # 8-byte Folded Spill
13 ; CHECK-NEXT: stdu 1, -64(1)
14 ; CHECK-NEXT: std 0, 80(1)
15 ; CHECK-NEXT: ld 3, 0(3)
16 ; CHECK-NEXT: ld 30, 32(1)
17 ; CHECK-NEXT: sub 4, 3, 30
18 ; CHECK-NEXT: cmpld 4, 3
19 ; CHECK-NEXT: iselgt 3, 0, 4
20 ; CHECK-NEXT: addi 29, 3, 1
21 ; CHECK-NEXT: .p2align 4
22 ; CHECK-NEXT: .LBB0_1: # %forcond
24 ; CHECK-NEXT: addi 29, 29, -1
25 ; CHECK-NEXT: cmpldi 29, 0
26 ; CHECK-NEXT: bc 4, 1, .LBB0_3
27 ; CHECK-NEXT: # %bb.2: # %bounds.ok
29 ; CHECK-NEXT: lfs 2, 0(3)
30 ; CHECK-NEXT: xxlxor 1, 1, 1
31 ; CHECK-NEXT: bl fmodf
33 ; CHECK-NEXT: stfs 1, 0(3)
34 ; CHECK-NEXT: addi 30, 30, 1
35 ; CHECK-NEXT: b .LBB0_1
36 ; CHECK-NEXT: .LBB0_3: # %bounds.fail
37 ; CHECK-NEXT: std 30, 32(1)
38 %pos = alloca i64, align 8
41 forcond: ; preds = %bounds.ok, %0
42 %1 = load i64, ptr %pos
43 %.len1 = load i64, ptr undef
44 %bounds.cmp = icmp ult i64 %1, %.len1
45 br i1 %bounds.cmp, label %bounds.ok, label %bounds.fail
47 bounds.ok: ; preds = %forcond
48 %2 = load float, ptr undef
49 %3 = frem float 0.000000e+00, %2
50 store float %3, ptr undef
51 %4 = load i64, ptr %pos
53 store i64 %5, ptr %pos
56 bounds.fail: ; preds = %forcond