[Bug tree-optimization/34330] -ftree-parallelize-loops=4 ICE with the vectorizer also

2007-12-09 Thread pinskia at gcc dot gnu dot org


--- Comment #1 from pinskia at gcc dot gnu dot org  2007-12-10 00:23 ---
This is a vectorizer vs not being able to run may_alias after it.

Confirmed.

(gdb) p debug_generic_expr (tag_type)
vector short int


(gdb) p debug_tree(tag)
 
unit size 
align 16 symtab 0 alias set 5 canonical type 0x4277ff50
fields 
HI file t.c line 6 col 18
size 
unit size 
align 16 offset_align 128
offset 
bit offset  context
 chain > context

pointer_to_this  chain >
addressable used file t.c line 11 col 1 context >
$3 = void
(gdb) p debug_generic_expr (0x4277ff50)
struct 
{
  short int s1;
  short int s2;
  short int s3;
  short int s4;
}

(gdb) p tag_set
$5 = 6
(gdb) p get_alias_set (tag) 
$6 = 5


-- 

pinskia at gcc dot gnu dot org changed:

   What|Removed |Added

 CC||dorit at gcc dot gnu dot org
 Status|UNCONFIRMED |NEW
 Ever Confirmed|0   |1
  GCC build triplet|i686-pc-linux-gnu   |
   GCC host triplet|i686-pc-linux-gnu   |
 GCC target triplet|i686-*-*, x86_64-*-*|
   Keywords||ice-on-valid-code
   Last reconfirmed|-00-00 00:00:00 |2007-12-10 00:23:44
   date||
Summary|-ftree-parallelize-loops=4  |-ftree-parallelize-loops=4
   |ICE |ICE with the vectorizer also


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34330



[Bug tree-optimization/34330] -ftree-parallelize-loops=4 ICE with the vectorizer also

2007-12-16 Thread rakdver at gcc dot gnu dot org


-- 

rakdver at gcc dot gnu dot org changed:

   What|Removed |Added

 AssignedTo|unassigned at gcc dot gnu   |rakdver at gcc dot gnu dot
   |dot org |org
 Status|NEW |ASSIGNED
   Last reconfirmed|2007-12-10 00:23:44 |2007-12-16 22:07:18
   date||


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34330



[Bug tree-optimization/34330] -ftree-parallelize-loops=4 ICE with the vectorizer also

2007-12-18 Thread rakdver at gcc dot gnu dot org


--- Comment #2 from rakdver at gcc dot gnu dot org  2007-12-18 18:51 ---
I do not see a way how to fix this in 4.3, other than disabling vectorizer when
parallelization is enabled, or vice versa.


-- 

rakdver at gcc dot gnu dot org changed:

   What|Removed |Added

 AssignedTo|rakdver at gcc dot gnu dot  |unassigned at gcc dot gnu
   |org |dot org
 Status|ASSIGNED|NEW


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34330



[Bug tree-optimization/34330] -ftree-parallelize-loops=4 ICE with the vectorizer also

2007-12-19 Thread jakub at gcc dot gnu dot org


--- Comment #4 from jakub at gcc dot gnu dot org  2007-12-19 09:46 ---
We could even TODO_rebuild_alias only if vectorizer changed anything...


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34330



[Bug tree-optimization/34330] -ftree-parallelize-loops=4 ICE with the vectorizer also

2007-12-19 Thread dorit at gcc dot gnu dot org


--- Comment #3 from dorit at gcc dot gnu dot org  2007-12-19 09:38 ---
> This is a vectorizer vs not being able to run may_alias after it

can you please remind me why we can't run may_alias after the vectorizer? (and
what do you think can be done about it?)


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34330



[Bug tree-optimization/34330] -ftree-parallelize-loops=4 ICE with the vectorizer also

2008-01-21 Thread rakdver at gcc dot gnu dot org


--- Comment #5 from rakdver at gcc dot gnu dot org  2008-01-21 17:35 ---
(In reply to comment #3)
> > This is a vectorizer vs not being able to run may_alias after it
> 
> can you please remind me why we can't run may_alias after the vectorizer? (and
> what do you think can be done about it?)

As for this ICE: may_alias rebuilds the smt's, and finds that the smt for the
pointers created by vectorizer should be different (based on their type, not
the artificial ones created by vectorizer).

If we removed the hacks to update the alias info from vectorizer and run
may_alias instead, we might get type-based alias analysis related
misscompilations, as we create code of form

vector_type *p = &object_of_arbitrary_type;
*p = something;

And TBA might decide that references through vector_type and arbitrary_type
cannot alias.

I actually tried this some time ago, and I was not able to get misscompilations
this way (I am not really sure why).  However, I got many fails in the
testsuite (that I did not have time to investigate), so there may be some other
problems with alias analysis after vectorizer.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34330



[Bug tree-optimization/34330] -ftree-parallelize-loops=4 ICE with the vectorizer also

2008-05-12 Thread razya at il dot ibm dot com


