From 7ef58a1a45e7f2f3b2c377212acfbdd94d830fbf Mon Sep 17 00:00:00 2001 From: Bill Schmidt Date: Wed, 13 Jun 2012 12:33:55 +0000 Subject: [PATCH] re PR tree-optimization/53647 (gcc.c-torture/compile/20011229-1.c and gcc.c-torture/compile/pr25311.c) 2012-06-13 Bill Schmidt PR tree-optimization/53647 * tree-ssa-phiopt.c (gate_hoist_loads): Skip transformation for targets with no defined cache line size. From-SVN: r188509 --- gcc/ChangeLog | 6 ++++++ gcc/tree-ssa-phiopt.c | 6 ++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index f2959dd7e87..66d8a9f6047 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2012-06-13 Bill Schmidt + + PR tree-optimization/53647 + * tree-ssa-phiopt.c (gate_hoist_loads): Skip transformation for + targets with no defined cache line size. + 2012-06-13 Bill Schmidt * targhooks.c (default_builtin_vectorized_conversion): Handle diff --git a/gcc/tree-ssa-phiopt.c b/gcc/tree-ssa-phiopt.c index 6e47f6f85b3..c64e8e2a984 100644 --- a/gcc/tree-ssa-phiopt.c +++ b/gcc/tree-ssa-phiopt.c @@ -1976,12 +1976,14 @@ hoist_adjacent_loads (basic_block bb0, basic_block bb1, /* Determine whether we should attempt to hoist adjacent loads out of diamond patterns in pass_phiopt. Always hoist loads if -fhoist-adjacent-loads is specified and the target machine has - a conditional move instruction. */ + both a conditional move instruction and a defined cache line size. */ static bool gate_hoist_loads (void) { - return (flag_hoist_adjacent_loads == 1 && HAVE_conditional_move); + return (flag_hoist_adjacent_loads == 1 + && PARAM_VALUE (PARAM_L1_CACHE_LINE_SIZE) + && HAVE_conditional_move); } /* Always do these optimizations if we have SSA -- 2.30.2