This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/36038] [4.4 Regression] miscompiled loop in perlbmk for -Os
- From: "rguenth at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 2 May 2008 14:53:02 -0000
- Subject: [Bug tree-optimization/36038] [4.4 Regression] miscompiled loop in perlbmk for -Os
- References: <bug-36038-4503@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #4 from rguenth at gcc dot gnu dot org 2008-05-02 14:53 -------
It looks sub-optimal. But we should try to figure out why and what is wrong.
The optimality can be fixed with
Index: tree-ssa-loop-ivopts.c
===================================================================
--- tree-ssa-loop-ivopts.c (revision 134885)
+++ tree-ssa-loop-ivopts.c (working copy)
@@ -4716,7 +4716,8 @@ try_add_cand_for (struct ivopts_data *da
{
cand = iv_cand (data, i);
- if (cand->iv->base_object != NULL_TREE)
+ if (cand->iv->base_object != NULL_TREE
+ || POINTER_TYPE_P (TREE_TYPE (cand->iv->base)))
continue;
if (iv_ca_cand_used_p (ivs, cand))
or similar.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36038