On Wed, 6 Sep 2017, Richard Biener wrote:

> 
> This fixes a bogus check for a mode when the type matters.  The
> test can get fooled by vector ops with integral mode and thus we
> later ICE trying to use wide-ints operating on vector constants.
> 
> Bootstrapped and tested on x86_64-unknown-linux-gnu, applied.

Promptly overlooked some regressions, fixed as follows.

Richard.

2017-09-06  Richard Biener  <rguent...@suse.de>

        * gimple-ssa-strength-reduction.c
        (find_candidates_dom_walker::before_dom_children): Also allow
        pointer types.

Index: gcc/gimple-ssa-strength-reduction.c
===================================================================
--- gcc/gimple-ssa-strength-reduction.c (revision 251753)
+++ gcc/gimple-ssa-strength-reduction.c (working copy)
@@ -1742,7 +1742,8 @@ find_candidates_dom_walker::before_dom_c
        slsr_process_ref (gs);
 
       else if (is_gimple_assign (gs)
-              && INTEGRAL_TYPE_P (TREE_TYPE (gimple_assign_lhs (gs))))
+              && (INTEGRAL_TYPE_P (TREE_TYPE (gimple_assign_lhs (gs)))
+                  || POINTER_TYPE_P (TREE_TYPE (gimple_assign_lhs (gs)))))
        {
          tree rhs1 = NULL_TREE, rhs2 = NULL_TREE;
 

Reply via email to