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() #0 comdat {
11 ; CHECK-NEXT: .cfi_def_cfa_offset 64
12 ; CHECK-NEXT: .cfi_offset lr, 16
13 ; CHECK-NEXT: .cfi_offset r29, -24
14 ; CHECK-NEXT: .cfi_offset r30, -16
15 ; CHECK-NEXT: std 29, -24(1) # 8-byte Folded Spill
16 ; CHECK-NEXT: std 30, -16(1) # 8-byte Folded Spill
17 ; CHECK-NEXT: std 0, 16(1)
18 ; CHECK-NEXT: stdu 1, -64(1)
19 ; CHECK-NEXT: ld 29, 0(3)
20 ; CHECK-NEXT: ld 30, 32(1)
21 ; CHECK-NEXT: cmpld 30, 29
22 ; CHECK-NEXT: bge- 0, .LBB0_2
23 ; CHECK-NEXT: .p2align 5
24 ; CHECK-NEXT: .LBB0_1: # %bounds.ok
26 ; CHECK-NEXT: xxlxor 1, 1, 1
27 ; CHECK-NEXT: bl fmodf
29 ; CHECK-NEXT: addi 30, 30, 1
30 ; CHECK-NEXT: stfsx 1, 0, 3
31 ; CHECK-NEXT: cmpld 30, 29
32 ; CHECK-NEXT: blt+ 0, .LBB0_1
33 ; CHECK-NEXT: .LBB0_2: # %bounds.fail
34 ; CHECK-NEXT: std 30, 32(1)
35 %pos = alloca i64, align 8
38 forcond: ; preds = %bounds.ok, %0
39 %1 = load i64, i64* %pos
40 %.len1 = load i64, i64* undef
41 %bounds.cmp = icmp ult i64 %1, %.len1
42 br i1 %bounds.cmp, label %bounds.ok, label %bounds.fail
44 bounds.ok: ; preds = %forcond
45 %2 = load float, float* undef
46 %3 = frem float 0.000000e+00, %2
47 store float %3, float* undef
48 %4 = load i64, i64* %pos
50 store i64 %5, i64* %pos
53 bounds.fail: ; preds = %forcond