summaryrefslogtreecommitdiff
path: root/gcc/tree-ssa-phiprop.c
diff options
context:
space:
mode:
authorRichard Biener <rguenther@suse.de>2013-05-23 12:23:59 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2013-05-23 12:23:59 +0000
commitce521ae644954b0869428201225e85d8e86eaf2e (patch)
tree817c953d76e27cedecd6b9e444751bfe1da13db0 /gcc/tree-ssa-phiprop.c
parent75c7257f75227e3db09120e38562cf3a3c136ced (diff)
re PR tree-optimization/57380 (GCC 4.9.0 will not vectorize std::max and similar functions)
2013-05-23 Richard Biener <rguenther@suse.de> PR tree-optimization/57380 * tree-ssa-phiprop.c (propagate_with_phi): Do not require at least one invariant or re-used load. * passes.c (init_optimization_passes): Move pass_phiprop before pass_forwprop. * g++.dg/tree-ssa/pr57380.C: New testcase. From-SVN: r199246
Diffstat (limited to 'gcc/tree-ssa-phiprop.c')
-rw-r--r--gcc/tree-ssa-phiprop.c10
1 files changed, 0 insertions, 10 deletions
diff --git a/gcc/tree-ssa-phiprop.c b/gcc/tree-ssa-phiprop.c
index 6555ae344b7..96d7ba6a935 100644
--- a/gcc/tree-ssa-phiprop.c
+++ b/gcc/tree-ssa-phiprop.c
@@ -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)