------- Additional Comments From pinskia at gcc dot gnu dot org 2004-11-22 07:12 ------- The way to fix this is before going out of SSA to have another HOST_WIDE_INT in INDIRECT_REF to say the aliasing set for that tree. And also add this patch which looks at the use defs: Index: alias.c =============================================================== ==== RCS file: /cvs/gcc/gcc/gcc/alias.c,v retrieving revision 1.246 diff -u -p -r1.246 alias.c --- alias.c 11 Nov 2004 23:08:55 -0000 1.246 +++ alias.c 22 Nov 2004 07:08:29 -0000 @@ -347,6 +347,15 @@ find_base_decl (tree t) if (t == 0 || t == error_mark_node || ! POINTER_TYPE_P (TREE_TYPE (t))) return 0; + + if (TREE_CODE (t) == SSA_NAME) + { + d0 = SSA_NAME_DEF_STMT (t); + if (TREE_CODE (d0) == MODIFY_EXPR) + return find_base_decl (TREE_OPERAND (d0, 1)); + else + return 0; + } /* If this is a declaration, return it. */ if (DECL_P (t))
Currently if I use the following optimizations I get the optimization: -fno-tree-pre -fno-tree-loop-im -fno-tree-dominator-opts -fno-ivopts The reason why PRE and loop-im is needed is because we would pull out the b[j] out of the loop. the reason why dominator-opts is need is because we would combine b[j] for the INDIRECT's. The reason why -fno-ivopts is needed is because we would change a[i] into *iv.opt -- What |Removed |Added ---------------------------------------------------------------------------- Last reconfirmed|2004-10-08 14:53:59 |2004-11-22 07:12:49 date| | http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16913