public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/46213] New: [4.6 Regression] gfortran.dg/aliasing_array_result_1.f90 ICE: in vectorizable_reduction, at tree-vect-loop.c:4046 with custom compiler flags
@ 2010-10-28 18:44 zsojka at seznam dot cz
  2010-10-28 19:11 ` [Bug tree-optimization/46213] " dominiq at lps dot ens.fr
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: zsojka at seznam dot cz @ 2010-10-28 18:44 UTC (permalink / raw)
  To: gcc-bugs

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

           Summary: [4.6 Regression]
                    gfortran.dg/aliasing_array_result_1.f90 ICE: in
                    vectorizable_reduction, at tree-vect-loop.c:4046 with
                    custom compiler flags
           Product: gcc
           Version: 4.6.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: tree-optimization
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: zsojka@seznam.cz


Created attachment 22192
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=22192
auto-reduced testcase

Command line:
$ gcc -O -finline-small-functions -fno-tree-ccp -fno-tree-ch
-fno-tree-loop-ivcanon -ftree-vectorize

Compiler output:
$ gcc -O -finline-small-functions -fno-tree-ccp -fno-tree-ch
-fno-tree-loop-ivcanon -ftree-vectorize aliasing_array_result_1.f90 
aliasing_array_result_1.f90: In function 'main':
aliasing_array_result_1.f90:74:0: internal compiler error: in
vectorizable_reduction, at tree-vect-loop.c:4046
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.

Tested revisions:
r166029 - crash
r161659 - crash
r159696 - OK
4.5 r165781 - OK


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug tree-optimization/46213] [4.6 Regression] gfortran.dg/aliasing_array_result_1.f90 ICE: in vectorizable_reduction, at tree-vect-loop.c:4046 with custom compiler flags
  2010-10-28 18:44 [Bug tree-optimization/46213] New: [4.6 Regression] gfortran.dg/aliasing_array_result_1.f90 ICE: in vectorizable_reduction, at tree-vect-loop.c:4046 with custom compiler flags zsojka at seznam dot cz
@ 2010-10-28 19:11 ` dominiq at lps dot ens.fr
  2010-10-28 19:52 ` irar at il dot ibm.com
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: dominiq at lps dot ens.fr @ 2010-10-28 19:11 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #1 from Dominique d'Humieres <dominiq at lps dot ens.fr> 2010-10-28 19:11:46 UTC ---
The test was introduced at revision 161550 along a patch fixing pr44582.
Note that before this revision the test compiles with the flags, but abort at
run time.


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug tree-optimization/46213] [4.6 Regression] gfortran.dg/aliasing_array_result_1.f90 ICE: in vectorizable_reduction, at tree-vect-loop.c:4046 with custom compiler flags
  2010-10-28 18:44 [Bug tree-optimization/46213] New: [4.6 Regression] gfortran.dg/aliasing_array_result_1.f90 ICE: in vectorizable_reduction, at tree-vect-loop.c:4046 with custom compiler flags zsojka at seznam dot cz
  2010-10-28 19:11 ` [Bug tree-optimization/46213] " dominiq at lps dot ens.fr
@ 2010-10-28 19:52 ` irar at il dot ibm.com
  2010-10-29 14:31 ` hjl.tools at gmail dot com
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: irar at il dot ibm.com @ 2010-10-28 19:52 UTC (permalink / raw)
  To: gcc-bugs

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

Ira Rosen <irar at il dot ibm.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2010.10.28 19:52:01
                 CC|                            |irar at il dot ibm.com,
                   |                            |matz at gcc dot gnu.org
     Ever Confirmed|0                           |1

--- Comment #2 from Ira Rosen <irar at il dot ibm.com> 2010-10-28 19:52:01 UTC ---
Looks like the problem is in reduction with MINUS_EXPR. The reduction here is
res = a[i] - res and not res = res - a[i] which we intend to support.

Ira


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug tree-optimization/46213] [4.6 Regression] gfortran.dg/aliasing_array_result_1.f90 ICE: in vectorizable_reduction, at tree-vect-loop.c:4046 with custom compiler flags
  2010-10-28 18:44 [Bug tree-optimization/46213] New: [4.6 Regression] gfortran.dg/aliasing_array_result_1.f90 ICE: in vectorizable_reduction, at tree-vect-loop.c:4046 with custom compiler flags zsojka at seznam dot cz
  2010-10-28 19:11 ` [Bug tree-optimization/46213] " dominiq at lps dot ens.fr
  2010-10-28 19:52 ` irar at il dot ibm.com
@ 2010-10-29 14:31 ` hjl.tools at gmail dot com
  2010-10-29 23:32 ` rguenth at gcc dot gnu.org
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: hjl.tools at gmail dot com @ 2010-10-29 14:31 UTC (permalink / raw)
  To: gcc-bugs

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

H.J. Lu <hjl.tools at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |pault at gcc dot gnu.org

--- Comment #3 from H.J. Lu <hjl.tools at gmail dot com> 2010-10-29 14:31:03 UTC ---
It is caused by revision 161550:

http://gcc.gnu.org/ml/gcc-cvs/2010-06/msg01468.html


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug tree-optimization/46213] [4.6 Regression] gfortran.dg/aliasing_array_result_1.f90 ICE: in vectorizable_reduction, at tree-vect-loop.c:4046 with custom compiler flags
  2010-10-28 18:44 [Bug tree-optimization/46213] New: [4.6 Regression] gfortran.dg/aliasing_array_result_1.f90 ICE: in vectorizable_reduction, at tree-vect-loop.c:4046 with custom compiler flags zsojka at seznam dot cz
                   ` (2 preceding siblings ...)
  2010-10-29 14:31 ` hjl.tools at gmail dot com
