This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] S/390: shifts and setmems with implicit ANDs
- From: Richard Henderson <rth at redhat dot com>
- To: Andreas Krebbel <krebbel1 at de dot ibm dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Tue, 16 Aug 2005 13:58:12 -0700
- Subject: Re: [PATCH] S/390: shifts and setmems with implicit ANDs
- References: <20050812103012.GD3065@de.ibm.com>
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~