1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc -O0 -verify-machineinstrs -mtriple=powerpc64le-unknown-linux-gnu \
3 ; RUN: -fast-isel -mcpu=pwr10 -ppc-asm-full-reg-names -ppc-vsr-nums-as-vr < %s | \
6 %struct._IO_FILE = type { i32, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, i32, i32, i64, i16, i8, [1 x i8], ptr, i64, ptr, ptr, ptr, ptr, i64, i32, [20 x i8] }
7 %struct._IO_marker = type { ptr, ptr, i32 }
9 @.str = private unnamed_addr constant [25 x i8] c"Breaking the TOC for FP\0A\00", align 1
10 @.str.1 = private unnamed_addr constant [25 x i8] c"Breaking the TOC for GV\0A\00", align 1
11 @stdout = external global ptr, align 8
13 ; Function Attrs: noinline nounwind optnone
14 define internal void @loadFP(ptr %d) #0 {
15 ; CHECK-LABEL: loadFP:
16 ; CHECK: .localentry loadFP, 1
17 ; CHECK-NEXT: # %bb.0: # %entry
19 ; CHECK-NEXT: std r0, 16(r1)
20 ; CHECK-NEXT: stdu r1, -112(r1)
21 ; CHECK-NEXT: std r3, 104(r1)
22 ; CHECK-NEXT: paddi r3, 0, .L.str@PCREL, 1
23 ; CHECK-NEXT: bl printf@notoc
24 ; CHECK-NEXT: ld r4, 104(r1)
25 ; CHECK-NEXT: pli r5, 1075049922
26 ; CHECK-NEXT: pli r3, 2405181686
27 ; CHECK-NEXT: rldimi r3, r5, 32, 0
28 ; CHECK-NEXT: std r3, 0(r4)
29 ; CHECK-NEXT: addi r1, r1, 112
30 ; CHECK-NEXT: ld r0, 16(r1)
34 %d.addr = alloca ptr, align 8
35 store ptr %d, ptr %d.addr, align 8
36 %call = call signext i32 (ptr, ...) @printf(ptr @.str)
37 %0 = load ptr, ptr %d.addr, align 8
38 store double 4.990000e+00, ptr %0, align 8
42 declare signext i32 @printf(ptr, ...)
44 ; Function Attrs: noinline nounwind optnone
45 define internal void @loadGV() #0 {
46 ; CHECK-LABEL: loadGV:
47 ; CHECK: .localentry loadGV, 1
48 ; CHECK-NEXT: # %bb.0: # %entry
50 ; CHECK-NEXT: std r0, 16(r1)
51 ; CHECK-NEXT: stdu r1, -96(r1)
52 ; CHECK-NEXT: paddi r3, 0, .L.str.1@PCREL, 1
53 ; CHECK-NEXT: bl printf@notoc
54 ; CHECK-NEXT: pld r3, stdout@got@pcrel(0), 1
55 ; CHECK-NEXT: ld r4, 0(r3)
56 ; CHECK-NEXT: li r3, 97
57 ; CHECK-NEXT: bl _IO_putc@notoc
58 ; CHECK-NEXT: addi r1, r1, 96
59 ; CHECK-NEXT: ld r0, 16(r1)
63 %call = call signext i32 (ptr, ...) @printf(ptr @.str.1)
64 %0 = load ptr, ptr @stdout, align 8
65 %call1 = call signext i32 @_IO_putc(i32 signext 97, ptr %0)
69 declare signext i32 @_IO_putc(i32 signext, ptr)
71 attributes #0 = { noinline nounwind optnone }