public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/25212]  New: unrecognizable insn for facerec with odd optimization set
@ 2005-12-01 22:08 janis at gcc dot gnu dot org
  2005-12-01 22:09 ` [Bug target/25212] " janis at gcc dot gnu dot org
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: janis at gcc dot gnu dot org @ 2005-12-01 22:08 UTC (permalink / raw)
  To: gcc-bugs

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1631 bytes --]

Current trunk and 4.1 branch ICE on powerpc-linux compiling facerec
from SPEC CPU2000 with an admittedly odd set of options:

elm3b11% /opt/gcc-nightly/4.1/bin/gfortran -c -O2 -funroll-loops
-ftree-vectorize -maltivec -fno-ivopts -fpic fr1201.f
fr1201.f: In function ‘foo’:
fr1201.f:38: error: unrecognizable insn:
(insn 2616 288 289 28 (set (reg:SI 4 4)
        (and:SI (plus:SI (reg:SI 26 26)
                (reg:SI 0 0 [orig:141 base_off.93 ] [141]))
            (const_int -16 [0xfffffffffffffff0]))) -1 (nil)
    (nil))
fr1201.f:38: internal compiler error: in extract_insn, at recog.c:2084

The testcase compiles with GCC 4.0.2 and with the 4.0 branch.
A regression hunt identified the following patch:

http://gcc.gnu.org/viewcvs?view=rev&rev=103001

r103001 | dje | 2005-08-11 21:18:11 +0000 (Thu, 11 Aug 2005) | 6 lines

        * config/rs6000/altivec.md: Change constraint "m" to "Z".
        * config/rs6000/predicates.md (indexed_or_indirect_operand):
        Accept address wrapped in AND for Altivec.
        * config/rs6000/rs6000.c (rs6000_legitimize_reload_address):
        Strip AND wrapping offset address for Altivec.

I'll attach a minimized testcase.


-- 
           Summary: unrecognizable insn for facerec with odd optimization
                    set
           Product: gcc
           Version: 4.1.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: janis at gcc dot gnu dot org
GCC target triplet: powerpc-linux


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


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

* [Bug target/25212] unrecognizable insn for facerec with odd optimization set
  2005-12-01 22:08 [Bug target/25212] New: unrecognizable insn for facerec with odd optimization set janis at gcc dot gnu dot org
@ 2005-12-01 22:09 ` janis at gcc dot gnu dot org
  2005-12-01 22:34 ` [Bug target/25212] [4.1/4.2 Regression] " pinskia at gcc dot gnu dot org
                   ` (7 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: janis at gcc dot gnu dot org @ 2005-12-01 22:09 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from janis at gcc dot gnu dot org  2005-12-01 22:09 -------
Created an attachment (id=10385)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=10385&action=view)
minimized testcase


-- 


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


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

