* [Bug tree-optimization/46172] [4.2/4.3/4.4/4.5/4.6 Regression] ICE: in expand_widen_pattern_expr, at optabs.c:522 with -ftree-vectorize -fno-tree-dce
2010-10-25 21:17 [Bug tree-optimization/46172] New: ICE: in expand_widen_pattern_expr, at optabs.c:522 with -ftree-vectorize -fno-tree-dce zsojka at seznam dot cz
@ 2010-10-26 7:12 ` hjl.tools at gmail dot com
2010-10-26 8:21 ` hjl.tools at gmail dot com
` (11 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: hjl.tools at gmail dot com @ 2010-10-26 7:12 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46172
H.J. Lu <hjl.tools at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2010.10.26 07:11:43
Summary|ICE: in |[4.2/4.3/4.4/4.5/4.6
|expand_widen_pattern_expr, |Regression] ICE: in
|at optabs.c:522 with |expand_widen_pattern_expr,
|-ftree-vectorize |at optabs.c:522 with
|-fno-tree-dce |-ftree-vectorize
| |-fno-tree-dce
Ever Confirmed|0 |1
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug tree-optimization/46172] [4.2/4.3/4.4/4.5/4.6 Regression] ICE: in expand_widen_pattern_expr, at optabs.c:522 with -ftree-vectorize -fno-tree-dce
2010-10-25 21:17 [Bug tree-optimization/46172] New: ICE: in expand_widen_pattern_expr, at optabs.c:522 with -ftree-vectorize -fno-tree-dce zsojka at seznam dot cz
2010-10-26 7:12 ` [Bug tree-optimization/46172] [4.2/4.3/4.4/4.5/4.6 Regression] " hjl.tools at gmail dot com
@ 2010-10-26 8:21 ` hjl.tools at gmail dot com
2010-10-26 14:01 ` [Bug tree-optimization/46172] [4.3/4.4/4.5/4.6 " rguenth at gcc dot gnu.org
` (10 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: hjl.tools at gmail dot com @ 2010-10-26 8:21 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46172
H.J. Lu <hjl.tools at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |hjl.tools at gmail dot com
--- Comment #1 from H.J. Lu <hjl.tools at gmail dot com> 2010-10-26 08:21:32 UTC ---
It is caused by revision 109954:
http://gcc.gnu.org/ml/gcc-cvs/2006-01/msg00752.html
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug tree-optimization/46172] [4.3/4.4/4.5/4.6 Regression] ICE: in expand_widen_pattern_expr, at optabs.c:522 with -ftree-vectorize -fno-tree-dce
2010-10-25 21:17 [Bug tree-optimization/46172] New: ICE: in expand_widen_pattern_expr, at optabs.c:522 with -ftree-vectorize -fno-tree-dce zsojka at seznam dot cz
2010-10-26 7:12 ` [Bug tree-optimization/46172] [4.2/4.3/4.4/4.5/4.6 Regression] " hjl.tools at gmail dot com
2010-10-26 8:21 ` hjl.tools at gmail dot com
@ 2010-10-26 14:01 ` rguenth at gcc dot gnu.org
2010-11-02 9:47 ` jakub at gcc dot gnu.org
` (9 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: rguenth at gcc dot gnu.org @ 2010-10-26 14:01 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46172
Richard Guenther <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |4.3.6
Summary|[4.2/4.3/4.4/4.5/4.6 |[4.3/4.4/4.5/4.6
|Regression] ICE: in |Regression] ICE: in
|expand_widen_pattern_expr, |expand_widen_pattern_expr,
|at optabs.c:522 with |at optabs.c:522 with
|-ftree-vectorize |-ftree-vectorize
|-fno-tree-dce |-fno-tree-dce
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug tree-optimization/46172] [4.3/4.4/4.5/4.6 Regression] ICE: in expand_widen_pattern_expr, at optabs.c:522 with -ftree-vectorize -fno-tree-dce
2010-10-25 21:17 [Bug tree-optimization/46172] New: ICE: in expand_widen_pattern_expr, at optabs.c:522 with -ftree-vectorize -fno-tree-dce zsojka at seznam dot cz
` (2 preceding siblings ...)
2010-10-26 14:01 ` [Bug tree-optimization/46172] [4.3/4.4/4.5/4.6 " rguenth at gcc dot gnu.org
@ 2010-11-02 9:47 ` jakub at gcc dot gnu.org
2010-11-02 12:39 ` jakub at gcc dot gnu.org
` (8 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: jakub at gcc dot gnu.org @ 2010-11-02 9:47 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46172
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |ASSIGNED
CC| |jakub at gcc dot gnu.org
AssignedTo|unassigned at gcc dot |jakub at gcc dot gnu.org
|gnu.org |
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug tree-optimization/46172] [4.3/4.4/4.5/4.6 Regression] ICE: in expand_widen_pattern_expr, at optabs.c:522 with -ftree-vectorize -fno-tree-dce
2010-10-25 21:17 [Bug tree-optimization/46172] New: ICE: in expand_widen_pattern_expr, at optabs.c:522 with -ftree-vectorize -fno-tree-dce zsojka at seznam dot cz
` (3 preceding siblings ...)
2010-11-02 9:47 ` jakub at gcc dot gnu.org
@ 2010-11-02 12:39 ` jakub at gcc dot gnu.org
2010-11-02 13:12 ` irar at il dot ibm.com
` (7 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: jakub at gcc dot gnu.org @ 2010-11-02 12:39 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46172
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |NEW
AssignedTo|jakub at gcc dot gnu.org |unassigned at gcc dot
| |gnu.org
--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> 2010-11-02 12:39:16 UTC ---
The problem is that we create DOT_PLUS_EXPR in vect_recog_dot_prod_pattern and
it is kept, because for vector mode the pattern is supported, but then it is
kept also for the final loop handling last few entries and for scalar modes
there is no sdot_prod* pattern.
During expansion DOT_PROD_EXPR is expanded using expand_widen_pattern_expr
which ICEs if there is no handler for it.
To fix this, either the vectorizer would need to undo DOT_PROD_EXPR in the
scalar code if there is no DOT_PROD_EXPR scalar handler, or expansion should
check if there is a handler for it and if not, expand it manually using
multiplication and addition, or all the 3 targets that have
sdot_prod*/udot_prod* patterns should always support both vector and scalar
patterns.
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug tree-optimization/46172] [4.3/4.4/4.5/4.6 Regression] ICE: in expand_widen_pattern_expr, at optabs.c:522 with -ftree-vectorize -fno-tree-dce
2010-10-25 21:17 [Bug tree-optimization/46172] New: ICE: in expand_widen_pattern_expr, at optabs.c:522 with -ftree-vectorize -fno-tree-dce zsojka at seznam dot cz
` (4 preceding siblings ...)
2010-11-02 12:39 ` jakub at gcc dot gnu.org
@ 2010-11-02 13:12 ` irar at il dot ibm.com
2010-11-02 13:19 ` jakub at gcc dot gnu.org
` (6 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: irar at il dot ibm.com @ 2010-11-02 13:12 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46172
--- Comment #3 from Ira Rosen <irar at il dot ibm.com> 2010-11-02 13:11:48 UTC ---
The vectorizer assumes that DCE will be applied after it, and not only in this
case. I don't see why someone would want to use this combination of flags
(-ftree-vectorize -fno-tree-dce). I think it is reasonable to automatically
invoke DCE in case -ftree-vectorize is turned on.
Ira
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug tree-optimization/46172] [4.3/4.4/4.5/4.6 Regression] ICE: in expand_widen_pattern_expr, at optabs.c:522 with -ftree-vectorize -fno-tree-dce
2010-10-25 21:17 [Bug tree-optimization/46172] New: ICE: in expand_widen_pattern_expr, at optabs.c:522 with -ftree-vectorize -fno-tree-dce zsojka at seznam dot cz
` (5 preceding siblings ...)
2010-11-02 13:12 ` irar at il dot ibm.com
@ 2010-11-02 13:19 ` jakub at gcc dot gnu.org
2010-11-02 13:28 ` irar at il dot ibm.com
` (5 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: jakub at gcc dot gnu.org @ 2010-11-02 13:19 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46172
--- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> 2010-11-02 13:18:57 UTC ---
Ah, if this is in dead code created by vectorizer that really shouldn't be ever
expanded, then either we need to arrange for DCE to be performed after
vectorizer even if flag_tree_vectorize && !flag_tree_dce (e.g. by using a
different pass structure e.g. instead of pass_dce_loop and use a different gate
for it right after vectorizer), or vectorizer shouldn't create garbage.
-fno-tree-dce is sometimes useful for compiler testing to write testcases e.g.
for expansion and RTL passes bugs, so making it unconditional is not a good
idea.
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug tree-optimization/46172] [4.3/4.4/4.5/4.6 Regression] ICE: in expand_widen_pattern_expr, at optabs.c:522 with -ftree-vectorize -fno-tree-dce
2010-10-25 21:17 [Bug tree-optimization/46172] New: ICE: in expand_widen_pattern_expr, at optabs.c:522 with -ftree-vectorize -fno-tree-dce zsojka at seznam dot cz
` (6 preceding siblings ...)
2010-11-02 13:19 ` jakub at gcc dot gnu.org
@ 2010-11-02 13:28 ` irar at il dot ibm.com
2010-11-02 15:21 ` jakub at gcc dot gnu.org
` (4 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: irar at il dot ibm.com @ 2010-11-02 13:28 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46172
--- Comment #5 from Ira Rosen <irar at il dot ibm.com> 2010-11-02 13:28:14 UTC ---
(In reply to comment #4)
> Ah, if this is in dead code created by vectorizer that really shouldn't be ever
> expanded,
Yes, in this case it's dead code created by the vectorizer that shouldn't be
expanded. But there is also always scalar code that we do not remove except for
stores.
> then either we need to arrange for DCE to be performed after
> vectorizer even if flag_tree_vectorize && !flag_tree_dce (e.g. by using a
> different pass structure e.g. instead of pass_dce_loop and use a different gate
> for it right after vectorizer),
Yes, this is what I meant.
> or vectorizer shouldn't create garbage.
>
> -fno-tree-dce is sometimes useful for compiler testing to write testcases e.g.
> for expansion and RTL passes bugs, so making it unconditional is not a good
> idea.
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug tree-optimization/46172] [4.3/4.4/4.5/4.6 Regression] ICE: in expand_widen_pattern_expr, at optabs.c:522 with -ftree-vectorize -fno-tree-dce
2010-10-25 21:17 [Bug tree-optimization/46172] New: ICE: in expand_widen_pattern_expr, at optabs.c:522 with -ftree-vectorize -fno-tree-dce zsojka at seznam dot cz
` (7 preceding siblings ...)
2010-11-02 13:28 ` irar at il dot ibm.com
@ 2010-11-02 15:21 ` jakub at gcc dot gnu.org
2010-11-03 11:19 ` jakub at gcc dot gnu.org
` (3 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: jakub at gcc dot gnu.org @ 2010-11-02 15:21 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46172
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |ASSIGNED
AssignedTo|unassigned at gcc dot |jakub at gcc dot gnu.org
|gnu.org |
--- Comment #6 from Jakub Jelinek <jakub at gcc dot gnu.org> 2010-11-02 15:20:48 UTC ---
Created attachment 22230
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=22230
gcc46-pr46172.patch
Untested fix.
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug tree-optimization/46172] [4.3/4.4/4.5/4.6 Regression] ICE: in expand_widen_pattern_expr, at optabs.c:522 with -ftree-vectorize -fno-tree-dce
2010-10-25 21:17 [Bug tree-optimization/46172] New: ICE: in expand_widen_pattern_expr, at optabs.c:522 with -ftree-vectorize -fno-tree-dce zsojka at seznam dot cz
` (8 preceding siblings ...)
2010-11-02 15:21 ` jakub at gcc dot gnu.org
@ 2010-11-03 11:19 ` jakub at gcc dot gnu.org
2010-11-12 14:46 ` rguenth at gcc dot gnu.org
` (2 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: jakub at gcc dot gnu.org @ 2010-11-03 11:19 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46172
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |NEW
AssignedTo|jakub at gcc dot gnu.org |unassigned at gcc dot
| |gnu.org
--- Comment #7 from Jakub Jelinek <jakub at gcc dot gnu.org> 2010-11-03 11:18:57 UTC ---
Seems richi prefers a solution in the vectorizer, see
http://gcc.gnu.org/ml/gcc-patches/2010-11/msg00263.html
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug tree-optimization/46172] [4.3/4.4/4.5/4.6 Regression] ICE: in expand_widen_pattern_expr, at optabs.c:522 with -ftree-vectorize -fno-tree-dce
2010-10-25 21:17 [Bug tree-optimization/46172] New: ICE: in expand_widen_pattern_expr, at optabs.c:522 with -ftree-vectorize -fno-tree-dce zsojka at seznam dot cz
` (9 preceding siblings ...)
2010-11-03 11:19 ` jakub at gcc dot gnu.org
@ 2010-11-12 14:46 ` rguenth at gcc dot gnu.org
2010-11-18 15:18 ` rguenth at gcc dot gnu.org
2010-11-18 15:27 ` rguenth at gcc dot gnu.org
12 siblings, 0 replies; 14+ messages in thread
From: rguenth at gcc dot gnu.org @ 2010-11-12 14:46 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46172
Richard Guenther <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |ASSIGNED
AssignedTo|unassigned at gcc dot |rguenth at gcc dot gnu.org
|gnu.org |
--- Comment #8 from Richard Guenther <rguenth at gcc dot gnu.org> 2010-11-12 14:13:01 UTC ---
Mine.
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug tree-optimization/46172] [4.3/4.4/4.5/4.6 Regression] ICE: in expand_widen_pattern_expr, at optabs.c:522 with -ftree-vectorize -fno-tree-dce
2010-10-25 21:17 [Bug tree-optimization/46172] New: ICE: in expand_widen_pattern_expr, at optabs.c:522 with -ftree-vectorize -fno-tree-dce zsojka at seznam dot cz
` (10 preceding siblings ...)
2010-11-12 14:46 ` rguenth at gcc dot gnu.org
@ 2010-11-18 15:18 ` rguenth at gcc dot gnu.org
2010-11-18 15:27 ` rguenth at gcc dot gnu.org
12 siblings, 0 replies; 14+ messages in thread
From: rguenth at gcc dot gnu.org @ 2010-11-18 15:18 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46172
--- Comment #9 from Richard Guenther <rguenth at gcc dot gnu.org> 2010-11-18 15:17:43 UTC ---
Author: rguenth
Date: Thu Nov 18 15:17:37 2010
New Revision: 166908
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=166908
Log:
2010-11-18 Richard Guenther <rguenther@suse.de>
PR tree-optimization/46172
* tree-vect-loop-manip.c (remove_dead_stmts_from_loop): New
function.
(slpeel_tree_peel_loop_to_edge): Call it.
* gcc.dg/torture/pr46172.c: New testcase.
Added:
trunk/gcc/testsuite/gcc.dg/torture/pr46172.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/testsuite/ChangeLog
trunk/gcc/tree-vect-loop-manip.c
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug tree-optimization/46172] [4.3/4.4/4.5/4.6 Regression] ICE: in expand_widen_pattern_expr, at optabs.c:522 with -ftree-vectorize -fno-tree-dce
2010-10-25 21:17 [Bug tree-optimization/46172] New: ICE: in expand_widen_pattern_expr, at optabs.c:522 with -ftree-vectorize -fno-tree-dce zsojka at seznam dot cz
` (11 preceding siblings ...)
2010-11-18 15:18 ` rguenth at gcc dot gnu.org
@ 2010-11-18 15:27 ` rguenth at gcc dot gnu.org
12 siblings, 0 replies; 14+ messages in thread
From: rguenth at gcc dot gnu.org @ 2010-11-18 15:27 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46172
Richard Guenther <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Known to work| |4.6.0
Resolution| |FIXED
Target Milestone|4.3.6 |4.6.0
Known to fail|4.6.0 |
--- Comment #10 from Richard Guenther <rguenth at gcc dot gnu.org> 2010-11-18 15:18:15 UTC ---
Fixed on trunk. Not worth backporting anywhere.
^ permalink raw reply [flat|nested] 14+ messages in thread