public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug middle-end/35085]  New: [4.3 regression] gcc.dg/vect/vect-iv-9.c fails
@ 2008-02-05  7:01 ismail at pardus dot org dot tr
  2008-02-05 10:20 ` [Bug middle-end/35085] " rguenth at gcc dot gnu dot org
                   ` (28 more replies)
  0 siblings, 29 replies; 30+ messages in thread
From: ismail at pardus dot org dot tr @ 2008-02-05  7:01 UTC (permalink / raw)
  To: gcc-bugs

FAIL: gcc.dg/vect/vect-iv-9.c scan-tree-dump-times vect "vectorized 1 loops" 2

Not much detail in logs,

Using built-in specs.
Target: i686-pc-linux-gnu
Configured with: ../configure --prefix=/usr --bindir=/usr/bin --libdir=/usr/lib
--libexecdir=/usr/lib --includedir=/usr/include --mandir=/usr/share/man
--infodir=/usr/share/info --with-gxx-include-dir=/usr/include/c++
--disable-libgcj --disable-multilib --disable-nls --disable-werror
--disable-mudflap --disable-libmudflap --enable-checking=release
--enable-clocale=gnu --enable-__cxa_atexit
--enable-languages=c,c++,fortran,objc --enable-libstdcxx-allocator=new
--disable-libstdcxx-pch --enable-shared --enable-ssp --disable-libssp
--enable-threads=posix --without-included-gettext --without-system-libunwind
--with-system-zlib --with-cpu=generic --with-pkgversion='Pardus Linux'
--with-bugurl=http://bugs.pardus.org.tr
Thread model: posix
gcc version 4.3.0 20080205 [trunk revision 132110] (Pardus Linux)

Seems to be a relatively new regression.


-- 
           Summary: [4.3 regression] gcc.dg/vect/vect-iv-9.c fails
           Product: gcc
           Version: 4.3.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: middle-end
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: ismail at pardus dot org dot tr
  GCC host triplet: i686-gnu-linux


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


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

* [Bug middle-end/35085] [4.3 regression] gcc.dg/vect/vect-iv-9.c fails
  2008-02-05  7:01 [Bug middle-end/35085] New: [4.3 regression] gcc.dg/vect/vect-iv-9.c fails ismail at pardus dot org dot tr
@ 2008-02-05 10:20 ` rguenth at gcc dot gnu dot org
  2008-02-05 10:21 ` ismail at pardus dot org dot tr
                   ` (27 subsequent siblings)
  28 siblings, 0 replies; 30+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2008-02-05 10:20 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from rguenth at gcc dot gnu dot org  2008-02-05 10:19 -------
Works for me.


-- 


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


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

* [Bug middle-end/35085] [4.3 regression] gcc.dg/vect/vect-iv-9.c fails
  2008-02-05  7:01 [Bug middle-end/35085] New: [4.3 regression] gcc.dg/vect/vect-iv-9.c fails ismail at pardus dot org dot tr
  2008-02-05 10:20 ` [Bug middle-end/35085] " rguenth at gcc dot gnu dot org
@ 2008-02-05 10:21 ` ismail at pardus dot org dot tr
  2008-02-05 11:53 ` ismail at pardus dot org dot tr
                   ` (26 subsequent siblings)
  28 siblings, 0 replies; 30+ messages in thread
From: ismail at pardus dot org dot tr @ 2008-02-05 10:21 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from ismail at pardus dot org dot tr  2008-02-05 10:21 -------
I bootstrapped twice and still get it. I will try svn up, reboot the machine
etc *sigh*


-- 


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


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

* [Bug middle-end/35085] [4.3 regression] gcc.dg/vect/vect-iv-9.c fails
  2008-02-05  7:01 [Bug middle-end/35085] New: [4.3 regression] gcc.dg/vect/vect-iv-9.c fails ismail at pardus dot org dot tr
  2008-02-05 10:20 ` [Bug middle-end/35085] " rguenth at gcc dot gnu dot org
  2008-02-05 10:21 ` ismail at pardus dot org dot tr
@ 2008-02-05 11:53 ` ismail at pardus dot org dot tr
  2008-02-05 12:36 ` rguenth at gcc dot gnu dot org
                   ` (25 subsequent siblings)
  28 siblings, 0 replies; 30+ messages in thread
From: ismail at pardus dot org dot tr @ 2008-02-05 11:53 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from ismail at pardus dot org dot tr  2008-02-05 11:53 -------
Ok on a third bootstrap I can still reproduce, is there a way to debug it?


-- 


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


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

* [Bug middle-end/35085] [4.3 regression] gcc.dg/vect/vect-iv-9.c fails
  2008-02-05  7:01 [Bug middle-end/35085] New: [4.3 regression] gcc.dg/vect/vect-iv-9.c fails ismail at pardus dot org dot tr
                   ` (2 preceding siblings ...)
  2008-02-05 11:53 ` ismail at pardus dot org dot tr
