1; RUN: llc -march=mips -mcpu=mips32 < %s | FileCheck %s -check-prefixes=ALL,FCC 2; RUN: llc -march=mips -mcpu=mips32r2 < %s | FileCheck %s -check-prefixes=ALL,FCC 3; RUN: llc -march=mips -mcpu=mips32r6 < %s | FileCheck %s -check-prefixes=ALL,GPR,32-GPR 4; RUN: llc -march=mips64 -mcpu=mips4 < %s | FileCheck %s -check-prefixes=ALL,FCC 5; RUN: llc -march=mips64 -mcpu=mips64 < %s | FileCheck %s -check-prefixes=ALL,FCC 6; RUN: llc -march=mips64 -mcpu=mips64r2 < %s | FileCheck %s -check-prefixes=ALL,FCC 7; RUN: llc -march=mips64 -mcpu=mips64r6 < %s | FileCheck %s -check-prefixes=ALL,GPR,64-GPR 8 9define double @foo(double %a, double %b) nounwind readnone { 10entry: 11; ALL-LABEL: foo: 12 13; FCC: bc1f $BB 14; FCC: nop 15 16; 32-GPR: mtc1 $zero, $[[Z:f[0-9]]] 17; 32-GPR: mthc1 $zero, $[[Z:f[0-9]]] 18; 64-GPR: dmtc1 $zero, $[[Z:f[0-9]]] 19; GPR: cmp.lt.d $[[FGRCC:f[0-9]+]], $[[Z]], $f12 20; GPR: mfc1 $[[GPRCC:[0-9]+]], $[[FGRCC]] 21; GPR-NOT: not $[[GPRCC]], $[[GPRCC]] 22; GPR: bnezc $[[GPRCC]], $BB 23 24 %cmp = fcmp ogt double %a, 0.000000e+00 25 br i1 %cmp, label %if.end6, label %if.else 26 27if.else: ; preds = %entry 28 %cmp3 = fcmp ogt double %b, 0.000000e+00 29 br i1 %cmp3, label %if.end6, label %return 30 31if.end6: ; preds = %if.else, %entry 32 %c.0 = phi double [ %a, %entry ], [ 0.000000e+00, %if.else ] 33 %sub = fsub double %b, %c.0 34 %mul = fmul double %sub, 2.000000e+00 35 br label %return 36 37return: ; preds = %if.else, %if.end6 38 %retval.0 = phi double [ %mul, %if.end6 ], [ 0.000000e+00, %if.else ] 39 ret double %retval.0 40} 41 42define void @f1(float %f) nounwind { 43entry: 44; ALL-LABEL: f1: 45 46; FCC: bc1f $BB 47; FCC: nop 48 49; GPR: mtc1 $zero, $[[Z:f[0-9]]] 50; GPR: cmp.eq.s $[[FGRCC:f[0-9]+]], $f12, $[[Z]] 51; GPR: mfc1 $[[GPRCC:[0-9]+]], $[[FGRCC]] 52; GPR-NOT: not $[[GPRCC]], $[[GPRCC]] 53; 64-GPR beqzc $[[GPRCC]], $BB 54; 32-GPR beqz $[[GPRCC]], $BB 55 56 %cmp = fcmp une float %f, 0.000000e+00 57 br i1 %cmp, label %if.then, label %if.end 58 59if.then: ; preds = %entry 60 tail call void @abort() noreturn 61 unreachable 62 63if.end: ; preds = %entry 64 tail call void (...) @f2() nounwind 65 ret void 66} 67 68declare void @abort() noreturn nounwind 69 70declare void @f2(...) 71