re PR tree-optimization/57380 (GCC 4.9.0 will not vectorize std::max and similar...
[gcc.git] / gcc / tree-ssa-phiprop.c
index 6555ae344b70e7096daee167e7f5333e8d8e9115..96d7ba6a9356d9d147a94d38e125e317aadda463 100644 (file)
@@ -247,7 +247,6 @@ propagate_with_phi (basic_block bb, gimple phi, struct phiprop_d *phivn,
   ssa_op_iter i;
   bool phi_inserted;
   tree type = NULL_TREE;
-  bool one_invariant = false;
 
   if (!POINTER_TYPE_P (TREE_TYPE (ptr))
       || !is_gimple_reg_type (TREE_TYPE (TREE_TYPE (ptr))))
@@ -282,17 +281,8 @@ propagate_with_phi (basic_block bb, gimple phi, struct phiprop_d *phivn,
       if (!type
          && TREE_CODE (arg) == SSA_NAME)
        type = TREE_TYPE (phivn[SSA_NAME_VERSION (arg)].value);
-      if (TREE_CODE (arg) == ADDR_EXPR
-         && is_gimple_min_invariant (arg))
-       one_invariant = true;
     }
 
-  /* If we neither have an address of a decl nor can reuse a previously
-     inserted load, do not hoist anything.  */
-  if (!one_invariant
-      && !type)
-    return false;
-
   /* Find a dereferencing use.  First follow (single use) ssa
      copy chains for ptr.  */
   while (single_imm_use (ptr, &use, &use_stmt)