@ 2008-02-05 12:36 ` rguenth at gcc dot gnu dot org
  2008-02-05 12:39 ` rguenth at gcc dot gnu dot org
                   ` (24 subsequent siblings)
  28 siblings, 0 replies; 30+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2008-02-05 12:36 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from rguenth at gcc dot gnu dot org  2008-02-05 12:35 -------
How does it fail?


-- 


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


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

* [Bug middle-end/35085] [4.3 regression] gcc.dg/vect/vect-iv-9.c fails
  2008-02-05  7:01 [Bug middle-end/35085] New: [4.3 regression] gcc.dg/vect/vect-iv-9.c fails ismail at pardus dot org dot tr
                   ` (3 preceding siblings ...)
  2008-02-05 12:36 ` rguenth at gcc dot gnu dot org
@ 2008-02-05 12:39 ` rguenth at gcc dot gnu dot org
  2008-02-05 12:39 ` ismail at pardus dot org dot tr
                   ` (23 subsequent siblings)
  28 siblings, 0 replies; 30+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2008-02-05 12:39 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from rguenth at gcc dot gnu dot org  2008-02-05 12:38 -------
does making int a[N]; aligned fix it?  That is

int a[N] __attribute__((aligned(16)));

?


-- 


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


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

* [Bug middle-end/35085] [4.3 regression] gcc.dg/vect/vect-iv-9.c fails
  2008-02-05  7:01 [Bug middle-end/35085] New: [4.3 regression] gcc.dg/vect/vect-iv-9.c fails ismail at pardus dot org dot tr
                   ` (4 preceding siblings ...)
  2008-02-05 12:39 ` rguenth at gcc dot gnu dot org
@ 2008-02-05 12:39 ` ismail at pardus dot org dot tr
  2008-02-05 12:44 ` [Bug middle-end/35085] [4.3 Regression] " rguenth at gcc dot gnu dot org
                   ` (22 subsequent siblings)
  28 siblings, 0 replies; 30+ messages in thread
From: ismail at pardus dot org dot tr @ 2008-02-05 12:39 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from ismail at pardus dot org dot tr  2008-02-05 12:38 -------
The long only shows:

FAIL: gcc.dg/vect/vect-iv-9.c scan-tree-dump-times vect "vectorized 1 loops" 2

nothing else.


-- 


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


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

* [Bug middle-end/35085] [4.3 Regression] gcc.dg/vect/vect-iv-9.c fails
  2008-02-05  7:01 [Bug middle-end/35085] New: [4.3 regression] gcc.dg/vect/vect-iv-9.c fails ismail at pardus dot org dot tr
                   ` (5 preceding siblings ...)
  2008-02-05 12:39 ` ismail at pardus dot org dot tr
@ 2008-02-05 12:44 ` rguenth at gcc dot gnu dot org
  2008-02-05 13:21 ` ismail at pardus dot org dot tr
                   ` (21 subsequent siblings)
  28 siblings, 0 replies; 30+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2008-02-05 12:44 UTC (permalink / raw)
  To: gcc-bugs



-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|[4.3 regression]            |[4.3 Regression]
                   |gcc.dg/vect/vect-iv-9.c     |gcc.dg/vect/vect-iv-9.c
                   |fails                       |fails
   Target Milestone|---                         |4.3.0


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


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

* [Bug middle-end/35085] [4.3 Regression] gcc.dg/vect/vect-iv-9.c fails
  2008-02-05  7:01 [Bug middle-end/35085] New: [4.3 regression] gcc.dg/vect/vect-iv-9.c fails ismail at pardus dot org dot tr
                   ` (6 preceding siblings ...)
  2008-02-05 12:44 ` [Bug middle-end/35085] [4.3 Regression] " rguenth at gcc dot gnu dot org
@ 2008-02-05 13:21 ` ismail at pardus dot org dot tr
  2008-02-05 13:21 ` ismail at pardus dot org dot tr
                   ` (20 subsequent siblings)
  28 siblings, 0 replies; 30+ messages in thread
From: ismail at pardus dot org dot tr @ 2008-02-05 13:21 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #7 from ismail at pardus dot org dot tr  2008-02-05 13:20 -------
Adding __attribute__((aligned(16))) doesn't work, attached is the *.vect file.


-- 


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


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

* [Bug middle-end/35085] [4.3 Regression] gcc.dg/vect/vect-iv-9.c fails
  2008-02-05  7:01 [Bug middle-end/35085] New: [4.3 regression] gcc.dg/vect/vect-iv-9.c fails ismail at pardus dot org dot tr
                   ` (7 preceding siblings ...)
  2008-02-05 13:21 ` ismail at pardus dot org dot tr
@ 2008-02-05 13:21 ` ismail at pardus dot org dot tr
  2008-02-06  9:35 ` ismail at pardus dot org dot tr
                   ` (19 subsequent siblings)
  28 siblings, 0 replies; 30+ messages in thread
