public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/105334] New: [12 Regression] ICE in curr_insn_transform,  at lra-constraints.cc:4168 (error: unable to generate reloads)
@ 2022-04-21 13:07 asolokha at gmx dot com
  2022-04-21 18:02 ` [Bug target/105334] " segher at gcc dot gnu.org
                   ` (10 more replies)
  0 siblings, 11 replies; 12+ messages in thread
From: asolokha at gmx dot com @ 2022-04-21 13:07 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 105334
           Summary: [12 Regression] ICE in curr_insn_transform, at
                    lra-constraints.cc:4168 (error: unable to generate
                    reloads)
           Product: gcc
           Version: 12.0
            Status: UNCONFIRMED
          Keywords: accepts-invalid, ice-on-invalid-code
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: asolokha at gmx dot com
                CC: bergner at gcc dot gnu.org, linkw at gcc dot gnu.org,
                    segher at gcc dot gnu.org
  Target Milestone: ---
            Target: powerpc-*-linux-gnu

gcc 12.0.1 20220417 snapshot (g:000c1b89d259fadb466e1f2e63c79da45fd17372) ICEs
when compiling the following testcase, reduced from
gcc/testsuite/gcc.target/powerpc/pack02.c, w/ -mcpu=401:

long double
foo (void)
{
  return __builtin_pack_longdouble (1.0, 1.0);
}

% powerpc-e300c3-linux-gnu-gcc-12.0.1 -mcpu=401 -c eqozx4uz.c
eqozx4uz.c: In function 'foo':
eqozx4uz.c:5:1: error: unable to generate reloads for:
    5 | }
      | ^
(insn 7 6 10 2 (set (reg:TF 117 [ _1 ])
        (unspec:TF [
                (reg:DF 119)
                (reg:DF 120)
            ] UNSPEC_PACK_128BIT)) "eqozx4uz.c":4:10 1070 {packtf}
     (expr_list:REG_DEAD (reg:DF 120)
        (expr_list:REG_DEAD (reg:DF 119)
            (nil))))
during RTL pass: reload
eqozx4uz.c:5:1: internal compiler error: in curr_insn_transform, at
lra-constraints.cc:4168
0x690c51 _fatal_insn(char const*, rtx_def const*, char const*, int, char
const*)
       
/var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-12.0.1_p20220417/work/gcc-12-20220417/gcc/rtl-error.cc:108
0x66b2b7 curr_insn_transform
       
/var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-12.0.1_p20220417/work/gcc-12-20220417/gcc/lra-constraints.cc:4168
0xc9a615 lra_constraints(bool)
       
/var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-12.0.1_p20220417/work/gcc-12-20220417/gcc/lra-constraints.cc:5203
0xc848ba lra(_IO_FILE*)
       
/var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-12.0.1_p20220417/work/gcc-12-20220417/gcc/lra.cc:2375
0xc3b989 do_reload
       
/var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-12.0.1_p20220417/work/gcc-12-20220417/gcc/ira.cc:5940
0xc3b989 execute
       
/var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-12.0.1_p20220417/work/gcc-12-20220417/gcc/ira.cc:6126

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

* [Bug target/105334] [12 Regression] ICE in curr_insn_transform, at lra-constraints.cc:4168 (error: unable to generate reloads)
  2022-04-21 13:07 [Bug target/105334] New: [12 Regression] ICE in curr_insn_transform, at lra-constraints.cc:4168 (error: unable to generate reloads) asolokha at gmx dot com
@ 2022-04-21 18:02 ` segher at gcc dot gnu.org
  2022-04-21 18:05 ` segher at gcc dot gnu.org
                   ` (9 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: segher at gcc dot gnu.org @ 2022-04-21 18:02 UTC (permalink / raw)
  To: gcc-bugs

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

Segher Boessenkool <segher at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |DUPLICATE
             Status|UNCONFIRMED                 |RESOLVED
           Keywords|accepts-invalid,            |
                   |ice-on-invalid-code         |

--- Comment #1 from Segher Boessenkool <segher at gcc dot gnu.org> ---
Dup of PR103623.

*** This bug has been marked as a duplicate of bug 103623 ***

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

* [Bug target/105334] [12 Regression] ICE in curr_insn_transform, at lra-constraints.cc:4168 (error: unable to generate reloads)
  2022-04-21 13:07 [Bug target/105334] New: [12 Regression] ICE in curr_insn_transform, at lra-constraints.cc:4168 (error: unable to generate reloads) asolokha at gmx dot com
  2022-04-21 18:02 ` [Bug target/105334] " segher at gcc dot gnu.org
