Add some additional functions to the list of helper functions for
[oota-llvm.git] / test / CodeGen / Mips / hfptrcall.ll
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
2
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
13
14 ; Function Attrs: nounwind
15 define float @sv() #0 {
16 entry:
17   ret float 1.000000e+01
18 }
19 ; picel:        .ent    sv
20 ; picel:        lw      ${{[0-9]+}}, %call16(__mips16_ret_sf)(${{[0-9]+}})
21 ; picel:        .end    sv
22
23 ; Function Attrs: nounwind
24 define double @dv() #0 {
25 entry:
26   ret double 1.500000e+01
27 }
28
29 ; picel:        .ent    dv
30 ; picel:        lw      ${{[0-9]+}}, %call16(__mips16_ret_df)(${{[0-9]+}})
31 ; picel:        .end    dv
32
33 ; Function Attrs: nounwind
34 define { float, float } @scv() #0 {
35 entry:
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
43 }
44
45 ; picel:        .ent    scv
46 ; picel:        lw      ${{[0-9]+}}, %call16(__mips16_ret_sc)(${{[0-9]+}})
47 ; picel:        .end    scv
48
49 ; Function Attrs: nounwind
50 define { double, double } @dcv() #0 {
51 entry:
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
59 }
60
61 ; picel:        .ent    dcv
62 ; picel:        lw      ${{[0-9]+}}, %call16(__mips16_ret_dc)(${{[0-9]+}})
63 ; picel:        .end    dcv
64
65
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" }
67