1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc -mcpu=pwr9 -ppc-asm-full-reg-names -ppc-vsr-nums-as-vr \
3 ; RUN: -mtriple=powerpc64le-unknown-unknown < %s | FileCheck %s \
4 ; RUN: -check-prefix=CHECK-P9
6 @_ZL3num = external dso_local unnamed_addr global float, align 4
8 define dso_local void @main() local_unnamed_addr personality ptr @__gxx_personality_v0 {
9 ; CHECK-P9-LABEL: main:
10 ; CHECK-P9: # %bb.0: # %bb
11 ; CHECK-P9-NEXT: mflr r0
12 ; CHECK-P9-NEXT: stdu r1, -32(r1)
13 ; CHECK-P9-NEXT: std r0, 48(r1)
14 ; CHECK-P9-NEXT: .cfi_def_cfa_offset 32
15 ; CHECK-P9-NEXT: .cfi_offset lr, 16
16 ; CHECK-P9-NEXT: bl malloc
18 ; CHECK-P9-NEXT: addis r4, r2, _ZL3num@toc@ha
19 ; CHECK-P9-NEXT: addi r3, r3, -25400
20 ; CHECK-P9-NEXT: lfs f0, _ZL3num@toc@l(r4)
21 ; CHECK-P9-NEXT: addis r4, r2, .LCPI0_0@toc@ha
22 ; CHECK-P9-NEXT: lfs f1, .LCPI0_0@toc@l(r4)
23 ; CHECK-P9-NEXT: li r4, 0
24 ; CHECK-P9-NEXT: xsmulsp f0, f0, f1
25 ; CHECK-P9-NEXT: cmpldi r4, 0
26 ; CHECK-P9-NEXT: beq- cr0, .LBB0_2
27 ; CHECK-P9-NEXT: .p2align 5
28 ; CHECK-P9-NEXT: .LBB0_1: # %bb5
30 ; CHECK-P9-NEXT: addi r3, r3, 25400
31 ; CHECK-P9-NEXT: addi r4, r4, 25400
32 ; CHECK-P9-NEXT: stfs f0, 15240(r3)
33 ; CHECK-P9-NEXT: cmpldi r4, 0
34 ; CHECK-P9-NEXT: bne+ cr0, .LBB0_1
35 ; CHECK-P9-NEXT: .LBB0_2: # %bb16
37 %i = tail call noalias dereferenceable_or_null(6451600) ptr @malloc()
40 bb2: ; preds = %bb5, %bb
41 %i3 = phi i64 [ 0, %bb ], [ %i15, %bb5 ]
42 %i4 = icmp eq i64 %i3, 0
43 br i1 %i4, label %bb16, label %bb5
46 %i6 = mul nuw nsw i64 %i3, 1270
47 %i7 = add nuw nsw i64 %i6, 0
48 %i8 = getelementptr inbounds float, ptr %i, i64 %i7
49 store float undef, ptr %i8, align 4
50 %i9 = add nuw nsw i64 %i3, 3
51 %i10 = load float, ptr @_ZL3num, align 4
52 %i11 = fmul float %i10, 0x3E00000000000000
53 %i12 = mul nuw nsw i64 %i9, 1270
54 %i13 = add nuw nsw i64 %i12, 0
55 %i14 = getelementptr inbounds float, ptr %i, i64 %i13
56 store float %i11, ptr %i14, align 4
57 %i15 = add nuw nsw i64 %i3, 5
64 declare i32 @__gxx_personality_v0(...)
66 declare ptr @malloc() local_unnamed_addr