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: VRP: make range_includes_zero_p handle value_ranges




On 08/24/2018 05:08 AM, Richard Biener wrote:

@@ -1407,7 +1407,10 @@ extract_range_from_binary_expr_1 (value_range *vr,
        && code != POINTER_PLUS_EXPR
        && (vr0.type == VR_VARYING
           || vr1.type == VR_VARYING
-         || vr0.type != vr1.type
+         || (vr0.type != vr1.type
+             /* We can handle POINTER_PLUS_EXPR(~[0,0], [x,y]) below,
+                even though we have differing range kinds.  */
+             && code != POINTER_PLUS_EXPR)
           || symbolic_range_p (&vr0)
           || symbolic_range_p (&vr1)))
      {

is redundant now (spot the code != POINTER_PLUS_EXPR check at the
beginning of context)

Hey, no fair making my code irrelevant mid way through a review! :)


OK with this hunk removed.

Done.

Thanks.
Aldy


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