* [Bug tree-optimization/18308] ICE in do_jump, at dojump.c:274
2004-11-05 13:01 [Bug tree-optimization/18308] New: ICE in do_jump, at dojump.c:274 reichelt at gcc dot gnu dot org
@ 2004-11-05 13:25 ` reichelt at gcc dot gnu dot org
2004-11-05 13:51 ` pinskia at gcc dot gnu dot org
` (13 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2004-11-05 13:25 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From reichelt at gcc dot gnu dot org 2004-11-05 13:25 -------
Zdenek, the problem appeared with your patch
http://gcc.gnu.org/ml/gcc-cvs/2004-10/msg00030.html
--
What |Removed |Added
----------------------------------------------------------------------------
CC| |rakdver at gcc dot gnu dot
| |org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18308
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug tree-optimization/18308] ICE in do_jump, at dojump.c:274
2004-11-05 13:01 [Bug tree-optimization/18308] New: ICE in do_jump, at dojump.c:274 reichelt at gcc dot gnu dot org
2004-11-05 13:25 ` [Bug tree-optimization/18308] " reichelt at gcc dot gnu dot org
@ 2004-11-05 13:51 ` pinskia at gcc dot gnu dot org
2004-11-18 1:27 ` dpatel at apple dot com
` (12 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-11-05 13:51 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-11-05 13:51 -------
ifcvt produces non-gimple:
_ifc_.2_15 = (j_6 != 0 || !_ifc_.1_16) && ivtmp.0_4 != 0;
Confirmed.
--
What |Removed |Added
----------------------------------------------------------------------------
CC| |dpatel at apple dot com
Status|UNCONFIRMED |NEW
Ever Confirmed| |1
Last reconfirmed|0000-00-00 00:00:00 |2004-11-05 13:51:36
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18308
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug tree-optimization/18308] ICE in do_jump, at dojump.c:274
2004-11-05 13:01 [Bug tree-optimization/18308] New: ICE in do_jump, at dojump.c:274 reichelt at gcc dot gnu dot org
2004-11-05 13:25 ` [Bug tree-optimization/18308] " reichelt at gcc dot gnu dot org
2004-11-05 13:51 ` pinskia at gcc dot gnu dot org
@ 2004-11-18 1:27 ` dpatel at apple dot com
2004-11-18 1:28 ` dpatel at apple dot com
` (11 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: dpatel at apple dot com @ 2004-11-18 1:27 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From dpatel at apple dot com 2004-11-18 01:27 -------
Bigger issue is : if-convert COND_EXPR is not vectorized and do_jump() does not aborts().
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18308
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug tree-optimization/18308] ICE in do_jump, at dojump.c:274
2004-11-05 13:01 [Bug tree-optimization/18308] New: ICE in do_jump, at dojump.c:274 reichelt at gcc dot gnu dot org
` (2 preceding siblings ...)
2004-11-18 1:27 ` dpatel at apple dot com
@ 2004-11-18 1:28 ` dpatel at apple dot com
2004-11-18 2:26 ` dpatel at apple dot com
` (10 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: dpatel at apple dot com @ 2004-11-18 1:28 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From dpatel at apple dot com 2004-11-18 01:28 -------
I meant,
Bigger issue is : if-convert COND_EXPR is not vectorized and do_jump() does not handle it.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18308
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug tree-optimization/18308] ICE in do_jump, at dojump.c:274
2004-11-05 13:01 [Bug tree-optimization/18308] New: ICE in do_jump, at dojump.c:274 reichelt at gcc dot gnu dot org
` (3 preceding siblings ...)
2004-11-18 1:28 ` dpatel at apple dot com
@ 2004-11-18 2:26 ` dpatel at apple dot com
2004-11-18 2:29 ` pinskia at gcc dot gnu dot org
` (9 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: dpatel at apple dot com @ 2004-11-18 2:26 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From dpatel at apple dot com 2004-11-18 02:26 -------
After I update tree-level if-conversion to force gimple operands appropriately, rewrite_out_of_ssa() is
converting following ...
bar()
{
_Bool _ifc_.3;
_Bool _ifc_.2;
_Bool D.1339;
_Bool D.1336;
_Bool D.1337;
_Bool D.1338;
_Bool _ifc_.1;
unsigned int ivtmp.0;
int k;
int j;
int i;
# BLOCK 0
# PRED: ENTRY [100.0%] (fallthru,exec)
k_21 = j_6 != 0 ? 2 : 0;
k_5 = j_6 == 0 ? k_21 : 2;
if (k_5 != 0) goto <L5>; else goto <L6>;
# SUCC: 1 [46.5%] (true,exec) 2 [53.5%] (false,exec)
# BLOCK 1
# PRED: 0 [46.5%] (true,exec)
<L5>:;
# .GLOBAL_VAR_10 = V_MAY_DEF <.GLOBAL_VAR_9>;
foo () [tail call];
# SUCC: 2 [100.0%] (fallthru,exec)
# BLOCK 2
# PRED: 0 [53.5%] (false,exec) 1 [100.0%] (fallthru,exec)
<L6>:;
return;
# SUCC: EXIT [100.0%]
}
into ...
bar ()
{
int k.17;
_Bool _ifc_.3;
_Bool _ifc_.2;
_Bool D.1339;
_Bool D.1336;
_Bool D.1337;
_Bool D.1338;
_Bool _ifc_.1;
unsigned int ivtmp.0;
int k;
int j;
int i;
# BLOCK 0
# PRED: ENTRY [100.0%] (fallthru,exec)
if ((j == 0 ? j != 0 ? 2 : 0 : 2) != 0) goto <L5>; else goto <L6>;
# SUCC: 1 [46.5%] (true,exec) 2 [53.5%] (false,exec)
# BLOCK 1
# PRED: 0 [46.5%] (true,exec)
<L5>:;
# .GLOBAL_VAR_10 = V_MAY_DEF <.GLOBAL_VAR_9>;
foo () [tail call];
# SUCC: 2 [100.0%] (fallthru,exec)
# BLOCK 2
# PRED: 0 [53.5%] (false,exec) 1 [100.0%] (fallthru,exec)
<L6>:;
return;
# SUCC: EXIT [100.0%]
}
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18308
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug tree-optimization/18308] ICE in do_jump, at dojump.c:274
2004-11-05 13:01 [Bug tree-optimization/18308] New: ICE in do_jump, at dojump.c:274 reichelt at gcc dot gnu dot org
` (4 preceding siblings ...)
2004-11-18 2:26 ` dpatel at apple dot com
@ 2004-11-18 2:29 ` pinskia at gcc dot gnu dot org
2004-11-18 2:31 ` pinskia at gcc dot gnu dot org
` (8 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-11-18 2:29 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-11-18 02:29 -------
So someone removed too much from do_jump in the first place.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18308
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug tree-optimization/18308] ICE in do_jump, at dojump.c:274
2004-11-05 13:01 [Bug tree-optimization/18308] New: ICE in do_jump, at dojump.c:274 reichelt at gcc dot gnu dot org
` (5 preceding siblings ...)
2004-11-18 2:29 ` pinskia at gcc dot gnu dot org
@ 2004-11-18 2:31 ` pinskia at gcc dot gnu dot org
2004-11-18 2:34 ` dpatel at apple dot com
` (7 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-11-18 2:31 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-11-18 02:31 -------
And that would mean it was caused by:
* dojump.c (do_jump) <COND_EXPR, EQ_EXPR, NE_EXPR,
TRUTH_ANDIF_EXPR, TRUTH_ORIF_EXPR, COMPOUND_EXPR>:
Abort on gimplified cases.
--
What |Removed |Added
----------------------------------------------------------------------------
CC| |bonzini at gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18308
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug tree-optimization/18308] ICE in do_jump, at dojump.c:274
2004-11-05 13:01 [Bug tree-optimization/18308] New: ICE in do_jump, at dojump.c:274 reichelt at gcc dot gnu dot org
` (6 preceding siblings ...)
2004-11-18 2:31 ` pinskia at gcc dot gnu dot org
@ 2004-11-18 2:34 ` dpatel at apple dot com
2004-11-18 8:04 ` paolo dot bonzini at lu dot unisi dot ch
` (6 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: dpatel at apple dot com @ 2004-11-18 2:34 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From dpatel at apple dot com 2004-11-18 02:33 -------
Subject: Re: ICE in do_jump, at dojump.c:274
Andrew,
You can try following to fix tree level if-conversion. I have not
tested it completely yet.
-
Devang
Index: tree-if-conv.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/tree-if-conv.c,v
retrieving revision 2.19
diff -Idpatel.pbxuser -c -3 -p -r2.19 tree-if-conv.c
*** tree-if-conv.c 16 Nov 2004 20:02:48 -0000 2.19
--- tree-if-conv.c 18 Nov 2004 02:32:03 -0000
*************** add_to_dst_predicate_list (struct loop *
*** 639,645 ****
new_cond = unshare_expr (cond);
else
{
! tree tmp_stmt;
/* new_cond == prev_cond AND cond */
tree tmp = build (TRUTH_AND_EXPR, boolean_type_node,
unshare_expr (prev_cond), cond);
--- 639,655 ----
new_cond = unshare_expr (cond);
else
{
! tree tmp_stmt = NULL_TREE;
! tree tmp_stmts1 = NULL_TREE;
! tree tmp_stmts2 = NULL_TREE;
! prev_cond = force_gimple_operand (unshare_expr (prev_cond),
&tmp_stmts1, true, NULL);
! if (tmp_stmts1)
! bsi_insert_before (bsi, tmp_stmts1, BSI_SAME_STMT);
!
! cond = force_gimple_operand (unshare_expr (cond), &tmp_stmts2,
true, NULL);
! if (tmp_stmts2)
! bsi_insert_before (bsi, tmp_stmts2, BSI_SAME_STMT);
!
/* new_cond == prev_cond AND cond */
tree tmp = build (TRUTH_AND_EXPR, boolean_type_node,
unshare_expr (prev_cond), cond);
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18308
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug tree-optimization/18308] ICE in do_jump, at dojump.c:274
2004-11-05 13:01 [Bug tree-optimization/18308] New: ICE in do_jump, at dojump.c:274 reichelt at gcc dot gnu dot org
` (7 preceding siblings ...)
2004-11-18 2:34 ` dpatel at apple dot com
@ 2004-11-18 8:04 ` paolo dot bonzini at lu dot unisi dot ch
2004-11-18 19:09 ` dpatel at apple dot com
` (5 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: paolo dot bonzini at lu dot unisi dot ch @ 2004-11-18 8:04 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From paolo dot bonzini at lu dot unisi dot ch 2004-11-18 08:03 -------
Subject: Re: ICE in do_jump, at dojump.c:274
> And that would mean it was caused by:
> * dojump.c (do_jump) <COND_EXPR, EQ_EXPR, NE_EXPR,
> TRUTH_ANDIF_EXPR, TRUTH_ORIF_EXPR, COMPOUND_EXPR>:
> Abort on gimplified cases.
While I can work on a fix, those COND_EXPR were *not* valid GIMPLE at
the time the patch was written.
Paolo
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18308
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug tree-optimization/18308] ICE in do_jump, at dojump.c:274
2004-11-05 13:01 [Bug tree-optimization/18308] New: ICE in do_jump, at dojump.c:274 reichelt at gcc dot gnu dot org
` (8 preceding siblings ...)
2004-11-18 8:04 ` paolo dot bonzini at lu dot unisi dot ch
@ 2004-11-18 19:09 ` dpatel at apple dot com
2004-12-28 17:44 ` bonzini at gcc dot gnu dot org
` (4 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: dpatel at apple dot com @ 2004-11-18 19:09 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From dpatel at apple dot com 2004-11-18 19:09 -------
Subject: Re: ICE in do_jump, at dojump.c:274
On Nov 18, 2004, at 12:03 AM, paolo dot bonzini at lu dot unisi dot ch
wrote:
> While I can work on a fix, those COND_EXPR were *not* valid GIMPLE at
> the time the patch was written.
I agree with you. While cleanup this stuff, you even cc'ed us and left
some stuff around. May be we can update rewrite_outof_ssa()? See
example I included above.
-
Devang
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18308
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug tree-optimization/18308] ICE in do_jump, at dojump.c:274
2004-11-05 13:01 [Bug tree-optimization/18308] New: ICE in do_jump, at dojump.c:274 reichelt at gcc dot gnu dot org
` (9 preceding siblings ...)
2004-11-18 19:09 ` dpatel at apple dot com
@ 2004-12-28 17:44 ` bonzini at gcc dot gnu dot org
2004-12-28 17:45 ` bonzini at gcc dot gnu dot org
` (3 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: bonzini at gcc dot gnu dot org @ 2004-12-28 17:44 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From bonzini at gcc dot gnu dot org 2004-12-28 17:44 -------
Looking at it.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18308
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug tree-optimization/18308] ICE in do_jump, at dojump.c:274
2004-11-05 13:01 [Bug tree-optimization/18308] New: ICE in do_jump, at dojump.c:274 reichelt at gcc dot gnu dot org
` (10 preceding siblings ...)
2004-12-28 17:44 ` bonzini at gcc dot gnu dot org
@ 2004-12-28 17:45 ` bonzini at gcc dot gnu dot org
2004-12-28 18:50 ` bonzini at gcc dot gnu dot org
` (2 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: bonzini at gcc dot gnu dot org @ 2004-12-28 17:45 UTC (permalink / raw)
To: gcc-bugs
--
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |bonzini at gcc dot gnu dot
|dot org |org
Status|NEW |ASSIGNED
Last reconfirmed|2004-11-05 13:51:36 |2004-12-28 17:45:12
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18308
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug tree-optimization/18308] ICE in do_jump, at dojump.c:274
2004-11-05 13:01 [Bug tree-optimization/18308] New: ICE in do_jump, at dojump.c:274 reichelt at gcc dot gnu dot org
` (11 preceding siblings ...)
2004-12-28 17:45 ` bonzini at gcc dot gnu dot org
@ 2004-12-28 18:50 ` bonzini at gcc dot gnu dot org
2005-01-04 14:37 ` cvs-commit at gcc dot gnu dot org
2005-01-04 15:43 ` pinskia at gcc dot gnu dot org
14 siblings, 0 replies; 16+ messages in thread
From: bonzini at gcc dot gnu dot org @ 2004-12-28 18:50 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From bonzini at gcc dot gnu dot org 2004-12-28 18:49 -------
http://gcc.gnu.org/ml/gcc-patches/2004-12/msg02012.html
--
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |patch
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18308
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug tree-optimization/18308] ICE in do_jump, at dojump.c:274
2004-11-05 13:01 [Bug tree-optimization/18308] New: ICE in do_jump, at dojump.c:274 reichelt at gcc dot gnu dot org
` (12 preceding siblings ...)
2004-12-28 18:50 ` bonzini at gcc dot gnu dot org
@ 2005-01-04 14:37 ` cvs-commit at gcc dot gnu dot org
2005-01-04 15:43 ` pinskia at gcc dot gnu dot org
14 siblings, 0 replies; 16+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2005-01-04 14:37 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From cvs-commit at gcc dot gnu dot org 2005-01-04 14:37 -------
Subject: Bug 18308
CVSROOT: /cvs/gcc
Module name: gcc
Changes by: bonzini@gcc.gnu.org 2005-01-04 14:37:24
Modified files:
gcc : ChangeLog tree-if-conv.c dojump.c
gcc/testsuite : ChangeLog
Added files:
gcc/testsuite/gcc.dg/vect: pr18308.c
Log message:
gcc:
2005-01-04 Paolo Bonzini <bonzini@gnu.org>
Devang Patel <dpatel@apple.com>
PR tree-optimization/18308
* tree-if-conv.c (add_to_dst_predicate_list): Gimplify
the operands before creating a new expression.
* dojump.c (do_jump): Make drop_through_label available
for all cases. Add expansion of COND_EXPR.
gcc/testsuite:
2005-01-04 Paolo Bonzini <bonzini@gnu.org>
* gcc.dg/vect/pr18308.c: New testcase.
Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&r1=2.7019&r2=2.7020
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/tree-if-conv.c.diff?cvsroot=gcc&r1=2.24&r2=2.25
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/dojump.c.diff?cvsroot=gcc&r1=1.35&r2=1.36
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.4844&r2=1.4845
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gcc.dg/vect/pr18308.c.diff?cvsroot=gcc&r1=NONE&r2=1.1
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18308
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug tree-optimization/18308] ICE in do_jump, at dojump.c:274
2004-11-05 13:01 [Bug tree-optimization/18308] New: ICE in do_jump, at dojump.c:274 reichelt at gcc dot gnu dot org
` (13 preceding siblings ...)
2005-01-04 14:37 ` cvs-commit at gcc dot gnu dot org
@ 2005-01-04 15:43 ` pinskia at gcc dot gnu dot org
14 siblings, 0 replies; 16+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-01-04 15:43 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2005-01-04 15:43 -------
Fixed.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
Target Milestone|--- |4.0.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18308
^ permalink raw reply [flat|nested] 16+ messages in thread