On Tue, Apr 9, 2013 at 3:54 AM, Jeff Law wrote:
>
> This incorporates the concrete suggestions from Steven & Richi -- it doesn't
> do any refactoring of the VRP code. There's still stuff I'm looking at that
> might directly lead to some refactoring. In the mean time I'm submitting
> the obvious
On 04/08/2013 07:54 PM, Jeff Law wrote:
This incorporates the concrete suggestions from Steven & Richi -- it
doesn't do any refactoring of the VRP code. There's still stuff I'm
looking at that might directly lead to some refactoring. In the mean
time I'm submitting the obvious small improvemen
This incorporates the concrete suggestions from Steven & Richi -- it
doesn't do any refactoring of the VRP code. There's still stuff I'm
looking at that might directly lead to some refactoring. In the mean
time I'm submitting the obvious small improvements.
Bootstrapped and regression test
On Mon, Apr 8, 2013 at 3:27 PM, Jeff Law wrote:
> On 04/08/2013 03:45 AM, Richard Biener wrote:
>
>>> @@ -8584,6 +8584,43 @@ simplify_cond_using_ranges (gimple stmt)
>>> }
>>> }
>>>
>>> + /* If we have a comparison of a SSA_NAME boolean against
>>> + a constant (which obviously
On 04/08/2013 03:45 AM, Richard Biener wrote:
@@ -8584,6 +8584,43 @@ simplify_cond_using_ranges (gimple stmt)
}
}
+ /* If we have a comparison of a SSA_NAME boolean against
+ a constant (which obviously must be [0..1]). See if the
+ SSA_NAME was set by a type conversion
On Sat, Apr 6, 2013 at 2:48 PM, Jeff Law wrote:
>
> Given something like this:
>
> :
> _23 = changed_17 ^ 1;
> _12 = (_Bool) _23;
> if (_12 != 0)
> goto ;
> else
> goto ;
>
> Assume _23 and changed_17 have integer types wider than a boolean, but VRP
> has determined they have a ra
On 04/06/2013 07:08 AM, Steven Bosscher wrote:
+ if (!SSA_NAME_OCCURS_IN_ABNORMAL_PHI (innerop))
+ {
+ value_range_t *vr = get_value_range (innerop);
+
I don't think the SSA_NAME_OCCURS_IN_ABNORMAL_PHI test is necessary,
get_value_range() will simply return a !VR_RANGE.
It'
On Sat, Apr 6, 2013 at 2:48 PM, Jeff Law wrote:
>
> Given something like this:
...and the other one from earlier today. Nice finds! :-)
> + /* If we have a comparison of a SSA_NAME boolean against
> + a constant (which obviously must be [0..1]). See if the
"...be [0..1]), see if ..."
> +
Given something like this:
:
_23 = changed_17 ^ 1;
_12 = (_Bool) _23;
if (_12 != 0)
goto ;
else
goto ;
Assume _23 and changed_17 have integer types wider than a boolean, but
VRP has determined they have a range [0..1].
We should be turning that into:
:
_23 = changed_17 ^