On Tue, Apr 9, 2013 at 3:54 AM, Jeff Law l...@redhat.com 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
On Sat, Apr 6, 2013 at 2:48 PM, Jeff Law l...@redhat.com wrote:
Given something like this:
bb 6:
_23 = changed_17 ^ 1;
_12 = (_Bool) _23;
if (_12 != 0)
goto bb 10;
else
goto bb 7;
Assume _23 and changed_17 have integer types wider than a boolean, but VRP
has
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
On Mon, Apr 8, 2013 at 3:27 PM, Jeff Law l...@redhat.com 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
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
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
Given something like this:
bb 6:
_23 = changed_17 ^ 1;
_12 = (_Bool) _23;
if (_12 != 0)
goto bb 10;
else
goto bb 7;
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:
bb 6:
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 ...
+
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.