Home | History | Annotate | Download | only in Mips
      1 ; RUN: llc -march=mips < %s | FileCheck %s
      2 
      3 ; FIXME: Disabled because it unpredictably fails on certain platforms.
      4 ; REQUIRES: disabled
      5 
      6 ; $f12, $f14
      7 ; CHECK: ldc1 $f12, %lo
      8 ; CHECK: ldc1 $f14, %lo
      9 define void @testlowercall0() nounwind {
     10 entry:
     11   tail call void @f0(double 5.000000e+00, double 6.000000e+00) nounwind
     12   ret void
     13 }
     14 
     15 declare void @f0(double, double)
     16 
     17 ; $f12, $f14
     18 ; CHECK: lwc1 $f12, %lo
     19 ; CHECK: lwc1 $f14, %lo
     20 define void @testlowercall1() nounwind {
     21 entry:
     22   tail call void @f1(float 8.000000e+00, float 9.000000e+00) nounwind
     23   ret void
     24 }
     25 
     26 declare void @f1(float, float)
     27 
     28 ; $f12, $f14
     29 ; CHECK: lwc1 $f12, %lo
     30 ; CHECK: ldc1 $f14, %lo
     31 define void @testlowercall2() nounwind {
     32 entry:
     33   tail call void @f2(float 8.000000e+00, double 6.000000e+00) nounwind
     34   ret void
     35 }
     36 
     37 declare void @f2(float, double)
     38 
     39 ; $f12, $f14
     40 ; CHECK: ldc1 $f12, %lo
     41 ; CHECK: lwc1 $f14, %lo
     42 define void @testlowercall3() nounwind {
     43 entry:
     44   tail call void @f3(double 5.000000e+00, float 9.000000e+00) nounwind
     45   ret void
     46 }
     47 
     48 declare void @f3(double, float)
     49 
     50 ; $4, $5, $6, $7
     51 ; CHECK: addiu $4, $zero, 12
     52 ; CHECK: addiu $5, $zero, 13
     53 ; CHECK: addiu $6, $zero, 14
     54 ; CHECK: addiu $7, $zero, 15
     55 define void @testlowercall4() nounwind {
     56 entry:
     57   tail call void @f4(i32 12, i32 13, i32 14, i32 15) nounwind
     58   ret void
     59 }
     60 
     61 declare void @f4(i32, i32, i32, i32)
     62 
     63 ; $f12, $6, stack
     64 ; CHECK: sw
     65 ; CHECK: sw
     66 ; CHECK: ldc1 $f12, %lo
     67 ; CHECK: addiu $6, $zero, 23
     68 define void @testlowercall5() nounwind {
     69 entry:
     70   tail call void @f5(double 1.500000e+01, i32 23, double 1.700000e+01) nounwind
     71   ret void
     72 }
     73 
     74 declare void @f5(double, i32, double)
     75 
     76 ; $f12, $6, $7
     77 ; CHECK: ldc1 $f12, %lo
     78 ; CHECK: addiu $6, $zero, 33
     79 ; CHECK: addiu $7, $zero, 24
     80 define void @testlowercall6() nounwind {
     81 entry:
     82   tail call void @f6(double 2.500000e+01, i32 33, i32 24) nounwind
     83   ret void
     84 }
     85 
     86 declare void @f6(double, i32, i32)
     87 
     88 ; $f12, $5, $6
     89 ; CHECK: lwc1 $f12, %lo
     90 ; CHECK: addiu $5, $zero, 43
     91 ; CHECK: addiu $6, $zero, 34
     92 define void @testlowercall7() nounwind {
     93 entry:
     94   tail call void @f7(float 1.800000e+01, i32 43, i32 34) nounwind
     95   ret void
     96 }
     97 
     98 declare void @f7(float, i32, i32)
     99 
    100 ; $4, $5, $6, stack
    101 ; CHECK: sw
    102 ; CHECK: sw
    103 ; CHECK: addiu $4, $zero, 22
    104 ; CHECK: addiu $5, $zero, 53
    105 ; CHECK: addiu $6, $zero, 44
    106 define void @testlowercall8() nounwind {
    107 entry:
    108   tail call void @f8(i32 22, i32 53, i32 44, double 4.000000e+00) nounwind
    109   ret void
    110 }
    111 
    112 declare void @f8(i32, i32, i32, double)
    113 
    114 ; $4, $5, $6, $7
    115 ; CHECK: addiu $4, $zero, 32
    116 ; CHECK: addiu $5, $zero, 63
    117 ; CHECK: addiu $6, $zero, 54
    118 ; CHECK: ori $7
    119 define void @testlowercall9() nounwind {
    120 entry:
    121   tail call void @f9(i32 32, i32 63, i32 54, float 1.100000e+01) nounwind
    122   ret void
    123 }
    124 
    125 declare void @f9(i32, i32, i32, float)
    126 
    127 ; $4, $5, ($6, $7)
    128 ; CHECK: addiu $4, $zero, 42
    129 ; CHECK: addiu $5, $zero, 73
    130 ; CHECK: addiu $6, $zero, 0
    131 ; CHECK: ori $7
    132 define void @testlowercall10() nounwind {
    133 entry:
    134   tail call void @f10(i32 42, i32 73, double 2.700000e+01) nounwind
    135   ret void
    136 }
    137 
    138 declare void @f10(i32, i32, double)
    139 
    140 ; $4, ($6, $7)
    141 ; CHECK: addiu $4, $zero, 52
    142 ; CHECK: addiu $6, $zero, 0
    143 ; CHECK: ori $7
    144 define void @testlowercall11() nounwind {
    145 entry:
    146   tail call void @f11(i32 52, double 1.600000e+01) nounwind
    147   ret void
    148 }
    149 
    150 declare void @f11(i32, double)
    151 
    152 ; $f12, $f14, $6, $7
    153 ; CHECK: lwc1 $f12, %lo
    154 ; CHECK: lwc1 $f14, %lo
    155 ; CHECK: ori $6
    156 ; CHECK: ori $7
    157 define void @testlowercall12() nounwind {
    158 entry:
    159   tail call void @f12(float 2.800000e+01, float 1.900000e+01, float 1.000000e+01, float 2.100000e+01) nounwind
    160   ret void
    161 }
    162 
    163 declare void @f12(float, float, float, float)
    164 
    165 ; $f12, $5, $6, $7
    166 ; CHECK: lwc1 $f12, %lo
    167 ; CHECK: addiu $5, $zero, 83
    168 ; CHECK: ori $6
    169 ; CHECK: addiu $7, $zero, 25
    170 define void @testlowercall13() nounwind {
    171 entry:
    172   tail call void @f13(float 3.800000e+01, i32 83, float 2.000000e+01, i32 25) nounwind
    173   ret void
    174 }
    175 
    176 
    177 declare void @f13(float, i32, float, i32)
    178 
    179 ; $f12, $f14, $7
    180 ; CHECK: ldc1 $f12, %lo
    181 ; CHECK: lwc1 $f14, %lo
    182 ; CHECK: ori $7
    183 define void @testlowercall14() nounwind {
    184 entry:
    185   tail call void @f14(double 3.500000e+01, float 2.900000e+01, float 3.000000e+01) nounwind
    186   ret void
    187 }
    188 
    189 declare void @f14(double, float, float)
    190 
    191 ; $f12, $f14, ($6, $7)
    192 ; CHECK: lwc1 $f12, %lo
    193 ; CHECK: lwc1 $f14, %lo
    194 ; CHECK: addiu $6, $zero, 0
    195 ; CHECK: ori $7
    196 define void @testlowercall15() nounwind {
    197 entry:
    198   tail call void @f15(float 4.800000e+01, float 3.900000e+01, double 3.700000e+01) nounwind
    199   ret void
    200 }
    201 
    202 declare void @f15(float, float, double)
    203 
    204 ; $4, $5, $6, $7
    205 ; CHECK: addiu $4, $zero, 62
    206 ; CHECK: ori $5
    207 ; CHECK: addiu $6, $zero, 64
    208 ; CHECK: ori $7
    209 define void @testlowercall16() nounwind {
    210 entry:
    211   tail call void @f16(i32 62, float 4.900000e+01, i32 64, float 3.100000e+01) nounwind
    212   ret void
    213 }
    214 
    215 declare void @f16(i32, float, i32, float)
    216 
    217 ; $4, $5, $6, $7
    218 ; CHECK: addiu $4, $zero, 72
    219 ; CHECK: ori $5
    220 ; CHECK: addiu $6, $zero, 74
    221 ; CHECK: addiu $7, $zero, 35
    222 define void @testlowercall17() nounwind {
    223 entry:
    224   tail call void @f17(i32 72, float 5.900000e+01, i32 74, i32 35) nounwind
    225   ret void
    226 }
    227 
    228 declare void @f17(i32, float, i32, i32)
    229 
    230 ; $4, $5, $6, $7
    231 ; CHECK: addiu $4, $zero, 82
    232 ; CHECK: addiu $5, $zero, 93
    233 ; CHECK: ori $6
    234 ; CHECK: addiu $7, $zero, 45
    235 define void @testlowercall18() nounwind {
    236 entry:
    237   tail call void @f18(i32 82, i32 93, float 4.000000e+01, i32 45) nounwind
    238   ret void
    239 }
    240 
    241 declare void @f18(i32, i32, float, i32)
    242 
    243 
    244 ; $4, ($6, $7), stack
    245 ; CHECK: sw
    246 ; CHECK: sw
    247 ; CHECK: addiu $4, $zero, 92
    248 ; CHECK: addiu $6, $zero, 0
    249 ; CHECK: ori $7
    250 define void @testlowercall20() nounwind {
    251 entry:
    252   tail call void @f20(i32 92, double 2.600000e+01, double 4.700000e+01) nounwind
    253   ret void
    254 }
    255 
    256 declare void @f20(i32, double, double)
    257 
    258 ; $f12, $5
    259 ; CHECK: lwc1 $f12, %lo
    260 ; CHECK: addiu $5, $zero, 103
    261 define void @testlowercall21() nounwind {
    262 entry:
    263   tail call void @f21(float 5.800000e+01, i32 103) nounwind
    264   ret void
    265 }
    266 
    267 declare void @f21(float, i32)
    268 
    269 ; $f12, $5, ($6, $7)
    270 ; CHECK: lwc1 $f12, %lo
    271 ; CHECK: addiu $5, $zero, 113
    272 ; CHECK: addiu $6, $zero, 0
    273 ; CHECK: ori $7
    274 define void @testlowercall22() nounwind {
    275 entry:
    276   tail call void @f22(float 6.800000e+01, i32 113, double 5.700000e+01) nounwind
    277   ret void
    278 }
    279 
    280 declare void @f22(float, i32, double)
    281 
    282 ; $f12, f6
    283 ; CHECK: ldc1 $f12, %lo
    284 ; CHECK: addiu $6, $zero, 123
    285 define void @testlowercall23() nounwind {
    286 entry:
    287   tail call void @f23(double 4.500000e+01, i32 123) nounwind
    288   ret void
    289 }
    290 
    291 declare void @f23(double, i32)
    292 
    293 ; $f12,$6, stack
    294 ; CHECK: sw
    295 ; CHECK: sw
    296 ; CHECK: ldc1 $f12, %lo
    297 ; CHECK: addiu $6, $zero, 133
    298 define void @testlowercall24() nounwind {
    299 entry:
    300   tail call void @f24(double 5.500000e+01, i32 133, double 6.700000e+01) nounwind
    301   ret void
    302 }
    303 
    304 declare void @f24(double, i32, double)
    305 
    306 ; CHECK: lwc1 $f12, %lo
    307 ; lwc1 $f12, %lo
    308 ; CHECK: lwc1 $f14, %lo
    309 ; CHECK: ori $6
    310 ; CHECK: ori $7
    311 ; CHECK: lwc1 $f12, %lo
    312 ; CHECK: addiu $5, $zero, 83
    313 ; CHECK: ori $6
    314 ; CHECK: addiu $7, $zero, 25
    315 ; CHECK: addiu $4, $zero, 82
    316 ; CHECK: addiu $5, $zero, 93
    317 ; CHECK: ori $6
    318 ; CHECK: addiu $7, $zero, 45
    319 define void @testlowercall25() nounwind {
    320 entry:
    321   tail call void @f12(float 2.800000e+01, float 1.900000e+01, float 1.000000e+01, float 2.100000e+01) nounwind
    322   tail call void @f13(float 3.800000e+01, i32 83, float 2.000000e+01, i32 25) nounwind
    323   tail call void @f18(i32 82, i32 93, float 4.000000e+01, i32 45) nounwind
    324   ret void
    325 }
    326