brintos

brintos / llvm-project-archived public Read only

0
0
Text · 6.4 KiB · 7193a42 Raw
199 lines · plain
1; RUN: llc < %s -mtriple=mipsel-elf -mcpu=mips32   -relocation-model=pic  | FileCheck %s -check-prefixes=ALL,32-FCC2; RUN: llc < %s -mtriple=mipsel-elf -mcpu=mips32r2 -relocation-model=pic  | FileCheck %s -check-prefixes=ALL,32-FCC3; RUN: llc < %s -mtriple=mipsel-elf -mcpu=mips32r6 -relocation-model=pic  | FileCheck %s -check-prefixes=ALL,GPR,32-GPR4; RUN: llc < %s -mtriple=mips64el-elf -mcpu=mips64   | FileCheck %s -check-prefixes=ALL,64-FCC5; RUN: llc < %s -mtriple=mips64el-elf -mcpu=mips64r2 | FileCheck %s -check-prefixes=ALL,64-FCC6; RUN: llc < %s -mtriple=mips64el-elf -mcpu=mips64r6 | FileCheck %s -check-prefixes=ALL,GPR,64-GPR7 8define void @func0(float %f2, float %f3) nounwind {9entry:10; ALL-LABEL: func0:11 12; 32-FCC:        c.eq.s $f12, $f1413; 32-FCC:        bc1f   $BB0_214; 64-FCC:        c.eq.s $f12, $f1315; 64-FCC:        bc1f   .LBB0_216 17; 32-GPR:        cmp.eq.s $[[FGRCC:f[0-9]+]], $f12, $f1418; 64-GPR:        cmp.eq.s $[[FGRCC:f[0-9]+]], $f12, $f1319; GPR:           mfc1     $[[GPRCC:[0-9]+]], $[[FGRCC:f[0-9]+]]20; FIXME: We ought to be able to transform not+bnez -> beqz21; GPR:           not      $[[GPRCC]], $[[GPRCC]]22; 32-GPR:        bnez     $[[GPRCC]], $BB0_223; 64-GPR:        bnezc    $[[GPRCC]], .LBB0_224 25  %cmp = fcmp oeq float %f2, %f326  br i1 %cmp, label %if.then, label %if.else27 28if.then:                                          ; preds = %entry29  tail call void (...) @g0() nounwind30  br label %if.end31 32if.else:                                          ; preds = %entry33  tail call void (...) @g1() nounwind34  br label %if.end35 36if.end:                                           ; preds = %if.else, %if.then37  ret void38}39 40declare void @g0(...)41 42declare void @g1(...)43 44define void @func1(float %f2, float %f3) nounwind {45entry:46; ALL-LABEL: func1:47 48; 32-FCC:        c.olt.s $f12, $f1449; 32-FCC:        bc1f    $BB1_250; 64-FCC:        c.olt.s $f12, $f1351; 64-FCC:        bc1f    .LBB1_252 53; 32-GPR:        cmp.ule.s $[[FGRCC:f[0-9]+]], $f14, $f1254; 64-GPR:        cmp.ule.s $[[FGRCC:f[0-9]+]], $f13, $f1255; GPR:           mfc1     $[[GPRCC:[0-9]+]], $[[FGRCC:f[0-9]+]]56; GPR-NOT:       not      $[[GPRCC]], $[[GPRCC]]57; 32-GPR:        bnez     $[[GPRCC]], $BB1_258; 64-GPR:        bnezc    $[[GPRCC]], .LBB1_259 60  %cmp = fcmp olt float %f2, %f361  br i1 %cmp, label %if.then, label %if.else62 63if.then:                                          ; preds = %entry64  tail call void (...) @g0() nounwind65  br label %if.end66 67if.else:                                          ; preds = %entry68  tail call void (...) @g1() nounwind69  br label %if.end70 71if.end:                                           ; preds = %if.else, %if.then72  ret void73}74 75define void @func2(float %f2, float %f3) nounwind {76entry:77; ALL-LABEL: func2:78 79; 32-FCC:        c.ole.s $f12, $f1480; 32-FCC:        bc1t    $BB2_281; 64-FCC:        c.ole.s $f12, $f1382; 64-FCC:        bc1t    .LBB2_283 84; 32-GPR:        cmp.ult.s $[[FGRCC:f[0-9]+]], $f14, $f1285; 64-GPR:        cmp.ult.s $[[FGRCC:f[0-9]+]], $f13, $f1286; GPR:           mfc1     $[[GPRCC:[0-9]+]], $[[FGRCC:f[0-9]+]]87; GPR-NOT:       not      $[[GPRCC]], $[[GPRCC]]88; 32-GPR:        beqz     $[[GPRCC]], $BB2_289; 64-GPR:        beqzc    $[[GPRCC]], .LBB2_290 91  %cmp = fcmp ugt float %f2, %f392  br i1 %cmp, label %if.else, label %if.then93 94if.then:                                          ; preds = %entry95  tail call void (...) @g0() nounwind96  br label %if.end97 98if.else:                                          ; preds = %entry99  tail call void (...) @g1() nounwind100  br label %if.end101 102if.end:                                           ; preds = %if.else, %if.then103  ret void104}105 106define void @func3(double %f2, double %f3) nounwind {107entry:108; ALL-LABEL: func3:109 110; 32-FCC:        c.eq.d $f12, $f14111; 32-FCC:        bc1f $BB3_2112; 64-FCC:        c.eq.d $f12, $f13113; 64-FCC:        bc1f .LBB3_2114 115; 32-GPR:        cmp.eq.d $[[FGRCC:f[0-9]+]], $f12, $f14116; 64-GPR:        cmp.eq.d $[[FGRCC:f[0-9]+]], $f12, $f13117; GPR:           mfc1     $[[GPRCC:[0-9]+]], $[[FGRCC:f[0-9]+]]118; FIXME: We ought to be able to transform not+bnez -> beqz119; GPR:           not      $[[GPRCC]], $[[GPRCC]]120; 32-GPR:        bnez     $[[GPRCC]], $BB3_2121; 64-GPR:        bnezc    $[[GPRCC]], .LBB3_2122 123  %cmp = fcmp oeq double %f2, %f3124  br i1 %cmp, label %if.then, label %if.else125 126if.then:                                          ; preds = %entry127  tail call void (...) @g0() nounwind128  br label %if.end129 130if.else:                                          ; preds = %entry131  tail call void (...) @g1() nounwind132  br label %if.end133 134if.end:                                           ; preds = %if.else, %if.then135  ret void136}137 138define void @func4(double %f2, double %f3) nounwind {139entry:140; ALL-LABEL: func4:141 142; 32-FCC:        c.olt.d $f12, $f14143; 32-FCC:        bc1f $BB4_2144; 64-FCC:        c.olt.d $f12, $f13145; 64-FCC:        bc1f .LBB4_2146 147; 32-GPR:        cmp.ule.d $[[FGRCC:f[0-9]+]], $f14, $f12148; 64-GPR:        cmp.ule.d $[[FGRCC:f[0-9]+]], $f13, $f12149; GPR:           mfc1     $[[GPRCC:[0-9]+]], $[[FGRCC:f[0-9]+]]150; GPR-NOT:       not      $[[GPRCC]], $[[GPRCC]]151; 32-GPR:        bnez     $[[GPRCC]], $BB4_2152; 64-GPR:        bnezc    $[[GPRCC]], .LBB4_2153 154  %cmp = fcmp olt double %f2, %f3155  br i1 %cmp, label %if.then, label %if.else156 157if.then:                                          ; preds = %entry158  tail call void (...) @g0() nounwind159  br label %if.end160 161if.else:                                          ; preds = %entry162  tail call void (...) @g1() nounwind163  br label %if.end164 165if.end:                                           ; preds = %if.else, %if.then166  ret void167}168 169define void @func5(double %f2, double %f3) nounwind {170entry:171; ALL-LABEL: func5:172 173; 32-FCC:        c.ole.d $f12, $f14174; 32-FCC:        bc1t $BB5_2175; 64-FCC:        c.ole.d $f12, $f13176; 64-FCC:        bc1t .LBB5_2177 178; 32-GPR:        cmp.ult.d $[[FGRCC:f[0-9]+]], $f14, $f12179; 64-GPR:        cmp.ult.d $[[FGRCC:f[0-9]+]], $f13, $f12180; GPR:           mfc1     $[[GPRCC:[0-9]+]], $[[FGRCC:f[0-9]+]]181; GPR-NOT:       not      $[[GPRCC]], $[[GPRCC]]182; 32-GPR:        beqz     $[[GPRCC]], $BB5_2183; 64-GPR:        beqzc    $[[GPRCC]], .LBB5_2184 185  %cmp = fcmp ugt double %f2, %f3186  br i1 %cmp, label %if.else, label %if.then187 188if.then:                                          ; preds = %entry189  tail call void (...) @g0() nounwind190  br label %if.end191 192if.else:                                          ; preds = %entry193  tail call void (...) @g1() nounwind194  br label %if.end195 196if.end:                                           ; preds = %if.else, %if.then197  ret void198}199