[PATCH]: combine.c SHIFT_COUNT_TRUNCATED adjustment
Clarke, Stephen
stephen.clarke@superh.com
Wed Jun 26 23:48:00 GMT 2002
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.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: shift-count-truncated-patch
Type: application/octet-stream
Size: 951 bytes
Desc: shift-count-truncated-patch
URL: <https://gcc.gnu.org/pipermail/gcc/attachments/20020626/0947ce53/attachment.obj>
More information about the Gcc
mailing list