[Bug target/83158] [8 regression] gcc.target/i386/pr78057.c fail

rguenth at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Mon Nov 27 15:24:00 GMT 2017


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83158

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED
           Assignee|unassigned at gcc dot gnu.org      |rguenth at gcc dot gnu.org

--- Comment #3 from Richard Biener <rguenth at gcc dot gnu.org> ---
Testing

Index: gcc/tree-vrp.c
===================================================================
--- gcc/tree-vrp.c      (revision 255173)
+++ gcc/tree-vrp.c      (working copy)
@@ -6021,11 +6021,13 @@ intersect_ranges (enum value_range_type
                   && vrp_val_is_max (vr1max))
            ;
          /* Choose the anti-range if it is ~[0,0], that range is special
-            enough to special case when vr1's range is relatively wide.  */
+            enough to special case when vr1's range is relatively wide.
+            At least for types bigger than int - this covers pointers
+            and arguments to functions like ctz.  */
          else if (*vr0min == *vr0max
                   && integer_zerop (*vr0min)
                   && (TYPE_PRECISION (TREE_TYPE (*vr0min))
-                      == TYPE_PRECISION (ptr_type_node))
+                      >= TYPE_PRECISION (integer_type_node))
                   && TREE_CODE (vr1max) == INTEGER_CST
                   && TREE_CODE (vr1min) == INTEGER_CST
                   && (wi::clz (wi::to_wide (vr1max) - wi::to_wide (vr1min))


More information about the Gcc-bugs mailing list