[Bug middle-end/45758] [4.6 Regression] ICE in expr_invariant_in_loop_p

2010-09-23 Thread spop at gcc dot gnu dot org


--- Comment #4 from spop at gcc dot gnu dot org  2010-09-23 15:54 ---
Subject: Bug 45758

Author: spop
Date: Thu Sep 23 15:54:01 2010
New Revision: 164567

URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=164567
Log:
Add testcase for PR45758.

2010-09-23  Sebastian Pop  sebastian@amd.com

PR middle-end/45758
* gfortran.dg/graphite/pr45758.f90: New.

Added:
branches/graphite/gcc/testsuite/gfortran.dg/graphite/pr45758.f90
Modified:
branches/graphite/gcc/ChangeLog.graphite


-- 


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



[Bug tree-optimization/43430] Missed vectorization: stmt not supported: cond_expr

2010-09-17 Thread spop at gcc dot gnu dot org


--- Comment #9 from spop at gcc dot gnu dot org  2010-09-17 19:01 ---
Fixed.


-- 

spop at gcc dot gnu dot org changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution||FIXED


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



[Bug bootstrap/45680] [4.6 regression] cc1 fails to link on Solaris 9/x86 with Sun as: min_insn_size missing

2010-09-16 Thread spop at gcc dot gnu dot org


--- Comment #4 from spop at gcc dot gnu dot org  2010-09-16 17:19 ---
Subject: Bug 45680

Author: spop
Date: Thu Sep 16 17:19:25 2010
New Revision: 164345

URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=164345
Log:
Fix PR45680.

2010-09-16  Reza Yazdani  reza.yazd...@amd.com

PR bootstrap/45680
* config/i386/i386.c (min_insn_size): Moved out of the
ASM_OUTPUT_MAX_SKIP_PAD ifdef.

Modified:
trunk/gcc/ChangeLog
trunk/gcc/config/i386/i386.c


-- 


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



[Bug bootstrap/45680] [4.6 regression] cc1 fails to link on Solaris 9/x86 with Sun as: min_insn_size missing

2010-09-16 Thread spop at gcc dot gnu dot org


--- Comment #5 from spop at gcc dot gnu dot org  2010-09-16 17:21 ---
Fixed.


-- 

spop at gcc dot gnu dot org changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution||FIXED


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



[Bug middle-end/45230] gcc.c-torture/execute/strncmp-1.c ICEs with -fgraphite-identity

2010-08-20 Thread spop at gcc dot gnu dot org


--- Comment #3 from spop at gcc dot gnu dot org  2010-08-20 23:50 ---
Subject: Bug 45230

Author: spop
Date: Fri Aug 20 23:49:58 2010
New Revision: 163432

URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=163432
Log:
Add testcase for PR45230.

2010-08-20  Sebastian Pop  sebastian@amd.com

PR middle-end/45230
* gcc.dg/graphite/id-pr45230.c: New.

Added:
branches/graphite/gcc/testsuite/gcc.dg/graphite/id-pr45230.c
Modified:
branches/graphite/gcc/ChangeLog.graphite


-- 


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



[Bug tree-optimization/45313] New: [graphite] interchange-7.c is miscompiled

2010-08-17 Thread spop at gcc dot gnu dot org
In the graphite branch interchange-7.c is miscompiled with the following flags:

$ gcc -O3 -fgraphite  -fno-loop-block -floop-strip-mine -floop-interchange
interchange-7.c
$ ./a.out 
Aborted


-- 
   Summary: [graphite] interchange-7.c is miscompiled
   Product: gcc
   Version: 4.6.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: tree-optimization
AssignedTo: spop at gcc dot gnu dot org
ReportedBy: spop at gcc dot gnu dot org


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



[Bug tree-optimization/45313] [graphite] interchange-7.c is miscompiled

2010-08-17 Thread spop at gcc dot gnu dot org


-- 

spop at gcc dot gnu dot org changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
 Ever Confirmed|0   |1
   Last reconfirmed|-00-00 00:00:00 |2010-08-17 19:00:25
   date||


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



[Bug middle-end/45229] gcc.c-torture/execute/20000412-4.c ICEs with -fgraphite-identity

2010-08-17 Thread spop at gcc dot gnu dot org


--- Comment #3 from spop at gcc dot gnu dot org  2010-08-17 20:41 ---
Subject: Bug 45229

Author: spop
Date: Tue Aug 17 20:41:26 2010
New Revision: 163319

URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=163319
Log:
Fix PR45229: gcc.c-torture/execute/2412-4.c ICEs with -fgraphite-identity.

2010-08-17  Sebastian Pop  sebastian@amd.com

PR middle-end/45229
* graphite-sese-to-poly.c (rewrite_cross_bb_scalar_deps): Do not
handle GIMPLE_CALLs with no LHS.

Modified:
branches/graphite/gcc/ChangeLog.graphite
branches/graphite/gcc/graphite-sese-to-poly.c


-- 


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



[Bug tree-optimization/45199] New: ICE in loop distribution

2010-08-05 Thread spop at gcc dot gnu dot org
When compiled with -O3 the following code ICEs on amd64-linux.

  parameter(numlev=3,numoblev=1000)
  integer i_otyp(numoblev,numlev), i_styp(numoblev,numlev)
  logical l_numob(numoblev,numlev)
  do ixe=1,numoblev
 do iye=1,numlev
i_otyp(ixe,iye)=0
i_styp(ixe,iye)=0
l_numob(ixe,iye)=.false.
 enddo
  enddo
  do i=1,m
 do j=1,n
if (l_numob(i,j)) then
   write(20,'(7I4,F12.2,4F16.10)') i_otyp(i,j),i_styp(i,j)
endif 
 enddo
  enddo
  end


-- 
   Summary: ICE in loop distribution
   Product: gcc
   Version: 4.6.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: tree-optimization
AssignedTo: spop at gcc dot gnu dot org
ReportedBy: spop at gcc dot gnu dot org


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



[Bug bootstrap/45146] New: Bootstrap broken at -O3

2010-07-30 Thread spop at gcc dot gnu dot org
tr...@162541 does not bootstrap with BOOT_CFLAGS=-g -O3.

Comparing stages 2 and 3
warning: gcc/cc1plus-checksum.o differs
warning: gcc/cc1-checksum.o differs
Bootstrap comparison failure!
gcc/dbxout.o differs


-- 
   Summary: Bootstrap broken at -O3
   Product: gcc
   Version: 4.6.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: bootstrap
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: spop at gcc dot gnu dot org


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



[Bug fortran/45117] New: Segfault in resolve_array_bound

2010-07-28 Thread spop at gcc dot gnu dot org
GCC segfaults on this program while printing diagnostic:

  SUBROUTINE DFTAX8A(F,H,MAPAUX,IAUXTYP,LOCAUX)
  COMMON /INFOA / NAT,ICH,MUL,NUM,NQMT,NE,NA,NB,
 *  TMPTMP(NUM+NAUXFUN,NUM+NAUXFUN)
  END

This happens in resolve_array_bound, on trying to access a NULL pointer:

  gfc_error (Variable '%s' at %L in this context must be constant,
 e-symtree-n.sym-name, e-where);

(gdb) p e-symtree
$26 = (gfc_symtree *) 0x0


-- 
   Summary: Segfault in resolve_array_bound
   Product: gcc
   Version: 4.6.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: fortran
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: spop at gcc dot gnu dot org


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



[Bug c++/45069] Instruction wrong with graphite on i486 geode

2010-07-26 Thread spop at gcc dot gnu dot org


--- Comment #1 from spop at gcc dot gnu dot org  2010-07-26 16:45 ---
This looks like a duplicate of a binutils bug:
http://sourceware.org/bugzilla/show_bug.cgi?id=6957
I fail to see how this is related to Graphite: you may find
other codes that are padded with NOPL that are triggering
this same error on Geode.

Sebastian


-- 

spop at gcc dot gnu dot org changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution||INVALID


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



[Bug tree-optimization/44676] [4.5/4.6 Regression] ICE: in loop_entry_phi_arg, at graphite-sese-to-poly.c:89 with -fgraphite-identity -fprofile-generate

2010-07-22 Thread spop at gcc dot gnu dot org


--- Comment #2 from spop at gcc dot gnu dot org  2010-07-22 17:02 ---
Mine.

On trunk I am able to reproduce the ICE.
This is fixed in the Graphite branch, probably by the cleanup of the IV
canonicalization.
I will investigate a little bit more what happens in trunk, and if this is
really fixed by my changes in the Graphite branch I will close this PR when
these changes will be committed to trunk.

Sebastian


-- 

spop at gcc dot gnu dot org changed:

   What|Removed |Added

 AssignedTo|unassigned at gcc dot gnu   |spop at gcc dot gnu dot org
   |dot org |
 Status|UNCONFIRMED |ASSIGNED
 Ever Confirmed|0   |1
   Last reconfirmed|-00-00 00:00:00 |2010-07-22 17:02:04
   date||


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



[Bug tree-optimization/44955] over-prefetched for arrays of complex number

2010-07-21 Thread spop at gcc dot gnu dot org


--- Comment #3 from spop at gcc dot gnu dot org  2010-07-21 15:44 ---
Subject: Bug 44955

Author: spop
Date: Wed Jul 21 15:44:24 2010
New Revision: 162381

URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=162381
Log:
Fix PR 44955: Strip off the real and complex parts.

2010-07-21  Changpeng Fang  changpeng.f...@amd.com

PR tree-optimization/44955
* tree-ssa-loop-prefetch.c (analyze_ref): Strip off the real
and imagine parts of a complex, so that they can have the same
base and fall into the same group.

Modified:
trunk/gcc/ChangeLog
trunk/gcc/tree-ssa-loop-prefetch.c


-- 


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



[Bug tree-optimization/44955] over-prefetched for arrays of complex number

2010-07-21 Thread spop at gcc dot gnu dot org


--- Comment #4 from spop at gcc dot gnu dot org  2010-07-21 16:24 ---
Fixed.


-- 

spop at gcc dot gnu dot org changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution||FIXED


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



[Bug middle-end/44576] [4.5/4.6 Regression] testsuite/gfortran.dg/zero_sized_1.f90 with huge compile time on prefetching + peeling

