This is the mail archive of the gcc-patches@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] |
The attached patch to combine.c makes shift count truncation more effective for targets where the shift count has a different mode than the expression being shifted. Originally described at http://gcc.gnu.org/ml/gcc/2002-06/msg00379.html where (for sh64) the shift count truncation code was ineffective on: (insn/i 41 40 42 (set (reg:DI 177) (zero_extend:DI (reg/v:SI 159))) 114 {zero_extendsidi2} (insn_list 6 (nil)) (expr_list:REG_DEAD (reg/v:SI 159) (nil))) (insn/i 42 41 43 (set (reg:V2SI 178) (ashift:V2SI (reg:V2SI 176) (reg:DI 177))) 358 {ashlv2si3} (insn_list 40 (insn_list 41 (nil))) (expr_list:REG_DEAD (reg:V2SI 176) (expr_list:REG_DEAD (reg:DI 177) (nil)))) because it was trying to force the shift count to V2SI mode. That didn't match any instruction patterns. This is applicable to any target which has SHIFT_COUNT_TRUNCATED defined true, and shift patterns in which the shift count is a different mode than the expression being shifted. Tested on sh64 and mips64, where it did not introduce any new regressions (words chosen carefully, as both those targets have a number of failures at the moment). Steve.
Attachment:
shift-count-truncated-patch
Description: shift-count-truncated-patch
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |