This is the mail archive of the
mailing list for the GCC project.
Re: [patch] Deal with larger anti-ranages incompare_range_with_value
- From: ja2morri at csclub dot uwaterloo dot ca (James A. Morrison)
- To: Tom Truscott <trt at unx dot sas dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Thu, 28 Jul 2005 01:07:49 -0400
- Subject: Re: [patch] Deal with larger anti-ranages incompare_range_with_value
- References: <200507271748.NAA22215@login002.unx.sas.com>
Tom Truscott <email@example.com> writes:
> Somewhat related to this (EQ/NE working the same way,
> it looks like the ordinary-range NE test is missing
> the case of [p,p] != q detected by compare_values (p,q) returning +2
I'm not quite sure what you mean but in compare_value_with_range at line 1779
NE_EXPR dealt with nicely for VR_RANGEs.
> Perhaps the EQ_EXPR and NE_EXPR code on approx lines 1714..1747
> could be merged. Change the separate ifs into:
> if (comp == EQ_EXPR || comp == NE_EXPR)
> if (cmp == 0)
> return comp == EQ_EXPR ? boolean_true_node : boolean_false_node;
> and so on.
> Tom Truscott
I'm not a fan of trying to squish any of the code in compare_ranges, it's
nice and easy to read right now and I think trying to factor it as you suggest
above would cause confusion.