This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
I played a bit to see how gcc expands multiplication by various constants in leas/adds/subs/shifts and found that it does not do the job in the best possible way it could. I tracked for the the reason and found 3 different problems:
1) the cost of an add insn for p4 (in config/i386/i386.c) is 1 while it should be 0.5 (or probably 1 with all other costs doubled)
2) that x86_decompose_lea flag is causing invalid cost evaluation for the lea insn (in gcc/expmed.c, init_expmed())
3) look at the followind code in gcc/expmed.c, expand_mult(): mult_cost = rtx_cost (gen_rtx_MULT (mode, op0, op1), SET); mult_cost = MIN (12 * add_cost, mult_cost);
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |