This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Fix loop optimization bug


> Agreed.  Something like this?

Sorry, that didn't really work.  I'm testing this instead:

Index: tree-ssa-loop-ivopts.c
===================================================================
--- tree-ssa-loop-ivopts.c      (revision 140904)
+++ tree-ssa-loop-ivopts.c      (working copy)
@@ -1557,8 +1557,7 @@ may_be_nonaddressable_p (tree expr)
         and make them look addressable.  After some processing the
         non-addressability may be uncovered again, causing ADDR_EXPRs
         of inappropriate objects to be built.  */
-      if (is_gimple_reg (TREE_OPERAND (expr, 0))
-         || is_gimple_min_invariant (TREE_OPERAND (expr, 0)))
+      if (!is_gimple_addressable (TREE_OPERAND (expr, 0)))
        return true;

       /* ... fall through ... */

-- 
Eric Botcazou


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]