2010-07-09 Thread spop at gcc dot gnu dot org


--- Comment #21 from spop at gcc dot gnu dot org  2010-07-09 23:09 ---
Subject: Bug 44576

Author: spop
Date: Fri Jul  9 23:08:55 2010
New Revision: 162023

URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=162023
Log:
pr44576 Avoid un-necessary prefetch analysis by distributing the cost models

2010-07-09  Changpeng Fang  changpeng.f...@amd.com

PR tree-optimization/44576
* tree-ssa-loop-prefetch.c (trip_count_to_ahead_ratio_too_small_p):
New.  Pull out from is_loop_prefetching_profitable to implement
the trip count to ahead ratio heuristic.
(mem_ref_count_reasonable_p): New.  Pull out from
is_loop_prefetching_profitable to implement the instruction to
memory reference ratio heuristic.  Also consider not reasonable if
the memory reference count is above a threshold (to avoid
explosive compilation time.
(insn_to_prefetch_ratio_too_small_p): New.  Pull out from
is_loop_prefetching_profitable to implement the instruction to
prefetch ratio heuristic.
(is_loop_prefetching_profitable): Removed.
(loop_prefetch_arrays): Distribute the cost analysis across the
function to allow early exit of the prefetch analysis.
is_loop_prefetching_profitable is splitted into three functions,
with each one called as early as possible.
(PREFETCH_MAX_MEM_REFS_PER_LOOP): New.  Threshold above which the
number of memory references in a loop is considered too many.

Modified:
trunk/gcc/ChangeLog
trunk/gcc/tree-ssa-loop-prefetch.c


-- 


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



[Bug middle-end/44576] [4.5/4.6 Regression] testsuite/gfortran.dg/zero_sized_1.f90 with huge compile time on prefetching + peeling

2010-07-09 Thread spop at gcc dot gnu dot org


--- Comment #22 from spop at gcc dot gnu dot org  2010-07-09 23:12 ---
Fixed.


-- 

spop at gcc dot gnu dot org changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED


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



[Bug tree-optimization/44710] [4.6 Regression] If-conversion generates redundant statements

2010-07-08 Thread spop at gcc dot gnu dot org


--- Comment #3 from spop at gcc dot gnu dot org  2010-07-08 16:38 ---
Subject: Bug 44710

Author: spop
Date: Thu Jul  8 16:38:00 2010
New Revision: 161964

URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=161964
Log:
Call maybe_fold_or_comparisons to fold OR-ed predicates.

2010-07-08  Sebastian Pop  sebastian@amd.com

PR tree-optimization/44710
* tree-if-conv.c (parse_predicate): New.
(add_to_predicate_list): Call it, call maybe_fold_or_comparisons.
Make sure that the predicates are either SSA_NAMEs or gimple_condexpr.

* gcc.dg/tree-ssa/ifc-6.c: New.
* gcc.dg/tree-ssa/ifc-pr44710.c: New.

Added:
trunk/gcc/testsuite/gcc.dg/tree-ssa/ifc-6.c
trunk/gcc/testsuite/gcc.dg/tree-ssa/ifc-pr44710.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/testsuite/ChangeLog
trunk/gcc/tree-if-conv.c


-- 


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



[Bug tree-optimization/44710] [4.6 Regression] If-conversion generates redundant statements

2010-07-08 Thread spop at gcc dot gnu dot org


--- Comment #4 from spop at gcc dot gnu dot org  2010-07-08 16:40 ---
Fixed.


-- 

spop at gcc dot gnu dot org changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution||FIXED


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



[Bug middle-end/44576] [4.5/4.6 Regression] testsuite/gfortran.dg/zero_sized_1.f90 with huge compile time on prefetching + peeling

2010-07-07 Thread spop at gcc dot gnu dot org


--- Comment #18 from spop at gcc dot gnu dot org  2010-07-07 18:14 ---
Changpeng, should this PR be closed now?


-- 


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



[Bug middle-end/44576] [4.5/4.6 Regression] testsuite/gfortran.dg/zero_sized_1.f90 with huge compile time on prefetching + peeling

2010-07-02 Thread spop at gcc dot gnu dot org


--- Comment #16 from spop at gcc dot gnu dot org  2010-07-02 16:34 ---
Subject: Bug 44576

Author: spop
Date: Fri Jul  2 16:34:29 2010
New Revision: 161727

URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=161727
Log:
PR 44576: miss rate computation improvement for prefetching loop arrays.

2010-07-02  Changpeng Fang  changpeng.f...@amd.com

PR middle-end/44576
* tree-ssa-loop-prefetch.c (compute_miss_rate): Return 1000 (out
of 1000) for miss rate if the address diference is greater than or
equal to the cache line size (the two reference will never hit the
same cache line).

Modified:
trunk/gcc/ChangeLog
trunk/gcc/tree-ssa-loop-prefetch.c


-- 


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



[Bug bootstrap/44726] [4.6 Regression] Yet another broken bootstrap

2010-06-30 Thread spop at gcc dot gnu dot org


--- Comment #1 from spop at gcc dot gnu dot org  2010-06-30 16:11 ---
Mine.

Let's transform this code:
  base_alias_pair *bap;

  if (dr-aux)
bap = (base_alias_pair *)(dr-aux);

into:
  base_alias_pair *bap;

  gcc_assert (dr-aux);
  bap = (base_alias_pair *)(dr-aux);


-- 

spop at gcc dot gnu dot org changed:

   What|Removed |Added

 AssignedTo|unassigned at gcc dot gnu   |spop at gcc dot gnu dot org
   |dot org |
 Status|UNCONFIRMED |ASSIGNED
 Ever Confirmed|0   |1
   Last reconfirmed|-00-00 00:00:00 |2010-06-30 16:11:19
   date||


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



[Bug tree-optimization/44710] [4.6 Regression] If-conversion generates redundant statements

2010-06-29 Thread spop at gcc dot gnu dot org


--- Comment #2 from spop at gcc dot gnu dot org  2010-06-29 13:56 ---
Mine.

Patch 0005 of http://gcc.gnu.org/ml/gcc-patches/2010-06/msg02250.html
fixes exactly this problem.  I have not yet worked on correcting the patch
as Richi asked.


-- 

spop at gcc dot gnu dot org changed:

   What|Removed |Added

 AssignedTo|unassigned at gcc dot gnu   |spop at gcc dot gnu dot org
   |dot org |
 Status|UNCONFIRMED |ASSIGNED
 Ever Confirmed|0   |1
   Last reconfirmed|-00-00 00:00:00 |2010-06-29 13:56:58
   date||


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



[Bug fortran/44660] New: ICE in resolve_equivalence()

2010-06-24 Thread spop at gcc dot gnu dot org
GCC trunk is ICEing in the fortran front-end while compiling this:

$ cat ./bug.f
  165CONTINUE
  EQUIVALENCE (CHECK, CHECK_STR)
  DATA CHECK_STR/CHECK   /
  END

$ ./f951 bug.f
bug.f:2.72:

  EQUIVALENCE (CHECK, CHECK_STR)
1
Error: Unexpected EQUIVALENCE statement at (1)
bug.f:3.10:

  DATA CHECK_STR/CHECK   /
  1
Error: Incompatible types in DATA statement at (1); attempted conversion of
CHARACTER(1) to REAL(4)
f951: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See http://gcc.gnu.org/bugs.html for instructions.

The ICE happens in:
(gdb) bt
#0  0x0053dcfe in resolve_equivalence (eq=0x17e6d60) at
../../gcc/fortran/resolve.c:12363
#1  0x0053ec22 in resolve_types (ns=0x1835640) at
../../gcc/fortran/resolve.c:12788
#2  0x0053ee9d in gfc_resolve (ns=0x1835640) at
../../gcc/fortran/resolve.c:12849
#3  0x0051dcff in gfc_parse_file () at ../../gcc/fortran/parse.c:4275
#4  0x0055e86f in gfc_be_parse_file (set_yydebug=0) at
../../gcc/fortran/f95-lang.c:234
#5  0x00a1c7b0 in compile_file () at ../../gcc/toplev.c:1044
#6  0x00a1ec33 in do_compile () at ../../gcc/toplev.c:2441
#7  0x00a1ed09 in toplev_main (argc=5, argv=0x7fffe868) at
../../gcc/toplev.c:2483
#8  0x005e69b0 in main (argc=5, argv=0x7fffe868) at
../../gcc/main.c:35


-- 
   Summary: ICE in resolve_equivalence()
   Product: gcc
   Version: 4.6.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: fortran
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: spop at gcc dot gnu dot org


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



[Bug middle-end/44185] [4.6 regression] New prefetch test failures

2010-06-17 Thread spop at gcc dot gnu dot org


--- Comment #10 from spop at gcc dot gnu dot org  2010-06-17 23:33 ---
Fixed.


-- 

spop at gcc dot gnu dot org changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution||FIXED


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



[Bug tree-optimization/44391] [4.6 Regression] gcc.dg/graphite/id-19.c ICEs at -Os (in build2_stat, at tree.c:3670)

2010-06-15 Thread spop at gcc dot gnu dot org


--- Comment #2 from spop at gcc dot gnu dot org  2010-06-15 16:19 ---
Patch http://gcc.gnu.org/ml/gcc-patches/2010-06/msg01519.html


-- 


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



[Bug tree-optimization/44391] [4.6 Regression] gcc.dg/graphite/id-19.c ICEs at -Os (in build2_stat, at tree.c:3670)

2010-06-15 Thread spop at gcc dot gnu dot org


--- Comment #3 from spop at gcc dot gnu dot org  2010-06-15 19:12 ---
Subject: Bug 44391

Author: spop
Date: Tue Jun 15 19:11:59 2010
New Revision: 160803

URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=160803
Log:
Fix PR44391: use size_one_node for pointer types.

2010-06-15  Sebastian Pop  sebastian@amd.com

PR middle-end/44391
* graphite-clast-to-gimple.c (graphite_create_new_loop_guard): Use
size_one_node for pointer types.  Do not call gmp_cst_to_tree.

* gcc.dg/graphite/pr44391.c: New.

Added:
trunk/gcc/testsuite/gcc.dg/graphite/pr44391.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/graphite-clast-to-gimple.c
trunk/gcc/testsuite/ChangeLog


-- 


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



[Bug tree-optimization/44391] [4.6 Regression] gcc.dg/graphite/id-19.c ICEs at -Os (in build2_stat, at tree.c:3670)

2010-06-15 Thread spop at gcc dot gnu dot org


--- Comment #4 from spop at gcc dot gnu dot org  2010-06-15 19:13 ---
Fixed.


-- 

spop at gcc dot gnu dot org changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution||FIXED


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



[Bug tree-optimization/44483] [4.6 regression] gcc consumes all available memory when optimizing

2010-06-11 Thread spop at gcc dot gnu dot org


--- Comment #6 from spop at gcc dot gnu dot org  2010-06-11 18:28 ---
Subject: Bug 44483

Author: spop
Date: Fri Jun 11 18:28:17 2010
New Revision: 160625

URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=160625
Log:
Fix PR44483: incrementally gimplify BB predicates to avoid redundant
computations.

2010-06-11  Sebastian Pop  sebastian@amd.com

PR middle-end/44483
* tree-if-conv.c (bb_predicate_s): New struct.
(bb_predicate_p): New.
(bb_has_predicate): New.
(bb_predicate): New.
(set_bb_predicate): New.
(bb_predicate_gimplified_stmts): New.
(set_bb_predicate_gimplified_stmts): New.
(add_bb_predicate_gimplified_stmts): New.
(init_bb_predicate): New.
(free_bb_predicate): New.
(is_predicated): Use bb_predicate.
(add_to_predicate_list): Use bb_predicate and set_bb_predicate.
(predicate_bbs): Same.  Gimplify the condition of the basic blocks
before processing their successors.
(clean_predicate_lists): Removed.
(find_phi_replacement_condition): Use bb_predicate.
(process_phi_nodes): Renamed ifconvert_phi_nodes.  Avoid useless
computations.
(insert_gimplified_predicates): New.
(combine_blocks): Call insert_gimplified_predicates.
(tree_if_conversion): Call free_bb_predicate instead of
clean_predicate_lists.

* gcc.dg/tree-ssa/pr44483.c: New.

Added:
trunk/gcc/testsuite/gcc.dg/tree-ssa/pr44483.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/testsuite/ChangeLog
trunk/gcc/tree-if-conv.c


-- 


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



[Bug tree-optimization/44483] [4.6 regression] gcc consumes all available memory when optimizing

2010-06-11 Thread spop at gcc dot gnu dot org


--- Comment #7 from spop at gcc dot gnu dot org  2010-06-11 18:30 ---
Fixed.


-- 

spop at gcc dot gnu dot org changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution||FIXED


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



[Bug middle-end/44185] [4.6 regression] New prefetch test failures

2010-06-10 Thread spop at gcc dot gnu dot org


--- Comment #9 from spop at gcc dot gnu dot org  2010-06-10 17:55 ---
Subject: Bug 44185

Author: spop
Date: Thu Jun 10 17:54:39 2010
New Revision: 160566

URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=160566
Log:
Fix PR44185: prefetch test failures.

2010-06-10  Changpeng Fang  changpeng.f...@amd.com

PR middle-end/44185
* gcc.dg/tree-ssa/prefetch-7.c: take the loops that will generate
non-temporal stores out of the tests to form new test cases.  As a
result, no non-temporal store should be generated in this case.

* gcc.dg/tree-ssa/prefetch-8.c: New.  Test from original
prefetch-7.c that generate one non-temporal store.

* gcc.dg/tree-ssa/prefetch-9.c: New.  Test from original
prefetch-7.c that generate one non-temporal store and one
one-temporal prefetch.

Added:
trunk/gcc/testsuite/gcc.dg/tree-ssa/prefetch-8.c
trunk/gcc/testsuite/gcc.dg/tree-ssa/prefetch-9.c
Modified:
trunk/gcc/testsuite/ChangeLog
trunk/gcc/testsuite/gcc.dg/tree-ssa/prefetch-7.c


-- 


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



[Bug tree-optimization/44483] [4.6 regression] gcc consumes all available memory when optimizing

2010-06-10 Thread spop at gcc dot gnu dot org


--- Comment #5 from spop at gcc dot gnu dot org  2010-06-10 22:59 ---
Patch http://gcc.gnu.org/ml/gcc-patches/2010-06/msg01155.html


-- 


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



[Bug tree-optimization/44483] [4.6 regression] gcc consumes all available memory when optimizing

2010-06-09 Thread spop at gcc dot gnu dot org


--- Comment #4 from spop at gcc dot gnu dot org  2010-06-09 22:13 ---
Mine.


-- 

spop at gcc dot gnu dot org changed:

   What|Removed |Added

 AssignedTo|unassigned at gcc dot gnu   |spop at gcc dot gnu dot org
   |dot org |
 Status|NEW |ASSIGNED
   Last reconfirmed|-00-00 00:00:00 |2010-06-09 22:13:10
   date||


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



[Bug tree-optimization/44363] [4.6 Regression] gcc fails with ICE when compiling ffmpeg

2010-06-02 Thread spop at gcc dot gnu dot org


--- Comment #11 from spop at gcc dot gnu dot org  2010-06-02 16:39 ---
Subject: Bug 44363

Author: spop
Date: Wed Jun  2 16:39:26 2010
New Revision: 160163

URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=160163
Log:
Fix PR44363: don't abort when the ifcvt analysis fails to recognize a Gimple
stmt.

2010-06-02  Sebastian Pop  sebastian@amd.com

PR middle-end/44363
* tree-if-conv.c (predicate_bbs): Do not call gcc_unreachable,
return false instead.

Modified:
trunk/gcc/ChangeLog
trunk/gcc/tree-if-conv.c


-- 


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



[Bug tree-optimization/44363] [4.6 Regression] gcc fails with ICE when compiling ffmpeg

2010-06-02 Thread spop at gcc dot gnu dot org


--- Comment #12 from spop at gcc dot gnu dot org  2010-06-02 16:42 ---
Fixed.


-- 

spop at gcc dot gnu dot org changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution||FIXED


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



[Bug tree-optimization/44391] [4.6 Regression] gcc.dg/graphite/id-19.c ICEs at -Os (in build2_stat, at tree.c:3670)

2010-06-02 Thread spop at gcc dot gnu dot org


--- Comment #1 from spop at gcc dot gnu dot org  2010-06-02 19:28 ---
Mine.


-- 

spop at gcc dot gnu dot org changed:

   What|Removed |Added

 AssignedTo|unassigned at gcc dot gnu   |spop at gcc dot gnu dot org
   |dot org |
 Status|UNCONFIRMED |ASSIGNED
 Ever Confirmed|0   |1
   Last reconfirmed|-00-00 00:00:00 |2010-06-02 19:28:58
   date||


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



[Bug tree-optimization/44363] [4.6 Regression] gcc fails with ICE when compiling ffmpeg

2010-06-01 Thread spop at gcc dot gnu dot org


--- Comment #10 from spop at gcc dot gnu dot org  2010-06-01 18:18 ---
Patch: http://gcc.gnu.org/ml/gcc-patches/2010-06/msg00063.html


-- 


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



[Bug tree-optimization/44306] [4.6 Regression] 464.h264ref fails to build.

2010-05-29 Thread spop at gcc dot gnu dot org


--- Comment #5 from spop at gcc dot gnu dot org  2010-05-29 17:14 ---
Subject: Bug 44306

Author: spop
Date: Sat May 29 17:14:31 2010
New Revision: 160031

URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=160031
Log:
Don't use unshare_expr when not necessary.

2010-05-29  Sebastian Pop  sebastian@amd.com

PR middle-end/44306
* gcc.dg/tree-ssa/pr44306.c: New.

* tree-if-conv.c (is_true_predicate): New.
(is_predicated): Use is_true_predicate.
(add_to_predicate_list): Same.  Do not use unshare_expr.
(add_to_dst_predicate_list): Same.

Added:
trunk/gcc/testsuite/gcc.dg/tree-ssa/pr44306.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/testsuite/ChangeLog
trunk/gcc/tree-if-conv.c


-- 


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



[Bug tree-optimization/44306] [4.6 Regression] 464.h264ref fails to build.

2010-05-29 Thread spop at gcc dot gnu dot org


--- Comment #6 from spop at gcc dot gnu dot org  2010-05-29 17:15 ---
Fixed.


-- 

spop at gcc dot gnu dot org changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution||FIXED


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



[Bug tree-optimization/44303] [graphite] Segmentation fault within CLooG

2010-05-28 Thread spop at gcc dot gnu dot org


--- Comment #3 from spop at gcc dot gnu dot org  2010-05-28 14:46 ---
Confirmed.

I think that this one is a bug in CLooG-PPL.  I will have a look at it.


-- 

spop at gcc dot gnu dot org changed:

   What|Removed |Added

 AssignedTo|unassigned at gcc dot gnu   |spop at gcc dot gnu dot org
   |dot org |
 Status|NEW |ASSIGNED
   Last reconfirmed|2010-05-28 14:04:12 |2010-05-28 14:46:22
   date||


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



[Bug tree-optimization/44306] [4.6 Regression] 464.h264ref fails to build.

2010-05-28 Thread spop at gcc dot gnu dot org


--- Comment #3 from spop at gcc dot gnu dot org  2010-05-28 14:46 ---
Mine.


-- 

spop at gcc dot gnu dot org changed:

   What|Removed |Added

 AssignedTo|unassigned at gcc dot gnu   |spop at gcc dot gnu dot org
   |dot org |
 Status|NEW |ASSIGNED
   Last reconfirmed|2010-05-28 14:05:45 |2010-05-28 14:46:45
   date||


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



[Bug middle-end/44293] [4.6 regression] FAIL: gcc.c-torture/compile/20040304-1.c

2010-05-28 Thread spop at gcc dot gnu dot org


--- Comment #3 from spop at gcc dot gnu dot org  2010-05-28 18:38 ---
Subject: Bug 44293

Author: spop
Date: Fri May 28 18:38:06 2010
New Revision: 159990

URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=159990
Log:
Check the if-convertibility of phi nodes in non predicated BBs.

2010-05-28  Sebastian Pop  sebastian@amd.com

PR middle-end/44293
* tree-if-conv.c (if_convertible_loop_p): Check the
if-convertibility of phi nodes in non predicated BBs.

Modified:
trunk/gcc/ChangeLog
trunk/gcc/tree-if-conv.c


-- 


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



[Bug middle-end/44293] [4.6 regression] FAIL: gcc.c-torture/compile/20040304-1.c

2010-05-28 Thread spop at gcc dot gnu dot org


--- Comment #4 from spop at gcc dot gnu dot org  2010-05-28 18:46 ---
Fixed.


-- 

spop at gcc dot gnu dot org changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED


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



[Bug tree-optimization/44306] [4.6 Regression] 464.h264ref fails to build.

2010-05-28 Thread spop at gcc dot gnu dot org


--- Comment #4 from spop at gcc dot gnu dot org  2010-05-28 23:38 ---
Patch: http://gcc.gnu.org/ml/gcc-patches/2010-05/msg02294.html


-- 


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



[Bug tree-optimization/43423] gcc should vectorize this loop through if-conversion

2010-05-25 Thread spop at gcc dot gnu dot org


--- Comment #11 from spop at gcc dot gnu dot org  2010-05-25 23:33 ---
This is not a IV type problem: the number of iterations may be zero when mid ==
0 or mid == n, so the number of iterations analysis has a condition under which
niter may_be_zero.

I sent out a patch that makes niter return a COND_EXPR
instead of a chrec_dont_know:
http://gcc.gnu.org/ml/gcc-patches/2010-05/msg01927.html

With that patch I now get 
  note: not vectorized: data ref analysis failed D.2726_51 = a[var.9_55];


-- 


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



[Bug tree-optimization/43423] gcc should vectorize this loop through if-conversion

2010-05-24 Thread spop at gcc dot gnu dot org


--- Comment #8 from spop at gcc dot gnu dot org  2010-05-24 22:44 ---
-fgraphite-identity does iteration splitting for this case.


-- 


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



[Bug tree-optimization/43423] gcc should vectorize this loop through if-conversion

2010-05-24 Thread spop at gcc dot gnu dot org


--- Comment #10 from spop at gcc dot gnu dot org  2010-05-24 23:02 ---
note: not vectorized: number of iterations cannot be computed.

Graphite has a problem with the generation of induction variables types
that makes the code harder to analyze after Graphite.  I will try to get this
fixed to make this loop vectorized with the iteration range splitting that
Graphite does by default. 

Sebastian


-- 


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



[Bug middle-end/44185] [4.6 regression] New prefetch test failures

2010-05-20 Thread spop at gcc dot gnu dot org


--- Comment #3 from spop at gcc dot gnu dot org  2010-05-20 15:30 ---
Subject: Bug 44185

Author: spop
Date: Thu May 20 15:29:40 2010
New Revision: 159630

URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=159630
Log:
Fix PR44185: new prefetch test failures.

2010-05-20  Changpeng Fang  changpeng.f...@amd.com

PR middle-end/44185
* gcc.dg/tree-ssa/prefetch-6.c: Add --param
min-insn-to-prefetch-ratio=6.
* gcc.dg/tree-ssa/prefetch-7.c: Remove --param max-unrolled-insns=1 to
allow unrolling, and adjust the movnti count.

Modified:
trunk/gcc/testsuite/ChangeLog
trunk/gcc/testsuite/gcc.dg/tree-ssa/prefetch-6.c
trunk/gcc/testsuite/gcc.dg/tree-ssa/prefetch-7.c


-- 


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



[Bug middle-end/44185] [4.6 regression] New prefetch test failures

2010-05-20 Thread spop at gcc dot gnu dot org


--- Comment #4 from spop at gcc dot gnu dot org  2010-05-20 15:30 ---
Fixed.


-- 

spop at gcc dot gnu dot org changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution||FIXED


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



[Bug bootstrap/43737] New: Bootstrap broken at -O3

2010-04-12 Thread spop at gcc dot gnu dot org
I was trying to bootstrap GCC rev. 158136 with a different BOOT_CFLAGS:

--- a/Makefile.in
+++ b/Makefile.in
@@ -352,7 +352,7 @@ BUILD_PREFIX_1 = @BUILD_PREFIX_1@

 # Flags to pass to stage2 and later makes.  They are defined
 # here so that they can be overridden by Makefile fragments.
-BOOT_CFLAGS= -g -O2
+BOOT_CFLAGS= -g -O3 -msse2
 BOOT_LDFLAGS=
 BOOT_ADAFLAGS=-gnatpg -gnata

The bootstrap stops during the compilation of builtins.c with this error:

cc1: warnings being treated as errors
../../gcc/builtins.c: In function ‘builtin_strncpy_read_str’:
../../gcc/builtins.c:567:37: error: array subscript is above array bounds

This is error comes from one of VRP's checks.


-- 
   Summary: Bootstrap broken at -O3
   Product: gcc
   Version: 4.6.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: bootstrap
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: spop at gcc dot gnu dot org


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



[Bug bootstrap/43737] Bootstrap broken at -O3

2010-04-12 Thread spop at gcc dot gnu dot org


--- Comment #1 from spop at gcc dot gnu dot org  2010-04-13 05:41 ---
This commit causes the bootstrap to fail at -O3.

c26ce8a90a7c8ef9b6587959083d12f6edbc5e01 is first bad commit
commit c26ce8a90a7c8ef9b6587959083d12f6edbc5e01
Author: rguenth rgue...@138bc75d-0d04-0410-961f-82ee72b054a4
Date:   Wed Apr 7 12:31:32 2010 +

2010-04-07  Richard Guenther  rguent...@suse.de

PR tree-optimization/43270
* tree-vrp.c (check_array_ref): Fix flexible array member
detection.
* tree-ssa-sccvn.h (fully_constant_vn_reference_p): Declare.
* tree-ssa-pre.c (phi_translate_1): Adjust.
(fully_constant_expression): Split out vn_reference handling to ...
* tree-ssa-sccvn.c (fully_constant_vn_reference_p): ... here.
Fold reads from constant strings.
(vn_reference_lookup): Handle fully constant references.
(vn_reference_lookup_pieces): Likewise.
* Makefile.in (expmed.o-warn): Add -Wno-error.

* g++.dg/warn/Warray-bounds-4.C: New testcase.
* gcc.dg/Warray-bounds-7.c: Likewise.


git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/tr...@158058
138bc75d-0d04-0410-961f-82ee72b054a4


-- 

spop at gcc dot gnu dot org changed:

   What|Removed |Added

 CC||rguenth at gcc dot gnu dot
   ||org


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



[Bug tree-optimization/32824] Missed reduction vectorizer after store to global is LIM'd

2010-04-10 Thread spop at gcc dot gnu dot org


--- Comment #10 from spop at gcc dot gnu dot org  2010-04-11 05:45 ---
Fixed.


-- 

spop at gcc dot gnu dot org changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution||FIXED


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



[Bug tree-optimization/43427] The loop is not interchanged and thus could not be vectorized.

2010-04-08 Thread spop at gcc dot gnu dot org


--- Comment #5 from spop at gcc dot gnu dot org  2010-04-08 17:40 ---
Fixed.


-- 

spop at gcc dot gnu dot org changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||WORKSFORME


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



[Bug tree-optimization/43423] gcc should vectorize this loop through if-conversion

2010-04-08 Thread spop at gcc dot gnu dot org


--- Comment #6 from spop at gcc dot gnu dot org  2010-04-08 17:47 ---
I changed the title of this bug to match the comments in the PR:
we should vectorize this loop using if-conversion, and not iteration
range splitting.

Also note that in general, by doing an iteration range splitting the data 
locality in the two loops could be worse than in the if-converted loop.


-- 

spop at gcc dot gnu dot org changed:

   What|Removed |Added

Summary|gcc should vectorize this   |gcc should vectorize this
   |loop through iteration |loop through if-conversion
   |range splitting|


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



[Bug middle-end/43519] [graphite] Bootstrap with Graphite enabled fails in Java libs

2010-04-06 Thread spop at gcc dot gnu dot org


--- Comment #8 from spop at gcc dot gnu dot org  2010-04-06 06:14 ---
Subject: Bug 43519

Author: spop
Date: Tue Apr  6 06:14:26 2010
New Revision: 157978

URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=157978
Log:
Fix 473.astar miscompile.

2010-04-05  Sebastian Pop  sebastian@amd.com

PR middle-end/43519
* graphite-clast-to-gimple.c (max_signed_precision_type): Use
lang_hooks.types.type_for_size instead of
build_nonstandard_integer_type.
When converting an unsigned type to signed, double its precision.
(gcc_type_for_interval): Use lang_hooks.types.type_for_size.
(gcc_type_for_iv_of_clast_loop): Call max_signed_precision_type.
(graphite_create_new_loop_guard): When ub + 1 wraps around, use lb =
ub.

Modified:
branches/graphite/gcc/ChangeLog.graphite
branches/graphite/gcc/graphite-clast-to-gimple.c


-- 


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



[Bug target/43667] ICE with __builtin_ia32_vpermil2p* and -mavx

2010-04-06 Thread spop at gcc dot gnu dot org


--- Comment #2 from spop at gcc dot gnu dot org  2010-04-06 15:45 ---
The fix looks good.
Are you testing this patch, or should I ask Quentin to extra test it on our
end?

Thanks,
Sebastian


-- 


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



[Bug tree-optimization/32824] Missed reduction vectorizer after store to global is LIM'd

2010-04-06 Thread spop at gcc dot gnu dot org


--- Comment #9 from spop at gcc dot gnu dot org  2010-04-06 19:20 ---
Subject: Bug 32824

Author: spop
Date: Tue Apr  6 19:19:41 2010
New Revision: 158018

URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=158018
Log:
Fix PR32824.

2010-04-06  Changpeng Fang  changpeng.f...@amd.com

PR middle-end/32824
* passes.c (init_optimization_passes): Move pass_lim before
pass_copy_prop and pass_dce_loop.

* gcc.dg/vect/pr32824: New.

Added:
trunk/gcc/testsuite/gcc.dg/vect/pr32824.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/passes.c
trunk/gcc/testsuite/ChangeLog


-- 


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



[Bug middle-end/43519] [graphite] Bootstrap with Graphite enabled fails in Java libs

2010-04-06 Thread spop at gcc dot gnu dot org


--- Comment #9 from spop at gcc dot gnu dot org  2010-04-06 21:01 ---
Subject: Bug 43519

Author: spop
Date: Tue Apr  6 21:01:16 2010
New Revision: 158026

URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=158026
Log:
Compute min and max bounds for IVs and infer types.

2010-04-04  Sebastian Pop  sebastian@amd.com

PR middle-end/43519
* Makefile.in (graphite-clast-to-gimple.o): Depends on langhooks.h.
* graphite-clast-to-gimple.c: Include langhooks.h.
(max_signed_precision_type): New.
(max_precision_type): Takes two types as arguments.
(precision_for_value): New.
(precision_for_interval): New.
(gcc_type_for_interval): New.
(gcc_type_for_value): New.
(gcc_type_for_clast_term): New.
(gcc_type_for_clast_red): New.
(gcc_type_for_clast_bin): New.
(gcc_type_for_clast_expr): Split up into several functions.
(gcc_type_for_clast_eq): Rewritten.
(compute_bounds_for_level): New.
(compute_type_for_level_1): New.
(compute_type_for_level): New.
(gcc_type_for_cloog_iv): Removed.
(gcc_type_for_iv_of_clast_loop): Rewritten.
(graphite_create_new_loop): Compute the lower and upper bound types
with gcc_type_for_clast_expr.
(graphite_create_new_loop_guard): Same.
(find_cloog_iv_in_expr): Removed.
(compute_cloog_iv_types_1): Removed.
(compute_cloog_iv_types): Removed.
(gloog): Do not call compute_cloog_iv_types.
* graphite-sese-to-poly.c (new_gimple_bb): Do not initialize
GBB_CLOOG_IV_TYPES.
(free_data_refs_aux): Do not free GBB_CLOOG_IV_TYPES.
* sese.h (struct gimple_bb): Removed field cloog_iv_types.
(GBB_CLOOG_IV_TYPES): Removed.

* gcc.dg/graphite/run-id-pr42644.c: Call abort.

Modified:
trunk/gcc/ChangeLog.graphite
trunk/gcc/Makefile.in
trunk/gcc/graphite-clast-to-gimple.c
trunk/gcc/graphite-sese-to-poly.c
trunk/gcc/sese.h
trunk/gcc/testsuite/gcc.dg/graphite/run-id-pr42644.c


-- 


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



[Bug middle-end/43519] [graphite] Bootstrap with Graphite enabled fails in Java libs

2010-04-06 Thread spop at gcc dot gnu dot org


--- Comment #10 from spop at gcc dot gnu dot org  2010-04-06 21:02 ---
Fixed.


-- 

spop at gcc dot gnu dot org changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution||FIXED


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



[Bug middle-end/43519] [graphite] Bootstrap with Graphite enabled fails in Java libs

2010-04-06 Thread spop at gcc dot gnu dot org


--- Comment #11 from spop at gcc dot gnu dot org  2010-04-06 21:03 ---
Subject: Bug 43519

Author: spop
Date: Tue Apr  6 21:02:25 2010
New Revision: 158027

URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=158027
Log:
Use POINTER_PLUS_EXPR for pointer types.

2010-04-04  Sebastian Pop  sebastian@amd.com

PR middle-end/43519
* graphite-clast-to-gimple.c (graphite_create_new_loop_guard): Use
POINTER_PLUS_EXPR for pointer types.

* gcc.dg/graphite/id-19.c: New.

Added:
trunk/gcc/testsuite/gcc.dg/graphite/id-19.c
Modified:
trunk/gcc/ChangeLog.graphite
trunk/gcc/graphite-clast-to-gimple.c


-- 


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



[Bug middle-end/43519] [graphite] Bootstrap with Graphite enabled fails in Java libs

2010-04-06 Thread spop at gcc dot gnu dot org


--- Comment #12 from spop at gcc dot gnu dot org  2010-04-06 21:03 ---
Subject: Bug 43519

Author: spop
Date: Tue Apr  6 21:03:37 2010
New Revision: 158028

URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=158028
Log:
Fix 473.astar miscompile.

2010-04-05  Sebastian Pop  sebastian@amd.com

PR middle-end/43519
* graphite-clast-to-gimple.c (max_signed_precision_type): Use
lang_hooks.types.type_for_size instead of
build_nonstandard_integer_type.
When converting an unsigned type to signed, double its precision.
(gcc_type_for_interval): Use lang_hooks.types.type_for_size.
(gcc_type_for_iv_of_clast_loop): Call max_signed_precision_type.
(graphite_create_new_loop_guard): When ub + 1 wraps around, use lb =
ub.

Modified:
trunk/gcc/ChangeLog.graphite
trunk/gcc/graphite-clast-to-gimple.c


-- 


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



[Bug middle-end/43519] [graphite] Bootstrap with Graphite enabled fails in Java libs

2010-04-05 Thread spop at gcc dot gnu dot org


--- Comment #1 from spop at gcc dot gnu dot org  2010-04-05 06:59 ---
Subject: Bug 43519

Author: spop
Date: Mon Apr  5 06:58:46 2010
New Revision: 157963

URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=157963
Log:
Compute min and max bounds for IVs and infer types.

2010-04-04  Sebastian Pop  sebastian@amd.com

PR middle-end/43519
* Makefile.in (graphite-clast-to-gimple.o): Depends on langhooks.h.
* graphite-clast-to-gimple.c: Include langhooks.h.
(max_signed_precision_type): New.
(max_precision_type): Takes two types as arguments.
(precision_for_value): New.
(precision_for_interval): New.
(gcc_type_for_interval): New.
(gcc_type_for_value): New.
(gcc_type_for_clast_term): New.
(gcc_type_for_clast_red): New.
(gcc_type_for_clast_bin): New.
(gcc_type_for_clast_expr): Split up into several functions.
(gcc_type_for_clast_eq): Rewritten.
(compute_bounds_for_level): New.
(compute_type_for_level_1): New.
(compute_type_for_level): New.
(gcc_type_for_cloog_iv): Removed.
(gcc_type_for_iv_of_clast_loop): Rewritten.
(graphite_create_new_loop): Compute the lower and upper bound types
with gcc_type_for_clast_expr.
(graphite_create_new_loop_guard): Same.
(find_cloog_iv_in_expr): Removed.
(compute_cloog_iv_types_1): Removed.
(compute_cloog_iv_types): Removed.
(gloog): Do not call compute_cloog_iv_types.
* graphite-sese-to-poly.c (new_gimple_bb): Do not initialize
GBB_CLOOG_IV_TYPES.
(free_data_refs_aux): Do not free GBB_CLOOG_IV_TYPES.
* sese.h (struct gimple_bb): Removed field cloog_iv_types.
(GBB_CLOOG_IV_TYPES): Removed.

* gcc.dg/graphite/run-id-pr42644.c: Call abort.

Modified:
branches/graphite/gcc/ChangeLog.graphite
branches/graphite/gcc/Makefile.in
branches/graphite/gcc/graphite-clast-to-gimple.c
branches/graphite/gcc/graphite-sese-to-poly.c
branches/graphite/gcc/sese.h
branches/graphite/gcc/testsuite/gcc.dg/graphite/run-id-pr42644.c


-- 


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



[Bug middle-end/43519] [graphite] Bootstrap with Graphite enabled fails in Java libs

2010-04-05 Thread spop at gcc dot gnu dot org


--- Comment #5 from spop at gcc dot gnu dot org  2010-04-06 03:16 ---
Subject: Bug 43519

Author: spop
Date: Tue Apr  6 03:15:58 2010
New Revision: 157976

URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=157976
Log:
Use POINTER_PLUS_EXPR for pointer types.

2010-04-04  Sebastian Pop  sebastian@amd.com

PR middle-end/43519
* graphite-clast-to-gimple.c (graphite_create_new_loop_guard): Use
POINTER_PLUS_EXPR for pointer types.

* gcc.dg/graphite/id-19.c: New.

Added:
branches/graphite/gcc/testsuite/gcc.dg/graphite/id-19.c
Modified:
branches/graphite/gcc/ChangeLog.graphite
branches/graphite/gcc/graphite-clast-to-gimple.c


--- Comment #6 from spop at gcc dot gnu dot org  2010-04-06 03:16 ---
Subject: Bug 43519

Author: spop
Date: Tue Apr  6 03:16:04 2010
New Revision: 157977

URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=157977
Log:
Use build_nonstandard_integer_type.

2010-04-05  Sebastian Pop  sebastian@amd.com

PR middle-end/43519
* graphite-clast-to-gimple.c (max_signed_precision_type): Use
build_nonstandard_integer_type.
(gcc_type_for_interval): Same.

Modified:
branches/graphite/gcc/ChangeLog.graphite
branches/graphite/gcc/graphite-clast-to-gimple.c


-- 


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



[Bug middle-end/43519] [graphite] Bootstrap with Graphite enabled fails in Java libs

2010-04-05 Thread spop at gcc dot gnu dot org


--- Comment #5 from spop at gcc dot gnu dot org  2010-04-06 03:16 ---
Subject: Bug 43519

Author: spop
Date: Tue Apr  6 03:15:58 2010
New Revision: 157976

URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=157976
Log:
Use POINTER_PLUS_EXPR for pointer types.

2010-04-04  Sebastian Pop  sebastian@amd.com

PR middle-end/43519
* graphite-clast-to-gimple.c (graphite_create_new_loop_guard): Use
POINTER_PLUS_EXPR for pointer types.

* gcc.dg/graphite/id-19.c: New.

Added:
branches/graphite/gcc/testsuite/gcc.dg/graphite/id-19.c
Modified:
branches/graphite/gcc/ChangeLog.graphite
branches/graphite/gcc/graphite-clast-to-gimple.c


--- Comment #6 from spop at gcc dot gnu dot org  2010-04-06 03:16 ---
Subject: Bug 43519

Author: spop
Date: Tue Apr  6 03:16:04 2010
New Revision: 157977

URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=157977
Log:
Use build_nonstandard_integer_type.

2010-04-05  Sebastian Pop  sebastian@amd.com

PR middle-end/43519
* graphite-clast-to-gimple.c (max_signed_precision_type): Use
build_nonstandard_integer_type.
(gcc_type_for_interval): Same.

Modified:
branches/graphite/gcc/ChangeLog.graphite
branches/graphite/gcc/graphite-clast-to-gimple.c


-- 


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



[Bug tree-optimization/43427] The loop is not interchanged and thus could not be vectorized.

2010-04-01 Thread spop at gcc dot gnu dot org


--- Comment #4 from spop at gcc dot gnu dot org  2010-04-01 18:59 ---
I think that this bug should be closed as fixed,
unless we change the subject to:
At -O3 the loop is not interchanged and thus not vectorized.


-- 


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



[Bug tree-optimization/43351] ICE: SIGSEGV with -fgraphite-identity in 4.4

2010-03-31 Thread spop at gcc dot gnu dot org


--- Comment #4 from spop at gcc dot gnu dot org  2010-03-31 18:37 ---
Subject: Bug 43351

Author: spop
Date: Wed Mar 31 18:36:45 2010
New Revision: 157882

URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=157882
Log:
Add testcase for PR43351.

2010-03-13  Sebastian Pop  sebastian@amd.com

PR middle-end/43351
* gcc.dg/graphite/id-pr43351.c

Added:
trunk/gcc/testsuite/gcc.dg/graphite/id-pr43351.c
Modified:
trunk/gcc/ChangeLog.graphite


-- 


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



[Bug middle-end/43464] copy prop breaks loop closed SSA form

2010-03-31 Thread spop at gcc dot gnu dot org


--- Comment #15 from spop at gcc dot gnu dot org  2010-03-31 18:38 ---
Subject: Bug 43464

Author: spop
Date: Wed Mar 31 18:37:41 2010
New Revision: 157889

URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=157889
Log:
Fix PR43464: copyprop should maintain loop close phi nodes with multiple
arguments.

2010-03-30  Richard Guenther  rguent...@suse.de
Zdenek Dvorak  o...@ucw.cz
Sebastian Pop  sebastian@amd.com

PR middle-end/43464
* tree-ssa-copy.c (init_copy_prop): Handle loop close phi nodes
with multiple arguments.
(execute_copy_prop): Remove call to rewrite_into_loop_closed_ssa.

Modified:
trunk/gcc/ChangeLog.graphite
trunk/gcc/tree-ssa-copy.c


-- 


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



[Bug middle-end/43464] copy prop breaks loop closed SSA form

2010-03-31 Thread spop at gcc dot gnu dot org


--- Comment #16 from spop at gcc dot gnu dot org  2010-03-31 18:48 ---
Fixed.


-- 

spop at gcc dot gnu dot org changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED


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



[Bug middle-end/43464] copy prop breaks loop closed SSA form

2010-03-30 Thread spop at gcc dot gnu dot org


--- Comment #14 from spop at gcc dot gnu dot org  2010-03-30 16:57 ---
Subject: Bug 43464

Author: spop
Date: Tue Mar 30 16:56:49 2010
New Revision: 157828

URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=157828
Log:
Fix PR43464: copyprop should maintain loop close phi nodes with multiple
arguments.

2010-03-30  Richard Guenther  rguent...@suse.de
Zdenek Dvorak  o...@ucw.cz
Sebastian Pop  sebastian@amd.com

PR middle-end/43464
* tree-ssa-copy.c (init_copy_prop): Handle loop close phi nodes
with multiple arguments.
(execute_copy_prop): Remove call to rewrite_into_loop_closed_ssa.

Modified:
branches/graphite/gcc/ChangeLog.graphite
branches/graphite/gcc/tree-ssa-copy.c


-- 


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



[Bug tree-optimization/43430] Missed vectorization: stmt not supported: cond_expr

2010-03-30 Thread spop at gcc dot gnu dot org


--- Comment #6 from spop at gcc dot gnu dot org  2010-03-30 19:58 ---
Subject: Bug 43430

Author: spop
Date: Tue Mar 30 19:58:35 2010
New Revision: 157833

URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=157833
Log:
Replace type != type comparisons with types_compatible_p.

2010-03-30  Sebastian Pop  sebastian@amd.com

PR middle-end/43430
* tree-vect-slp.c (vect_get_and_check_slp_defs): Replace type
pointer comparisons with types_compatible_p.
* tree-vect-stmts.c (vectorizable_call): Same.
(vectorizable_condition): Same.

* gcc.dg/vect/pr43430-1.c: New.

Added:
trunk/gcc/testsuite/gcc.dg/vect/pr43430-1.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/testsuite/ChangeLog
trunk/gcc/tree-vect-slp.c
trunk/gcc/tree-vect-stmts.c


-- 


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



[Bug tree-optimization/43431] Diagnostic message is not clear for vectorization profitability analysis

2010-03-28 Thread spop at gcc dot gnu dot org


--- Comment #2 from spop at gcc dot gnu dot org  2010-03-28 15:56 ---
(In reply to comment #1)
  What does this message mean?
  vector iteration cost = 2056 is divisible by scalar iteration cost = 4 by a
  factor greater than or equal to the vectorization factor = 4 .
  Is the vectorization not profitable?
  Why?

 The cost of one vector iteration is 2056.
 The cost of one scalar iteration is 4.
 2056/4 = 514
 514  4 (= vectorization factor)
 The vectorization is not profitable.

 We want to vectorize only if one vector iteration cost is lower than one 
 scalar
 iteration cost multiplied by vectorization factor.


Ok.  Thanks for the explanation.  Could we change the diagnostic
message to read this instead: the vector iteration cost = 2056
divided by the scalar iteration cost = 4 is greater or equal to
the vectorization factor = 4.

 (Vector cost is so high here, because of the j,i access. We should vectorize
 the outer loop, but we fail because of some unsupported features: unknown 
 inner
 loop bound, need for versioning (for alias) in outer loop.)

I looked at whether loop interchange could help, but interchanging the
two loops seems non trivial to me.


-- 


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



[Bug tree-optimization/43436] Missed vectorization: unhandled data-ref

2010-03-28 Thread spop at gcc dot gnu dot org


--- Comment #4 from spop at gcc dot gnu dot org  2010-03-28 16:28 ---
What about fixing the diagnostic message like this:

diff --git a/gcc/tree-vect-data-refs.c b/gcc/tree-vect-data-refs.c
index 37ae9b5..44248b3 100644
--- a/gcc/tree-vect-data-refs.c
+++ b/gcc/tree-vect-data-refs.c
@@ -1866,10 +1866,21 @@ vect_analyze_data_refs (loop_vec_info loop_vinfo,
bb_vec_info bb_vinfo)

   if (loop_vinfo)
 {
+  bool res;
+
   loop = LOOP_VINFO_LOOP (loop_vinfo);
-  compute_data_dependences_for_loop (loop, true,
- LOOP_VINFO_DATAREFS (loop_vinfo),
- LOOP_VINFO_DDRS (loop_vinfo));
+  res = compute_data_dependences_for_loop
+   (loop, true, LOOP_VINFO_DATAREFS (loop_vinfo),
+LOOP_VINFO_DDRS (loop_vinfo));
+
+  if (!res)
+{
+  if (vect_print_dump_info (REPORT_UNVECTORIZED_LOCATIONS))
+   fprintf (vect_dump, not vectorized: loop contains function calls
+ or data references that cannot be analyzed);
+  return false;
+}
+
   datarefs = LOOP_VINFO_DATAREFS (loop_vinfo);
 }
   else


-- 


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



[Bug tree-optimization/43436] Missed vectorization: unhandled data-ref

2010-03-28 Thread spop at gcc dot gnu dot org


--- Comment #5 from spop at gcc dot gnu dot org  2010-03-28 16:35 ---
When defining the missing function like this:

static inline int mid_pred(int a, int b, int c)
{
int t= (a-b)((a-b)31);
a-=t;
b+=t;
b-= (b-c)((b-c)31);
b+= (a-b)((a-b)31);

return b;
}

The vectorization reports: not vectorized: unsupported use in stmt.

When this function is defined like this:
static inline int mid_pred(int a, int b, int c)
{
  if(ab){
if(cb){
  if(ca) b=a;
  elseb=c;
}
  }else{
if(bc){
  if(ca) b=c;
  elseb=a;
}
  }
  return b;
}

the vectorizer stops with: not vectorized: control flow in loop.


-- 


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



[Bug tree-optimization/43431] Diagnostic message is not clear for vectorization profitability analysis

2010-03-28 Thread spop at gcc dot gnu dot org


--- Comment #3 from spop at gcc dot gnu dot org  2010-03-28 16:57 ---
What about fixing this bug with 

diff --git a/gcc/tree-vect-loop.c b/gcc/tree-vect-loop.c
index afbd342..2601b58 100644
--- a/gcc/tree-vect-loop.c
+++ b/gcc/tree-vect-loop.c
@@ -2173,9 +2173,9 @@ vect_estimate_min_profitable_iters (loop_vec_info
loop_vinfo)
   else
 {
   if (vect_print_dump_info (REPORT_COST))
-fprintf (vect_dump, cost model: vector iteration cost = %d 
- is divisible by scalar iteration cost = %d by a factor 
- greater than or equal to the vectorization factor = %d .,
+fprintf (vect_dump, cost model: the vector iteration cost = %d 
+divided by the scalar iteration cost = %d 
+is greater or equal to the vectorization factor = %d.,
  vec_inside_cost, scalar_single_iter_cost, vf);
   return -1;
 }


-- 


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



[Bug tree-optimization/43430] Missed vectorization: stmt not supported: cond_expr

2010-03-26 Thread spop at gcc dot gnu dot org


--- Comment #1 from spop at gcc dot gnu dot org  2010-03-26 20:08 ---
Due to the FORNOW fail in vectorizable_condition:

  int nunits = TYPE_VECTOR_SUBPARTS (vectype);
  int ncopies = LOOP_VINFO_VECT_FACTOR (loop_vinfo) / nunits;
  if (ncopies  1)
return false; /* FORNOW */


-- 


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



[Bug tree-optimization/43430] Missed vectorization: stmt not supported: cond_expr

2010-03-26 Thread spop at gcc dot gnu dot org


--- Comment #2 from spop at gcc dot gnu dot org  2010-03-26 20:13 ---
Reduced testcase, for which ncopies is 4.

typedef unsigned char uint8_t;
vsad16_c (void *c, uint8_t * s1, uint8_t * s2, int stride, int h)
{
  int score = 0;
  int x, y;
  for (x = 0; x  16; x++)
score += ((s1[x] - s1[x + stride] + s2[x + stride]) = 0 ?
  s1[x] + s2[x + stride] :
  s2[x + stride]);
  return score;
}


-- 


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



[Bug tree-optimization/43430] Missed vectorization: stmt not supported: cond_expr

2010-03-26 Thread spop at gcc dot gnu dot org


--- Comment #3 from spop at gcc dot gnu dot org  2010-03-26 20:26 ---
vectorizable_condition has to be cleaned up of this condition:

  /* We do not handle two different vector types for the condition
 and the values.  */
  if (TREE_TYPE (TREE_OPERAND (cond_expr, 0)) != TREE_TYPE (vectype))
return false;

When using: 

typedef int uint8_t;
vsad16_c (void *c, uint8_t * s1, uint8_t * s2, int stride, int h)
{
  int score = 0;
  int x, y;
  for (x = 0; x  16; x++)
score += ((s1[x] - s1[x + stride] + s2[x + stride]) = 0 ?
  s1[x] + s2[x + stride] :
  s2[x + stride]);
  return score;
}

ncopies is then equal to 1, but then this condition is true:
uint8_t is a different type than int

type integer_type 0x75a91498 uint8_t sizes-gimplified public SI
type integer_type 0x77e7f498 int sizes-gimplified public SI

but using this version, we pass over this condition:

int vsad16_c (void *c, int * s1, int * s2, int stride, int h)
{
  int score = 0;
  int x, y;
  for (x = 0; x  16; x++)
score += ((s1[x] - s1[x + stride] + s2[x + stride]) = 0 ?
  s1[x] + s2[x + stride] :
  s2[x + stride]);
  return score;
}

and the loop is vectorized.


-- 


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



[Bug tree-optimization/43430] Missed vectorization: stmt not supported: cond_expr

2010-03-26 Thread spop at gcc dot gnu dot org


--- Comment #4 from spop at gcc dot gnu dot org  2010-03-26 20:49 ---
This cleanup of vectorizable_condition allows this testcase to be vectorized:

typedef int uint8_t;
vsad16_c (void *c, uint8_t * s1, uint8_t * s2, int stride, int h)
{
  int score = 0;
  int x, y;
  for (x = 0; x  16; x++)
score += ((s1[x] - s1[x + stride] + s2[x + stride]) = 0 ?
  s1[x] + s2[x + stride] :
  s2[x + stride]);
  return score;
}


diff --git a/gcc/tree-vect-stmts.c b/gcc/tree-vect-stmts.c
index 4bce61a..cfb1471 100644
--- a/gcc/tree-vect-stmts.c
+++ b/gcc/tree-vect-stmts.c
@@ -3865,7 +3865,8 @@ vectorizable_condition (gimple stmt, gimple_stmt_iterator
*gsi,

   /* We do not handle two different vector types for the condition
  and the values.  */
-  if (TREE_TYPE (TREE_OPERAND (cond_expr, 0)) != TREE_TYPE (vectype))
+  if (!useless_type_conversion_p (TREE_TYPE (TREE_OPERAND (cond_expr, 0)),
+ TREE_TYPE (vectype)))
 return false;

   if (TREE_CODE (then_clause) == SSA_NAME)


-- 


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



[Bug tree-optimization/43430] Missed vectorization: stmt not supported: cond_expr

2010-03-26 Thread spop at gcc dot gnu dot org


--- Comment #5 from spop at gcc dot gnu dot org  2010-03-26 21:18 ---
Created an attachment (id=20218)
 -- (http://gcc.gnu.org/bugzilla/attachment.cgi?id=20218action=view)
Cleanup comparisons of types

This patch replaces with types_compatible_p all the places in the
vectorizer that were comparing types by pointer equality.


-- 


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



[Bug middle-end/42130] [graphite-branch] dealII fails

2010-03-25 Thread spop at gcc dot gnu dot org


--- Comment #12 from spop at gcc dot gnu dot org  2010-03-25 15:15 ---
The patch for the fix is:
http://gcc.gnu.org/viewcvs?view=revisionrevision=157286


-- 


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



[Bug middle-end/43519] New: [graphite] Bootstrap with Graphite enabled fails in Java libs

2010-03-25 Thread spop at gcc dot gnu dot org
Bootstrap with Graphite enabled stops while building Java libraries.
See for example the results of the automatic testers at:
http://groups.google.com/group/gcc-graphite-test/browse_thread/thread/3b326e5e27fc72b3

The error was introduced by the patch fixing PR42130
http://gcc.gnu.org/viewcvs?view=revisionrevision=157286
more precisely, the use of types such as long_long_integer_type_node
that are not initialized by the Java front-end.

See also:
http://gcc.gnu.org/ml/gcc-patches/2010-03/msg00408.html


-- 
   Summary: [graphite] Bootstrap with Graphite enabled fails in Java
libs
   Product: gcc
   Version: 4.5.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: middle-end
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: spop at gcc dot gnu dot org


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



[Bug middle-end/42181] [4.5 Regression][graphite] -fgraphite-identity miscompiles air.f90

2010-03-24 Thread spop at gcc dot gnu dot org


--- Comment #30 from spop at gcc dot gnu dot org  2010-03-24 20:17 ---
Fixed.

Please use ftp://gcc.gnu.org/pub/gcc/infrastructure/cloog-ppl-0.15.9.tar.gz


-- 

spop at gcc dot gnu dot org changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution||FIXED


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



[Bug middle-end/42777] [graphite] loop interchange heuristic is broken

2010-03-24 Thread spop at gcc dot gnu dot org


--- Comment #1 from spop at gcc dot gnu dot org  2010-03-24 21:11 ---
I don't think this is due to the interchange heuristic,
it looks more like a missed vectorization problem after Graphite. 

Closing the bug.


-- 

spop at gcc dot gnu dot org changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution||FIXED


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



[Bug middle-end/42181] [4.5 Regression][graphite] -fgraphite-identity miscompiles air.f90

2010-03-23 Thread spop at gcc dot gnu dot org


--- Comment #27 from spop at gcc dot gnu dot org  2010-03-23 20:08 ---
I just verified that the problem is well in CLooG-PPL.
With CLooG-ISL we generate a correct code that looks like this:

  for (c2=1;c2=D.1554_10-3;c2++) {
S1(c2);
for (c4=0;c4=c2-1;c4++) {
  S2(c2,c4);
  S3(c2,c4);
  S4(c2,c4);
}
S2(c2,c2);
S4(c2,c2);
for (c4=c2+1;c4=D.1554_10-2;c4++) {
  S2(c2,c4);
  S3(c2,c4);
  S4(c2,c4);
}
S5(c2);
S6(c2);
  }


-- 


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



[Bug middle-end/42181] [4.5 Regression][graphite] -fgraphite-identity miscompiles air.f90

2010-03-23 Thread spop at gcc dot gnu dot org


--- Comment #28 from spop at gcc dot gnu dot org  2010-03-23 21:24 ---
I fixed this problem in CLooG-PPL: the code generated with 
the new version looks like the code generated by CLooG-ISL:

  for (c2=1;c2=D.1554_10-3;c2++) {
S1(c2);
for (c4=0;c4=c2-1;c4++) {
  S2(c2,c4);
  S3(c2,c4);
  S4(c2,c4);
}
S2(c2,c2);
S4(c2,c2);
for (c4=c2+1;c4=D.1554_10-2;c4++) {
  S2(c2,c4);
  S3(c2,c4);
  S4(c2,c4);
}
S5(c2);
S6(c2);
  }

I will bootstrap and test the graphite branch with the modified
version of CLooG-PPL and then if everything looks good,
I will prepare a new version CLooG-PPL-0.15.9 and I will 
upload it on ftp://gcc.gnu.org/pub/gcc/infrastructure/

Sebastian


-- 


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



[Bug middle-end/42181] [4.5 Regression][graphite] -fgraphite-identity miscompiles air.f90

2010-03-23 Thread spop at gcc dot gnu dot org


--- Comment #29 from spop at gcc dot gnu dot org  2010-03-23 21:27 ---
Also note that with the fix in CLooG-PPL,
gfortran -O2 -fgraphite-identity air.f90 -o air
./air
passes without error.


-- 


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



[Bug middle-end/43464] copy prop breaks loop closed SSA form

2010-03-22 Thread spop at gcc dot gnu dot org


--- Comment #13 from spop at gcc dot gnu dot org  2010-03-22 15:47 ---
Note that 

   * tree-ssa-copy.c (init_copy_prop): Loop closed phi nodes can
contain more than one argument.

breaks both 464.h264ref and 416.gamess with -O3.  See for example
http://groups.google.com/group/gcc-graphite-test/browse_thread/thread/f5b0d912e90b598f


-- 


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



[Bug middle-end/43464] New: copy prop breaks loop closed SSA form

2010-03-21 Thread spop at gcc dot gnu dot org
When copy propagation is called from the loop optimizer, copy prop
does not update the loop closed SSA form, and we end up on a
representation that crashes on verify_loop_closed_ssa ().

This bug appeared on the Graphite branch with -O3 on the attached
testcase reduced from perlbench.

Note that the graphite pass does not execute for this testcase, as
there are more than 100 basic blocks in its CFG, only the cleanup
passes that are scheduled after the graphite pass are run: so this bug
is not related to Graphite, and could also occur in the current pass
ordering after we build the loop closed SSA form:

  NEXT_PASS (pass_tree_loop_init);
  NEXT_PASS (pass_copy_prop);
  NEXT_PASS (pass_dce_loop);
  NEXT_PASS (pass_lim);


-- 
   Summary: copy prop breaks loop closed SSA form
   Product: gcc
   Version: 4.5.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: middle-end
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: spop at gcc dot gnu dot org


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



[Bug middle-end/43464] copy prop breaks loop closed SSA form

2010-03-21 Thread spop at gcc dot gnu dot org


--- Comment #1 from spop at gcc dot gnu dot org  2010-03-21 07:01 ---
Created an attachment (id=20148)
 -- (http://gcc.gnu.org/bugzilla/attachment.cgi?id=20148action=view)
pr43464.i


-- 


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



[Bug middle-end/43464] copy prop breaks loop closed SSA form

2010-03-21 Thread spop at gcc dot gnu dot org


--- Comment #2 from spop at gcc dot gnu dot org  2010-03-21 07:06 ---
Created an attachment (id=20149)
 -- (http://gcc.gnu.org/bugzilla/attachment.cgi?id=20149action=view)
proposed fix

The proposed fix is to recompute the loop closed SSA form after copy
propagation.


-- 


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



[Bug middle-end/43464] copy prop breaks loop closed SSA form

2010-03-21 Thread spop at gcc dot gnu dot org


--- Comment #3 from spop at gcc dot gnu dot org  2010-03-21 07:32 ---
Subject: Bug 43464

Author: spop
Date: Sun Mar 21 07:32:43 2010
New Revision: 157602

URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=157602
Log:
Fix PR43464: update loop close SSA once copy prop is done.

2010-03-21  Sebastian Pop  sebastian@amd.com

PR middle-end/43464
* tree-ssa-copy.c (execute_copy_prop): Call
rewrite_into_loop_closed_ssa
and verify_loop_closed_ssa when copy prop is executed in the LNO.

* gcc.dg/graphite/id-pr43464.c: New.

Added:
branches/graphite/gcc/testsuite/gcc.dg/graphite/id-pr43464.c
Modified:
branches/graphite/gcc/ChangeLog.graphite
branches/graphite/gcc/tree-ssa-copy.c


-- 


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



[Bug middle-end/43464] copy prop breaks loop closed SSA form

2010-03-21 Thread spop at gcc dot gnu dot org


--- Comment #6 from spop at gcc dot gnu dot org  2010-03-21 17:01 ---
Further reduced testcase:

typedef struct regnode
{
  char flags;
} regnode;
extern const unsigned char A[];

char *foo (regnode *c, char *s, int norun)
{
  int uskip;
  while (s + (uskip = A[*s]))
{
  if ((c-flags || bar (c))  norun)
goto got_it;
  s += uskip;
}
 got_it:
  return s;
}

Needs an extra patch to trigger the ICE:

diff --git a/gcc/passes.c b/gcc/passes.c
index 1ac8694..620487f 100644
--- a/gcc/passes.c
+++ b/gcc/passes.c
@@ -894,6 +894,10 @@ init_optimization_passes (void)
  NEXT_PASS (pass_check_data_deps);
  NEXT_PASS (pass_loop_distribution);
  NEXT_PASS (pass_linear_transform);
+ NEXT_PASS (pass_copy_prop);
+ NEXT_PASS (pass_dce_loop);
+ NEXT_PASS (pass_lim);
+
  NEXT_PASS (pass_graphite_transforms);
{
  struct opt_pass **p = pass_graphite_transforms.pass.sub;


-- 


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



[Bug middle-end/43464] copy prop breaks loop closed SSA form

2010-03-21 Thread spop at gcc dot gnu dot org


--- Comment #7 from spop at gcc dot gnu dot org  2010-03-21 17:17 ---
The problem is that copyprop does this change:

@@ -25,7 +25,7 @@
   bb 12:
 # .MEM_16 = PHI .MEM_18(10), .MEM_20(11)
 # s_66 = PHI s_1(10), s_1(11)
-s_13 = s_66;
+s_13 = s_1;
 goto bb 16 (got_it);

   }

then verify_loop_closed_ssa () complains about the fact that s_1 is
defined in loop_1 and used outside loop_1 in a non close-phi node.


-- 


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



[Bug middle-end/43464] copy prop breaks loop closed SSA form

2010-03-21 Thread spop at gcc dot gnu dot org


--- Comment #10 from spop at gcc dot gnu dot org  2010-03-22 00:17 ---
Yes, this patch does fix the problem.

diff --git a/gcc/tree-ssa-copy.c b/gcc/tree-ssa-copy.c
index 57c6558..61e32cc 100644
--- a/gcc/tree-ssa-copy.c
+++ b/gcc/tree-ssa-copy.c
@@ -797,7 +797,6 @@ init_copy_prop (void)
 PHI nodes.  Technically this is only needed for loop
 exit PHIs, but this is difficult to query.  */
  || (current_loops
-  gimple_phi_num_args (phi) == 1
   loops_state_satisfies_p (LOOP_CLOSED_SSA)))
 prop_set_simulate_again (phi, false);
  else

I will bootstrap and test this again.


-- 


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



[Bug middle-end/43464] copy prop breaks loop closed SSA form

2010-03-21 Thread spop at gcc dot gnu dot org


--- Comment #11 from spop at gcc dot gnu dot org  2010-03-22 00:26 ---
I would still like to see some extra checking after copyprop:
would this extra check be ok to commit with the fix?

diff --git a/gcc/tree-ssa-copy.c b/gcc/tree-ssa-copy.c
index 61e32cc..011a80a 100644
--- a/gcc/tree-ssa-copy.c
+++ b/gcc/tree-ssa-copy.c
@@ -967,6 +967,13 @@ execute_copy_prop (void)
   init_copy_prop ();
   ssa_propagate (copy_prop_visit_stmt, copy_prop_visit_phi_node);
   fini_copy_prop ();
+
+#ifdef ENABLE_CHECKING
+  if (current_loops
+   loops_state_satisfies_p (LOOP_CLOSED_SSA))
+verify_loop_closed_ssa ();
+#endif
+
   return 0;
 }



-- 


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



[Bug middle-end/43464] copy prop breaks loop closed SSA form

2010-03-21 Thread spop at gcc dot gnu dot org


--- Comment #12 from spop at gcc dot gnu dot org  2010-03-22 01:29 ---
Subject: Bug 43464

Author: spop
Date: Mon Mar 22 01:28:51 2010
New Revision: 157617

URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=157617
Log:
Fix PR43464: loop close phi nodes can contain more than one argument.

2010-03-21  Sebastian Pop  sebastian@amd.com
Richard Guenther  rguent...@suse.de

PR middle-end/43464
* tree-ssa-copy.c (init_copy_prop): Loop closed phi nodes can
contain more than one argument.
(execute_copy_prop): Revert the previous change: do not call
rewrite_into_loop_closed_ssa.

* gcc.dg/graphite/id-pr43464.c: Remove compile warning.
* gcc.dg/graphite/id-pr43464-1.c: New.

Added:
branches/graphite/gcc/testsuite/gcc.dg/graphite/id-pr43464-1.c
Modified:
branches/graphite/gcc/ChangeLog.graphite
branches/graphite/gcc/testsuite/gcc.dg/graphite/id-pr43464.c
branches/graphite/gcc/tree-ssa-copy.c


-- 


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



[Bug tree-optimization/43423] gcc should vectorize this loop through iteration range splitting

2010-03-18 Thread spop at gcc dot gnu dot org


--- Comment #5 from spop at gcc dot gnu dot org  2010-03-18 18:51 ---
Yes,
I think we should improve if-conversion to handle more complex cases.


-- 


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



[Bug tree-optimization/43427] The loop is not interchanged and thus could not be vectorized.

2010-03-18 Thread spop at gcc dot gnu dot org


--- Comment #2 from spop at gcc dot gnu dot org  2010-03-18 18:59 ---
In the output of ./cc1 -O3 -floop-interchange -fdump-tree-graphite-all
-ftree-vectorizer-verbose=7
we have: Loops at depths 0 and 1 will be interchanged.
so we do the interchange, but then the vectorizer complains about:
note: not vectorized: data ref analysis failed D.2729_41 = a[i_40][var.8_47];


-- 


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



[Bug tree-optimization/43427] The loop is not interchanged and thus could not be vectorized.

2010-03-18 Thread spop at gcc dot gnu dot org


--- Comment #3 from spop at gcc dot gnu dot org  2010-03-18 19:01 ---
./cc1 -O3 -msse2 -ffast-math -ftree-vectorizer-verbose=2 pr43427.c
-ftree-loop-linear 

pr43427.c:6: note: not vectorized: complicated access pattern.
pr43427.c:7: note: LOOP VECTORIZED.
pr43427.c:3: note: vectorized 1 loops in function.


-- 


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



[Bug tree-optimization/43430] New: Missed vectorization: stmt not supported: cond_expr

2010-03-18 Thread spop at gcc dot gnu dot org
This code from FFmpeg is not vectorized:

gcc-4.5 -c vsad_intra.c -O3 -ffast-math -ftree-vectorizer-verbose=7 -msse2
[...]
vsad_intra.c:15: note: not vectorized: relevant stmt not supported: iftmp.0_7 =
[cond_expr] iftmp.0_35  0 ? iftmp.0_77 : iftmp.0_35;


typedef short DCTELEM;
typedef unsigned char uint8_t;
typedef long int x86_reg;
typedef unsigned int uint32_t;
typedef unsigned long int uint64_t;

int
vsad16_c (void *c, uint8_t * s1, uint8_t * s2, int stride, int h)
{
  int score = 0;
  int x, y;

  for (y = 1; y  h; y++)
{
  for (x = 0; x  16; x++)
{
  score +=
((s1[x] - s2[x] - s1[x + stride] + s2[x + stride]) =
 0 ? (s1[x] - s2[x] - s1[x + stride] +
  s2[x + stride]) : (-(s1[x] - s2[x] - s1[x + stride] +
   s2[x + stride])));
}
  s1 += stride;
  s2 += stride;
}

  return score;
}


-- 
   Summary: Missed vectorization: stmt not supported: cond_expr
   Product: gcc
   Version: 4.5.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: tree-optimization
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: spop at gcc dot gnu dot org


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



  1   2   3   4   5   6   7   8   >