From: ismail at pardus dot org dot tr @ 2008-02-05 13:21 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #8 from ismail at pardus dot org dot tr  2008-02-05 13:20 -------
Created an attachment (id=15099)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=15099&action=view)
*.vect file


-- 


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


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

* [Bug middle-end/35085] [4.3 Regression] gcc.dg/vect/vect-iv-9.c fails
  2008-02-05  7:01 [Bug middle-end/35085] New: [4.3 regression] gcc.dg/vect/vect-iv-9.c fails ismail at pardus dot org dot tr
                   ` (8 preceding siblings ...)
  2008-02-05 13:21 ` ismail at pardus dot org dot tr
@ 2008-02-06  9:35 ` ismail at pardus dot org dot tr
  2008-02-06 13:33 ` ubizjak at gmail dot com
                   ` (18 subsequent siblings)
  28 siblings, 0 replies; 30+ messages in thread
From: ismail at pardus dot org dot tr @ 2008-02-06  9:35 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #9 from ismail at pardus dot org dot tr  2008-02-06 09:34 -------
CC'ing Dorit to get his idea on the vectorizer dump.


-- 

ismail at pardus dot org dot tr changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |dorit at il dot ibm dot com


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


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

* [Bug middle-end/35085] [4.3 Regression] gcc.dg/vect/vect-iv-9.c fails
  2008-02-05  7:01 [Bug middle-end/35085] New: [4.3 regression] gcc.dg/vect/vect-iv-9.c fails ismail at pardus dot org dot tr
                   ` (9 preceding siblings ...)
  2008-02-06  9:35 ` ismail at pardus dot org dot tr
@ 2008-02-06 13:33 ` ubizjak at gmail dot com
  2008-02-06 13:34 ` ismail at pardus dot org dot tr
                   ` (17 subsequent siblings)
  28 siblings, 0 replies; 30+ messages in thread
From: ubizjak at gmail dot com @ 2008-02-06 13:33 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #10 from ubizjak at gmail dot com  2008-02-06 13:32 -------
I have noticed, that following text is missing from your vect dump:

Dependence tester statistics:
Number of dependence tests: 0
Number of dependence tests classified dependent: 0
Number of dependence tests classified independent: 0
Number of undetermined dependence tests: 0
Number of subscript tests: 0
Number of undetermined subscript tests: 0
Number of same subscript function: 0
Number of ziv tests: 0
Number of ziv tests returning dependent: 0
Number of ziv tests returning independent: 0
Number of ziv tests unimplemented: 0
Number of siv tests: 0
Number of siv tests returning dependent: 0
Number of siv tests returning independent: 0
Number of siv tests unimplemented: 0
Number of miv tests: 0
Number of miv tests returning dependent: 0
Number of miv tests returning independent: 0
Number of miv tests unimplemented: 0


-- 


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


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

* [Bug middle-end/35085] [4.3 Regression] gcc.dg/vect/vect-iv-9.c fails
  2008-02-05  7:01 [Bug middle-end/35085] New: [4.3 regression] gcc.dg/vect/vect-iv-9.c fails ismail at pardus dot org dot tr
                   ` (10 preceding siblings ...)
  2008-02-06 13:33 ` ubizjak at gmail dot com
@ 2008-02-06 13:34 ` ismail at pardus dot org dot tr
  2008-02-06 14:03 ` ubizjak at gmail dot com
                   ` (16 subsequent siblings)
  28 siblings, 0 replies; 30+ messages in thread
From: ismail at pardus dot org dot tr @ 2008-02-06 13:34 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #11 from ismail at pardus dot org dot tr  2008-02-06 13:33 -------
(In reply to comment #10)
> I have noticed, that following text is missing from your vect dump:
> 
> Dependence tester statistics:
> Number of dependence tests: 0
> Number of dependence tests classified dependent: 0
> Number of dependence tests classified independent: 0
> Number of undetermined dependence tests: 0
> Number of subscript tests: 0
> Number of undetermined subscript tests: 0
> Number of same subscript function: 0
> Number of ziv tests: 0
> Number of ziv tests returning dependent: 0
> Number of ziv tests returning independent: 0
> Number of ziv tests unimplemented: 0
> Number of siv tests: 0
> Number of siv tests returning dependent: 0
> Number of siv tests returning independent: 0
> Number of siv tests unimplemented: 0
> Number of miv tests: 0
> Number of miv tests returning dependent: 0
> Number of miv tests returning independent: 0
> Number of miv tests unimplemented: 0

I don't why but I didn't modify the vector dump :/


-- 


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


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

* [Bug middle-end/35085] [4.3 Regression] gcc.dg/vect/vect-iv-9.c fails
  2008-02-05  7:01 [Bug middle-end/35085] New: [4.3 regression] gcc.dg/vect/vect-iv-9.c fails ismail at pardus dot org dot tr
                   ` (11 preceding siblings ...)
  2008-02-06 13:34 ` ismail at pardus dot org dot tr
@ 2008-02-06 14:03 ` ubizjak at gmail dot com
  2008-02-06 14:11 ` ubizjak at gmail dot com
                   ` (15 subsequent siblings)
  28 siblings, 0 replies; 30+ messages in thread
