For example, when loading 1.03.1415926535897931159979634685441851615905761718750, use
lu12i.w $a0, 345154
ori $a0, $a0, 3352
lu32i.d $a0, -450053
lu52i.d $a0, $zero$a0, 0x3ff1024
movgr2fr.d $fa0, $a0
instead of
addi.dpcalau12i $a0, $zero, 1.LCPI2_0
movgr2fr.d $fa0addi.d $a0, $a0, $a0.LCPI2_0
ffint.d.l $fa0ld.d $fa0, $a0, 0
Test this patch with 3A5000 on llvm13, the result shows that SPEC CPU2006 FP score increases 1% in average, $fa0470.lbm score increases 8.9%.
Thanks to @xry111 for the suggestion: https://reviews.llvm.org/D128898#3632140