re PR tree-optimization/53647 (gcc.c-torture/compile/20011229-1.c and gcc.c-torture...
authorBill Schmidt <wschmidt@linux.ibm.com>
Wed, 13 Jun 2012 12:33:55 +0000 (12:33 +0000)
committerWilliam Schmidt <wschmidt@gcc.gnu.org>
Wed, 13 Jun 2012 12:33:55 +0000 (12:33 +0000)
2012-06-13  Bill Schmidt  <wschmidt@linux.ibm.com>

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
gcc/tree-ssa-phiopt.c

index f2959dd7e87013ff304ee2216a9eb685bf9cc137..66d8a9f604797cd87af3e4574e7ac4fc77a77064 100644 (file)
@@ -1,3 +1,9 @@
+2012-06-13  Bill Schmidt  <wschmidt@linux.ibm.com>
+
+       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  <wschmidt@linux.ibm.com>
 
        * targhooks.c (default_builtin_vectorized_conversion): Handle
index 6e47f6f85b3125867968e145629c6f8b01590b69..c64e8e2a984eef4138a7fb14db3d571968d0945d 100644 (file)
@@ -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