public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/113720] New: [14 Regression] internal compiler error: in extract_insn, at recog.cc:2812 targeting alpha-linux-gnu
@ 2024-02-02 13:18 doko at gcc dot gnu.org
  2024-02-02 14:01 ` [Bug target/113720] " ubizjak at gmail dot com
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: doko at gcc dot gnu.org @ 2024-02-02 13:18 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 113720
           Summary: [14 Regression] internal compiler error: in
                    extract_insn, at recog.cc:2812 targeting
                    alpha-linux-gnu
           Product: gcc
           Version: 14.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: doko at gcc dot gnu.org
  Target Milestone: ---

Created attachment 57291
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=57291&action=edit
preprocessed source

[There is PR113615, but I was asked to file a separate issue]

works with 20240129, fails with 20240201 on alpha-linux-gnu

// gcc version 14.0.1 20240131 (experimental) [master r14-8680-g2f14c0dbb78]
(Debian 14-20240201-3) 
// 
// ../../../../../src/libstdc++-v3/src/c++17/floating_to_chars.cc: In function
'std::to_chars_result std::__floating_to_chars_shortest(char*, char*, T,
chars_format) [with T = double]':
// ../../../../../src/libstdc++-v3/src/c++17/floating_to_chars.cc:1306:3:
error: unrecognizable insn:
//  1306 |   }
//       |   ^
// (insn 712 711 713 22 (set (reg:DI 686 [ highparttmp_857 ])
//         (truncate:DI (lshiftrt:TI (mult:TI (zero_extend:TI (subreg:DI
(reg:TI 223 [ _319 ]) 0))
//                     (subreg:DI (reg:TI 225 [ _321 ]) 0))
//                 (const_int 64 [0x40]))))
"../../../../../src/libstdc++-v3/src/c++17/ryu/d2s_intrinsics.h":254:27 -1
//      (nil))
// during RTL pass: vregs
// ../../../../../src/libstdc++-v3/src/c++17/floating_to_chars.cc:1306:3:
internal compiler error: in extract_insn, at recog.cc:2812
// 0x7b030c _fatal_insn(char const*, rtx_def const*, char const*, int, char
const*)
//      ../../src/gcc/rtl-error.cc:108
// 0x7b0328 _fatal_insn_not_found(rtx_def const*, char const*, int, char
const*)
//      ../../src/gcc/rtl-error.cc:116
// 0x7aed6e extract_insn(rtx_insn*)
//      ../../src/gcc/recog.cc:2812
// 0xe44cd5 instantiate_virtual_regs_in_insn
//      ../../src/gcc/function.cc:1611
// 0xe44cd5 instantiate_virtual_regs
//      ../../src/gcc/function.cc:1994
// 0xe44cd5 execute
//      ../../src/gcc/function.cc:2041
// Please submit a full bug report, with preprocessed source (by using
-freport-bug).
// Please include the complete backtrace with any bug report.

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

* [Bug target/113720] [14 Regression] internal compiler error: in extract_insn, at recog.cc:2812 targeting alpha-linux-gnu
  2024-02-02 13:18 [Bug target/113720] New: [14 Regression] internal compiler error: in extract_insn, at recog.cc:2812 targeting alpha-linux-gnu doko at gcc dot gnu.org
@ 2024-02-02 14:01 ` ubizjak at gmail dot com
  2024-02-02 14:55 ` jsm28 at gcc dot gnu.org
                   ` (7 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: ubizjak at gmail dot com @ 2024-02-02 14:01 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #1 from Uroš Bizjak <ubizjak at gmail dot com> ---
Created attachment 57292
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=57292&action=edit
Patch that introduces umul_highpart RTX

Please try the attached (untested) patch.

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

* [Bug target/113720] [14 Regression] internal compiler error: in extract_insn, at recog.cc:2812 targeting alpha-linux-gnu
  2024-02-02 13:18 [Bug target/113720] New: [14 Regression] internal compiler error: in extract_insn, at recog.cc:2812 targeting alpha-linux-gnu doko at gcc dot gnu.org
  2024-02-02 14:01 ` [Bug target/113720] " ubizjak at gmail dot com
@ 2024-02-02 14:55 ` jsm28 at gcc dot gnu.org
  2024-02-02 18:38 ` roger at nextmovesoftware dot com
                   ` (6 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: jsm28 at gcc dot gnu.org @ 2024-02-02 14:55 UTC (permalink / raw)
  To: gcc-bugs

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

Joseph S. Myers <jsm28 at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jsm28 at gcc dot gnu.org,
                   |                            |sayle at gcc dot gnu.org
             Status|UNCONFIRMED                 |NEW
   Target Milestone|---                         |14.0
   Last reconfirmed|                            |2024-02-02
     Ever confirmed|0                           |1

--- Comment #2 from Joseph S. Myers <jsm28 at gcc dot gnu.org> ---
Introduced by:

commit 2f14c0dbb789852947cb58fdf7d3162413f053fa
Author: Roger Sayle <roger@nextmovesoftware.com>
Date:   Thu Feb 1 06:10:42 2024 +0000

    PR target/113560: Enhance is_widening_mult_rhs_p.

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

* [Bug target/113720] [14 Regression] internal compiler error: in extract_insn, at recog.cc:2812 targeting alpha-linux-gnu
  2024-02-02 13:18 [Bug target/113720] New: [14 Regression] internal compiler error: in extract_insn, at recog.cc:2812 targeting alpha-linux-gnu doko at gcc dot gnu.org
  2024-02-02 14:01 ` [Bug target/113720] " ubizjak at gmail dot com
  2024-02-02 14:55 ` jsm28 at gcc dot gnu.org
@ 2024-02-02 18:38 ` roger at nextmovesoftware dot com
  2024-02-03  9:28 ` doko at gcc dot gnu.org
                   ` (5 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: roger at nextmovesoftware dot com @ 2024-02-02 18:38 UTC (permalink / raw)
  To: gcc-bugs

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

Roger Sayle <roger at nextmovesoftware dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |roger at nextmovesoftware dot com

--- Comment #3 from Roger Sayle <roger at nextmovesoftware dot com> ---
Sorry for the inconvenience.  alpha.md's define_expand that creates RTL that
contains a MULT with operands of different modes looks highly suspicious. 
Uros' patch to use the (relatively recently added) UMUL_HIGHPART rtx_code is
certainly a step in the right direction.

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

* [Bug target/113720] [14 Regression] internal compiler error: in extract_insn, at recog.cc:2812 targeting alpha-linux-gnu
  2024-02-02 13:18 [Bug target/113720] New: [14 Regression] internal compiler error: in extract_insn, at recog.cc:2812 targeting alpha-linux-gnu doko at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2024-02-02 18:38 ` roger at nextmovesoftware dot com
@ 2024-02-03  9:28 ` doko at gcc dot gnu.org
  2024-02-03  9:54 ` ubizjak at gmail dot com
                   ` (4 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: doko at gcc dot gnu.org @ 2024-02-03  9:28 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from Matthias Klose <doko at gcc dot gnu.org> ---
Uros proposed patch lets the build succeed.

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

* [Bug target/113720] [14 Regression] internal compiler error: in extract_insn, at recog.cc:2812 targeting alpha-linux-gnu
  2024-02-02 13:18 [Bug target/113720] New: [14 Regression] internal compiler error: in extract_insn, at recog.cc:2812 targeting alpha-linux-gnu doko at gcc dot gnu.org
                   ` (3 preceding siblings ...)
  2024-02-03  9:28 ` doko at gcc dot gnu.org
@ 2024-02-03  9:54 ` ubizjak at gmail dot com
  2024-02-03 13:20 ` doko at gcc dot gnu.org
                   ` (3 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: ubizjak at gmail dot com @ 2024-02-03  9:54 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #5 from Uroš Bizjak <ubizjak at gmail dot com> ---
(In reply to Matthias Klose from comment #4)
> Uros proposed patch lets the build succeed.

FTR, the problem was in umuldi3_highpart expander, which did:

   if (REG_P (operands[2]))
     operands[2] = gen_rtx_ZERO_EXTEND (TImode, operands[2]);

on register_operand predicate, which also allows SUBREG RTX. So, subregs were
emitted without ZERO_EXTEND RTX.

But nowadays we have UMUL_HIGHPART that allows us to fix this issue while also
simplifying the instruction RTX.

Matthias, can you please run the regression check - The fix is kind of obvious,
but just to be sure.

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

* [Bug target/113720] [14 Regression] internal compiler error: in extract_insn, at recog.cc:2812 targeting alpha-linux-gnu
  2024-02-02 13:18 [Bug target/113720] New: [14 Regression] internal compiler error: in extract_insn, at recog.cc:2812 targeting alpha-linux-gnu doko at gcc dot gnu.org
                   ` (4 preceding siblings ...)
  2024-02-03  9:54 ` ubizjak at gmail dot com
@ 2024-02-03 13:20 ` doko at gcc dot gnu.org
  2024-02-12 10:36 ` jakub at gcc dot gnu.org
                   ` (2 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: doko at gcc dot gnu.org @ 2024-02-03 13:20 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #6 from Matthias Klose <doko at gcc dot gnu.org> ---
will do, but cannot do that before next week.

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

* [Bug target/113720] [14 Regression] internal compiler error: in extract_insn, at recog.cc:2812 targeting alpha-linux-gnu
  2024-02-02 13:18 [Bug target/113720] New: [14 Regression] internal compiler error: in extract_insn, at recog.cc:2812 targeting alpha-linux-gnu doko at gcc dot gnu.org
                   ` (5 preceding siblings ...)
  2024-02-03 13:20 ` doko at gcc dot gnu.org
@ 2024-02-12 10:36 ` jakub at gcc dot gnu.org
  2024-03-03 19:42 ` cvs-commit at gcc dot gnu.org
  2024-03-03 19:44 ` ubizjak at gmail dot com
  8 siblings, 0 replies; 10+ messages in thread
From: jakub at gcc dot gnu.org @ 2024-02-12 10:36 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jakub at gcc dot gnu.org
           Priority|P3                          |P4

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

* [Bug target/113720] [14 Regression] internal compiler error: in extract_insn, at recog.cc:2812 targeting alpha-linux-gnu
  2024-02-02 13:18 [Bug target/113720] New: [14 Regression] internal compiler error: in extract_insn, at recog.cc:2812 targeting alpha-linux-gnu doko at gcc dot gnu.org
                   ` (6 preceding siblings ...)
  2024-02-12 10:36 ` jakub at gcc dot gnu.org
@ 2024-03-03 19:42 ` cvs-commit at gcc dot gnu.org
  2024-03-03 19:44 ` ubizjak at gmail dot com
  8 siblings, 0 replies; 10+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2024-03-03 19:42 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #7 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Uros Bizjak <uros@gcc.gnu.org>:

https://gcc.gnu.org/g:318e0d44fe66ade59edb16a94565b3bfdc1883c6

commit r14-9282-g318e0d44fe66ade59edb16a94565b3bfdc1883c6
Author: Uros Bizjak <ubizjak@gmail.com>
Date:   Sun Mar 3 20:40:45 2024 +0100

    alpha: Introduce UMUL_HIGHPART rtx_code [PR113720]

    umuldi3_highpart expander does:

       if (REG_P (operands[2]))
         operands[2] = gen_rtx_ZERO_EXTEND (TImode, operands[2]);

    on register_operand predicate, which also allows SUBREG RTX. So,
    subregs were emitted without ZERO_EXTEND RTX.

    But nowadays we have UMUL_HIGHPART that allows us to fix this
    issue while also simplifying the instruction RTX.

            PR target/113720

    gcc/ChangeLog:

            * config/alpha/alpha.md (umuldi3_highpart): Remove expander.
            (*umuldi3_highpart_reg): Rename to umuldi3_highpart and
            simplify insn RTX using UMUL_HIGHPART rtx_code.
            (*umuldi3_highpart_const): Remove.

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

* [Bug target/113720] [14 Regression] internal compiler error: in extract_insn, at recog.cc:2812 targeting alpha-linux-gnu
  2024-02-02 13:18 [Bug target/113720] New: [14 Regression] internal compiler error: in extract_insn, at recog.cc:2812 targeting alpha-linux-gnu doko at gcc dot gnu.org
                   ` (7 preceding siblings ...)
  2024-03-03 19:42 ` cvs-commit at gcc dot gnu.org
@ 2024-03-03 19:44 ` ubizjak at gmail dot com
  8 siblings, 0 replies; 10+ messages in thread
From: ubizjak at gmail dot com @ 2024-03-03 19:44 UTC (permalink / raw)
  To: gcc-bugs

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

Uroš Bizjak <ubizjak at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |FIXED
           Assignee|unassigned at gcc dot gnu.org      |ubizjak at gmail dot com
             Status|NEW                         |RESOLVED

--- Comment #8 from Uroš Bizjak <ubizjak at gmail dot com> ---
Assuming fixed, please reopen if not.

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

end of thread, other threads:[~2024-03-03 19:44 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-02 13:18 [Bug target/113720] New: [14 Regression] internal compiler error: in extract_insn, at recog.cc:2812 targeting alpha-linux-gnu doko at gcc dot gnu.org
2024-02-02 14:01 ` [Bug target/113720] " ubizjak at gmail dot com
2024-02-02 14:55 ` jsm28 at gcc dot gnu.org
2024-02-02 18:38 ` roger at nextmovesoftware dot com
2024-02-03  9:28 ` doko at gcc dot gnu.org
2024-02-03  9:54 ` ubizjak at gmail dot com
2024-02-03 13:20 ` doko at gcc dot gnu.org
2024-02-12 10:36 ` jakub at gcc dot gnu.org
2024-03-03 19:42 ` cvs-commit at gcc dot gnu.org
2024-03-03 19:44 ` ubizjak at gmail dot com

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