@ 2022-04-21 18:05 ` segher at gcc dot gnu.org
  2022-04-21 22:54 ` segher at gcc dot gnu.org
                   ` (8 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: segher at gcc dot gnu.org @ 2022-04-21 18:05 UTC (permalink / raw)
  To: gcc-bugs

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

Segher Boessenkool <segher at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Last reconfirmed|                            |2022-04-21
         Resolution|DUPLICATE                   |---
     Ever confirmed|0                           |1
             Status|RESOLVED                    |REOPENED

--- Comment #2 from Segher Boessenkool <segher at gcc dot gnu.org> ---
It actually still ICEs?  Huh.

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

* [Bug target/105334] [12 Regression] ICE in curr_insn_transform, at lra-constraints.cc:4168 (error: unable to generate reloads)
  2022-04-21 13:07 [Bug target/105334] New: [12 Regression] ICE in curr_insn_transform, at lra-constraints.cc:4168 (error: unable to generate reloads) asolokha at gmx dot com
  2022-04-21 18:02 ` [Bug target/105334] " segher at gcc dot gnu.org
  2022-04-21 18:05 ` segher at gcc dot gnu.org
@ 2022-04-21 22:54 ` segher at gcc dot gnu.org
  2022-04-21 23:50 ` segher at gcc dot gnu.org
                   ` (7 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: segher at gcc dot gnu.org @ 2022-04-21 22:54 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from Segher Boessenkool <segher at gcc dot gnu.org> ---
Oh duh, this is pack, not unpack.  I see the problem now.

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

* [Bug target/105334] [12 Regression] ICE in curr_insn_transform, at lra-constraints.cc:4168 (error: unable to generate reloads)
  2022-04-21 13:07 [Bug target/105334] New: [12 Regression] ICE in curr_insn_transform, at lra-constraints.cc:4168 (error: unable to generate reloads) asolokha at gmx dot com
                   ` (2 preceding siblings ...)
  2022-04-21 22:54 ` segher at gcc dot gnu.org
@ 2022-04-21 23:50 ` segher at gcc dot gnu.org
  2022-04-22  2:33 ` linkw at gcc dot gnu.org
                   ` (6 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: segher at gcc dot gnu.org @ 2022-04-21 23:50 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from Segher Boessenkool <segher at gcc dot gnu.org> ---
Created attachment 52849
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=52849&action=edit
proposed patch

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

* [Bug target/105334] [12 Regression] ICE in curr_insn_transform, at lra-constraints.cc:4168 (error: unable to generate reloads)
  2022-04-21 13:07 [Bug target/105334] New: [12 Regression] ICE in curr_insn_transform, at lra-constraints.cc:4168 (error: unable to generate reloads) asolokha at gmx dot com
                   ` (3 preceding siblings ...)
  2022-04-21 23:50 ` segher at gcc dot gnu.org
@ 2022-04-22  2:33 ` linkw at gcc dot gnu.org
  2022-04-22  5:58 ` rguenth at gcc dot gnu.org
                   ` (5 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: linkw at gcc dot gnu.org @ 2022-04-22  2:33 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #5 from Kewen Lin <linkw at gcc dot gnu.org> ---
Oops, sorry that I just verified the original case in PR103623 previously,
missed to find it doesn't have pack bif.

Maybe we could add one test case to cover both unpack and pack ICEs, such as:

$cat gcc/testsuite/gcc.target/powerpc/pr105334.c

/* { dg-skip-if "" { powerpc*-*-darwin* } } */
/* { dg-options "-mlong-double-128 -msoft-float" } */

/* Verify there is no ICE.  */

#include <stddef.h>
#include <stdlib.h>
#include <math.h>

#if defined(__LONG_DOUBLE_IEEE128__)
/* If long double is IEEE 128-bit, we need to use the __ibm128 type instead of
   long double, and to use the appropriate pack/unpack routines.  We can't use
   __ibm128 on systems that don't support IEEE 128-bit floating point, because
   the type is not enabled on those systems.  */
#define PACK __builtin_pack_ibm128
#define UNPACK __builtin_unpack_ibm128
#define LDOUBLE __ibm128

#elif defined(__LONG_DOUBLE_IBM128__)
#define PACK __builtin_pack_longdouble
#define UNPACK __builtin_unpack_longdouble
#define LDOUBLE long double

#else
#error "long double must be either IBM 128-bit or IEEE 128-bit"
#endif

extern LDOUBLE bar (LDOUBLE);

int
main (void)
{
  double high = pow (2.0, 60);
  double low = 2.0;
  LDOUBLE a = ((LDOUBLE) high) + ((LDOUBLE) low);
  double x0 = UNPACK (a, 0);
  double x1 = UNPACK (a, 1);
  LDOUBLE b = PACK (x0, x1);
  LDOUBLE c = bar (b);

  return c > a;
}

-------

I confirmed this case will ICE if without Segher's proposed patch and even also
reverted Segher's r12-8091.

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

* [Bug target/105334] [12 Regression] ICE in curr_insn_transform, at lra-constraints.cc:4168 (error: unable to generate reloads)
  2022-04-21 13:07 [Bug target/105334] New: [12 Regression] ICE in curr_insn_transform, at lra-constraints.cc:4168 (error: unable to generate reloads) asolokha at gmx dot com
                   ` (4 preceding siblings ...)
  2022-04-22  2:33 ` linkw at gcc dot gnu.org
@ 2022-04-22  5:58 ` rguenth at gcc dot gnu.org
  2022-04-22 19:29 ` cvs-commit at gcc dot gnu.org
                   ` (4 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: rguenth at gcc dot gnu.org @ 2022-04-22  5:58 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |12.0

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

* [Bug target/105334] [12 Regression] ICE in curr_insn_transform, at lra-constraints.cc:4168 (error: unable to generate reloads)
  2022-04-21 13:07 [Bug target/105334] New: [12 Regression] ICE in curr_insn_transform, at lra-constraints.cc:4168 (error: unable to generate reloads) asolokha at gmx dot com
                   ` (5 preceding siblings ...)
  2022-04-22  5:58 ` rguenth at gcc dot gnu.org
@ 2022-04-22 19:29 ` cvs-commit at gcc dot gnu.org
  2022-04-22 19:54 ` segher at gcc dot gnu.org
                   ` (3 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2022-04-22 19:29 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #6 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Segher Boessenkool <segher@gcc.gnu.org>:

https://gcc.gnu.org/g:4938888ae1a1680e2aebf394d8fe80faad745bc7

commit r12-8226-g4938888ae1a1680e2aebf394d8fe80faad745bc7
Author: Segher Boessenkool <segher@kernel.crashing.org>
Date:   Fri Apr 22 15:45:00 2022 +0000

    rs6000: Fix pack for soft-float (PR105334)

    For PR103623 I fixed unpack, but pack is broken as well, as reported in
    PR105334.  Fixing that is a bit more code, but it is pretty simple code
    nonetheless.

    2022-04-22  Segher Boessenkool  <segher@kernel.crashing.org>

            PR target/105334
            * config/rs6000/rs6000.md (pack<mode> for FMOVE128): New expander.
            (pack<mode> for FMOVE128): Rename and split the insn_and_split
to...
            (pack<mode>_hard for FMOVE128): ... this...
            (pack<mode>_soft for FMOVE128): ... and this.

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

* [Bug target/105334] [12 Regression] ICE in curr_insn_transform, at lra-constraints.cc:4168 (error: unable to generate reloads)
  2022-04-21 13:07 [Bug target/105334] New: [12 Regression] ICE in curr_insn_transform, at lra-constraints.cc:4168 (error: unable to generate reloads) asolokha at gmx dot com
                   ` (6 preceding siblings ...)
  2022-04-22 19:29 ` cvs-commit at gcc dot gnu.org
@ 2022-04-22 19:54 ` segher at gcc dot gnu.org
  2022-04-26  8:46 ` [Bug target/105334] " jakub at gcc dot gnu.org
                   ` (2 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: segher at gcc dot gnu.org @ 2022-04-22 19:54 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #7 from Segher Boessenkool <segher at gcc dot gnu.org> ---
Should be fixed now.  Testcase for this and PR103623 forthcoming, leaving
this PR open until then.

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

* [Bug target/105334] ICE in curr_insn_transform, at lra-constraints.cc:4168 (error: unable to generate reloads)
  2022-04-21 13:07 [Bug target/105334] New: [12 Regression] ICE in curr_insn_transform, at lra-constraints.cc:4168 (error: unable to generate reloads) asolokha at gmx dot com
                   ` (7 preceding siblings ...)
  2022-04-22 19:54 ` segher at gcc dot gnu.org
@ 2022-04-26  8:46 ` jakub at gcc dot gnu.org
  2022-04-28  3:35 ` cvs-commit at gcc dot gnu.org
  2022-04-28  3:39 ` linkw at gcc dot gnu.org
  10 siblings, 0 replies; 12+ messages in thread
From: jakub at gcc dot gnu.org @ 2022-04-26  8:46 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jakub at gcc dot gnu.org
            Summary|[12 Regression] ICE in      |ICE in curr_insn_transform,
                   |curr_insn_transform, at     |at lra-constraints.cc:4168
                   |lra-constraints.cc:4168     |(error: unable to generate
                   |(error: unable to generate  |reloads)
                   |reloads)                    |

--- Comment #8 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Dropping regression marker because the regression is fixed, just testcase
hasn't been added, which shouldn't be a release blocker.

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

* [Bug target/105334] ICE in curr_insn_transform, at lra-constraints.cc:4168 (error: unable to generate reloads)
  2022-04-21 13:07 [Bug target/105334] New: [12 Regression] ICE in curr_insn_transform, at lra-constraints.cc:4168 (error: unable to generate reloads) asolokha at gmx dot com
                   ` (8 preceding siblings ...)
  2022-04-26  8:46 ` [Bug target/105334] " jakub at gcc dot gnu.org
@ 2022-04-28  3:35 ` cvs-commit at gcc dot gnu.org
  2022-04-28  3:39 ` linkw at gcc dot gnu.org
  10 siblings, 0 replies; 12+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2022-04-28  3:35 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #9 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Kewen Lin <linkw@gcc.gnu.org>:

https://gcc.gnu.org/g:84c1c9b013faf8cdac31db3f6612bd9d5f70ddb3

commit r12-8296-g84c1c9b013faf8cdac31db3f6612bd9d5f70ddb3
Author: Kewen Lin <linkw@linux.ibm.com>
Date:   Wed Apr 27 22:34:27 2022 -0500

    testsuite: Add test case for pack/unpack bifs at soft-float [PR105334]

    This patch is to add the test coverage for the two recent fixes
    r12-8091 and r12-8226 from Segher, aix is skipped since it takes
    soft-float and long-double-128 incompatible.

            PR target/105334

    gcc/testsuite/ChangeLog:

            * gcc.target/powerpc/pr105334.c: New test.

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

* [Bug target/105334] ICE in curr_insn_transform, at lra-constraints.cc:4168 (error: unable to generate reloads)
  2022-04-21 13:07 [Bug target/105334] New: [12 Regression] ICE in curr_insn_transform, at lra-constraints.cc:4168 (error: unable to generate reloads) asolokha at gmx dot com
                   ` (9 preceding siblings ...)
  2022-04-28  3:35 ` cvs-commit at gcc dot gnu.org
@ 2022-04-28  3:39 ` linkw at gcc dot gnu.org
  10 siblings, 0 replies; 12+ messages in thread
From: linkw at gcc dot gnu.org @ 2022-04-28  3:39 UTC (permalink / raw)
  To: gcc-bugs

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

Kewen Lin <linkw at gcc dot gnu.org> changed:

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

--- Comment #10 from Kewen Lin <linkw at gcc dot gnu.org> ---
Should be fixed.

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

end of thread, other threads:[~2022-04-28  3:39 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-21 13:07 [Bug target/105334] New: [12 Regression] ICE in curr_insn_transform, at lra-constraints.cc:4168 (error: unable to generate reloads) asolokha at gmx dot com
2022-04-21 18:02 ` [Bug target/105334] " segher at gcc dot gnu.org
2022-04-21 18:05 ` segher at gcc dot gnu.org
2022-04-21 22:54 ` segher at gcc dot gnu.org
2022-04-21 23:50 ` segher at gcc dot gnu.org
2022-04-22  2:33 ` linkw at gcc dot gnu.org
2022-04-22  5:58 ` rguenth at gcc dot gnu.org
2022-04-22 19:29 ` cvs-commit at gcc dot gnu.org
2022-04-22 19:54 ` segher at gcc dot gnu.org
2022-04-26  8:46 ` [Bug target/105334] " jakub at gcc dot gnu.org
2022-04-28  3:35 ` cvs-commit at gcc dot gnu.org
2022-04-28  3:39 ` linkw 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).