public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/99070] New: ICE in extract_constrain_insn, at recog.c:2670
@ 2021-02-11  8:25 marxin at gcc dot gnu.org
  2021-02-11  8:26 ` [Bug target/99070] " marxin at gcc dot gnu.org
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: marxin at gcc dot gnu.org @ 2021-02-11  8:25 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99070

            Bug ID: 99070
           Summary: ICE in extract_constrain_insn, at recog.c:2670
           Product: gcc
           Version: 11.0
            Status: UNCONFIRMED
          Keywords: ice-on-valid-code
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: marxin at gcc dot gnu.org
                CC: bergner at gcc dot gnu.org, segher at gcc dot gnu.org
  Target Milestone: ---
              Host: x86_64-linux-gnu
            Target: ppc64-linux-gnu

The following fails:

$ gcc /home/marxin/Programming/gcc/gcc/testsuite/g++.dg/asan/pr95025.C -Og
-fpack-struct -mpower10-fusion-ld-cmpi -mpower10-fusion -c
/home/marxin/Programming/gcc/gcc/testsuite/g++.dg/asan/pr95025.C: In function
‘int i(f*)’:
/home/marxin/Programming/gcc/gcc/testsuite/g++.dg/asan/pr95025.C:22:1: error:
insn does not satisfy its constraints:
   22 | }
      | ^
(insn 35 7 36 2 (set (reg/f:DI 9 9 [orig:117 _1 ] [117])
        (mem/f:DI (plus:DI (reg/v/f:DI 3 3 [orig:120 j ] [120])
                (const_int 1 [0x1])) [1 j_6(D)->g+0 S8 A8]))
"/home/marxin/Programming/gcc/gcc/testsuite/g++.dg/asan/pr95025.C":16:5 649
{*movdi_internal64}
     (nil))
during RTL pass: cprop_hardreg
/home/marxin/Programming/gcc/gcc/testsuite/g++.dg/asan/pr95025.C:22:1: internal
compiler error: in extract_constrain_insn, at recog.c:2670
0x5f5003 _fatal_insn(char const*, rtx_def const*, char const*, int, char
const*)
       
/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-trunk-ppc64/build/gcc/rtl-error.c:108
0x5f5029 _fatal_insn_not_found(rtx_def const*, char const*, int, char const*)
       
/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-trunk-ppc64/build/gcc/rtl-error.c:118
0x5f4492 extract_constrain_insn(rtx_insn*)
       
/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-trunk-ppc64/build/gcc/recog.c:2670
0xc06d5c copyprop_hardreg_forward_1
       
/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-trunk-ppc64/build/gcc/regcprop.c:831
0xc07bdd execute
       
/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-trunk-ppc64/build/gcc/regcprop.c:1396
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.

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

* [Bug target/99070] ICE in extract_constrain_insn, at recog.c:2670
  2021-02-11  8:25 [Bug target/99070] New: ICE in extract_constrain_insn, at recog.c:2670 marxin at gcc dot gnu.org
@ 2021-02-11  8:26 ` marxin at gcc dot gnu.org
  2021-02-11 10:02 ` jakub at gcc dot gnu.org
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: marxin at gcc dot gnu.org @ 2021-02-11  8:26 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99070

Martin Liška <marxin at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |11.0
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2021-02-11
     Ever confirmed|0                           |1

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

* [Bug target/99070] ICE in extract_constrain_insn, at recog.c:2670
  2021-02-11  8:25 [Bug target/99070] New: ICE in extract_constrain_insn, at recog.c:2670 marxin at gcc dot gnu.org
  2021-02-11  8:26 ` [Bug target/99070] " marxin at gcc dot gnu.org
@ 2021-02-11 10:02 ` jakub at gcc dot gnu.org
  2021-02-11 13:57 ` rguenth at gcc dot gnu.org
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: jakub at gcc dot gnu.org @ 2021-02-11 10:02 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99070

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |acsawdey at gcc dot gnu.org,
                   |                            |jakub at gcc dot gnu.org

--- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
ICEs since r11-6940-g7a279bed24e1b2a628767a60a20f3dcf6f1088cb when the
-mpower10-fusion and -mpower10-fusion-ld-cmpi options were added.

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

* [Bug target/99070] ICE in extract_constrain_insn, at recog.c:2670
  2021-02-11  8:25 [Bug target/99070] New: ICE in extract_constrain_insn, at recog.c:2670 marxin at gcc dot gnu.org
  2021-02-11  8:26 ` [Bug target/99070] " marxin at gcc dot gnu.org
  2021-02-11 10:02 ` jakub at gcc dot gnu.org
@ 2021-02-11 13:57 ` rguenth at gcc dot gnu.org
  2021-02-11 19:26 ` acsawdey at gcc dot gnu.org
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: rguenth at gcc dot gnu.org @ 2021-02-11 13:57 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99070

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|11.0                        |---

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

