public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug optimization/14110] New: altivec code misoptimized with any -O
@ 2004-02-11 14:13 lu_zero at gentoo dot org
  2004-02-11 14:26 ` [Bug optimization/14110] " lu_zero at gentoo dot org
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: lu_zero at gentoo dot org @ 2004-02-11 14:13 UTC (permalink / raw)
  To: gcc-bugs

that problem happens while building libavicodec's idct_altivec.c.
I restricted the issue inq the idct_add_altivec() function.

the code is usually built with 
"-O4 -mcpu=7450 -mtune=7450 -maltivec -mabi=altivec -pipe -ffast-math
-fomit-frame-pointer" and with gcc-3.2.3 produces correct code.

if I change it removing -O4 and not putting any other -O (tested -O2 and -O1)
the result is a fully working code.

-- 
           Summary: altivec code misoptimized with any -O
           Product: gcc
           Version: 3.3.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: optimization
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: lu_zero at gentoo dot org
                CC: gcc-bugs at gcc dot gnu dot org
  GCC host triplet: powerpc-unknown-linux-gnu
GCC target triplet: powerpc-unknown-linux-gnu


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


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

* [Bug optimization/14110] altivec code misoptimized with any -O
  2004-02-11 14:13 [Bug optimization/14110] New: altivec code misoptimized with any -O lu_zero at gentoo dot org
@ 2004-02-11 14:26 ` lu_zero at gentoo dot org
  2004-02-11 16:46 ` pinskia at gcc dot gnu dot org
                   ` (7 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: lu_zero at gentoo dot org @ 2004-02-11 14:26 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From lu_zero at gentoo dot org  2004-02-11 14:25 -------
Created an attachment (id=5724)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=5724&action=view)
Preprocessed source


-- 


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


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

