Bug 173101 - error "unable to generate reloads" with vector builtin
error "unable to generate reloads" with vector builtin
Product: Fedora
Classification: Fedora
Component: gcc (Show other bugs)
x86_64 Linux
medium Severity medium
: ---
: ---
Assigned To: Jakub Jelinek
Depends On:
  Show dependency treegraph
Reported: 2005-11-14 00:24 EST by Paul Jakma
Modified: 2009-01-09 01:54 EST (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2009-01-09 01:54:48 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
pre-processed source that gave error (47.18 KB, application/octet-stream)
2005-11-14 00:25 EST, Paul Jakma
no flags Details
Patch that fixes the bug (742 bytes, patch)
2005-12-19 21:30 EST, Alexandre Oliva
no flags Details | Diff

  None (edit)
Description Paul Jakma 2005-11-14 00:24:34 EST
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.7.12) Gecko/20050923 Galeon/1.3.21

Description of problem:
Playing with gcc's SIMD/vector builtins, when it suddenly complained:

$ gcc -S -Os  -Wall -msse -o testv.mmx2 test.c 
test.c: In function ‘num_leading_bits’:
test.c:58: warning: unused variable ‘b’
test.c: At top level:
test.c:22: warning: ‘a’ defined but not used
test.c:23: warning: ‘b’ defined but not used
test.c: In function ‘get_common’:
test.c:125: error: unable to generate reloads for:
(insn:HI 180 178 181 5 (set (subreg:V2SI (reg:QI 0 ax [orig:182 r ] [182]) 0)
        (xor:V2SI (reg:V2SI 0 ax [176])
            (subreg:V2SI (reg/v:DI 41 r12 [orig:153 a ] [153]) 0))) 1008 {mmx_xorv2si3} (insn_list:REG_DEP_TRUE 171 (nil))
    (expr_list:REG_DEAD (reg:V2SI 0 ax [176])
test.c:125: internal compiler error: in find_reloads, at reload.c:3720
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/ccYxnIsM.out file, please attach this to your bugreport.

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

How reproducible:

Steps to Reproduce:
1. compile the pre-processed code, soon to be attached
2. gcc gives above error

Actual Results:  GCC gave me the above error and asked me to report the bug.

Additional info:
Comment 1 Paul Jakma 2005-11-14 00:25:58 EST
Created attachment 121004 [details]
pre-processed source that gave error
Comment 2 Alexandre Oliva 2005-12-19 21:30:42 EST
Created attachment 122433 [details]
Patch that fixes the bug

The insistence in only reloading QImode values into Q_REGS breaks the subreg
reload required in this case.  This patch relaxes the insistence a bit,
enabling reloading of values already in Q_REGS into other register classes.
Comment 3 Christian Iseli 2007-01-19 19:14:54 EST
This report targets the FC3 or FC4 products, which have now been EOL'd.

Could you please check that it still applies to a current Fedora release, and
either update the target product or close it ?

Comment 5 James Hogan 2007-08-30 18:44:59 EDT
I have a similar error message on fedora 7, gcc 4.1.2 20070502 when fiddling 
with the __int128_t (on x86_64), and i'm not sure if its the same problem or 
not, and whether to report it separately.

the following c program causes the error:

int main()
  __int128_t a = 0;
  return a >> 128;

the compilation error is:

bug.cpp: In function ‘int main()’:
bug.cpp:4: warning: right shift count >= width of type
bug.cpp:5: error: unable to generate reloads for:
(insn 11 10 12 0 (parallel [
            (set (reg:TI 0 ax [orig:58 D.2083 ] [58])
                (ashiftrt:TI (reg:TI 0 ax [orig:61 a ] [61])
                    (const_int -128 [0xffffffffffffff80])))
            (clobber (reg:CC 17 flags))
        ]) 428 {*ashrti3_2} (nil)
    (expr_list:REG_UNUSED (reg:CC 17 flags)
        (expr_list:REG_DEAD (reg:TI 0 ax [orig:61 a ] [61])
            (expr_list:REG_UNUSED (reg:CC 17 flags)
bug.cpp:5: internal compiler error: in find_reloads, at reload.c:3743

cheers. J
Comment 6 petrosyan 2008-03-09 16:45:27 EDT
This bug is still present in Fedora 8, gcc-4.1.2-33
Comment 7 Bug Zapper 2008-11-26 01:53:30 EST
This message is a reminder that Fedora 8 is nearing its end of life.
Approximately 30 (thirty) days from now Fedora will stop maintaining
and issuing updates for Fedora 8.  It is Fedora's policy to close all
bug reports from releases that are no longer maintained.  At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '8'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 8's end of life.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 8 is end of life.  If you 
would still like to see this bug fixed and are able to reproduce it 
against a later version of Fedora please change the 'version' of this 
bug to the applicable version.  If you are unable to change the version, 
please add a comment here and someone will do it for you.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events.  Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

The process we are following is described here: 
Comment 8 James Hogan 2008-11-26 05:13:27 EST
I am still able to reproduce the message using the short test program in my previous comment.

fedora 9 (x86_64)
gcc version 4.3.0 20080428 (Red Hat 4.3.0-8) (GCC)

can somebody update the version field to 9 please.
Comment 9 Bug Zapper 2009-01-09 01:54:48 EST
Fedora 8 changed to end-of-life (EOL) status on 2009-01-07. Fedora 8 is 
no longer maintained, which means that it will not receive any further 
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of 
Fedora please feel free to reopen this bug against that version.

Thank you for reporting this bug and we are sorry it could not be fixed.

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