brintos

brintos / llvm-project-archived public Read only

0
0
Text · 5.4 KiB · cba8124 Raw
236 lines · plain
1; RUN: llc -mtriple=s390x-linux-gnu -mcpu=z10 -mattr=soft-float -O0 < %s | FileCheck %s2 3; Arithmetic functions4 5define float @test_addsf3(float %a, float %b) {6  ; CHECK-LABEL:  test_addsf3:7  ; CHECK:        brasl %r14, __addsf38  %add = fadd float %a, %b9  ret float %add10}11 12define double @test_adddf3(double %a, double %b) {13  ; CHECK-LABEL:  test_adddf3:14  ; CHECK:        brasl %r14, __adddf315  %add = fadd double %a, %b16  ret double %add17}18 19define fp128 @test_addtf3(fp128 %a, fp128 %b) {20  ; CHECK-LABEL:  test_addtf3:21  ; CHECK:        brasl %r14, __addtf322  %add = fadd fp128 %a, %b23  ret fp128 %add24}25 26define float @test_mulsf3(float %a, float %b) {27  ; CHECK-LABEL:  test_mulsf3:28  ; CHECK:        brasl %r14, __mulsf329  %mul = fmul float %a, %b30  ret float %mul31}32 33define double @test_muldf3(double %a, double %b) {34  ; CHECK-LABEL:  test_muldf3:35  ; CHECK:        brasl %r14, __muldf336  %mul = fmul double %a, %b37  ret double %mul38}39 40define fp128 @test_multf3(fp128 %a, fp128 %b) {41  ; CHECK-LABEL:  test_multf3:42  ; CHECK:        brasl %r14, __multf343  %mul = fmul fp128 %a, %b44  ret fp128 %mul45}46 47define float @test_subsf3(float %a, float %b) {48  ; CHECK-LABEL:  test_subsf3:49  ; CHECK:        brasl %r14, __subsf350  %sub = fsub float %a, %b51  ret float %sub52}53 54define double @test_subdf3(double %a, double %b) {55  ; CHECK-LABEL:  test_subdf3:56  ; CHECK:        brasl %r14, __subdf357  %sub = fsub double %a, %b58  ret double %sub59}60 61define fp128 @test_subtf3(fp128 %a, fp128 %b) {62  ; CHECK-LABEL:  test_subtf3:63  ; CHECK:        brasl %r14, __subtf364  %sub = fsub fp128 %a, %b65  ret fp128 %sub66}67 68define float @test_divsf3(float %a, float %b) {69  ; CHECK-LABEL:  test_divsf3:70  ; CHECK:        brasl %r14, __divsf371  %div = fdiv float %a, %b72  ret float %div73}74 75define double @test_divdf3(double %a, double %b) {76  ; CHECK-LABEL:  test_divdf3:77  ; CHECK:        brasl %r14, __divdf378  %div = fdiv double %a, %b79  ret double %div80}81 82define fp128 @test_divtf3(fp128 %a, fp128 %b) {83  ; CHECK-LABEL:  test_divtf3:84  ; CHECK:        brasl %r14, __divtf385  %div = fdiv fp128 %a, %b86  ret fp128 %div87}88 89; Comparison functions90define i1 @test_unordsf2(float %a, float %b) {91  ; CHECK-LABEL:  test_unordsf2:92  ; CHECK:        brasl %r14, __unordsf293  %cmp = fcmp uno float %a, %b94  ret i1 %cmp95}96 97define i1 @test_unorddf2(double %a, double %b) {98  ; CHECK-LABEL:  test_unorddf2:99  ; CHECK:        brasl %r14, __unorddf2100  %cmp = fcmp uno double %a, %b101  ret i1 %cmp102}103 104define i1 @test_unordtf2(fp128 %a, fp128 %b) {105  ; CHECK-LABEL:  test_unordtf2:106  ; CHECK:        brasl %r14, __unordtf2107  %cmp = fcmp uno fp128 %a, %b108  ret i1 %cmp109}110 111define i1 @test_eqsf2(float %a, float %b) {112  ; CHECK-LABEL:  test_eqsf2:113  ; CHECK:        brasl %r14, __eqsf2114  %cmp = fcmp oeq float %a, %b115  ret i1 %cmp116}117 118define i1 @test_eqdf2(double %a, double %b) {119  ; CHECK-LABEL:  test_eqdf2:120  ; CHECK:        brasl %r14, __eqdf2121  %cmp = fcmp oeq double %a, %b122  ret i1 %cmp123}124 125define i1 @test_eqtf2(fp128 %a, fp128 %b) {126  ; CHECK-LABEL:  test_eqtf2:127  ; CHECK:        brasl %r14, __eqtf2128  %cmp = fcmp oeq fp128 %a, %b129  ret i1 %cmp130}131 132define i1 @test_nesf2(float %a, float %b) {133  ; CHECK-LABEL:  test_nesf2:134  ; CHECK:        brasl %r14, __nesf2135  %cmp = fcmp une float %a, %b136  ret i1 %cmp137}138 139define i1 @test_nedf2(double %a, double %b) {140  ; CHECK-LABEL:  test_nedf2:141  ; CHECK:        brasl %r14, __nedf2142  %cmp = fcmp une double %a, %b143  ret i1 %cmp144}145 146define i1 @test_netf2(fp128 %a, fp128 %b) {147  ; CHECK-LABEL:  test_netf2:148  ; CHECK:        brasl %r14, __netf2149  %cmp = fcmp une fp128 %a, %b150  ret i1 %cmp151}152 153define i1 @test_gesf2(float %a, float %b) {154  ; CHECK-LABEL:  test_gesf2:155  ; CHECK:        brasl %r14, __gesf2156  %cmp = fcmp oge float %a, %b157  ret i1 %cmp158}159 160define i1 @test_gedf2(double %a, double %b) {161  ; CHECK-LABEL:  test_gedf2:162  ; CHECK:        brasl %r14, __gedf2163  %cmp = fcmp oge double %a, %b164  ret i1 %cmp165}166 167define i1 @test_getf2(fp128 %a, fp128 %b) {168  ; CHECK-LABEL:  test_getf2:169  ; CHECK:        brasl %r14, __getf2170  %cmp = fcmp oge fp128 %a, %b171  ret i1 %cmp172}173 174define i1 @test_ltsf2(float %a, float %b) {175  ; CHECK-LABEL:  test_ltsf2:176  ; CHECK:        brasl %r14, __ltsf2177  %cmp = fcmp olt float %a, %b178  ret i1 %cmp179}180 181define i1 @test_ltdf2(double %a, double %b) {182  ; CHECK-LABEL:  test_ltdf2:183  ; CHECK:        brasl %r14, __ltdf2184  %cmp = fcmp olt double %a, %b185  ret i1 %cmp186}187 188define i1 @test_lttf2(fp128 %a, fp128 %b) {189  ; CHECK-LABEL:  test_lttf2:190  ; CHECK:        brasl %r14, __lttf2191  %cmp = fcmp olt fp128 %a, %b192  ret i1 %cmp193}194 195define i1 @test_lesf2(float %a, float %b) {196  ; CHECK-LABEL:  test_lesf2:197  ; CHECK:        brasl %r14, __lesf2198  %cmp = fcmp ole float %a, %b199  ret i1 %cmp200}201 202define i1 @test_ledf2(double %a, double %b) {203  ; CHECK-LABEL:  test_ledf2:204  ; CHECK:        brasl %r14, __ledf2205  %cmp = fcmp ole double %a, %b206  ret i1 %cmp207}208 209define i1 @test_letf2(fp128 %a, fp128 %b) {210  ; CHECK-LABEL:  test_letf2:211  ; CHECK:        brasl %r14, __letf2212  %cmp = fcmp ole fp128 %a, %b213  ret i1 %cmp214}215 216define i1 @test_gtsf2(float %a, float %b) {217  ; CHECK-LABEL:  test_gtsf2:218  ; CHECK:        brasl %r14, __gtsf2219  %cmp = fcmp ogt float %a, %b220  ret i1 %cmp221}222 223define i1 @test_gtdf2(double %a, double %b) {224  ; CHECK-LABEL:  test_gtdf2:225  ; CHECK:        brasl %r14, __gtdf2226  %cmp = fcmp ogt double %a, %b227  ret i1 %cmp228}229 230define i1 @test_gttf2(fp128 %a, fp128 %b) {231  ; CHECK-LABEL:  test_gttf2:232  ; CHECK:        brasl %r14, __gttf2233  %cmp = fcmp ogt fp128 %a, %b234  ret i1 %cmp235}236