brintos

brintos / llvm-project-archived public Read only

0
0
Text · 4.5 KiB · 2babc67 Raw
126 lines · plain
1; RUN: llc -mtriple=mipsel-linux-gnu -mattr=mips16 -relocation-model=pic < %s | FileCheck %s -check-prefix=picel2 3@ptrsv = global ptr @sv, align 44@ptrdv = global ptr @dv, align 45@ptrscv = global ptr @scv, align 46@ptrdcv = global ptr @dcv, align 47@x = common global float 0.000000e+00, align 48@.str = private unnamed_addr constant [4 x i8] c"%f\0A\00", align 19@xd = common global double 0.000000e+00, align 810@xy = common global { float, float } zeroinitializer, align 411@.str1 = private unnamed_addr constant [10 x i8] c"%f + %fi\0A\00", align 112@xyd = common global { double, double } zeroinitializer, align 813 14; Function Attrs: nounwind15define float @sv() #0 {16entry:17  ret float 1.000000e+0118}19; picel: 	.ent	sv20; picel: 	lw	${{[0-9]+}}, %call16(__mips16_ret_sf)(${{[0-9]+}})21; picel:	.end	sv22 23; Function Attrs: nounwind24define double @dv() #0 {25entry:26  ret double 1.500000e+0127}28 29; picel: 	.ent	dv30; picel: 	lw	${{[0-9]+}}, %call16(__mips16_ret_df)(${{[0-9]+}})31; picel:	.end	dv32 33; Function Attrs: nounwind34define { float, float } @scv() #0 {35entry:36  %retval = alloca { float, float }, align 437  %real = getelementptr inbounds { float, float }, ptr %retval, i32 0, i32 038  %imag = getelementptr inbounds { float, float }, ptr %retval, i32 0, i32 139  store float 5.000000e+00, ptr %real40  store float 9.900000e+01, ptr %imag41  %0 = load { float, float }, ptr %retval42  ret { float, float } %043}44 45; picel: 	.ent	scv46; picel: 	lw	${{[0-9]+}}, %call16(__mips16_ret_sc)(${{[0-9]+}})47; picel:	.end	scv48 49; Function Attrs: nounwind50define { double, double } @dcv() #0 {51entry:52  %retval = alloca { double, double }, align 853  %real = getelementptr inbounds { double, double }, ptr %retval, i32 0, i32 054  %imag = getelementptr inbounds { double, double }, ptr %retval, i32 0, i32 155  store double 0x416BC8B0A0000000, ptr %real56  store double 0x41CDCCB763800000, ptr %imag57  %0 = load { double, double }, ptr %retval58  ret { double, double } %059}60 61; picel: 	.ent	dcv62; picel: 	lw	${{[0-9]+}}, %call16(__mips16_ret_dc)(${{[0-9]+}})63; picel:	.end	dcv64 65; Function Attrs: nounwind66define i32 @main() #0 {67entry:68  %0 = load ptr, ptr @ptrsv, align 469  %call = call float %0()70  store float %call, ptr @x, align 471  %1 = load float, ptr @x, align 472  %conv = fpext float %1 to double73  %call1 = call i32 (ptr, ...) @printf(ptr @.str, double %conv)74  %2 = load ptr, ptr @ptrdv, align 475  %call2 = call double %2()76  store double %call2, ptr @xd, align 877  %3 = load double, ptr @xd, align 878  %call3 = call i32 (ptr, ...) @printf(ptr @.str, double %3)79  %4 = load ptr, ptr @ptrscv, align 480  %call4 = call { float, float } %4()81  %5 = extractvalue { float, float } %call4, 082  %6 = extractvalue { float, float } %call4, 183  store float %5, ptr @xy84  store float %6, ptr getelementptr inbounds ({ float, float }, ptr @xy, i32 0, i32 1)85  %xy.real = load float, ptr @xy86  %xy.imag = load float, ptr getelementptr inbounds ({ float, float }, ptr @xy, i32 0, i32 1)87  %conv5 = fpext float %xy.real to double88  %conv6 = fpext float %xy.imag to double89  %xy.real7 = load float, ptr @xy90  %xy.imag8 = load float, ptr getelementptr inbounds ({ float, float }, ptr @xy, i32 0, i32 1)91  %conv9 = fpext float %xy.real7 to double92  %conv10 = fpext float %xy.imag8 to double93  %call11 = call i32 (ptr, ...) @printf(ptr @.str1, double %conv5, double %conv10)94  %7 = load ptr, ptr @ptrdcv, align 495  %call12 = call { double, double } %7()96  %8 = extractvalue { double, double } %call12, 097  %9 = extractvalue { double, double } %call12, 198  store double %8, ptr @xyd99  store double %9, ptr getelementptr inbounds ({ double, double }, ptr @xyd, i32 0, i32 1)100  %xyd.real = load double, ptr @xyd101  %xyd.imag = load double, ptr getelementptr inbounds ({ double, double }, ptr @xyd, i32 0, i32 1)102  %xyd.real13 = load double, ptr @xyd103  %xyd.imag14 = load double, ptr getelementptr inbounds ({ double, double }, ptr @xyd, i32 0, i32 1)104  %call15 = call i32 (ptr, ...) @printf(ptr @.str1, double %xyd.real, double %xyd.imag14)105  ret i32 0106}107 108; picel: 	.ent	main109 110; picel:	lw	${{[0-9]+}}, %got(__mips16_call_stub_sf_0)(${{[0-9]+}})111 112; picel:	lw	${{[0-9]+}}, %got(__mips16_call_stub_df_0)(${{[0-9]+}})113 114; picel:	lw	${{[0-9]+}}, %got(__mips16_call_stub_sc_0)(${{[0-9]+}})115 116; picel:	lw	${{[0-9]+}}, %got(__mips16_call_stub_dc_0)(${{[0-9]+}})117 118 119declare i32 @printf(ptr, ...) #1120 121attributes #0 = { nounwind "less-precise-fpmad"="false" "frame-pointer"="all" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "use-soft-float"="false" }122attributes #1 = { "less-precise-fpmad"="false" "frame-pointer"="all" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "use-soft-float"="false" }123 124 125 126