From: ubizjak at gmail dot com @ 2008-02-06 14:03 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #12 from ubizjak at gmail dot com  2008-02-06 14:02 -------
(In reply to comment #11)
> (In reply to comment #10)
> > I have noticed, that following text is missing from your vect dump:
>
> I don't why but I didn't modify the vector dump :/

Eh, my dump was produced with -fdump-tree-vect-all.


-- 


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


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

* [Bug middle-end/35085] [4.3 Regression] gcc.dg/vect/vect-iv-9.c fails
  2008-02-05  7:01 [Bug middle-end/35085] New: [4.3 regression] gcc.dg/vect/vect-iv-9.c fails ismail at pardus dot org dot tr
                   ` (12 preceding siblings ...)
  2008-02-06 14:03 ` ubizjak at gmail dot com
@ 2008-02-06 14:11 ` ubizjak at gmail dot com
  2008-02-06 17:02 ` ismail at pardus dot org dot tr
                   ` (14 subsequent siblings)
  28 siblings, 0 replies; 30+ messages in thread
From: ubizjak at gmail dot com @ 2008-02-06 14:11 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #13 from ubizjak at gmail dot com  2008-02-06 14:11 -------
I think that following difference is the key:

In case vectorizer is able to vecotrize, we enter vectorizer pass with:

<bb 3>:
  # ivtmp.17_1 = PHI <ivtmp.17_2(4), 26(2)>
  # i_18 = PHI <i_10(4), 0(2)>
  # s_17 = PHI <s_9(4), X_3(D)(2)>
  D.2002_7 = a[i_18];
  D.2003_8 = i_18 + D.2002_7;
  s_9 = D.2003_8 + s_17;
  i_10 = i_18 + 1;
  ivtmp.17_2 = ivtmp.17_1 - 1;
  if (ivtmp.17_2 != 0)
    goto <bb 4>;
  else
    goto <bb 5>;

and in case vectorizer is not able to vectorize (your case):

<bb 3>:
  # ivtmp.17_1 = PHI <ivtmp.17_2(4), 26(2)>
  # s_18 = PHI <s_9(4), X_3(D)(2)>
  # i_17 = PHI <i_10(4), 0(2)>
  D.2020_7 = a[i_17];
  D.2021_8 = s_18 + i_17;
  s_9 = D.2021_8 + D.2020_7;
  i_10 = i_17 + 1;
  ivtmp.17_2 = ivtmp.17_1 - 1;
  if (ivtmp.17_2 != 0)
    goto <bb 4>;
  else
    goto <bb 5>;

In success case, we have:

vect-iv-9.c:15: note: detected reduction:D.2003_8 + s_17
vect-iv-9.c:15: note: Detected reduction.

in your case, vectorizer chokes with:

vect-iv-9.c:15: note: reduction: unknown pattern.D.2021_8 + D.2020_7

I don't know, why there is a difference between my and your tree dump...


-- 


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


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

* [Bug middle-end/35085] [4.3 Regression] gcc.dg/vect/vect-iv-9.c fails
  2008-02-05  7:01 [Bug middle-end/35085] New: [4.3 regression] gcc.dg/vect/vect-iv-9.c fails ismail at pardus dot org dot tr
                   ` (13 preceding siblings ...)
  2008-02-06 14:11 ` ubizjak at gmail dot com
@ 2008-02-06 17:02 ` ismail at pardus dot org dot tr
  2008-02-06 20:56 ` [Bug tree-optimization/35085] " rguenth at gcc dot gnu dot org
                   ` (13 subsequent siblings)
  28 siblings, 0 replies; 30+ messages in thread
From: ismail at pardus dot org dot tr @ 2008-02-06 17:02 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #14 from ismail at pardus dot org dot tr  2008-02-06 17:01 -------
I tried building without BOOT_CFLAGS and such but no luck.


-- 


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


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

* [Bug tree-optimization/35085] [4.3 Regression] gcc.dg/vect/vect-iv-9.c fails
  2008-02-05  7:01 [Bug middle-end/35085] New: [4.3 regression] gcc.dg/vect/vect-iv-9.c fails ismail at pardus dot org dot tr
                   ` (14 preceding siblings ...)
  2008-02-06 17:02 ` ismail at pardus dot org dot tr
@ 2008-02-06 20:56 ` rguenth at gcc dot gnu dot org
  2008-02-06 21:00 ` rguenth at gcc dot gnu dot org
                   ` (12 subsequent siblings)
  28 siblings, 0 replies; 30+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2008-02-06 20:56 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #15 from rguenth at gcc dot gnu dot org  2008-02-06 20:55 -------
It looks like for some reason the tree-reassoc pass did different things.


-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
          Component|middle-end                  |tree-optimization
   GCC host triplet|i686-gnu-linux              |
 GCC target triplet|                            |i686-linux-gnu
           Keywords|                            |missed-optimization


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


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

* [Bug tree-optimization/35085] [4.3 Regression] gcc.dg/vect/vect-iv-9.c fails
  2008-02-05  7:01 [Bug middle-end/35085] New: [4.3 regression] gcc.dg/vect/vect-iv-9.c fails ismail at pardus dot org dot tr
                   ` (15 preceding siblings ...)
  2008-02-06 20:56 ` [Bug tree-optimization/35085] " rguenth at gcc dot gnu dot org
@ 2008-02-06 21:00 ` rguenth at gcc dot gnu dot org
  2008-02-07  0:13 ` manu at gcc dot gnu dot org
                   ` (11 subsequent siblings)
  28 siblings, 0 replies; 30+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2008-02-06 21:00 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #16 from rguenth at gcc dot gnu dot org  2008-02-06 21:00 -------
It's also very dubious, as on my native i686 machine this works for me as well.


-- 


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


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

* [Bug tree-optimization/35085] [4.3 Regression] gcc.dg/vect/vect-iv-9.c fails
  2008-02-05  7:01 [Bug middle-end/35085] New: [4.3 regression] gcc.dg/vect/vect-iv-9.c fails ismail at pardus dot org dot tr
                   ` (16 preceding siblings ...)
  2008-02-06 21:00 ` rguenth at gcc dot gnu dot org
@ 2008-02-07  0:13 ` manu at gcc dot gnu dot org
  2008-02-07  3:13 ` ismail at pardus dot org dot tr
                   ` (10 subsequent siblings)
  28 siblings, 0 replies; 30+ messages in thread
From: manu at gcc dot gnu dot org @ 2008-02-07  0:13 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #17 from manu at gcc dot gnu dot org  2008-02-07 00:12 -------
Try dropping "--enable-checking=release" from your configure. Or alternatively,
finding out on which revision it broke by doing a regression hunt. If you need
help with the latter, mail me privately and I will explain how I do it.


-- 

manu at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |manu at gcc dot gnu dot org


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


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

* [Bug tree-optimization/35085] [4.3 Regression] gcc.dg/vect/vect-iv-9.c fails
  2008-02-05  7:01 [Bug middle-end/35085] New: [4.3 regression] gcc.dg/vect/vect-iv-9.c fails ismail at pardus dot org dot tr
                   ` (17 preceding siblings ...)
  2008-02-07  0:13 ` manu at gcc dot gnu dot org
@ 2008-02-07  3:13 ` ismail at pardus dot org dot tr
  2008-02-07  4:50 ` ismail at pardus dot org dot tr
                   ` (9 subsequent siblings)
  28 siblings, 0 replies; 30+ messages in thread
From: ismail at pardus dot org dot tr @ 2008-02-07  3:13 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #18 from ismail at pardus dot org dot tr  2008-02-07 03:12 -------
I started a reghunt with 20080104 snapshot, if that fails too I am out of ideas
why this happens. But I am sure this is the second time I see this file failing
but later on its fixed so I thought it was noise.

Thank you all.


-- 


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


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

* [Bug tree-optimization/35085] [4.3 Regression] gcc.dg/vect/vect-iv-9.c fails
  2008-02-05  7:01 [Bug middle-end/35085] New: [4.3 regression] gcc.dg/vect/vect-iv-9.c fails ismail at pardus dot org dot tr
                   ` (18 preceding siblings ...)
  2008-02-07  3:13 ` ismail at pardus dot org dot tr
@ 2008-02-07  4:50 ` ismail at pardus dot org dot tr
  2008-02-07  9:02 ` ubizjak at gmail dot com
                   ` (8 subsequent siblings)
  28 siblings, 0 replies; 30+ messages in thread
From: ismail at pardus dot org dot tr @ 2008-02-07  4:50 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #19 from ismail at pardus dot org dot tr  2008-02-07 04:49 -------
Even 20080104 snapshot fails, I have no idea why this only one test fails and
all other pass though.


-- 


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


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

* [Bug tree-optimization/35085] [4.3 Regression] gcc.dg/vect/vect-iv-9.c fails
  2008-02-05  7:01 [Bug middle-end/35085] New: [4.3 regression] gcc.dg/vect/vect-iv-9.c fails ismail at pardus dot org dot tr
                   ` (19 preceding siblings ...)
  2008-02-07  4:50 ` ismail at pardus dot org dot tr
@ 2008-02-07  9:02 ` ubizjak at gmail dot com
  2008-02-07  9:06 ` ismail at pardus dot org dot tr
                   ` (7 subsequent siblings)
  28 siblings, 0 replies; 30+ messages in thread
From: ubizjak at gmail dot com @ 2008-02-07  9:02 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #20 from ubizjak at gmail dot com  2008-02-07 09:01 -------
>From the logs:

tree-reassoc in failed case transforms:

  D.2020_7 = a[i_17];
  D.2021_8 = D.2020_7 + i_17;
  s_9 = D.2021_8 + s_18;

to:

  D.2020_7 = a[i_17];
  D.2021_8 = s_18 + i_17;
  s_9 = D.2021_8 + D.2020_7;


In my case, it transforms:

  D.2002_7 = a[i_18];
  D.2003_8 = D.2002_7 + i_18;
  s_9 = D.2003_8 + s_17;

to

  D.2002_7 = a[i_18];
  D.2003_8 = i_18 + D.2002_7;
  s_9 = D.2003_8 + s_17;
  i_10 = i_18 + 1;

What happens if you add -fno-tree-reassoc to your compile flags? In my case it
still vectorizes both loops.


-- 


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


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

* [Bug tree-optimization/35085] [4.3 Regression] gcc.dg/vect/vect-iv-9.c fails
  2008-02-05  7:01 [Bug middle-end/35085] New: [4.3 regression] gcc.dg/vect/vect-iv-9.c fails ismail at pardus dot org dot tr
                   ` (20 preceding siblings ...)
  2008-02-07  9:02 ` ubizjak at gmail dot com
@ 2008-02-07  9:06 ` ismail at pardus dot org dot tr
  2008-02-07  9:38 ` ubizjak at gmail dot com
                   ` (6 subsequent siblings)
  28 siblings, 0 replies; 30+ messages in thread
From: ismail at pardus dot org dot tr @ 2008-02-07  9:06 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #21 from ismail at pardus dot org dot tr  2008-02-07 09:05 -------
 -fno-tree-reassoc fixes the problem here,

With  -fno-tree-reassoc :

vect-iv-9.c:15: note: === vect_mark_stmts_to_be_vectorized ===
vect-iv-9.c:10: note: vectorized 1 loops in function.
vect-iv-9.c:26: note: === vect_mark_stmts_to_be_vectorized ===
vect/vect-iv-9.c:22: note: vectorized 1 loops in function.

Without it :

vect-iv-9.c:15: note: === vect_mark_stmts_to_be_vectorized ===
vect-iv-9.c:15: note: not vectorized: unsupported use in stmt.
vect-iv-9.c:10: note: vectorized 0 loops in function.
vect-iv-9.c:26: note: === vect_mark_stmts_to_be_vectorized ===
vect-iv-9.c:22: note: vectorized 1 loops in function.


-- 


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


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

* [Bug tree-optimization/35085] [4.3 Regression] gcc.dg/vect/vect-iv-9.c fails
  2008-02-05  7:01 [Bug middle-end/35085] New: [4.3 regression] gcc.dg/vect/vect-iv-9.c fails ismail at pardus dot org dot tr
                   ` (21 preceding siblings ...)
  2008-02-07  9:06 ` ismail at pardus dot org dot tr
@ 2008-02-07  9:38 ` ubizjak at gmail dot com
  2008-02-07 10:21 ` rguenth at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  28 siblings, 0 replies; 30+ messages in thread
From: ubizjak at gmail dot com @ 2008-02-07  9:38 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #22 from ubizjak at gmail dot com  2008-02-07 09:37 -------
(In reply to comment #21)
>  -fno-tree-reassoc fixes the problem here,

So, what happens to reassociation that sometimes produce (working case):

Rank for D.2002_7 is 327681
Transforming D.2002_7 + i_18 into i_18 + D.2002_7;
Reassociation stats:
Linearized: 0
Constants eliminated: 0
Ops eliminated: 0
Statements rewritten: 0

and the other time (non-working case):

Rank for D.2020_7 is 327681
Transforming D.2021_8 + s_18 into D.2021_8 + D.2020_7;
Transforming D.2020_7 + i_17 into s_18 + i_17;
Reassociation stats:
Linearized: 0
Constants eliminated: 0
Ops eliminated: 0
Statements rewritten: 0


-- 


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


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

* [Bug tree-optimization/35085] [4.3 Regression] gcc.dg/vect/vect-iv-9.c fails
  2008-02-05  7:01 [Bug middle-end/35085] New: [4.3 regression] gcc.dg/vect/vect-iv-9.c fails ismail at pardus dot org dot tr
                   ` (22 preceding siblings ...)
  2008-02-07  9:38 ` ubizjak at gmail dot com
@ 2008-02-07 10:21 ` rguenth at gcc dot gnu dot org
  2008-02-07 12:40 ` ubizjak at gmail dot com
                   ` (4 subsequent siblings)
  28 siblings, 0 replies; 30+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2008-02-07 10:21 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #23 from rguenth at gcc dot gnu dot org  2008-02-07 10:20 -------
qsort with sort_by_operand_rank is unstable, as it may return zero.  But, IMHO
the vectorizer should simply recognize the other pattern as well.


-- 


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


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

* [Bug tree-optimization/35085] [4.3 Regression] gcc.dg/vect/vect-iv-9.c fails
  2008-02-05  7:01 [Bug middle-end/35085] New: [4.3 regression] gcc.dg/vect/vect-iv-9.c fails ismail at pardus dot org dot tr
                   ` (23 preceding siblings ...)
  2008-02-07 10:21 ` rguenth at gcc dot gnu dot org
@ 2008-02-07 12:40 ` ubizjak at gmail dot com
  2008-02-07 12:44 ` ismail at pardus dot org dot tr
                   ` (3 subsequent siblings)
  28 siblings, 0 replies; 30+ messages in thread
From: ubizjak at gmail dot com @ 2008-02-07 12:40 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #24 from ubizjak at gmail dot com  2008-02-07 12:39 -------
It happens that we already have specialization to detect reduction in
rewrite_expr_tree:

--cut here--
     The alternative we try is to see if this is a destructive
     update style statement, which is like:
     b = phi (a, ...)
     a = c + b;
     In that case, we want to use the destructive update form to
     expose the possible vectorizer sum reduction opportunity.
     In that case, the third operand will be the phi node.
--cut here--

We have analysed operands in working and failed case:

(working):

+++ OP1: D.2002_7
op1 rank: 327681
->not phi for stmt
+++ OP2: i_18
op2 rank: 327680
not phi for stmt
+++ OP3: s_17
op3 rank: 327680
 phi for stmt

(failed):
+++ OP1: D.2020_7
op1 rank: 327681
->not phi for stmt
+++ OP2: s_18
op2 rank: 327680
 phi for stmt
+++ OP3: i_17
op3 rank: 327680
not phi for stmt

So, according to this data, following patch should (IMO) solve this mistery:

Index: tree-ssa-reassoc.c
===================================================================
--- tree-ssa-reassoc.c  (revision 132166)
+++ tree-ssa-reassoc.c  (working copy)
@@ -857,6 +857,18 @@ rewrite_expr_tree (tree stmt, unsigned i
          oe1->op = temp.op;
          oe1->rank= temp.rank;
        }
+      else if ((oe1->rank == oe3->rank
+               && oe2->rank != oe3->rank)
+              || (is_phi_for_stmt (stmt, oe2->op)
+                  && !is_phi_for_stmt (stmt, oe1->op)
+                  && !is_phi_for_stmt (stmt, oe3->op)))
+       {
+         struct operand_entry temp = *oe2;
+         oe2->op = oe1->op;
+         oe2->rank = oe1->rank;
+         oe1->op = temp.op;
+         oe1->rank= temp.rank;
+       }
     }

   /* The final recursion case for this function is that you have


-- 


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


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

* [Bug tree-optimization/35085] [4.3 Regression] gcc.dg/vect/vect-iv-9.c fails
  2008-02-05  7:01 [Bug middle-end/35085] New: [4.3 regression] gcc.dg/vect/vect-iv-9.c fails ismail at pardus dot org dot tr
                   ` (24 preceding siblings ...)
  2008-02-07 12:40 ` ubizjak at gmail dot com
@ 2008-02-07 12:44 ` ismail at pardus dot org dot tr
  2008-02-07 12:57 ` ubizjak at gmail dot com
                   ` (2 subsequent siblings)
  28 siblings, 0 replies; 30+ messages in thread
From: ismail at pardus dot org dot tr @ 2008-02-07 12:44 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #25 from ismail at pardus dot org dot tr  2008-02-07 12:43 -------
Uros you rock! That patch fixes the problem for me, thank you!


-- 


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


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

* [Bug tree-optimization/35085] [4.3 Regression] gcc.dg/vect/vect-iv-9.c fails
  2008-02-05  7:01 [Bug middle-end/35085] New: [4.3 regression] gcc.dg/vect/vect-iv-9.c fails ismail at pardus dot org dot tr
                   ` (25 preceding siblings ...)
  2008-02-07 12:44 ` ismail at pardus dot org dot tr
@ 2008-02-07 12:57 ` ubizjak at gmail dot com
  2008-02-07 14:12 ` uros at gcc dot gnu dot org
  2008-02-07 14:16 ` ubizjak at gmail dot com
  28 siblings, 0 replies; 30+ messages in thread
From: ubizjak at gmail dot com @ 2008-02-07 12:57 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #26 from ubizjak at gmail dot com  2008-02-07 12:56 -------
Testing the patch.


-- 

ubizjak at gmail dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |ubizjak at gmail dot com
                   |dot org                     |
             Status|UNCONFIRMED                 |ASSIGNED
     Ever Confirmed|0                           |1
   Last reconfirmed|0000-00-00 00:00:00         |2008-02-07 12:56:34
               date|                            |


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


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

* [Bug tree-optimization/35085] [4.3 Regression] gcc.dg/vect/vect-iv-9.c fails
  2008-02-05  7:01 [Bug middle-end/35085] New: [4.3 regression] gcc.dg/vect/vect-iv-9.c fails ismail at pardus dot org dot tr
                   ` (26 preceding siblings ...)
  2008-02-07 12:57 ` ubizjak at gmail dot com
@ 2008-02-07 14:12 ` uros at gcc dot gnu dot org
  2008-02-07 14:16 ` ubizjak at gmail dot com
  28 siblings, 0 replies; 30+ messages in thread
From: uros at gcc dot gnu dot org @ 2008-02-07 14:12 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #27 from uros at gcc dot gnu dot org  2008-02-07 14:12 -------
Subject: Bug 35085

Author: uros
Date: Thu Feb  7 14:11:26 2008
New Revision: 132168

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=132168
Log:
        PR tree-optimization/35085
        * tree-ssa-reassoc.c (rewrite_expr_tree): Enable destructive update
        for operand entry oe2 in addition to operand entry oe3 in order to
        expose more opportunities for vectorizer sum reduction.


Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/tree-ssa-reassoc.c


-- 


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


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

* [Bug tree-optimization/35085] [4.3 Regression] gcc.dg/vect/vect-iv-9.c fails
  2008-02-05  7:01 [Bug middle-end/35085] New: [4.3 regression] gcc.dg/vect/vect-iv-9.c fails ismail at pardus dot org dot tr
                   ` (27 preceding siblings ...)
  2008-02-07 14:12 ` uros at gcc dot gnu dot org
@ 2008-02-07 14:16 ` ubizjak at gmail dot com
  28 siblings, 0 replies; 30+ messages in thread
From: ubizjak at gmail dot com @ 2008-02-07 14:16 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #28 from ubizjak at gmail dot com  2008-02-07 14:15 -------
Fixed.


-- 

ubizjak at gmail dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                URL|                            |http://gcc.gnu.org/ml/gcc-
                   |                            |patches/2008-
                   |                            |02/msg00215.html
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED


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


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

end of thread, other threads:[~2008-02-07 14:16 UTC | newest]

Thread overview: 30+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-02-05  7:01 [Bug middle-end/35085] New: [4.3 regression] gcc.dg/vect/vect-iv-9.c fails ismail at pardus dot org dot tr
2008-02-05 10:20 ` [Bug middle-end/35085] " rguenth at gcc dot gnu dot org
2008-02-05 10:21 ` ismail at pardus dot org dot tr
2008-02-05 11:53 ` ismail at pardus dot org dot tr
2008-02-05 12:36 ` rguenth at gcc dot gnu dot org
2008-02-05 12:39 ` rguenth at gcc dot gnu dot org
2008-02-05 12:39 ` ismail at pardus dot org dot tr
2008-02-05 12:44 ` [Bug middle-end/35085] [4.3 Regression] " rguenth at gcc dot gnu dot org
2008-02-05 13:21 ` ismail at pardus dot org dot tr
2008-02-05 13:21 ` ismail at pardus dot org dot tr
2008-02-06  9:35 ` ismail at pardus dot org dot tr
2008-02-06 13:33 ` ubizjak at gmail dot com
2008-02-06 13:34 ` ismail at pardus dot org dot tr
2008-02-06 14:03 ` ubizjak at gmail dot com
2008-02-06 14:11 ` ubizjak at gmail dot com
2008-02-06 17:02 ` ismail at pardus dot org dot tr
2008-02-06 20:56 ` [Bug tree-optimization/35085] " rguenth at gcc dot gnu dot org
2008-02-06 21:00 ` rguenth at gcc dot gnu dot org
2008-02-07  0:13 ` manu at gcc dot gnu dot org
2008-02-07  3:13 ` ismail at pardus dot org dot tr
2008-02-07  4:50 ` ismail at pardus dot org dot tr
2008-02-07  9:02 ` ubizjak at gmail dot com
2008-02-07  9:06 ` ismail at pardus dot org dot tr
2008-02-07  9:38 ` ubizjak at gmail dot com
2008-02-07 10:21 ` rguenth at gcc dot gnu dot org
2008-02-07 12:40 ` ubizjak at gmail dot com
2008-02-07 12:44 ` ismail at pardus dot org dot tr
2008-02-07 12:57 ` ubizjak at gmail dot com
2008-02-07 14:12 ` uros at gcc dot gnu dot org
2008-02-07 14:16 ` ubizjak at gmail dot 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).