brintos

brintos / llvm-project-archived public Read only

0
0
Text · 11.2 KiB · 7c6fdd5 Raw
383 lines · plain
1; RUN: llc -mtriple=mipsel -mattr=mips16 -relocation-model=pic -O3 \2; RUN:     -verify-machineinstrs < %s | FileCheck %s -check-prefix=16hf3 4@x = global float 5.000000e+00, align 45@y = global float 1.500000e+01, align 46@xd = global double 6.000000e+00, align 87@yd = global double 1.800000e+01, align 88@two = global i32 2, align 49@addsf3_result = common global float 0.000000e+00, align 410@adddf3_result = common global double 0.000000e+00, align 811@subsf3_result = common global float 0.000000e+00, align 412@subdf3_result = common global double 0.000000e+00, align 813@mulsf3_result = common global float 0.000000e+00, align 414@muldf3_result = common global double 0.000000e+00, align 815@divsf3_result = common global float 0.000000e+00, align 416@divdf3_result = common global double 0.000000e+00, align 817@extendsfdf2_result = common global double 0.000000e+00, align 818@xd2 = global double 0x40147E6B74B4CF6A, align 819@truncdfsf2_result = common global float 0.000000e+00, align 420@fix_truncsfsi_result = common global i32 0, align 421@fix_truncdfsi_result = common global i32 0, align 422@si = global i32 -9, align 423@ui = global i32 9, align 424@floatsisf_result = common global float 0.000000e+00, align 425@floatsidf_result = common global double 0.000000e+00, align 826@floatunsisf_result = common global float 0.000000e+00, align 427@floatunsidf_result = common global double 0.000000e+00, align 828@xx = global float 5.000000e+00, align 429@eqsf2_result = common global i32 0, align 430@xxd = global double 6.000000e+00, align 831@eqdf2_result = common global i32 0, align 432@nesf2_result = common global i32 0, align 433@nedf2_result = common global i32 0, align 434@gesf2_result = common global i32 0, align 435@gedf2_result = common global i32 0, align 436@ltsf2_result = common global i32 0, align 437@ltdf2_result = common global i32 0, align 438@lesf2_result = common global i32 0, align 439@ledf2_result = common global i32 0, align 440@gtsf2_result = common global i32 0, align 441@gtdf2_result = common global i32 0, align 442 43define void @test_addsf3() nounwind {44entry:45;16hf-LABEL: test_addsf3:46  %0 = load float, ptr @x, align 447  %1 = load float, ptr @y, align 448  %add = fadd float %0, %149  store float %add, ptr @addsf3_result, align 450;16hf:  lw	${{[0-9]+}}, %call16(__mips16_addsf3)(${{[0-9]+}})51  ret void52}53 54define void @test_adddf3() nounwind {55entry:56;16hf-LABEL: test_adddf3:57  %0 = load double, ptr @xd, align 858  %1 = load double, ptr @yd, align 859  %add = fadd double %0, %160  store double %add, ptr @adddf3_result, align 861;16hf:  lw	${{[0-9]+}}, %call16(__mips16_adddf3)(${{[0-9]+}})62  ret void63}64 65define void @test_subsf3() nounwind {66entry:67;16hf-LABEL: test_subsf3:68  %0 = load float, ptr @x, align 469  %1 = load float, ptr @y, align 470  %sub = fsub float %0, %171  store float %sub, ptr @subsf3_result, align 472;16hf:  lw	${{[0-9]+}}, %call16(__mips16_subsf3)(${{[0-9]+}})73  ret void74}75 76define void @test_subdf3() nounwind {77entry:78;16hf-LABEL: test_subdf3:79  %0 = load double, ptr @xd, align 880  %1 = load double, ptr @yd, align 881  %sub = fsub double %0, %182  store double %sub, ptr @subdf3_result, align 883;16hf:  lw	${{[0-9]+}}, %call16(__mips16_subdf3)(${{[0-9]+}})84  ret void85}86 87define void @test_mulsf3() nounwind {88entry:89;16hf-LABEL: test_mulsf3:90  %0 = load float, ptr @x, align 491  %1 = load float, ptr @y, align 492  %mul = fmul float %0, %193  store float %mul, ptr @mulsf3_result, align 494;16hf:  lw	${{[0-9]+}}, %call16(__mips16_mulsf3)(${{[0-9]+}})95  ret void96}97 98define void @test_muldf3() nounwind {99entry:100;16hf-LABEL: test_muldf3:101  %0 = load double, ptr @xd, align 8102  %1 = load double, ptr @yd, align 8103  %mul = fmul double %0, %1104  store double %mul, ptr @muldf3_result, align 8105;16hf:  lw	${{[0-9]+}}, %call16(__mips16_muldf3)(${{[0-9]+}})106  ret void107}108 109define void @test_divsf3() nounwind {110entry:111;16hf-LABEL: test_divsf3:112  %0 = load float, ptr @y, align 4113  %1 = load float, ptr @x, align 4114  %div = fdiv float %0, %1115  store float %div, ptr @divsf3_result, align 4116;16hf:  lw	${{[0-9]+}}, %call16(__mips16_divsf3)(${{[0-9]+}})117  ret void118}119 120define void @test_divdf3() nounwind {121entry:122;16hf-LABEL: test_divdf3:123  %0 = load double, ptr @yd, align 8124  %mul = fmul double %0, 2.000000e+00125  %1 = load double, ptr @xd, align 8126  %div = fdiv double %mul, %1127  store double %div, ptr @divdf3_result, align 8128;16hf:  lw	${{[0-9]+}}, %call16(__mips16_divdf3)(${{[0-9]+}})129  ret void130}131 132define void @test_extendsfdf2() nounwind {133entry:134;16hf-LABEL: test_extendsfdf2:135  %0 = load float, ptr @x, align 4136  %conv = fpext float %0 to double137  store double %conv, ptr @extendsfdf2_result, align 8138;16hf:  lw	${{[0-9]+}}, %call16(__mips16_extendsfdf2)(${{[0-9]+}})139  ret void140}141 142define void @test_truncdfsf2() nounwind {143entry:144;16hf-LABEL: test_truncdfsf2:145  %0 = load double, ptr @xd2, align 8146  %conv = fptrunc double %0 to float147  store float %conv, ptr @truncdfsf2_result, align 4148;16hf:  lw	${{[0-9]+}}, %call16(__mips16_truncdfsf2)(${{[0-9]+}})149  ret void150}151 152define void @test_fix_truncsfsi() nounwind {153entry:154;16hf-LABEL: test_fix_truncsfsi:155  %0 = load float, ptr @x, align 4156  %conv = fptosi float %0 to i32157  store i32 %conv, ptr @fix_truncsfsi_result, align 4158;16hf:  lw	${{[0-9]+}}, %call16(__mips16_fix_truncsfsi)(${{[0-9]+}})159  ret void160}161 162define void @test_fix_truncdfsi() nounwind {163entry:164;16hf-LABEL: test_fix_truncdfsi:165  %0 = load double, ptr @xd, align 8166  %conv = fptosi double %0 to i32167  store i32 %conv, ptr @fix_truncdfsi_result, align 4168;16hf:  lw	${{[0-9]+}}, %call16(__mips16_fix_truncdfsi)(${{[0-9]+}})169  ret void170}171 172define void @test_floatsisf() nounwind {173entry:174;16hf-LABEL: test_floatsisf:175  %0 = load i32, ptr @si, align 4176  %conv = sitofp i32 %0 to float177  store float %conv, ptr @floatsisf_result, align 4178;16hf:  lw	${{[0-9]+}}, %call16(__mips16_floatsisf)(${{[0-9]+}})179  ret void180}181 182define void @test_floatsidf() nounwind {183entry:184;16hf-LABEL: test_floatsidf:185  %0 = load i32, ptr @si, align 4186  %conv = sitofp i32 %0 to double187  store double %conv, ptr @floatsidf_result, align 8188;16hf:  lw	${{[0-9]+}}, %call16(__mips16_floatsidf)(${{[0-9]+}})189  ret void190}191 192define void @test_floatunsisf() nounwind {193entry:194;16hf-LABEL: test_floatunsisf:195  %0 = load i32, ptr @ui, align 4196  %conv = uitofp i32 %0 to float197  store float %conv, ptr @floatunsisf_result, align 4198;16hf:  lw	${{[0-9]+}}, %call16(__mips16_floatunsisf)(${{[0-9]+}})199  ret void200}201 202define void @test_floatunsidf() nounwind {203entry:204;16hf-LABEL: test_floatunsidf:205  %0 = load i32, ptr @ui, align 4206  %conv = uitofp i32 %0 to double207  store double %conv, ptr @floatunsidf_result, align 8208;16hf:  lw	${{[0-9]+}}, %call16(__mips16_floatunsidf)(${{[0-9]+}})209  ret void210}211 212define void @test_eqsf2() nounwind {213entry:214;16hf-LABEL: test_eqsf2:215  %0 = load float, ptr @x, align 4216  %1 = load float, ptr @xx, align 4217  %cmp = fcmp oeq float %0, %1218  %conv = zext i1 %cmp to i32219  store i32 %conv, ptr @eqsf2_result, align 4220;16hf:  lw	${{[0-9]+}}, %call16(__mips16_eqsf2)(${{[0-9]+}})221  ret void222}223 224define void @test_eqdf2() nounwind {225entry:226;16hf-LABEL: test_eqdf2:227  %0 = load double, ptr @xd, align 8228  %1 = load double, ptr @xxd, align 8229  %cmp = fcmp oeq double %0, %1230  %conv = zext i1 %cmp to i32231  store i32 %conv, ptr @eqdf2_result, align 4232;16hf:  lw	${{[0-9]+}}, %call16(__mips16_eqdf2)(${{[0-9]+}})233  ret void234}235 236define void @test_nesf2() nounwind {237entry:238;16hf-LABEL: test_nesf2:239  %0 = load float, ptr @x, align 4240  %1 = load float, ptr @y, align 4241  %cmp = fcmp une float %0, %1242  %conv = zext i1 %cmp to i32243  store i32 %conv, ptr @nesf2_result, align 4244;16hf:  lw	${{[0-9]+}}, %call16(__mips16_nesf2)(${{[0-9]+}})245  ret void246}247 248define void @test_nedf2() nounwind {249entry:250;16hf-LABEL: test_nedf2:251  %0 = load double, ptr @xd, align 8252  %1 = load double, ptr @yd, align 8253  %cmp = fcmp une double %0, %1254  %conv = zext i1 %cmp to i32255  store i32 %conv, ptr @nedf2_result, align 4256;16hf:  lw	${{[0-9]+}}, %call16(__mips16_nedf2)(${{[0-9]+}})257  ret void258}259 260define void @test_gesf2() nounwind {261entry:262;16hf-LABEL: test_gesf2:263  %0 = load float, ptr @x, align 4264  %1 = load float, ptr @xx, align 4265  %cmp = fcmp oge float %0, %1266  %2 = load float, ptr @y, align 4267  %cmp1 = fcmp oge float %2, %0268  %and3 = and i1 %cmp, %cmp1269  %and = zext i1 %and3 to i32270  store i32 %and, ptr @gesf2_result, align 4271;16hf:  lw	${{[0-9]+}}, %call16(__mips16_gesf2)(${{[0-9]+}})272  ret void273}274 275define void @test_gedf2() nounwind {276entry:277;16hf-LABEL: test_gedf2:278  %0 = load double, ptr @xd, align 8279  %1 = load double, ptr @xxd, align 8280  %cmp = fcmp oge double %0, %1281  %2 = load double, ptr @yd, align 8282  %cmp1 = fcmp oge double %2, %0283  %and3 = and i1 %cmp, %cmp1284  %and = zext i1 %and3 to i32285  store i32 %and, ptr @gedf2_result, align 4286;16hf:  lw	${{[0-9]+}}, %call16(__mips16_gedf2)(${{[0-9]+}})287  ret void288}289 290define void @test_ltsf2() nounwind {291entry:292;16hf-LABEL: test_ltsf2:293  %0 = load float, ptr @x, align 4294  %1 = load float, ptr @xx, align 4295  %lnot = fcmp uge float %0, %1296  %2 = load float, ptr @y, align 4297  %cmp1 = fcmp olt float %0, %2298  %and2 = and i1 %lnot, %cmp1299  %and = zext i1 %and2 to i32300  store i32 %and, ptr @ltsf2_result, align 4301;16hf:  lw	${{[0-9]+}}, %call16(__mips16_ltsf2)(${{[0-9]+}})302;16hf:  lw	${{[0-9]+}}, %call16(__mips16_ltsf2)(${{[0-9]+}})303  ret void304}305 306define void @test_ltdf2() nounwind {307entry:308;16hf-LABEL: test_ltdf2:309  %0 = load double, ptr @xd, align 8310  %1 = load double, ptr @xxd, align 8311  %lnot = fcmp uge double %0, %1312  %2 = load double, ptr @yd, align 8313  %cmp1 = fcmp olt double %0, %2314  %and2 = and i1 %lnot, %cmp1315  %and = zext i1 %and2 to i32316  store i32 %and, ptr @ltdf2_result, align 4317;16hf:  lw	${{[0-9]+}}, %call16(__mips16_ltdf2)(${{[0-9]+}})318;16hf:  lw	${{[0-9]+}}, %call16(__mips16_ltdf2)(${{[0-9]+}})319  ret void320}321 322define void @test_lesf2() nounwind {323entry:324;16hf-LABEL: test_lesf2:325  %0 = load float, ptr @x, align 4326  %1 = load float, ptr @xx, align 4327  %cmp = fcmp ole float %0, %1328  %2 = load float, ptr @y, align 4329  %cmp1 = fcmp ole float %0, %2330  %and3 = and i1 %cmp, %cmp1331  %and = zext i1 %and3 to i32332  store i32 %and, ptr @lesf2_result, align 4333;16hf:  lw	${{[0-9]+}}, %call16(__mips16_lesf2)(${{[0-9]+}})334  ret void335}336 337define void @test_ledf2() nounwind {338entry:339;16hf-LABEL: test_ledf2:340  %0 = load double, ptr @xd, align 8341  %1 = load double, ptr @xxd, align 8342  %cmp = fcmp ole double %0, %1343  %2 = load double, ptr @yd, align 8344  %cmp1 = fcmp ole double %0, %2345  %and3 = and i1 %cmp, %cmp1346  %and = zext i1 %and3 to i32347  store i32 %and, ptr @ledf2_result, align 4348;16hf:  lw	${{[0-9]+}}, %call16(__mips16_ledf2)(${{[0-9]+}})349  ret void350}351 352define void @test_gtsf2() nounwind {353entry:354;16hf-LABEL: test_gtsf2:355  %0 = load float, ptr @x, align 4356  %1 = load float, ptr @xx, align 4357  %lnot = fcmp ule float %0, %1358  %2 = load float, ptr @y, align 4359  %cmp1 = fcmp ogt float %2, %0360  %and2 = and i1 %lnot, %cmp1361  %and = zext i1 %and2 to i32362  store i32 %and, ptr @gtsf2_result, align 4363;16hf:  lw	${{[0-9]+}}, %call16(__mips16_gtsf2)(${{[0-9]+}})364  ret void365}366 367define void @test_gtdf2() nounwind {368entry:369;16hf-LABEL: test_gtdf2:370  %0 = load double, ptr @xd, align 8371  %1 = load double, ptr @xxd, align 8372  %lnot = fcmp ule double %0, %1373  %2 = load double, ptr @yd, align 8374  %cmp1 = fcmp ogt double %2, %0375  %and2 = and i1 %lnot, %cmp1376  %and = zext i1 %and2 to i32377  store i32 %and, ptr @gtdf2_result, align 4378;16hf:  lw	${{[0-9]+}}, %call16(__mips16_gtdf2)(${{[0-9]+}})379  ret void380}381 382 383