-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


I noticed that VRP was missing many obvious jump threading
opportunities; investigation showed that it wasn't threading through
conditionals with pointer types, just those with integral types.

Fix is rather obvious.

Bootstrapped and regression tested on x86_64-unknown-linux-gnu.  OK for
trunk?




-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/

iQEcBAEBAgAGBQJNf9wXAAoJEBRtltQi2kC7i3gH+wS6SZNEVwMeHrx04LkRUV7i
hdWsBKWoWxFCm/JjIVEXkticztRGG2cF6OgtTutXCyYHriVXpHvJSATw0OrYLT2y
zMjj1+wy9NKcznIaulyYzCadoFiJUuTnZ3pMDGo+gqx7ThqrG11sJ581CnMtZWxA
Y3tpUBebhovORi4IZOvp2atjIFEnI/CCttxzVyTXtzaflysDr6rbZP75z/AGANI4
5gkcDkLCEglGHYL6phT0fxHjZAUaIJN/JHTvZ4MGA6lJjO8wG/Z4ZnDmtUURhLiR
z9th3gBzFtdjlkwcu8U1qulXDaxbMEmLLP3zMgmFthvI+PmqITsoshu3c7nn154=
=yWE3
-----END PGP SIGNATURE-----
        * tree-vrp.c (identify_jump_threads): Also allow comparisons
        with pointers.

Index: tree-vrp.c
===================================================================
*** tree-vrp.c  (revision 170949)
--- tree-vrp.c  (working copy)
*************** identify_jump_threads (void)
*** 7540,7549 ****
        /* We're basically looking for any kind of conditional with
         integral type arguments.  */
        if (TREE_CODE (gimple_cond_lhs (last)) == SSA_NAME
!         && INTEGRAL_TYPE_P (TREE_TYPE (gimple_cond_lhs (last)))
          && (TREE_CODE (gimple_cond_rhs (last)) == SSA_NAME
              || is_gimple_min_invariant (gimple_cond_rhs (last)))
!         && INTEGRAL_TYPE_P (TREE_TYPE (gimple_cond_rhs (last))))
        {
          edge_iterator ei;
  
--- 7540,7551 ----
        /* We're basically looking for any kind of conditional with
         integral type arguments.  */
        if (TREE_CODE (gimple_cond_lhs (last)) == SSA_NAME
!         && (INTEGRAL_TYPE_P (TREE_TYPE (gimple_cond_lhs (last)))
!             || POINTER_TYPE_P (TREE_TYPE (gimple_cond_lhs (last))))
          && (TREE_CODE (gimple_cond_rhs (last)) == SSA_NAME
              || is_gimple_min_invariant (gimple_cond_rhs (last)))
!         && (INTEGRAL_TYPE_P (TREE_TYPE (gimple_cond_rhs (last)))
!             || POINTER_TYPE_P (TREE_TYPE (gimple_cond_rhs (last)))))
        {
          edge_iterator ei;
  

Reply via email to