1 ; RUN: llc -mtriple=mipsel-linux-gnu -march=mipsel -mcpu=mips16 -soft-float -mips16-hard-float -relocation-model=pic < %s | FileCheck %s -check-prefix=picel
3 @ptrsv = global float ()* @sv, align 4
4 @ptrdv = global double ()* @dv, align 4
5 @ptrscv = global { float, float } ()* @scv, align 4
6 @ptrdcv = global { double, double } ()* @dcv, align 4
7 @x = common global float 0.000000e+00, align 4
8 @.str = private unnamed_addr constant [4 x i8] c"%f\0A\00", align 1
9 @xd = common global double 0.000000e+00, align 8
10 @xy = common global { float, float } zeroinitializer, align 4
11 @.str1 = private unnamed_addr constant [10 x i8] c"%f + %fi\0A\00", align 1
12 @xyd = common global { double, double } zeroinitializer, align 8
14 ; Function Attrs: nounwind
15 define float @sv() #0 {
17 ret float 1.000000e+01
20 ; picel: lw ${{[0-9]+}}, %call16(__mips16_ret_sf)(${{[0-9]+}})
23 ; Function Attrs: nounwind
24 define double @dv() #0 {
26 ret double 1.500000e+01
30 ; picel: lw ${{[0-9]+}}, %call16(__mips16_ret_df)(${{[0-9]+}})
33 ; Function Attrs: nounwind
34 define { float, float } @scv() #0 {
36 %retval = alloca { float, float }, align 4
37 %real = getelementptr inbounds { float, float }* %retval, i32 0, i32 0
38 %imag = getelementptr inbounds { float, float }* %retval, i32 0, i32 1
39 store float 5.000000e+00, float* %real
40 store float 9.900000e+01, float* %imag
41 %0 = load { float, float }* %retval
42 ret { float, float } %0
46 ; picel: lw ${{[0-9]+}}, %call16(__mips16_ret_sc)(${{[0-9]+}})
49 ; Function Attrs: nounwind
50 define { double, double } @dcv() #0 {
52 %retval = alloca { double, double }, align 8
53 %real = getelementptr inbounds { double, double }* %retval, i32 0, i32 0
54 %imag = getelementptr inbounds { double, double }* %retval, i32 0, i32 1
55 store double 0x416BC8B0A0000000, double* %real
56 store double 0x41CDCCB763800000, double* %imag
57 %0 = load { double, double }* %retval
58 ret { double, double } %0
62 ; picel: lw ${{[0-9]+}}, %call16(__mips16_ret_dc)(${{[0-9]+}})
66 attributes #0 = { nounwind "less-precise-fpmad"="false" "no-frame-pointer-elim"="true" "no-frame-pointer-elim-non-leaf"="true" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "unsafe-fp-math"="false" "use-soft-float"="true" }