@ 2010-10-29 23:32 ` rguenth at gcc dot gnu.org
  2010-11-02  8:32 ` irar at il dot ibm.com
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: rguenth at gcc dot gnu.org @ 2010-10-29 23:32 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Guenther <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |4.6.0


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug tree-optimization/46213] [4.6 Regression] gfortran.dg/aliasing_array_result_1.f90 ICE: in vectorizable_reduction, at tree-vect-loop.c:4046 with custom compiler flags
  2010-10-28 18:44 [Bug tree-optimization/46213] New: [4.6 Regression] gfortran.dg/aliasing_array_result_1.f90 ICE: in vectorizable_reduction, at tree-vect-loop.c:4046 with custom compiler flags zsojka at seznam dot cz
                   ` (3 preceding siblings ...)
  2010-10-29 23:32 ` rguenth at gcc dot gnu.org
@ 2010-11-02  8:32 ` irar at il dot ibm.com
  2010-11-04 11:51 ` irar at gcc dot gnu.org
  2010-11-04 12:48 ` irar at il dot ibm.com
  6 siblings, 0 replies; 8+ messages in thread
From: irar at il dot ibm.com @ 2010-11-02  8:32 UTC (permalink / raw)
  To: gcc-bugs

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

Ira Rosen <irar at il dot ibm.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED
         AssignedTo|unassigned at gcc dot       |irar at gcc dot gnu.org
                   |gnu.org                     |

--- Comment #4 from Ira Rosen <irar at il dot ibm.com> 2010-11-02 08:32:15 UTC ---
I am testing:

Index: tree-vect-loop.c
===================================================================
--- tree-vect-loop.c    (revision 166172)
+++ tree-vect-loop.c    (working copy)
@@ -1800,7 +1800,11 @@ vect_is_simple_reduction_1 (loop_vec_inf
      simply rewriting this into "res += -x[i]".  Avoid changing
      gimple instruction for the first simple tests and only do this
      if we're allowed to change code at all.  */
-  if (code == MINUS_EXPR && modify)
+  if (code == MINUS_EXPR
+      && modify
+      && (op1 = gimple_assign_rhs1 (def_stmt))
+      && TREE_CODE (op1) == SSA_NAME
+      && SSA_NAME_DEF_STMT (op1) == phi)
     code = PLUS_EXPR;

   if (check_reduction


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug tree-optimization/46213] [4.6 Regression] gfortran.dg/aliasing_array_result_1.f90 ICE: in vectorizable_reduction, at tree-vect-loop.c:4046 with custom compiler flags
  2010-10-28 18:44 [Bug tree-optimization/46213] New: [4.6 Regression] gfortran.dg/aliasing_array_result_1.f90 ICE: in vectorizable_reduction, at tree-vect-loop.c:4046 with custom compiler flags zsojka at seznam dot cz
                   ` (4 preceding siblings ...)
  2010-11-02  8:32 ` irar at il dot ibm.com
@ 2010-11-04 11:51 ` irar at gcc dot gnu.org
  2010-11-04 12:48 ` irar at il dot ibm.com
  6 siblings, 0 replies; 8+ messages in thread
From: irar at gcc dot gnu.org @ 2010-11-04 11:51 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #5 from irar at gcc dot gnu.org 2010-11-04 11:51:13 UTC ---
Author: irar
Date: Thu Nov  4 11:51:09 2010
New Revision: 166306

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=166306
Log:

        PR tree-optimization/46213
        * tree-vect-loop.c (vect_is_simple_reduction_1): Handle 
        MINUS_EXPR only if the first operand is reduction operand.


Added:
    trunk/gcc/testsuite/gfortran.dg/vect/pr46213.f90
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/tree-vect-loop.c


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug tree-optimization/46213] [4.6 Regression] gfortran.dg/aliasing_array_result_1.f90 ICE: in vectorizable_reduction, at tree-vect-loop.c:4046 with custom compiler flags
  2010-10-28 18:44 [Bug tree-optimization/46213] New: [4.6 Regression] gfortran.dg/aliasing_array_result_1.f90 ICE: in vectorizable_reduction, at tree-vect-loop.c:4046 with custom compiler flags zsojka at seznam dot cz
                   ` (5 preceding siblings ...)
  2010-11-04 11:51 ` irar at gcc dot gnu.org
@ 2010-11-04 12:48 ` irar at il dot ibm.com
  6 siblings, 0 replies; 8+ messages in thread
From: irar at il dot ibm.com @ 2010-11-04 12:48 UTC (permalink / raw)
  To: gcc-bugs

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

Ira Rosen <irar at il dot ibm.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED

--- Comment #6 from Ira Rosen <irar at il dot ibm.com> 2010-11-04 12:47:46 UTC ---
Fixed.


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2010-11-04 12:48 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-10-28 18:44 [Bug tree-optimization/46213] New: [4.6 Regression] gfortran.dg/aliasing_array_result_1.f90 ICE: in vectorizable_reduction, at tree-vect-loop.c:4046 with custom compiler flags zsojka at seznam dot cz
2010-10-28 19:11 ` [Bug tree-optimization/46213] " dominiq at lps dot ens.fr
2010-10-28 19:52 ` irar at il dot ibm.com
2010-10-29 14:31 ` hjl.tools at gmail dot com
2010-10-29 23:32 ` rguenth at gcc dot gnu.org
2010-11-02  8:32 ` irar at il dot ibm.com
2010-11-04 11:51 ` irar at gcc dot gnu.org
2010-11-04 12:48 ` irar at il dot ibm.com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).