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.

Richard.

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

        * gimple-ssa-strength-reduction.c
        (find_candidates_dom_walker::before_doom_children): Use a
        type and not a mode check.

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

Reply via email to