* [Bug target/25212] [4.1/4.2 Regression] unrecognizable insn for facerec with odd optimization set
  2005-12-01 22:08 [Bug target/25212] New: unrecognizable insn for facerec with odd optimization set janis at gcc dot gnu dot org
  2005-12-01 22:09 ` [Bug target/25212] " janis at gcc dot gnu dot org
@ 2005-12-01 22:34 ` pinskia at gcc dot gnu dot org
  2005-12-01 23:07 ` dje at gcc dot gnu dot org
                   ` (6 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-12-01 22:34 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from pinskia at gcc dot gnu dot org  2005-12-01 22:34 -------
Hmm, I would assume this is related to PR 24997.


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |ice-on-valid-code
            Summary|unrecognizable insn for     |[4.1/4.2 Regression]
                   |facerec with odd            |unrecognizable insn for
                   |optimization set            |facerec with odd
                   |                            |optimization set
   Target Milestone|---                         |4.1.0


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


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

* [Bug target/25212] [4.1/4.2 Regression] unrecognizable insn for facerec with odd optimization set
  2005-12-01 22:08 [Bug target/25212] New: unrecognizable insn for facerec with odd optimization set janis at gcc dot gnu dot org
  2005-12-01 22:09 ` [Bug target/25212] " janis at gcc dot gnu dot org
  2005-12-01 22:34 ` [Bug target/25212] [4.1/4.2 Regression] " pinskia at gcc dot gnu dot org
@ 2005-12-01 23:07 ` dje at gcc dot gnu dot org
  2005-12-01 23:15 ` janis at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: dje at gcc dot gnu dot org @ 2005-12-01 23:07 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from dje at gcc dot gnu dot org  2005-12-01 23:07 -------
Yes, I think this is the same as PR 24997.


-- 

dje at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |amodra at bigpond dot net
                   |                            |dot au


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


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

* [Bug target/25212] [4.1/4.2 Regression] unrecognizable insn for facerec with odd optimization set
  2005-12-01 22:08 [Bug target/25212] New: unrecognizable insn for facerec with odd optimization set janis at gcc dot gnu dot org
                   ` (2 preceding siblings ...)
  2005-12-01 23:07 ` dje at gcc dot gnu dot org
@ 2005-12-01 23:15 ` janis at gcc dot gnu dot org
  2005-12-02  1:22 ` amodra at bigpond dot net dot au
                   ` (4 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: janis at gcc dot gnu dot org @ 2005-12-01 23:15 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from janis at gcc dot gnu dot org  2005-12-01 23:15 -------
Except that the testcase still fails and the fix for 24997 was checked in a
few days ago.


-- 


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


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

* [Bug target/25212] [4.1/4.2 Regression] unrecognizable insn for facerec with odd optimization set
  2005-12-01 22:08 [Bug target/25212] New: unrecognizable insn for facerec with odd optimization set janis at gcc dot gnu dot org
                   ` (3 preceding siblings ...)
  2005-12-01 23:15 ` janis at gcc dot gnu dot org
@ 2005-12-02  1:22 ` amodra at bigpond dot net dot au
  2005-12-07 16:07 ` amodra at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: amodra at bigpond dot net dot au @ 2005-12-02  1:22 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from amodra at bigpond dot net dot au  2005-12-02 01:22 -------
The instruction in question looks like this after local reg alloc, both base
and index don't get a hard register.

(insn:HI 289 292 497 28 (set (reg:V4SF 137 [ vect_var_.102 ])
        (mem:V4SF (and:SI (plus:SI (reg/v/f:SI 193 [ a5 ])
                    (reg:SI 141 [ base_off.93 ]))
                (const_int -16 [0xfffffffffffffff0])) [4 S16 A128])) 628
{altivec_lvx_v4sf} (insn_list:REG_DEP_TRUE 287 (nil))
    (nil))

Global alloc decides to put reg 193 into lr..

Which reload notices as invalid:

Reloads for insn # 289
Reload 0: reload_in (SI) = (reg/v/f:SI 65 lr [orig:193 a5 ] [193])
        GENERAL_REGS, RELOAD_FOR_INPUT_ADDRESS (opnum = 1)
        reload_in_reg: (reg/v/f:SI 65 lr [orig:193 a5 ] [193])
        reload_reg_rtx: (reg:SI 26 26)

But of course the instruction doesn't have lr replaced by the time we try to
match constraints, leading to reload trying to put the whole address expression
into another reload reg.

Reload 1: reload_in (SI) = (and:SI (plus:SI (reg/v/f:SI 65 lr [orig:193 a5 ]
[193])
[snip]

The pr24997 trick of recognising non-canonical rtl generated by reload won't
work here, unfortunately.  Maybe we can look through the reloads already pushed
to decide if the address will be OK after substitution..


-- 

amodra at bigpond dot net dot au changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |amodra at bigpond dot net
                   |dot org                     |dot au
             Status|UNCONFIRMED                 |ASSIGNED
     Ever Confirmed|0                           |1
   Last reconfirmed|0000-00-00 00:00:00         |2005-12-02 01:22:52
               date|                            |


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


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

* [Bug target/25212] [4.1/4.2 Regression] unrecognizable insn for facerec with odd optimization set
  2005-12-01 22:08 [Bug target/25212] New: unrecognizable insn for facerec with odd optimization set janis at gcc dot gnu dot org
                   ` (4 preceding siblings ...)
  2005-12-02  1:22 ` amodra at bigpond dot net dot au
@ 2005-12-07 16:07 ` amodra at gcc dot gnu dot org
  2005-12-07 16:26 ` [Bug target/25212] [4.1 " pinskia at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: amodra at gcc dot gnu dot org @ 2005-12-07 16:07 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from amodra at gcc dot gnu dot org  2005-12-07 16:07 -------
Subject: Bug 25212

Author: amodra
Date: Wed Dec  7 16:07:08 2005
New Revision: 108167

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=108167
Log:
        PR target/25212
        * config/rs6000/rs6000.c (legitimate_indexed_address_p): Relax
        tests further when !strict && reload_in_progress.
        (print_operand): Check that both operands of indexed address are regs.
        (print_operand_address): Likewise.
        * config/rs6000/rs6000.h (INT_REG_OK_FOR_INDEX_P): Simplify.
        (INT_REG_OK_FOR_BASE_P): Correct.


Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/config/rs6000/rs6000.c
    trunk/gcc/config/rs6000/rs6000.h


-- 


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


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

* [Bug target/25212] [4.1 Regression] unrecognizable insn for facerec with odd optimization set
  2005-12-01 22:08 [Bug target/25212] New: unrecognizable insn for facerec with odd optimization set janis at gcc dot gnu dot org
                   ` (5 preceding siblings ...)
  2005-12-07 16:07 ` amodra at gcc dot gnu dot org
@ 2005-12-07 16:26 ` pinskia at gcc dot gnu dot org
  2005-12-12 10:03 ` amodra at gcc dot gnu dot org
  2005-12-12 10:04 ` amodra at bigpond dot net dot au
  8 siblings, 0 replies; 10+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-12-07 16:26 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #7 from pinskia at gcc dot gnu dot org  2005-12-07 16:26 -------
Fixed at least on the mainline.


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
      Known to fail|                            |4.1.0
      Known to work|                            |4.0.3 4.2.0
            Summary|[4.1/4.2 Regression]        |[4.1 Regression]
                   |unrecognizable insn for     |unrecognizable insn for
                   |facerec with odd            |facerec with odd
                   |optimization set            |optimization set


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


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

* [Bug target/25212] [4.1 Regression] unrecognizable insn for facerec with odd optimization set
  2005-12-01 22:08 [Bug target/25212] New: unrecognizable insn for facerec with odd optimization set janis at gcc dot gnu dot org
                   ` (6 preceding siblings ...)
  2005-12-07 16:26 ` [Bug target/25212] [4.1 " pinskia at gcc dot gnu dot org
@ 2005-12-12 10:03 ` amodra at gcc dot gnu dot org
  2005-12-12 10:04 ` amodra at bigpond dot net dot au
  8 siblings, 0 replies; 10+ messages in thread
From: amodra at gcc dot gnu dot org @ 2005-12-12 10:03 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #8 from amodra at gcc dot gnu dot org  2005-12-12 10:02 -------
Subject: Bug 25212

Author: amodra
Date: Mon Dec 12 10:02:51 2005
New Revision: 108400

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=108400
Log:
        PR target/25212
        * config/rs6000/rs6000.c (legitimate_indexed_address_p): Allow pattern
        generated by reload.
        (print_operand): Check that both operands of indexed address are regs.
        (print_operand_address): Likewise.
        * config/rs6000/rs6000.h (INT_REG_OK_FOR_INDEX_P): Simplify.
        (INT_REG_OK_FOR_BASE_P): Correct.
        * config/rs6000/predicates.md (indexed_or_indirect_operand): Use
        indexed_or_indirect_address.
        (indexed_or_indirect_address): Don't test for base reg.  Call
        address_operand last.  Make it a special predicate.


Modified:
    branches/gcc-4_1-branch/gcc/ChangeLog
    branches/gcc-4_1-branch/gcc/config/rs6000/predicates.md
    branches/gcc-4_1-branch/gcc/config/rs6000/rs6000.c
    branches/gcc-4_1-branch/gcc/config/rs6000/rs6000.h


-- 


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


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

* [Bug target/25212] [4.1 Regression] unrecognizable insn for facerec with odd optimization set
  2005-12-01 22:08 [Bug target/25212] New: unrecognizable insn for facerec with odd optimization set janis at gcc dot gnu dot org
                   ` (7 preceding siblings ...)
  2005-12-12 10:03 ` amodra at gcc dot gnu dot org
@ 2005-12-12 10:04 ` amodra at bigpond dot net dot au
  8 siblings, 0 replies; 10+ messages in thread
From: amodra at bigpond dot net dot au @ 2005-12-12 10:04 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #9 from amodra at bigpond dot net dot au  2005-12-12 10:04 -------
Fixed.  Patch applied to 4.1 combines mainline pr24997 fix + mainline pr25212
fix.


-- 

amodra at bigpond dot net dot au changed:

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


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


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

end of thread, other threads:[~2005-12-12 10:04 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-12-01 22:08 [Bug target/25212] New: unrecognizable insn for facerec with odd optimization set janis at gcc dot gnu dot org
2005-12-01 22:09 ` [Bug target/25212] " janis at gcc dot gnu dot org
2005-12-01 22:34 ` [Bug target/25212] [4.1/4.2 Regression] " pinskia at gcc dot gnu dot org
2005-12-01 23:07 ` dje at gcc dot gnu dot org
2005-12-01 23:15 ` janis at gcc dot gnu dot org
2005-12-02  1:22 ` amodra at bigpond dot net dot au
2005-12-07 16:07 ` amodra at gcc dot gnu dot org
2005-12-07 16:26 ` [Bug target/25212] [4.1 " pinskia at gcc dot gnu dot org
2005-12-12 10:03 ` amodra at gcc dot gnu dot org
2005-12-12 10:04 ` amodra at bigpond dot net dot au

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