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 | \ 4; RUN: FileCheck %s 5 6%struct._IO_FILE = type { i32, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, %struct._IO_marker*, %struct._IO_FILE*, i32, i32, i64, i16, i8, [1 x i8], i8*, i64, i8*, i8*, i8*, i8*, i64, i32, [20 x i8] } 7%struct._IO_marker = type { %struct._IO_marker*, %struct._IO_FILE*, i32 } 8 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 %struct._IO_FILE*, align 8 12 13; Function Attrs: noinline nounwind optnone 14define internal void @loadFP(double* %d) #0 { 15; CHECK-LABEL: loadFP: 16; CHECK: .localentry loadFP, 1 17; CHECK-NEXT: # %bb.0: # %entry 18; CHECK-NEXT: mflr r0 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: lis r3, 16403 26; CHECK-NEXT: ori r3, r3, 62914 27; CHECK-NEXT: sldi r3, r3, 32 28; CHECK-NEXT: oris r3, r3, 36700 29; CHECK-NEXT: ori r3, r3, 10486 30; CHECK-NEXT: std r3, 0(r4) 31; CHECK-NEXT: addi r1, r1, 112 32; CHECK-NEXT: ld r0, 16(r1) 33; CHECK-NEXT: mtlr r0 34; CHECK-NEXT: blr 35entry: 36 %d.addr = alloca double*, align 8 37 store double* %d, double** %d.addr, align 8 38 %call = call signext i32 (i8*, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0)) 39 %0 = load double*, double** %d.addr, align 8 40 store double 4.990000e+00, double* %0, align 8 41 ret void 42} 43 44declare signext i32 @printf(i8*, ...) 45 46; Function Attrs: noinline nounwind optnone 47define internal void @loadGV() #0 { 48; CHECK-LABEL: loadGV: 49; CHECK: .localentry loadGV, 1 50; CHECK-NEXT: # %bb.0: # %entry 51; CHECK-NEXT: mflr r0 52; CHECK-NEXT: std r0, 16(r1) 53; CHECK-NEXT: stdu r1, -96(r1) 54; CHECK-NEXT: paddi r3, 0, .L.str.1@PCREL, 1 55; CHECK-NEXT: bl printf@notoc 56; CHECK-NEXT: pld r3, stdout@got@pcrel(0), 1 57; CHECK-NEXT: ld r4, 0(r3) 58; CHECK-NEXT: li r3, 97 59; CHECK-NEXT: bl _IO_putc@notoc 60; CHECK-NEXT: addi r1, r1, 96 61; CHECK-NEXT: ld r0, 16(r1) 62; CHECK-NEXT: mtlr r0 63; CHECK-NEXT: blr 64entry: 65 %call = call signext i32 (i8*, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.1, i64 0, i64 0)) 66 %0 = load %struct._IO_FILE*, %struct._IO_FILE** @stdout, align 8 67 %call1 = call signext i32 @_IO_putc(i32 signext 97, %struct._IO_FILE* %0) 68 ret void 69} 70 71declare signext i32 @_IO_putc(i32 signext, %struct._IO_FILE*) 72 73attributes #0 = { noinline nounwind optnone } 74