From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 58017385B804; Fri, 22 Apr 2022 02:33:15 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 58017385B804 From: "linkw at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/105334] [12 Regression] ICE in curr_insn_transform, at lra-constraints.cc:4168 (error: unable to generate reloads) Date: Fri, 22 Apr 2022 02:33:15 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: target X-Bugzilla-Version: 12.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: linkw at gcc dot gnu.org X-Bugzilla-Status: REOPENED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: segher at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Apr 2022 02:33:15 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D105334 --- Comment #5 from Kewen Lin --- 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 a= s: $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 #include #include #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, beca= use 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 =3D pow (2.0, 60); double low =3D 2.0; LDOUBLE a =3D ((LDOUBLE) high) + ((LDOUBLE) low); double x0 =3D UNPACK (a, 0); double x1 =3D UNPACK (a, 1); LDOUBLE b =3D PACK (x0, x1); LDOUBLE c =3D 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.=