llvm-project
a7bacdae - [Mips] Don't use trunc.w.fmt for fptosi on MIPS I (#244859)

Commit
3 days ago
[Mips] Don't use trunc.w.fmt for fptosi on MIPS I (#244859) MIPS I has no trunc.w.fmt. fptosi from float selected trunc.w.s anyway, since its pattern was marked ISA_MIPS1, and fptosi from double failed to select. On MIPS I use cvt.w.fmt with the rounding mode set to round toward zero, then restore the FCSR. This is the same sequence the assembler uses for the trunc.w.fmt macro. cfc1/ctc1 have the same delay as mfc1/mtc1 before MIPS IV, so add them to the FPU delay slot hazard list. This puts a nop after cfc1 before its result is used and after ctc1 before the next FPU instruction. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Author
Parents
Loading