1*9880d681SAndroid Build Coastguard Worker; RUN: llc < %s -march=mips -mcpu=mips2 | FileCheck %s \ 2*9880d681SAndroid Build Coastguard Worker; RUN: -check-prefixes=ALL,M2,M2-M3 3*9880d681SAndroid Build Coastguard Worker; RUN: llc < %s -march=mips -mcpu=mips32 | FileCheck %s \ 4*9880d681SAndroid Build Coastguard Worker; RUN: -check-prefixes=ALL,CMOV,CMOV-32,CMOV-32R1 5*9880d681SAndroid Build Coastguard Worker; RUN: llc < %s -march=mips -mcpu=mips32r2 | FileCheck %s \ 6*9880d681SAndroid Build Coastguard Worker; RUN: -check-prefixes=ALL,CMOV,CMOV-32,CMOV-32R2-R5 7*9880d681SAndroid Build Coastguard Worker; RUN: llc < %s -march=mips -mcpu=mips32r3 | FileCheck %s \ 8*9880d681SAndroid Build Coastguard Worker; RUN: -check-prefixes=ALL,CMOV,CMOV-32,CMOV-32R2-R5 9*9880d681SAndroid Build Coastguard Worker; RUN: llc < %s -march=mips -mcpu=mips32r5 | FileCheck %s \ 10*9880d681SAndroid Build Coastguard Worker; RUN: -check-prefixes=ALL,CMOV,CMOV-32,CMOV-32R2-R5 11*9880d681SAndroid Build Coastguard Worker; RUN: llc < %s -march=mips -mcpu=mips32r6 | FileCheck %s \ 12*9880d681SAndroid Build Coastguard Worker; RUN: -check-prefixes=ALL,SEL-32,32R6 13*9880d681SAndroid Build Coastguard Worker; RUN: llc < %s -march=mips64 -mcpu=mips3 | FileCheck %s \ 14*9880d681SAndroid Build Coastguard Worker; RUN: -check-prefixes=ALL,M3,M2-M3 15*9880d681SAndroid Build Coastguard Worker; RUN: llc < %s -march=mips64 -mcpu=mips4 | FileCheck %s \ 16*9880d681SAndroid Build Coastguard Worker; RUN: -check-prefixes=ALL,CMOV,CMOV-64 17*9880d681SAndroid Build Coastguard Worker; RUN: llc < %s -march=mips64 -mcpu=mips64 | FileCheck %s \ 18*9880d681SAndroid Build Coastguard Worker; RUN: -check-prefixes=ALL,CMOV,CMOV-64 19*9880d681SAndroid Build Coastguard Worker; RUN: llc < %s -march=mips64 -mcpu=mips64r2 | FileCheck %s \ 20*9880d681SAndroid Build Coastguard Worker; RUN: -check-prefixes=ALL,CMOV,CMOV-64 21*9880d681SAndroid Build Coastguard Worker; RUN: llc < %s -march=mips64 -mcpu=mips64r3 | FileCheck %s \ 22*9880d681SAndroid Build Coastguard Worker; RUN: -check-prefixes=ALL,CMOV,CMOV-64 23*9880d681SAndroid Build Coastguard Worker; RUN: llc < %s -march=mips64 -mcpu=mips64r5 | FileCheck %s \ 24*9880d681SAndroid Build Coastguard Worker; RUN: -check-prefixes=ALL,CMOV,CMOV-64 25*9880d681SAndroid Build Coastguard Worker; RUN: llc < %s -march=mips64 -mcpu=mips64r6 | FileCheck %s \ 26*9880d681SAndroid Build Coastguard Worker; RUN: -check-prefixes=ALL,SEL-64,64R6 27*9880d681SAndroid Build Coastguard Worker; RUN: llc < %s -march=mips -mcpu=mips32r3 -mattr=+micromips | FileCheck %s \ 28*9880d681SAndroid Build Coastguard Worker; RUN: -check-prefixes=ALL,MM32R3 29*9880d681SAndroid Build Coastguard Worker; RUN: llc < %s -march=mips -mcpu=mips32r6 -mattr=+micromips | FileCheck %s \ 30*9880d681SAndroid Build Coastguard Worker; RUN: -check-prefixes=ALL,MM32R6,SEL-32 31*9880d681SAndroid Build Coastguard Worker 32*9880d681SAndroid Build Coastguard Workerdefine float @tst_select_i1_float(i1 signext %s, float %x, float %y) { 33*9880d681SAndroid Build Coastguard Workerentry: 34*9880d681SAndroid Build Coastguard Worker ; ALL-LABEL: tst_select_i1_float: 35*9880d681SAndroid Build Coastguard Worker 36*9880d681SAndroid Build Coastguard Worker ; M2-M3: andi $[[T0:[0-9]+]], $4, 1 37*9880d681SAndroid Build Coastguard Worker ; M2-M3: bnez $[[T0]], $[[BB0:BB[0-9_]+]] 38*9880d681SAndroid Build Coastguard Worker ; M2-M3: nop 39*9880d681SAndroid Build Coastguard Worker ; M2: jr $ra 40*9880d681SAndroid Build Coastguard Worker ; M2: mtc1 $6, $f0 41*9880d681SAndroid Build Coastguard Worker ; M3: mov.s $f13, $f14 42*9880d681SAndroid Build Coastguard Worker ; M2-M3: $[[BB0]]: 43*9880d681SAndroid Build Coastguard Worker ; M2-M3: jr $ra 44*9880d681SAndroid Build Coastguard Worker ; M2: mtc1 $5, $f0 45*9880d681SAndroid Build Coastguard Worker ; M3: mov.s $f0, $f13 46*9880d681SAndroid Build Coastguard Worker 47*9880d681SAndroid Build Coastguard Worker ; CMOV-32: mtc1 $6, $f0 48*9880d681SAndroid Build Coastguard Worker ; CMOV-32: mtc1 $5, $f1 49*9880d681SAndroid Build Coastguard Worker ; CMOV-32: andi $[[T0:[0-9]+]], $4, 1 50*9880d681SAndroid Build Coastguard Worker ; CMOV-32: movn.s $f0, $f1, $[[T0]] 51*9880d681SAndroid Build Coastguard Worker 52*9880d681SAndroid Build Coastguard Worker ; SEL-32: mtc1 $5, $[[F0:f[0-9]+]] 53*9880d681SAndroid Build Coastguard Worker ; SEL-32: mtc1 $6, $[[F1:f[0-9]+]] 54*9880d681SAndroid Build Coastguard Worker ; SEL-32: mtc1 $4, $f0 55*9880d681SAndroid Build Coastguard Worker ; SEL-32: sel.s $f0, $[[F1]], $[[F0]] 56*9880d681SAndroid Build Coastguard Worker 57*9880d681SAndroid Build Coastguard Worker ; CMOV-64: andi $[[T0:[0-9]+]], $4, 1 58*9880d681SAndroid Build Coastguard Worker ; CMOV-64: movn.s $f14, $f13, $[[T0]] 59*9880d681SAndroid Build Coastguard Worker ; CMOV-64: mov.s $f0, $f14 60*9880d681SAndroid Build Coastguard Worker 61*9880d681SAndroid Build Coastguard Worker ; SEL-64: mtc1 $4, $f0 62*9880d681SAndroid Build Coastguard Worker ; SEL-64: sel.s $f0, $f14, $f13 63*9880d681SAndroid Build Coastguard Worker 64*9880d681SAndroid Build Coastguard Worker ; MM32R3: mtc1 $6, $[[F0:f[0-9]+]] 65*9880d681SAndroid Build Coastguard Worker ; MM32R3: mtc1 $5, $[[F1:f[0-9]+]] 66*9880d681SAndroid Build Coastguard Worker ; MM32R3: andi16 $[[T0:[0-9]+]], $4, 1 67*9880d681SAndroid Build Coastguard Worker ; MM32R3: movn.s $f0, $[[F1]], $[[T0]] 68*9880d681SAndroid Build Coastguard Worker 69*9880d681SAndroid Build Coastguard Worker %r = select i1 %s, float %x, float %y 70*9880d681SAndroid Build Coastguard Worker ret float %r 71*9880d681SAndroid Build Coastguard Worker} 72*9880d681SAndroid Build Coastguard Worker 73*9880d681SAndroid Build Coastguard Workerdefine float @tst_select_i1_float_reordered(float %x, float %y, 74*9880d681SAndroid Build Coastguard Worker i1 signext %s) { 75*9880d681SAndroid Build Coastguard Workerentry: 76*9880d681SAndroid Build Coastguard Worker ; ALL-LABEL: tst_select_i1_float_reordered: 77*9880d681SAndroid Build Coastguard Worker 78*9880d681SAndroid Build Coastguard Worker ; M2-M3: andi $[[T0:[0-9]+]], $6, 1 79*9880d681SAndroid Build Coastguard Worker ; M2-M3: bnez $[[T0]], $[[BB0:BB[0-9_]+]] 80*9880d681SAndroid Build Coastguard Worker ; M2-M3: nop 81*9880d681SAndroid Build Coastguard Worker ; M2: mov.s $f12, $f14 82*9880d681SAndroid Build Coastguard Worker ; M3: mov.s $f12, $f13 83*9880d681SAndroid Build Coastguard Worker ; M2-M3: $[[BB0]]: 84*9880d681SAndroid Build Coastguard Worker ; M2-M3: jr $ra 85*9880d681SAndroid Build Coastguard Worker ; M2-M3: mov.s $f0, $f12 86*9880d681SAndroid Build Coastguard Worker 87*9880d681SAndroid Build Coastguard Worker ; CMOV-32: andi $[[T0:[0-9]+]], $6, 1 88*9880d681SAndroid Build Coastguard Worker ; CMOV-32: movn.s $f14, $f12, $[[T0]] 89*9880d681SAndroid Build Coastguard Worker ; CMOV-32: mov.s $f0, $f14 90*9880d681SAndroid Build Coastguard Worker 91*9880d681SAndroid Build Coastguard Worker ; SEL-32: mtc1 $6, $f0 92*9880d681SAndroid Build Coastguard Worker ; SEL-32: sel.s $f0, $f14, $f12 93*9880d681SAndroid Build Coastguard Worker 94*9880d681SAndroid Build Coastguard Worker ; CMOV-64: andi $[[T0:[0-9]+]], $6, 1 95*9880d681SAndroid Build Coastguard Worker ; CMOV-64: movn.s $f13, $f12, $[[T0]] 96*9880d681SAndroid Build Coastguard Worker ; CMOV-64: mov.s $f0, $f13 97*9880d681SAndroid Build Coastguard Worker 98*9880d681SAndroid Build Coastguard Worker ; SEL-64: mtc1 $6, $f0 99*9880d681SAndroid Build Coastguard Worker ; SEL-64: sel.s $f0, $f13, $f12 100*9880d681SAndroid Build Coastguard Worker 101*9880d681SAndroid Build Coastguard Worker ; MM32R3: andi16 $[[T0:[0-9]+]], $6, 1 102*9880d681SAndroid Build Coastguard Worker ; MM32R3: movn.s $[[F0:f[0-9]+]], $f12, $[[T0]] 103*9880d681SAndroid Build Coastguard Worker ; MM32R3: mov.s $f0, $[[F0]] 104*9880d681SAndroid Build Coastguard Worker 105*9880d681SAndroid Build Coastguard Worker %r = select i1 %s, float %x, float %y 106*9880d681SAndroid Build Coastguard Worker ret float %r 107*9880d681SAndroid Build Coastguard Worker} 108*9880d681SAndroid Build Coastguard Worker 109*9880d681SAndroid Build Coastguard Workerdefine float @tst_select_fcmp_olt_float(float %x, float %y) { 110*9880d681SAndroid Build Coastguard Workerentry: 111*9880d681SAndroid Build Coastguard Worker ; ALL-LABEL: tst_select_fcmp_olt_float: 112*9880d681SAndroid Build Coastguard Worker 113*9880d681SAndroid Build Coastguard Worker ; M2: c.olt.s $f12, $f14 114*9880d681SAndroid Build Coastguard Worker ; M3: c.olt.s $f12, $f13 115*9880d681SAndroid Build Coastguard Worker ; M2-M3: bc1t $[[BB0:BB[0-9_]+]] 116*9880d681SAndroid Build Coastguard Worker ; M2-M3: nop 117*9880d681SAndroid Build Coastguard Worker ; M2: mov.s $f12, $f14 118*9880d681SAndroid Build Coastguard Worker ; M3: mov.s $f12, $f13 119*9880d681SAndroid Build Coastguard Worker ; M2-M3: $[[BB0]]: 120*9880d681SAndroid Build Coastguard Worker ; M2-M3: jr $ra 121*9880d681SAndroid Build Coastguard Worker ; M2-M3: mov.s $f0, $f12 122*9880d681SAndroid Build Coastguard Worker 123*9880d681SAndroid Build Coastguard Worker ; CMOV-32: c.olt.s $f12, $f14 124*9880d681SAndroid Build Coastguard Worker ; CMOV-32: movt.s $f14, $f12, $fcc0 125*9880d681SAndroid Build Coastguard Worker ; CMOV-32: mov.s $f0, $f14 126*9880d681SAndroid Build Coastguard Worker 127*9880d681SAndroid Build Coastguard Worker ; SEL-32: cmp.lt.s $f0, $f12, $f14 128*9880d681SAndroid Build Coastguard Worker ; SEL-32: sel.s $f0, $f14, $f12 129*9880d681SAndroid Build Coastguard Worker 130*9880d681SAndroid Build Coastguard Worker ; CMOV-64: c.olt.s $f12, $f13 131*9880d681SAndroid Build Coastguard Worker ; CMOV-64: movt.s $f13, $f12, $fcc0 132*9880d681SAndroid Build Coastguard Worker ; CMOV-64: mov.s $f0, $f13 133*9880d681SAndroid Build Coastguard Worker 134*9880d681SAndroid Build Coastguard Worker ; SEL-64: cmp.lt.s $f0, $f12, $f13 135*9880d681SAndroid Build Coastguard Worker ; SEL-64: sel.s $f0, $f13, $f12 136*9880d681SAndroid Build Coastguard Worker 137*9880d681SAndroid Build Coastguard Worker ; MM32R3: c.olt.s $f12, $f14 138*9880d681SAndroid Build Coastguard Worker ; MM32R3: movt.s $f14, $f12, $fcc0 139*9880d681SAndroid Build Coastguard Worker ; MM32R3: mov.s $f0, $f14 140*9880d681SAndroid Build Coastguard Worker 141*9880d681SAndroid Build Coastguard Worker %s = fcmp olt float %x, %y 142*9880d681SAndroid Build Coastguard Worker %r = select i1 %s, float %x, float %y 143*9880d681SAndroid Build Coastguard Worker ret float %r 144*9880d681SAndroid Build Coastguard Worker} 145*9880d681SAndroid Build Coastguard Worker 146*9880d681SAndroid Build Coastguard Workerdefine float @tst_select_fcmp_ole_float(float %x, float %y) { 147*9880d681SAndroid Build Coastguard Workerentry: 148*9880d681SAndroid Build Coastguard Worker ; ALL-LABEL: tst_select_fcmp_ole_float: 149*9880d681SAndroid Build Coastguard Worker 150*9880d681SAndroid Build Coastguard Worker ; M2: c.ole.s $f12, $f14 151*9880d681SAndroid Build Coastguard Worker ; M3: c.ole.s $f12, $f13 152*9880d681SAndroid Build Coastguard Worker ; M2-M3: bc1t $[[BB0:BB[0-9_]+]] 153*9880d681SAndroid Build Coastguard Worker ; M2-M3: nop 154*9880d681SAndroid Build Coastguard Worker ; M2: mov.s $f12, $f14 155*9880d681SAndroid Build Coastguard Worker ; M3: mov.s $f12, $f13 156*9880d681SAndroid Build Coastguard Worker ; M2-M3: $[[BB0]]: 157*9880d681SAndroid Build Coastguard Worker ; M2-M3: jr $ra 158*9880d681SAndroid Build Coastguard Worker ; M2-M3: mov.s $f0, $f12 159*9880d681SAndroid Build Coastguard Worker 160*9880d681SAndroid Build Coastguard Worker ; CMOV-32: c.ole.s $f12, $f14 161*9880d681SAndroid Build Coastguard Worker ; CMOV-32: movt.s $f14, $f12, $fcc0 162*9880d681SAndroid Build Coastguard Worker ; CMOV-32: mov.s $f0, $f14 163*9880d681SAndroid Build Coastguard Worker 164*9880d681SAndroid Build Coastguard Worker ; SEL-32: cmp.le.s $f0, $f12, $f14 165*9880d681SAndroid Build Coastguard Worker ; SEL-32: sel.s $f0, $f14, $f12 166*9880d681SAndroid Build Coastguard Worker 167*9880d681SAndroid Build Coastguard Worker ; CMOV-64: c.ole.s $f12, $f13 168*9880d681SAndroid Build Coastguard Worker ; CMOV-64: movt.s $f13, $f12, $fcc0 169*9880d681SAndroid Build Coastguard Worker ; CMOV-64: mov.s $f0, $f13 170*9880d681SAndroid Build Coastguard Worker 171*9880d681SAndroid Build Coastguard Worker ; SEL-64: cmp.le.s $f0, $f12, $f13 172*9880d681SAndroid Build Coastguard Worker ; SEL-64: sel.s $f0, $f13, $f12 173*9880d681SAndroid Build Coastguard Worker 174*9880d681SAndroid Build Coastguard Worker ; MM32R3: c.ole.s $f12, $f14 175*9880d681SAndroid Build Coastguard Worker ; MM32R3: movt.s $f14, $f12, $fcc0 176*9880d681SAndroid Build Coastguard Worker ; MM32R3: mov.s $f0, $f14 177*9880d681SAndroid Build Coastguard Worker 178*9880d681SAndroid Build Coastguard Worker %s = fcmp ole float %x, %y 179*9880d681SAndroid Build Coastguard Worker %r = select i1 %s, float %x, float %y 180*9880d681SAndroid Build Coastguard Worker ret float %r 181*9880d681SAndroid Build Coastguard Worker} 182*9880d681SAndroid Build Coastguard Worker 183*9880d681SAndroid Build Coastguard Workerdefine float @tst_select_fcmp_ogt_float(float %x, float %y) { 184*9880d681SAndroid Build Coastguard Workerentry: 185*9880d681SAndroid Build Coastguard Worker ; ALL-LABEL: tst_select_fcmp_ogt_float: 186*9880d681SAndroid Build Coastguard Worker 187*9880d681SAndroid Build Coastguard Worker ; M2: c.ule.s $f12, $f14 188*9880d681SAndroid Build Coastguard Worker ; M3: c.ule.s $f12, $f13 189*9880d681SAndroid Build Coastguard Worker ; M2-M3: bc1f $[[BB0:BB[0-9_]+]] 190*9880d681SAndroid Build Coastguard Worker ; M2-M3: nop 191*9880d681SAndroid Build Coastguard Worker ; M2: mov.s $f12, $f14 192*9880d681SAndroid Build Coastguard Worker ; M3: mov.s $f12, $f13 193*9880d681SAndroid Build Coastguard Worker ; M2-M3: $[[BB0]]: 194*9880d681SAndroid Build Coastguard Worker ; M2-M3: jr $ra 195*9880d681SAndroid Build Coastguard Worker ; M2-M3: mov.s $f0, $f12 196*9880d681SAndroid Build Coastguard Worker 197*9880d681SAndroid Build Coastguard Worker ; CMOV-32: c.ule.s $f12, $f14 198*9880d681SAndroid Build Coastguard Worker ; CMOV-32: movf.s $f14, $f12, $fcc0 199*9880d681SAndroid Build Coastguard Worker ; CMOV-32: mov.s $f0, $f14 200*9880d681SAndroid Build Coastguard Worker 201*9880d681SAndroid Build Coastguard Worker ; SEL-32: cmp.lt.s $f0, $f14, $f12 202*9880d681SAndroid Build Coastguard Worker ; SEL-32: sel.s $f0, $f14, $f12 203*9880d681SAndroid Build Coastguard Worker 204*9880d681SAndroid Build Coastguard Worker ; CMOV-64: c.ule.s $f12, $f13 205*9880d681SAndroid Build Coastguard Worker ; CMOV-64: movf.s $f13, $f12, $fcc0 206*9880d681SAndroid Build Coastguard Worker ; CMOV-64: mov.s $f0, $f13 207*9880d681SAndroid Build Coastguard Worker 208*9880d681SAndroid Build Coastguard Worker ; SEL-64: cmp.lt.s $f0, $f13, $f12 209*9880d681SAndroid Build Coastguard Worker ; SEL-64: sel.s $f0, $f13, $f12 210*9880d681SAndroid Build Coastguard Worker 211*9880d681SAndroid Build Coastguard Worker ; MM32R3: c.ule.s $f12, $f14 212*9880d681SAndroid Build Coastguard Worker ; MM32R3: movf.s $f14, $f12, $fcc0 213*9880d681SAndroid Build Coastguard Worker ; MM32R3: mov.s $f0, $f14 214*9880d681SAndroid Build Coastguard Worker 215*9880d681SAndroid Build Coastguard Worker %s = fcmp ogt float %x, %y 216*9880d681SAndroid Build Coastguard Worker %r = select i1 %s, float %x, float %y 217*9880d681SAndroid Build Coastguard Worker ret float %r 218*9880d681SAndroid Build Coastguard Worker} 219*9880d681SAndroid Build Coastguard Worker 220*9880d681SAndroid Build Coastguard Workerdefine float @tst_select_fcmp_oge_float(float %x, float %y) { 221*9880d681SAndroid Build Coastguard Workerentry: 222*9880d681SAndroid Build Coastguard Worker ; ALL-LABEL: tst_select_fcmp_oge_float: 223*9880d681SAndroid Build Coastguard Worker 224*9880d681SAndroid Build Coastguard Worker ; M2: c.ult.s $f12, $f14 225*9880d681SAndroid Build Coastguard Worker ; M3: c.ult.s $f12, $f13 226*9880d681SAndroid Build Coastguard Worker ; M2-M3: bc1f $[[BB0:BB[0-9_]+]] 227*9880d681SAndroid Build Coastguard Worker ; M2-M3: nop 228*9880d681SAndroid Build Coastguard Worker ; M2: mov.s $f12, $f14 229*9880d681SAndroid Build Coastguard Worker ; M3: mov.s $f12, $f13 230*9880d681SAndroid Build Coastguard Worker ; M2-M3: $[[BB0]]: 231*9880d681SAndroid Build Coastguard Worker ; M2-M3: jr $ra 232*9880d681SAndroid Build Coastguard Worker ; M2-M3: mov.s $f0, $f12 233*9880d681SAndroid Build Coastguard Worker 234*9880d681SAndroid Build Coastguard Worker ; CMOV-32: c.ult.s $f12, $f14 235*9880d681SAndroid Build Coastguard Worker ; CMOV-32: movf.s $f14, $f12, $fcc0 236*9880d681SAndroid Build Coastguard Worker ; CMOV-32: mov.s $f0, $f14 237*9880d681SAndroid Build Coastguard Worker 238*9880d681SAndroid Build Coastguard Worker ; SEL-32: cmp.le.s $f0, $f14, $f12 239*9880d681SAndroid Build Coastguard Worker ; SEL-32: sel.s $f0, $f14, $f12 240*9880d681SAndroid Build Coastguard Worker 241*9880d681SAndroid Build Coastguard Worker ; CMOV-64: c.ult.s $f12, $f13 242*9880d681SAndroid Build Coastguard Worker ; CMOV-64: movf.s $f13, $f12, $fcc0 243*9880d681SAndroid Build Coastguard Worker ; CMOV-64: mov.s $f0, $f13 244*9880d681SAndroid Build Coastguard Worker 245*9880d681SAndroid Build Coastguard Worker ; SEL-64: cmp.le.s $f0, $f13, $f12 246*9880d681SAndroid Build Coastguard Worker ; SEL-64: sel.s $f0, $f13, $f12 247*9880d681SAndroid Build Coastguard Worker 248*9880d681SAndroid Build Coastguard Worker ; MM32R3: c.ult.s $f12, $f14 249*9880d681SAndroid Build Coastguard Worker ; MM32R3: movf.s $f14, $f12, $fcc0 250*9880d681SAndroid Build Coastguard Worker ; MM32R3: mov.s $f0, $f14 251*9880d681SAndroid Build Coastguard Worker 252*9880d681SAndroid Build Coastguard Worker %s = fcmp oge float %x, %y 253*9880d681SAndroid Build Coastguard Worker %r = select i1 %s, float %x, float %y 254*9880d681SAndroid Build Coastguard Worker ret float %r 255*9880d681SAndroid Build Coastguard Worker} 256*9880d681SAndroid Build Coastguard Worker 257*9880d681SAndroid Build Coastguard Workerdefine float @tst_select_fcmp_oeq_float(float %x, float %y) { 258*9880d681SAndroid Build Coastguard Workerentry: 259*9880d681SAndroid Build Coastguard Worker ; ALL-LABEL: tst_select_fcmp_oeq_float: 260*9880d681SAndroid Build Coastguard Worker 261*9880d681SAndroid Build Coastguard Worker ; M2: c.eq.s $f12, $f14 262*9880d681SAndroid Build Coastguard Worker ; M3: c.eq.s $f12, $f13 263*9880d681SAndroid Build Coastguard Worker ; M2-M3: bc1t $[[BB0:BB[0-9_]+]] 264*9880d681SAndroid Build Coastguard Worker ; M2-M3: nop 265*9880d681SAndroid Build Coastguard Worker ; M2: mov.s $f12, $f14 266*9880d681SAndroid Build Coastguard Worker ; M3: mov.s $f12, $f13 267*9880d681SAndroid Build Coastguard Worker ; M2-M3: $[[BB0]]: 268*9880d681SAndroid Build Coastguard Worker ; M2-M3: jr $ra 269*9880d681SAndroid Build Coastguard Worker ; M2-M3: mov.s $f0, $f12 270*9880d681SAndroid Build Coastguard Worker 271*9880d681SAndroid Build Coastguard Worker ; CMOV-32: c.eq.s $f12, $f14 272*9880d681SAndroid Build Coastguard Worker ; CMOV-32: movt.s $f14, $f12, $fcc0 273*9880d681SAndroid Build Coastguard Worker ; CMOV-32: mov.s $f0, $f14 274*9880d681SAndroid Build Coastguard Worker 275*9880d681SAndroid Build Coastguard Worker ; SEL-32: cmp.eq.s $f0, $f12, $f14 276*9880d681SAndroid Build Coastguard Worker ; SEL-32: sel.s $f0, $f14, $f12 277*9880d681SAndroid Build Coastguard Worker 278*9880d681SAndroid Build Coastguard Worker ; CMOV-64: c.eq.s $f12, $f13 279*9880d681SAndroid Build Coastguard Worker ; CMOV-64: movt.s $f13, $f12, $fcc0 280*9880d681SAndroid Build Coastguard Worker ; CMOV-64: mov.s $f0, $f13 281*9880d681SAndroid Build Coastguard Worker 282*9880d681SAndroid Build Coastguard Worker ; SEL-64: cmp.eq.s $f0, $f12, $f13 283*9880d681SAndroid Build Coastguard Worker ; SEL-64: sel.s $f0, $f13, $f12 284*9880d681SAndroid Build Coastguard Worker 285*9880d681SAndroid Build Coastguard Worker ; MM32R3: c.eq.s $f12, $f14 286*9880d681SAndroid Build Coastguard Worker ; MM32R3: movt.s $f14, $f12, $fcc0 287*9880d681SAndroid Build Coastguard Worker ; MM32R3: mov.s $f0, $f14 288*9880d681SAndroid Build Coastguard Worker 289*9880d681SAndroid Build Coastguard Worker %s = fcmp oeq float %x, %y 290*9880d681SAndroid Build Coastguard Worker %r = select i1 %s, float %x, float %y 291*9880d681SAndroid Build Coastguard Worker ret float %r 292*9880d681SAndroid Build Coastguard Worker} 293*9880d681SAndroid Build Coastguard Worker 294*9880d681SAndroid Build Coastguard Workerdefine float @tst_select_fcmp_one_float(float %x, float %y) { 295*9880d681SAndroid Build Coastguard Workerentry: 296*9880d681SAndroid Build Coastguard Worker ; ALL-LABEL: tst_select_fcmp_one_float: 297*9880d681SAndroid Build Coastguard Worker 298*9880d681SAndroid Build Coastguard Worker ; M2: c.ueq.s $f12, $f14 299*9880d681SAndroid Build Coastguard Worker ; M3: c.ueq.s $f12, $f13 300*9880d681SAndroid Build Coastguard Worker ; M2-M3: bc1f $[[BB0:BB[0-9_]+]] 301*9880d681SAndroid Build Coastguard Worker ; M2-M3: nop 302*9880d681SAndroid Build Coastguard Worker ; M2: mov.s $f12, $f14 303*9880d681SAndroid Build Coastguard Worker ; M3: mov.s $f12, $f13 304*9880d681SAndroid Build Coastguard Worker ; M2-M3: $[[BB0]]: 305*9880d681SAndroid Build Coastguard Worker ; M2-M3: jr $ra 306*9880d681SAndroid Build Coastguard Worker ; M2-M3: mov.s $f0, $f12 307*9880d681SAndroid Build Coastguard Worker 308*9880d681SAndroid Build Coastguard Worker ; CMOV-32: c.ueq.s $f12, $f14 309*9880d681SAndroid Build Coastguard Worker ; CMOV-32: movf.s $f14, $f12, $fcc0 310*9880d681SAndroid Build Coastguard Worker ; CMOV-32: mov.s $f0, $f14 311*9880d681SAndroid Build Coastguard Worker 312*9880d681SAndroid Build Coastguard Worker ; SEL-32: cmp.ueq.s $f0, $f12, $f14 313*9880d681SAndroid Build Coastguard Worker ; SEL-32: mfc1 $[[T0:[0-9]+]], $f0 314*9880d681SAndroid Build Coastguard Worker ; SEL-32: not $[[T0]], $[[T0]] 315*9880d681SAndroid Build Coastguard Worker ; SEL-32: mtc1 $[[T0:[0-9]+]], $f0 316*9880d681SAndroid Build Coastguard Worker ; SEL-32: sel.s $f0, $f14, $f12 317*9880d681SAndroid Build Coastguard Worker 318*9880d681SAndroid Build Coastguard Worker ; CMOV-64: c.ueq.s $f12, $f13 319*9880d681SAndroid Build Coastguard Worker ; CMOV-64: movf.s $f13, $f12, $fcc0 320*9880d681SAndroid Build Coastguard Worker ; CMOV-64: mov.s $f0, $f13 321*9880d681SAndroid Build Coastguard Worker 322*9880d681SAndroid Build Coastguard Worker ; SEL-64: cmp.ueq.s $f0, $f12, $f13 323*9880d681SAndroid Build Coastguard Worker ; SEL-64: mfc1 $[[T0:[0-9]+]], $f0 324*9880d681SAndroid Build Coastguard Worker ; SEL-64: not $[[T0]], $[[T0]] 325*9880d681SAndroid Build Coastguard Worker ; SEL-64: mtc1 $[[T0:[0-9]+]], $f0 326*9880d681SAndroid Build Coastguard Worker ; SEL-64: sel.s $f0, $f13, $f12 327*9880d681SAndroid Build Coastguard Worker 328*9880d681SAndroid Build Coastguard Worker ; MM32R3: c.ueq.s $f12, $f14 329*9880d681SAndroid Build Coastguard Worker ; MM32R3: movf.s $f14, $f12, $fcc0 330*9880d681SAndroid Build Coastguard Worker ; MM32R3: mov.s $f0, $f14 331*9880d681SAndroid Build Coastguard Worker 332*9880d681SAndroid Build Coastguard Worker %s = fcmp one float %x, %y 333*9880d681SAndroid Build Coastguard Worker %r = select i1 %s, float %x, float %y 334*9880d681SAndroid Build Coastguard Worker ret float %r 335*9880d681SAndroid Build Coastguard Worker} 336