Bug 134368 - Altivec compilation on PPC64 produces "Internal compiler error in extract_insn"
Altivec compilation on PPC64 produces "Internal compiler error in extract_insn"
Product: Red Hat Enterprise Linux 3
Classification: Red Hat
Component: gcc (Show other bugs)
powerpc Linux
medium Severity medium
: ---
: ---
Assigned To: Jakub Jelinek
Depends On:
  Show dependency treegraph
Reported: 2004-10-01 14:38 EDT by Kyle Ellrott
Modified: 2007-11-30 17:07 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2004-12-21 16:02:06 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
test case (847.77 KB, application/x-tar)
2004-10-05 17:33 EDT, Richard Henderson
no flags Details
PR 11591 patch (1.24 KB, patch)
2004-10-25 17:18 EDT, Jakub Jelinek
no flags Details | Diff

  None (edit)
Description Kyle Ellrott 2004-10-01 14:38:48 EDT
Description of problem:

Altivec compilation error on code from the gromacs molecular dynamic
program (www.gromacs.org)
I'm working on making gromacs compile with Altivec support on the
Redhat PPC 64-bit system (a IBM JS20), with Redhat AS 3.  I'm
compiling the software as a 32-bit application currently.

I've isolated the troubled code to two files, that when compiled
produce the error message:

inner_altivec.c: In function `transpose_4_to_3':
inner_altivec.c:18900: unrecognizable insn:
(insn 8 6 110 (set (reg:V4SF 115)
        (mem/f:V4SF (plus:SI (reg/f:SI 67 ap)
                (const_int 8 [0x8])) [0 xyz3+0 S16 A128])) -1 (nil)
inner_altivec.c:18900: Internal compiler error in extract_insn, at
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://bugzilla.redhat.com/bugzilla/> for instructions.
Preprocessed source stored into /tmp/ccg7o9a8.out file, please attach
this to your bugreport.


I've placed the preprocessed file produced, as well as the .c and .h
file,  and a shell script to call gcc at

Version-Release number of selected component (if applicable):

gcc-3.2.3-42  PPC (Redhat AS 3 update 3 standard compiler, with 64-bit
libraries installed)

How reproducible:

I've been able to isoloate the offending code, it is included in the
tar file found at http://csbl.bmb.uga.edu/~kellrott/altivec_bug.tar.gz

Steps to Reproduce:
1. Download file from http://csbl.bmb.uga.edu/~kellrott/altivec_bug.tar.gz
2. decompress and run ./test.sh

Actual results:
The proprocessed file is included.

Additional info:
This same peice of code compiles fine in Apple's branch of the gcc.
Comment 1 Richard Henderson 2004-10-05 17:33:27 EDT
Created attachment 104808 [details]
test case
Comment 2 Kyle Ellrott 2004-10-08 12:40:40 EDT
The code seems to compile correctly against standard GCC 3.4.2 (source
compile, not a Redhat RPM). 
( Although the #if !defined(__VEC__) || !defined(__ALTIVEC__)
 doesn't catch in 3.4.2 like is did in 3.2.3, GCC probably added both
definitions in.  Fixed this by simply commenting the line (and
including the altivec.h file by default) ).  

The same code fails in gcc-3.2.3 (even with commented #if line).  Can
probably assume the bug was fixed in between gcc-3.2.3 and gcc-3.4.2.
Comment 3 Jakub Jelinek 2004-10-25 08:36:38 EDT
Simplified testcase:
#define vector __attribute__ ((vector_size (16)))
extern int f ();
foo (vector float a, vector float b, vector float c, vector float *d)
  *d = (vector float)
       __builtin_altivec_vmrghw ((vector signed int) a,
                                 (vector signed int) b);
Comment 4 Jakub Jelinek 2004-10-25 17:18:08 EDT
Created attachment 105753 [details]
PR 11591 patch

This patch seems to fix this problem for me.
Comment 5 Jakub Jelinek 2004-10-26 13:38:33 EDT
Should be fixed in gcc-3.2.3-47.
Comment 6 John Flanagan 2004-12-21 16:02:06 EST
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on the solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.


Note You need to log in before you can comment on or make changes to this bug.