For example, when loading 3.1415926535897931159979634685441851615905761718750, useLoad FP immediates by movgr2fr from materialized integer if the bitcasted integer
lu12i.w $a0, 345154
ori $a0, $a0, 3352can be materialized within 2 instructions.
lu32i.d $a0For example, when loading double 1024.0, -450053use
lu52i.d $a0, $a0$zero, 10241033
movgr2fr.d $fa0, $a0
instead of
pcalau12i $a0, .LCPI2_0
addi.d $a0, $a0, .LCPI2_0
fld.d $fa0, $a0, 0
Test this patch with 3A5000 on llvm13, the result shows that SPEC CPU2006 FP FP
score increases 1.2% in average, 470.lbm score increases 811.9%.
Thanks to @xry111 for the suggestion: https://reviews.llvm.org/D128898#3632140