[PATCH] S/390: shifts and setmems with implicit ANDs
Richard Henderson
rth@redhat.com
Tue Aug 16 21:02:00 GMT 2005
On Fri, Aug 12, 2005 at 12:30:12PM +0200, Andreas Krebbel wrote:
> shift instructions on s390 only use the 6 least significant bits
> of the shift count operand. Hence we can skip pointless ANDs. After
> an unsuccessful try using TARGET_SHIFT_TRUNCATION_MASK I've modified
> the shift_count_operand predicate and the print_shift_count_operand
> function to omit ANDs with constants which have set these 6 bits.
Um, I think you'll find you have reload problems here. We've tried
this before on mips and x86 to deal with sign-extend and float-extend
operators respectively.
IMO the only thing to do is to move TARGET_SHIFT_TRUNCATION_MASK usage
into the combiner, etc, and replace use of SHIFT_COUNT_TRUNCATED.
> Almost the same applies to the padding byte operand of mvcle which is
> always truncated to the 8 least significant bits.
Here you'd just have to use multiple patterns, iiuc.
r~
More information about the Gcc-patches
mailing list