1; RUN: llc < %s -O0 -verify-machineinstrs -fast-isel-abort=1 -mtriple=powerpc64-unknown-linux-gnu -mcpu=pwr5 | FileCheck %s --check-prefix=ELF64 2 3; Test sitofp 4 5define void @sitofp_double_i32(i32 %a, double %b) nounwind { 6entry: 7; ELF64: sitofp_double_i32 8 %b.addr = alloca double, align 8 9 %conv = sitofp i32 %a to double 10; ELF64: std {{[0-9]+}}, -[[OFFSET:[0-9]+]](1) 11; ELF64: lfd {{[0-9]+}}, -[[OFFSET]](1) 12; ELF64: fcfid 13 store double %conv, double* %b.addr, align 8 14 ret void 15} 16 17define void @sitofp_double_i64(i64 %a, double %b) nounwind { 18entry: 19; ELF64: sitofp_double_i64 20 %b.addr = alloca double, align 8 21 %conv = sitofp i64 %a to double 22; ELF64: std {{[0-9]+}}, -[[OFFSET:[0-9]+]](1) 23; ELF64: lfd {{[0-9]+}}, -[[OFFSET]](1) 24; ELF64: fcfid 25 store double %conv, double* %b.addr, align 8 26 ret void 27} 28 29define void @sitofp_double_i16(i16 %a, double %b) nounwind { 30entry: 31; ELF64: sitofp_double_i16 32 %b.addr = alloca double, align 8 33 %conv = sitofp i16 %a to double 34; ELF64: extsh 35; ELF64: std {{[0-9]+}}, -[[OFFSET:[0-9]+]](1) 36; ELF64: lfd {{[0-9]+}}, -[[OFFSET]](1) 37; ELF64: fcfid 38 store double %conv, double* %b.addr, align 8 39 ret void 40} 41 42define void @sitofp_double_i8(i8 %a, double %b) nounwind { 43entry: 44; ELF64: sitofp_double_i8 45 %b.addr = alloca double, align 8 46 %conv = sitofp i8 %a to double 47; ELF64: extsb 48; ELF64: std {{[0-9]+}}, -[[OFFSET:[0-9]+]](1) 49; ELF64: lfd {{[0-9]+}}, -[[OFFSET]](1) 50; ELF64: fcfid 51 store double %conv, double* %b.addr, align 8 52 ret void 53} 54 55; Test fptosi 56 57define void @fptosi_float_i32(float %a) nounwind { 58entry: 59; ELF64: fptosi_float_i32 60 %b.addr = alloca i32, align 4 61 %conv = fptosi float %a to i32 62; ELF64: fctiwz 63; ELF64: stfd 64; ELF64: lwa 65 store i32 %conv, i32* %b.addr, align 4 66 ret void 67} 68 69define void @fptosi_float_i64(float %a) nounwind { 70entry: 71; ELF64: fptosi_float_i64 72 %b.addr = alloca i64, align 4 73 %conv = fptosi float %a to i64 74; ELF64: fctidz 75; ELF64: stfd 76; ELF64: ld 77 store i64 %conv, i64* %b.addr, align 4 78 ret void 79} 80 81define void @fptosi_double_i32(double %a) nounwind { 82entry: 83; ELF64: fptosi_double_i32 84 %b.addr = alloca i32, align 8 85 %conv = fptosi double %a to i32 86; ELF64: fctiwz 87; ELF64: stfd 88; ELF64: lwa 89 store i32 %conv, i32* %b.addr, align 8 90 ret void 91} 92 93define void @fptosi_double_i64(double %a) nounwind { 94entry: 95; ELF64: fptosi_double_i64 96 %b.addr = alloca i64, align 8 97 %conv = fptosi double %a to i64 98; ELF64: fctidz 99; ELF64: stfd 100; ELF64: ld 101 store i64 %conv, i64* %b.addr, align 8 102 ret void 103} 104 105; Test fptoui 106 107define void @fptoui_float_i32(float %a) nounwind { 108entry: 109; ELF64: fptoui_float_i32 110 %b.addr = alloca i32, align 4 111 %conv = fptoui float %a to i32 112; ELF64: fctidz 113; ELF64: stfd 114; ELF64: lwz 115 store i32 %conv, i32* %b.addr, align 4 116 ret void 117} 118 119define void @fptoui_double_i32(double %a) nounwind { 120entry: 121; ELF64: fptoui_double_i32 122 %b.addr = alloca i32, align 8 123 %conv = fptoui double %a to i32 124; ELF64: fctidz 125; ELF64: stfd 126; ELF64: lwz 127 store i32 %conv, i32* %b.addr, align 8 128 ret void 129} 130 131