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]

Re: [PATCH, committed] PR 28150 and PR 28170


On Thu, Jul 06, 2006 at 03:02:50PM -0400, David Edelsohn wrote:
>   int
>   insvdi_rshift_rlwimi_p (rtx sizeop, rtx startop, rtx shiftop)
>   {
> !   if (INTVAL (startop) > 32
> !       && INTVAL (startop) < 64
> !       && INTVAL (sizeop) > 1

Why disallow single-bit fields?

> !       && INTVAL (sizeop) + INTVAL (startop) < 64
> !       && INTVAL (shiftop) > 0

This could be >= 0 as far as the insn capabilities are concerned.  I
suppose you might never see a shift count of zero due to rtl
simplification.

> !       && INTVAL (sizeop) + INTVAL (shiftop) < 32
>         && (64 - (INTVAL (shiftop) & 63)) >= INTVAL (sizeop))

This last condition is already covered by the previous two lines.  It
rearranges as
         && 64 >= INTVAL (sizeop) + (INTVAL (shiftop) & 63)

>       return 1;

-- 
Alan Modra
IBM OzLabs - Linux Technology Centre


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]