[llvm] [MIPS] Implement llvm.fminimum and llvm.fmaximum with f32/f64 (PR #89907)
YunQiang Su via llvm-commits
llvm-commits at lists.llvm.org
Sun Apr 28 23:54:45 PDT 2024
wzssyqa wrote:
I figure out a pre-R6 asm code
```
xm:
.frame $sp,0,$31 # vars= 0, regs= 0/0, args= 0, gp= 0
.mask 0x00000000,0
.fmask 0x00000000,0
.set noreorder
.set nomacro
c.lt.d $fcc0,$f14,$f12
bc1t $fcc0,$L6
mov.d $f0,$f12
c.lt.d $fcc0,$f12,$f14
bc1t $fcc0,$L6
mov.d $f0,$f14
c.eq.d $fcc0,$f14,$f12
bc1f $fcc0,$L4
mfhc1 $t4,$f14
bltz $t4,$L6
mov.d $f0,$f12
mfhc1 $t4,$f12
bltz $t4,$L6
mov.d $f0,$f14
$L4:
mtc1 $0,$f4
mthc1 $0,$f4
c.un.d $fcc0,$f12,$f4
bc1t $fcc0,$L6
mov.d $f0,$f12
# we have $f14 already
$L6:
jr $31
nop
```
I will feed back it to glibc.
https://github.com/llvm/llvm-project/pull/89907
More information about the llvm-commits
mailing list