--- Comment #6 from razya at il dot ibm dot com  2008-05-12 09:13 ---
(In reply to comment #0)
> /* { dg-do compile } */
> /* { dg-options "-O3 -ftree-parallelize-loops=4" } */
> struct T
> {
>   int t;
>   struct { short s1, s2, s3, s4 } *s;
> };
> void
> foo (int *a, int *b, int *c, int *d, struct T *e)
> {
>   int i;
>   for (i = 0; i < e->t; i++)
> {
>   e->s[i].s1 = a[i];
>   e->s[i].s2 = b[i];
>   e->s[i].s3 = c[i];
>   e->s[i].s4 = d[i];
> }
> }
> ICEs on x86_64-linux with
> test.c: In function 'foo':
> test.c:11: internal compiler error: in get_smt_for, at tree-ssa-alias.c:3203
> Please submit a full bug report,
> with preprocessed source if appropriate.
> See  for instructions.

I'm getting the same ICE (with r134722) when running spec2006/gobmk on power6.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34330



[Bug tree-optimization/34330] -ftree-parallelize-loops=4 ICE with the vectorizer also

2008-05-12 Thread razya at il dot ibm dot com


--- Comment #7 from razya at il dot ibm dot com  2008-05-12 09:42 ---
(In reply to comment #6)
> I'm getting the same ICE (with r134722) when running spec2006/gobmk on power6.

The same failure appears also for other benchmarks from spec2006:
h264ref, gromacs, calculix, tonto, wrf


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34330



[Bug tree-optimization/34330] -ftree-parallelize-loops=4 ICE with the vectorizer also

2008-05-13 Thread rguenth at gcc dot gnu dot org


--- Comment #8 from rguenth at gcc dot gnu dot org  2008-05-13 09:07 ---
To fix potential TBAA miscompilations the vectorizer could mark all pointer
(types) it creates with TYPE_REF_CAN_ALIAS_ALL.  But I guess I have a more
pragmatic fix for this.


-- 

rguenth at gcc dot gnu dot org changed:

   What|Removed |Added

 AssignedTo|unassigned at gcc dot gnu   |rguenth at gcc dot gnu dot
   |dot org |org
 Status|NEW |ASSIGNED
   Last reconfirmed|2007-12-16 22:07:18 |2008-05-13 09:07:52
   date||


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34330



[Bug tree-optimization/34330] -ftree-parallelize-loops=4 ICE with the vectorizer also

2008-05-15 Thread rguenth at gcc dot gnu dot org


--- Comment #9 from rguenth at gcc dot gnu dot org  2008-05-15 08:22 ---
Fixed on the trunk.


-- 

rguenth at gcc dot gnu dot org changed:

   What|Removed |Added

  Known to fail||4.3.0
  Known to work||4.4.0
   Target Milestone|--- |4.4.0


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34330



[Bug tree-optimization/34330] -ftree-parallelize-loops=4 ICE with the vectorizer also

2008-05-15 Thread rguenth at gcc dot gnu dot org


--- Comment #10 from rguenth at gcc dot gnu dot org  2008-05-15 08:22 
---
Subject: Bug 34330

Author: rguenth
Date: Thu May 15 08:21:32 2008
New Revision: 135329

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=135329
Log:
2008-05-15  Richard Guenther  <[EMAIL PROTECTED]>

PR tree-optimization/34330
* tree-ssa-alias.c (get_smt_for): Only assert that accesses
through the pointer will alias the SMT.

* gcc.dg/torture/pr34330.c: New testcase.

Added:
trunk/gcc/testsuite/gcc.dg/torture/pr34330.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/testsuite/ChangeLog
trunk/gcc/tree-ssa-alias.c


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34330



[Bug tree-optimization/34330] -ftree-parallelize-loops=4 ICE with the vectorizer also

2008-05-15 Thread razya at il dot ibm dot com


--- Comment #14 from razya at il dot ibm dot com  2008-05-15 09:41 ---
(In reply to comment #13)
> I see this also even without the patch.  Can you open a new PR for this?

(In reply to comment #12)
>   int q, x;
> is missing in the testcase.  I suppose you tried on the 4.3 branch?

No, actually it's 4.4


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34330



[Bug tree-optimization/34330] -ftree-parallelize-loops=4 ICE with the vectorizer also

2008-05-15 Thread rguenth at gcc dot gnu dot org


--- Comment #12 from rguenth at gcc dot gnu dot org  2008-05-15 09:27 
---
  int q, x;

is missing in the testcase.  I suppose you tried on the 4.3 branch?


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34330



[Bug tree-optimization/34330] -ftree-parallelize-loops=4 ICE with the vectorizer also

2008-05-15 Thread razya at il dot ibm dot com


--- Comment #15 from razya at il dot ibm dot com  2008-05-15 09:46 ---
(In reply to comment #13)
> I see this also even without the patch.  Can you open a new PR for this?

Sure.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36244


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34330



[Bug tree-optimization/34330] -ftree-parallelize-loops=4 ICE with the vectorizer also

2008-05-15 Thread razya at il dot ibm dot com


--- Comment #11 from razya at il dot ibm dot com  2008-05-15 09:23 ---
(In reply to comment #10)
> Subject: Bug 34330
> Author: rguenth
> Date: Thu May 15 08:21:32 2008
> New Revision: 135329
> URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=135329
> Log:
> 2008-05-15  Richard Guenther  <[EMAIL PROTECTED]>
> PR tree-optimization/34330
> * tree-ssa-alias.c (get_smt_for): Only assert that accesses
> through the pointer will alias the SMT.
> * gcc.dg/torture/pr34330.c: New testcase.
> Added:
> trunk/gcc/testsuite/gcc.dg/torture/pr34330.c
> Modified:
> trunk/gcc/ChangeLog
> trunk/gcc/testsuite/ChangeLog
> trunk/gcc/tree-ssa-alias.c

/* { dg-do compile } */
/* { dg-options "-O3 -ftree-parallelize-loops=4 -c" } */

struct p7prior_s {

  int   mnum;   /* number of mat emission Dirichlet mixtures */
  float mq[200];  /* probabilities of mnum components  */
  float m[200][20];  /* match emission terms per mix component*/

};

struct p7prior_s *default_amino_prior(void);
struct p7prior_s *P7AllocPrior(void);

struct p7prior_s *
default_amino_prior(void)
{
  struct p7prior_s *pri;

  static float defmq[5] = {
0.178091, 0.056591, 0.0960191, 0.0781233, 0.0834977 };
 static float defm[5][6] = {
{ 0.270671, 0.039848, 0.017576, 0.016415, 0.014268,
  0.216147 },
{ 0.021465, 0.010300, 0.011741, 0.010883, 0.385651,
  0.029156 },
{ 0.561459, 0.045448, 0.438366, 0.764167, 0.087364,
  0.583402 },
{ 0.070143, 0.011140, 0.019479, 0.094657, 0.013162,
  0.073732 },
{ 0.041103, 0.014794, 0.005610, 0.010216, 0.153602,
  0.012049 }
  };

  pri = P7AllocPrior();
  pri->mnum  = 5;
  for (q = 0; q < pri->mnum; q++)
{
  pri->mq[q] = defmq[q];
  for (x = 0; x < 6; x++)
pri->m[q][x] = defm[q][x];
}
  return pri;
}

After applying Richard's patch, I'm still getting what seems to be a similar
problem.
prior.c:17: internal compiler error: in add_call_clobber_ops, at
tree-ssa-operands.c:1822
this was tested on power6, when both vectoriztion and autopar are enabled.
no failure when enabled seperately.



-- 

razya at il dot ibm dot com changed:

   What|Removed |Added

 CC||razya at il dot ibm dot com


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34330



[Bug tree-optimization/34330] -ftree-parallelize-loops=4 ICE with the vectorizer also

2008-05-15 Thread rguenth at gcc dot gnu dot org


--- Comment #13 from rguenth at gcc dot gnu dot org  2008-05-15 09:29 
---
I see this also even without the patch.  Can you open a new PR for this?


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34330



[Bug tree-optimization/34330] -ftree-parallelize-loops=4 ICE with the vectorizer also

2008-05-20 Thread rguenth at gcc dot gnu dot org


--- Comment #16 from rguenth at gcc dot gnu dot org  2008-05-20 21:04 
---
Fixed.


-- 

rguenth at gcc dot gnu dot org changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution||FIXED
   Target Milestone|4.4.0   |4.3.1


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34330



[Bug tree-optimization/34330] -ftree-parallelize-loops=4 ICE with the vectorizer also

2008-05-20 Thread rguenth at gcc dot gnu dot org


--- Comment #17 from rguenth at gcc dot gnu dot org  2008-05-20 21:05 
---
Subject: Bug 34330

Author: rguenth
Date: Tue May 20 21:03:59 2008
New Revision: 135680

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=135680
Log:
2008-05-20  Richard Guenther  <[EMAIL PROTECTED]>

Backport from mainline:
2008-05-15  Richard Guenther  <[EMAIL PROTECTED]>

PR tree-optimization/34330
* tree-ssa-alias.c (get_smt_for): Only assert that accesses
through the pointer will alias the SMT.

* gcc.dg/torture/pr34330.c: New testcase.

PR middle-end/36244
* tree-ssa-alias.c (new_type_alias): Do not set TREE_READONLY.
* tree-flow-inline.h (unmodifiable_var_p): Memory tags never
represent unmodifiable vars.

* gcc.dg/torture/pr36244.c: New testcase.

Added:
branches/gcc-4_3-branch/gcc/testsuite/gcc.dg/torture/pr34330.c
  - copied unchanged from r135329,
trunk/gcc/testsuite/gcc.dg/torture/pr34330.c
branches/gcc-4_3-branch/gcc/testsuite/gcc.dg/torture/pr36244.c
  - copied unchanged from r135336,
trunk/gcc/testsuite/gcc.dg/torture/pr36244.c
Modified:
branches/gcc-4_3-branch/gcc/ChangeLog
branches/gcc-4_3-branch/gcc/testsuite/ChangeLog
branches/gcc-4_3-branch/gcc/tree-flow-inline.h
branches/gcc-4_3-branch/gcc/tree-ssa-alias.c


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34330