[Bug target/112936] New: LoongArch: Wrong instruction costs
xry111 at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Sat Dec 9 09:12:39 GMT 2023
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112936
Bug ID: 112936
Summary: LoongArch: Wrong instruction costs
Product: gcc
Version: 14.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: target
Assignee: unassigned at gcc dot gnu.org
Reporter: xry111 at gcc dot gnu.org
Target Milestone: ---
Separated from PR112935 comment 3.
The current loongarch_rtx_cost_data constructor (for default cost model, used
by LA464 and LA664 for now) seems completely wrong. Per my micro-benchmark the
values in reality should be:
loongarch_rtx_cost_data::loongarch_rtx_cost_data ()
: fp_add (COSTS_N_INSNS (5)),
fp_mult_sf (COSTS_N_INSNS (5)),
fp_mult_df (COSTS_N_INSNS (5)),
fp_div_sf (COSTS_N_INSNS (8)),
fp_div_df (COSTS_N_INSNS (8)),
int_mult_si (COSTS_N_INSNS (4)),
int_mult_di (COSTS_N_INSNS (4)),
int_div_si (COSTS_N_INSNS (5)),
int_div_di (COSTS_N_INSNS (5)),
branch_cost (6),
memory_latency (4) {}
More information about the Gcc-bugs
mailing list