Summary: | [4.2 Regression] Over optimization of loop when using -ftree-vectorize | ||
---|---|---|---|
Product: | gcc | Reporter: | Anton Blanchard <anton> |
Component: | tree-optimization | Assignee: | Not yet assigned to anyone <unassigned> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | dnovillo, dorit, gcc-bugs, victork |
Priority: | P3 | Keywords: | alias, wrong-code |
Version: | 4.2.0 | ||
Target Milestone: | 4.2.0 | ||
Host: | Target: | ||
Build: | Known to work: | 4.1.0 | |
Known to fail: | 4.2.0 4.1.0 | Last reconfirmed: | 2006-02-19 02:26:33 |
Bug Depends on: | 36244 | ||
Bug Blocks: |
Description
Anton Blanchard
2006-02-19 02:24:01 UTC
Confirmed, also fails on x86_64. This is a regression from 4.1.0. It also looks like an aliasing issue too as DCE is removing the statements. The problem is that during dce the call to is_hidden_global_store returns false cause the tag is not marked as global/static. This seems to fix it: Index: tree-ssa-alias.c =================================================================== *** tree-ssa-alias.c (revision 110911) --- tree-ssa-alias.c (working copy) *************** new_type_alias (tree ptr, tree var) *** 2638,2643 **** --- 2638,2651 ---- add_may_alias (tag, al); } } + + /* CHECKME: + DECL_CONTEXT (tag) = DECL_CONTEXT (var); + TREE_PUBLIC (tag) = TREE_PUBLIC (var); + TREE_READONLY (tag) = TREE_READONLY (var); + */ + MTAG_GLOBAL (tag) = DECL_EXTERNAL (var); + TREE_STATIC (tag) = TREE_STATIC (var); } but I don't know if it's the right thing to do in the general case. Subject: Bug number PR tree-optimization/26359 A patch for this bug has been added to the patch tracker. The mailing list url for the patch is http://gcc.gnu.org/ml/gcc-patches/2006-02/msg01710.html Subject: Bug 26359 Author: dorit Date: Sun Feb 26 09:27:35 2006 New Revision: 111451 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=111451 Log: PR tree-optimization/26359 * tree-ssa-alias.c (new_type_alias): Set fields for new tag. Added: trunk/gcc/testsuite/gcc.dg/vect/dump-tree-dceloop-pr26359.c Modified: trunk/gcc/ChangeLog trunk/gcc/testsuite/ChangeLog trunk/gcc/testsuite/gcc.dg/vect/vect.exp trunk/gcc/tree-ssa-alias.c Fixed. |