1 ; RUN: llc < %s -march=mipsel -mcpu=4ke | FileCheck %s -check-prefix=CHECK-EL 2 ; RUN: llc < %s -march=mips -mcpu=4ke | FileCheck %s -check-prefix=CHECK-EB 3 4 define double @func0(double %d0, double %d1) nounwind readnone { 5 entry: 6 ; CHECK-EL: func0: 7 ; CHECK-EL: lui $[[T0:[0-9]+]], 32767 8 ; CHECK-EL: lui $[[T1:[0-9]+]], 32768 9 ; CHECK-EL: mfc1 $[[HI0:[0-9]+]], $f13 10 ; CHECK-EL: ori $[[MSK0:[0-9]+]], $[[T0]], 65535 11 ; CHECK-EL: mfc1 $[[HI1:[0-9]+]], $f15 12 ; CHECK-EL: ori $[[MSK1:[0-9]+]], $[[T1]], 0 13 ; CHECK-EL: and $[[AND0:[0-9]+]], $[[HI0]], $[[MSK0]] 14 ; CHECK-EL: and $[[AND1:[0-9]+]], $[[HI1]], $[[MSK1]] 15 ; CHECK-EL: mfc1 $[[LO0:[0-9]+]], $f12 16 ; CHECK-EL: or $[[OR:[0-9]+]], $[[AND0]], $[[AND1]] 17 ; CHECK-EL: mtc1 $[[LO0]], $f0 18 ; CHECK-EL: mtc1 $[[OR]], $f1 19 ; 20 ; CHECK-EB: lui $[[T0:[0-9]+]], 32767 21 ; CHECK-EB: lui $[[T1:[0-9]+]], 32768 22 ; CHECK-EB: mfc1 $[[HI0:[0-9]+]], $f12 23 ; CHECK-EB: ori $[[MSK0:[0-9]+]], $[[T0]], 65535 24 ; CHECK-EB: mfc1 $[[HI1:[0-9]+]], $f14 25 ; CHECK-EB: ori $[[MSK1:[0-9]+]], $[[T1]], 0 26 ; CHECK-EB: and $[[AND0:[0-9]+]], $[[HI0]], $[[MSK0]] 27 ; CHECK-EB: and $[[AND1:[0-9]+]], $[[HI1]], $[[MSK1]] 28 ; CHECK-EB: or $[[OR:[0-9]+]], $[[AND0]], $[[AND1]] 29 ; CHECK-EB: mfc1 $[[LO0:[0-9]+]], $f13 30 ; CHECK-EB: mtc1 $[[OR]], $f0 31 ; CHECK-EB: mtc1 $[[LO0]], $f1 32 %call = tail call double @copysign(double %d0, double %d1) nounwind readnone 33 ret double %call 34 } 35 36 declare double @copysign(double, double) nounwind readnone 37 38 define float @func1(float %f0, float %f1) nounwind readnone { 39 entry: 40 ; CHECK-EL: func1: 41 ; CHECK-EL: lui $[[T0:[0-9]+]], 32767 42 ; CHECK-EL: lui $[[T1:[0-9]+]], 32768 43 ; CHECK-EL: mfc1 $[[ARG0:[0-9]+]], $f12 44 ; CHECK-EL: ori $[[MSK0:[0-9]+]], $[[T0]], 65535 45 ; CHECK-EL: mfc1 $[[ARG1:[0-9]+]], $f14 46 ; CHECK-EL: ori $[[MSK1:[0-9]+]], $[[T1]], 0 47 ; CHECK-EL: and $[[T2:[0-9]+]], $[[ARG0]], $[[MSK0]] 48 ; CHECK-EL: and $[[T3:[0-9]+]], $[[ARG1]], $[[MSK1]] 49 ; CHECK-EL: or $[[T4:[0-9]+]], $[[T2]], $[[T3]] 50 ; CHECK-EL: mtc1 $[[T4]], $f0 51 %call = tail call float @copysignf(float %f0, float %f1) nounwind readnone 52 ret float %call 53 } 54 55 declare float @copysignf(float, float) nounwind readnone 56