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][RFH] Fix PR31169, bootstrap failure on SHIFT_COUNT_TRUNCATED targets


On 4/1/07, Richard Henderson <rth@redhat.com> wrote:
On Sat, Mar 31, 2007 at 12:11:05PM +0200, Richard Guenther wrote:
> It looks like a very bad design to have target dependencies in routines
> computing with double HOST(!)_WIDE_INTs.

I agree, but, as I said, I don't think we can *just* remove it.

> After all, it's only combine and cse that seem to care about
> SHIFT_COUNT_TRUNCATED.

I'd agree that the check ought to be moved into some routine
that only deals with rtl.

OTOH, I don't agree that we ought to rely on particular shift
behaviour at the tree level either, and that's what simply
removing the check from rshift_double would do -- it would
make tree-vrp rely on large-shift-generates-zero behaviour.

I've given my previous patch some more thought, and think that
the test I had isn't really correct either.  In this new patch,
I fall back to varying in case the shift count can possibly be
outside the range of defined values.


r~



PR tree-optimization/31169 * tree-vrp.c (extract_range_from_binary_expr) <RSHIFT_EXPR>: Drop to varying if the range is outside [0, prec-1].

I have added the following testcase.


Richard.

2007-04-12 Richard Guenther <rguenther@suse.de>

       PR tree-optimization/31169
       * gcc.c-torture/execute/pr31169.c: New testcase.

Attachment: p
Description: Binary data


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