* [Bug target/99070] ICE in extract_constrain_insn, at recog.c:2670
  2021-02-11  8:25 [Bug target/99070] New: ICE in extract_constrain_insn, at recog.c:2670 marxin at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2021-02-11 13:57 ` rguenth at gcc dot gnu.org
@ 2021-02-11 19:26 ` acsawdey at gcc dot gnu.org
  2021-02-11 19:30 ` jakub at gcc dot gnu.org
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: acsawdey at gcc dot gnu.org @ 2021-02-11 19:26 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99070

acsawdey at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Assignee|unassigned at gcc dot gnu.org      |acsawdey at gcc dot gnu.org

--- Comment #2 from acsawdey at gcc dot gnu.org ---
What are the build flags for this compiler?

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

* [Bug target/99070] ICE in extract_constrain_insn, at recog.c:2670
  2021-02-11  8:25 [Bug target/99070] New: ICE in extract_constrain_insn, at recog.c:2670 marxin at gcc dot gnu.org
                   ` (3 preceding siblings ...)
  2021-02-11 19:26 ` acsawdey at gcc dot gnu.org
@ 2021-02-11 19:30 ` jakub at gcc dot gnu.org
  2021-02-11 19:56 ` acsawdey at gcc dot gnu.org
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: jakub at gcc dot gnu.org @ 2021-02-11 19:30 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99070

--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
In my case (it was a cross-compiler from x86_64-linux)
../configure --target powerpc64-linux-gnu --disable-bootstrap
--enable-languages=c,c++,fortran,lto

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

* [Bug target/99070] ICE in extract_constrain_insn, at recog.c:2670
  2021-02-11  8:25 [Bug target/99070] New: ICE in extract_constrain_insn, at recog.c:2670 marxin at gcc dot gnu.org
                   ` (4 preceding siblings ...)
  2021-02-11 19:30 ` jakub at gcc dot gnu.org
@ 2021-02-11 19:56 ` acsawdey at gcc dot gnu.org
  2021-03-09  2:50 ` cvs-commit at gcc dot gnu.org
  2021-03-09  2:51 ` acsawdey at gcc dot gnu.org
  7 siblings, 0 replies; 9+ messages in thread
From: acsawdey at gcc dot gnu.org @ 2021-02-11 19:56 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99070

--- Comment #4 from acsawdey at gcc dot gnu.org ---
OK, I see the fail with -mcpu=power9. Looks like I botched something with
addressing and allowed D-form addresses when it should be DS-form. On power10
this would result in selection of a prefix D-form load, which then causes the
ld-cmpi to be split. On anything previous we just ICE.

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

* [Bug target/99070] ICE in extract_constrain_insn, at recog.c:2670
  2021-02-11  8:25 [Bug target/99070] New: ICE in extract_constrain_insn, at recog.c:2670 marxin at gcc dot gnu.org
                   ` (5 preceding siblings ...)
  2021-02-11 19:56 ` acsawdey at gcc dot gnu.org
@ 2021-03-09  2:50 ` cvs-commit at gcc dot gnu.org
  2021-03-09  2:51 ` acsawdey at gcc dot gnu.org
  7 siblings, 0 replies; 9+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-03-09  2:50 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99070

--- Comment #5 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Aaron Sawdey <acsawdey@gcc.gnu.org>:

https://gcc.gnu.org/g:9433c844c8bcf0166567943b45576ceeeee0b131

commit r11-7570-g9433c844c8bcf0166567943b45576ceeeee0b131
Author: Aaron Sawdey <acsawdey@linux.ibm.com>
Date:   Sun Mar 7 14:47:31 2021 -0600

    Tighten predicates for p10 ld/cmpi fusion

    PR99070 is caused by a fusion pattern matching that the individual
    instructions do not match when it is split later. In this case the
    ld+cmpi patterns were allowing a d-form load address, which the split
    condition would rightly split, however that left us with something that
    could not be matched by a ds-form ld instruction, hence the ICE. This
    only happened if the target cpu was not power10 -- if we were targeting
    power10 then a prefixed pld instruction would get generated because that
    can handle d-form. However this is not optimal code either.

    So the solution is a new predicate (ds_form_mem_operand) that only
    accepts what we can take as for a ds-form load. Then a small
    modification of the genfusion.pl script changes the relevant
    ld+cmpi patterns to use the new predicate.

    gcc/ChangeLog

            PR target/99070
            * config/rs6000/predicates.md (ds_form_mem_operand) New
            predicate.
            * config/rs6000/genfusion.pl (gen_ld_cmpi_p10) Use
            ds_form_mem_operand in ld/lwa patterns.
            * config/rs6000/fusion.md: Regenerate file.

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

* [Bug target/99070] ICE in extract_constrain_insn, at recog.c:2670
  2021-02-11  8:25 [Bug target/99070] New: ICE in extract_constrain_insn, at recog.c:2670 marxin at gcc dot gnu.org
                   ` (6 preceding siblings ...)
  2021-03-09  2:50 ` cvs-commit at gcc dot gnu.org
@ 2021-03-09  2:51 ` acsawdey at gcc dot gnu.org
  7 siblings, 0 replies; 9+ messages in thread
From: acsawdey at gcc dot gnu.org @ 2021-03-09  2:51 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99070

acsawdey at gcc dot gnu.org changed:

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

--- Comment #6 from acsawdey at gcc dot gnu.org ---
Fixed in trunk.

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

end of thread, other threads:[~2021-03-09  2:51 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-11  8:25 [Bug target/99070] New: ICE in extract_constrain_insn, at recog.c:2670 marxin at gcc dot gnu.org
2021-02-11  8:26 ` [Bug target/99070] " marxin at gcc dot gnu.org
2021-02-11 10:02 ` jakub at gcc dot gnu.org
2021-02-11 13:57 ` rguenth at gcc dot gnu.org
2021-02-11 19:26 ` acsawdey at gcc dot gnu.org
2021-02-11 19:30 ` jakub at gcc dot gnu.org
2021-02-11 19:56 ` acsawdey at gcc dot gnu.org
2021-03-09  2:50 ` cvs-commit at gcc dot gnu.org
2021-03-09  2:51 ` acsawdey at gcc dot gnu.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).