* [Bug optimization/14110] altivec code misoptimized with any -O
  2004-02-11 14:13 [Bug optimization/14110] New: altivec code misoptimized with any -O lu_zero at gentoo dot org
  2004-02-11 14:26 ` [Bug optimization/14110] " lu_zero at gentoo dot org
@ 2004-02-11 16:46 ` pinskia at gcc dot gnu dot org
  2004-02-11 17:15 ` lu_zero at gentoo dot org
                   ` (6 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-02-11 16:46 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-02-11 16:46 -------
Can you provide the non-preprocessed source as looking to the preprocessed source for altivec is a 
pain?

-- 


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


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

* [Bug optimization/14110] altivec code misoptimized with any -O
  2004-02-11 14:13 [Bug optimization/14110] New: altivec code misoptimized with any -O lu_zero at gentoo dot org
  2004-02-11 14:26 ` [Bug optimization/14110] " lu_zero at gentoo dot org
  2004-02-11 16:46 ` pinskia at gcc dot gnu dot org
@ 2004-02-11 17:15 ` lu_zero at gentoo dot org
  2004-03-15 12:10 ` khalek at linuxgamers dot net
                   ` (5 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: lu_zero at gentoo dot org @ 2004-02-11 17:15 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From lu_zero at gentoo dot org  2004-02-11 17:15 -------
Created an attachment (id=5725)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=5725&action=view)
source


-- 


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


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

* [Bug optimization/14110] altivec code misoptimized with any -O
  2004-02-11 14:13 [Bug optimization/14110] New: altivec code misoptimized with any -O lu_zero at gentoo dot org
                   ` (2 preceding siblings ...)
  2004-02-11 17:15 ` lu_zero at gentoo dot org
@ 2004-03-15 12:10 ` khalek at linuxgamers dot net
  2004-03-15 12:14 ` khalek at linuxgamers dot net
                   ` (4 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: khalek at linuxgamers dot net @ 2004-03-15 12:10 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From khalek at linuxgamers dot net  2004-03-15 12:10 -------
I have something similiar when attempting to build mpegvideo_altivec.c from ffmpeg. 

The following command always gives an ICE:
gcc -Wall  -maltivec -mabi=altivec -g -O3 -DHAVE_AV_CONFIG_H -I..
-D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_GNU_SOURCE -c -o
ppc/mpegvideo_altivec.o ppc/mpegvideo_altivec.c

Only when dropping -O entirely does it compile.

Output when adding -v and -save-tempts is as follows:

Reading specs from /usr/lib/gcc-lib/powerpc-linux/3.3.3/specs
Configured with: ../src/configure -v
--enable-languages=c,c++,java,f77,pascal,objc,ada --prefix=/usr
--mandir=/usr/share/man --infodir=/usr/share/info
--with-gxx-include-dir=/usr/include/c++/3.3 --enable-shared --with-system-zlib
--enable-nls --without-included-gettext --enable-__cxa_atexit
--enable-clocale=gnu --enable-java-gc=boehm --enable-java-awt=xlib
--enable-objc-gc --disable-multilib powerpc-linux
Thread model: posix
gcc version 3.3.3 (Debian 20040306)
 /usr/lib/gcc-lib/powerpc-linux/3.3.3/cc1 -E -quiet -v -I.. -D__GNUC__=3
-D__GNUC_MINOR__=3 -D__GNUC_PATCHLEVEL__=3 -D__unix__ -D__gnu_linux__
-D__linux__ -Dunix -D__unix -Dlinux -D__linux -Asystem=unix -Asystem=posix
-DHAVE_AV_CONFIG_H -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_GNU_SOURCE
ppc/mpegvideo_altivec.c -maltivec -mabi=altivec -Wall -O3 mpegvideo_altivec.i
ignoring nonexistent directory "/usr/powerpc-linux/include"
#include "..." search starts here:
#include <...> search starts here:
 ..
 /usr/local/include
 /usr/lib/gcc-lib/powerpc-linux/3.3.3/include
 /usr/include
End of search list.
 /usr/lib/gcc-lib/powerpc-linux/3.3.3/cc1 -fpreprocessed mpegvideo_altivec.i
-quiet -dumpbase mpegvideo_altivec.c -maltivec -mabi=altivec -auxbase-strip
ppc/mpegvideo_altivec.o -g -O3 -Wall -version -o mpegvideo_altivec.s
GNU C version 3.3.3 (Debian 20040306) (powerpc-linux)
        compiled by GNU C version 3.3.3 (Debian 20040306).
GGC heuristics: --param ggc-min-expand=72 --param ggc-min-heapsize=80312
ppc/mpegvideo_altivec.c: In function `dct_quantize_altivec':
ppc/mpegvideo_altivec.c:516: internal compiler error: in
add_location_or_const_value_attribute, at dwarf2out.c:9496
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.

-- 


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


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

* [Bug optimization/14110] altivec code misoptimized with any -O
  2004-02-11 14:13 [Bug optimization/14110] New: altivec code misoptimized with any -O lu_zero at gentoo dot org
                   ` (3 preceding siblings ...)
  2004-03-15 12:10 ` khalek at linuxgamers dot net
@ 2004-03-15 12:14 ` khalek at linuxgamers dot net
  2004-03-15 14:19 ` pinskia at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: khalek at linuxgamers dot net @ 2004-03-15 12:14 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From khalek at linuxgamers dot net  2004-03-15 12:14 -------
Created an attachment (id=5919)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=5919&action=view)
Preprocessed source


-- 


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


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

* [Bug optimization/14110] altivec code misoptimized with any -O
  2004-02-11 14:13 [Bug optimization/14110] New: altivec code misoptimized with any -O lu_zero at gentoo dot org
                   ` (4 preceding siblings ...)
  2004-03-15 12:14 ` khalek at linuxgamers dot net
@ 2004-03-15 14:19 ` pinskia at gcc dot gnu dot org
  2004-10-11 10:45 ` [Bug rtl-optimization/14110] " giovannibajo at libero dot it
                   ` (2 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-03-15 14:19 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-03-15 14:19 -------
Jonathan Gray,
Your bug is that 3.3.3 did not have a patch to fix that ICE, it has been fixed already in 3.3.4.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |khalek at linuxgamers dot
                   |                            |net


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


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

* [Bug rtl-optimization/14110] altivec code misoptimized with any -O
  2004-02-11 14:13 [Bug optimization/14110] New: altivec code misoptimized with any -O lu_zero at gentoo dot org
                   ` (5 preceding siblings ...)
  2004-03-15 14:19 ` pinskia at gcc dot gnu dot org
@ 2004-10-11 10:45 ` giovannibajo at libero dot it
  2004-10-11 17:16 ` lu_zero at gentoo dot org
  2004-10-11 17:20 ` pinskia at gcc dot gnu dot org
  8 siblings, 0 replies; 10+ messages in thread
From: giovannibajo at libero dot it @ 2004-10-11 10:45 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From giovannibajo at libero dot it  2004-10-11 10:45 -------
Lu Zero, I'm revisiting this bug report. The testcase you provided cannot be 
executed to check for the miscompilation, which makes it very difficult for us 
to check for the problem.

Would you please provide a testcase with a main() invoking idc_add_altivec() 
with some valid parameters, and aborting if the result is incorrect (assuming 
it does not crash right way because of the miscompilation)?

Thanks

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |giovannibajo at libero dot
                   |                            |it
             Status|UNCONFIRMED                 |WAITING


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


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

* [Bug rtl-optimization/14110] altivec code misoptimized with any -O
  2004-02-11 14:13 [Bug optimization/14110] New: altivec code misoptimized with any -O lu_zero at gentoo dot org
                   ` (6 preceding siblings ...)
  2004-10-11 10:45 ` [Bug rtl-optimization/14110] " giovannibajo at libero dot it
@ 2004-10-11 17:16 ` lu_zero at gentoo dot org
  2004-10-11 17:20 ` pinskia at gcc dot gnu dot org
  8 siblings, 0 replies; 10+ messages in thread
From: lu_zero at gentoo dot org @ 2004-10-11 17:16 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From lu_zero at gentoo dot org  2004-10-11 17:16 -------
Fixed at least on gcc-3.4.x and in the hammer branch.
gcc-3.3.4 should have other problems (I didn't check yet)

the best way to check about the problem works is just use mplayer or ffplay...

-- 


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


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

* [Bug rtl-optimization/14110] altivec code misoptimized with any -O
  2004-02-11 14:13 [Bug optimization/14110] New: altivec code misoptimized with any -O lu_zero at gentoo dot org
                   ` (7 preceding siblings ...)
  2004-10-11 17:16 ` lu_zero at gentoo dot org
@ 2004-10-11 17:20 ` pinskia at gcc dot gnu dot org
  8 siblings, 0 replies; 10+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-10-11 17:20 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-10-11 17:20 -------
Fixed so closing.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|WAITING                     |RESOLVED
         Resolution|                            |FIXED
   Target Milestone|---                         |3.4.0


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


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

end of thread, other threads:[~2004-10-11 17:20 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-02-11 14:13 [Bug optimization/14110] New: altivec code misoptimized with any -O lu_zero at gentoo dot org
2004-02-11 14:26 ` [Bug optimization/14110] " lu_zero at gentoo dot org
2004-02-11 16:46 ` pinskia at gcc dot gnu dot org
2004-02-11 17:15 ` lu_zero at gentoo dot org
2004-03-15 12:10 ` khalek at linuxgamers dot net
2004-03-15 12:14 ` khalek at linuxgamers dot net
2004-03-15 14:19 ` pinskia at gcc dot gnu dot org
2004-10-11 10:45 ` [Bug rtl-optimization/14110] " giovannibajo at libero dot it
2004-10-11 17:16 ` lu_zero at gentoo dot org
2004-10-11 17:20 ` pinskia at gcc dot gnu dot org

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).