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: std 0, 16(1)
14 ; CHECK-NEXT: stdu 1, -64(1)
15 ; CHECK-NEXT: ld 29, 0(3)
16 ; CHECK-NEXT: ld 30, 32(1)
17 ; CHECK-NEXT: cmpld 30, 29
18 ; CHECK-NEXT: bge- 0, .LBB0_2
19 ; CHECK-NEXT: .p2align 5
20 ; CHECK-NEXT: .LBB0_1: # %bounds.ok
22 ; CHECK-NEXT: lfsx 2, 0, 3
23 ; CHECK-NEXT: xxlxor 1, 1, 1
24 ; CHECK-NEXT: bl fmodf
26 ; CHECK-NEXT: addi 30, 30, 1
27 ; CHECK-NEXT: stfsx 1, 0, 3
28 ; CHECK-NEXT: cmpld 30, 29
29 ; CHECK-NEXT: blt+ 0, .LBB0_1
30 ; CHECK-NEXT: .LBB0_2: # %bounds.fail
31 ; CHECK-NEXT: std 30, 32(1)
32 %pos = alloca i64, align 8
35 forcond: ; preds = %bounds.ok, %0
36 %1 = load i64, i64* %pos
37 %.len1 = load i64, i64* undef
38 %bounds.cmp = icmp ult i64 %1, %.len1
39 br i1 %bounds.cmp, label %bounds.ok, label %bounds.fail
41 bounds.ok: ; preds = %forcond
42 %2 = load float, float* undef
43 %3 = frem float 0.000000e+00, %2
44 store float %3, float* undef
45 %4 = load i64, i64* %pos
47 store i64 %5, i64* %pos
50 bounds.fail: ; preds = %forcond