From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 847013858D37; Thu, 20 Apr 2023 08:34:58 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 847013858D37 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1681979698; bh=x0qpySavQaUtR4FIwkRg3aYJychTs+O5X8BWPhSiNms=; h=From:To:Subject:Date:From; b=WxeLTF54MszDd01fVk8hOTB/ESh1y2fSUxdcnzsn2DzvJc08PI5jKdt0mX5UObhMt 54qC3nPJ83Jn7upOZ2EbQ8vHCTMclfmfqMXYzr13V57ONk3xRvpIvcO0jz/6muzMwD vv20QdOJf2frMPHkoRXJiSyDs5Lo3YAdgruHFM1U= From: "sebastian.huber@embedded-brains.de" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/109566] New: powerpc: unrecognizable insn for -mcpu=e6500 Date: Thu, 20 Apr 2023 08:34:54 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: target X-Bugzilla-Version: 13.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: sebastian.huber@embedded-brains.de X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone Message-ID: 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 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D109566 Bug ID: 109566 Summary: powerpc: unrecognizable insn for -mcpu=3De6500 Product: gcc Version: 13.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: target Assignee: unassigned at gcc dot gnu.org Reporter: sebastian.huber@embedded-brains.de Target Milestone: --- Consider the following test case: typedef int __int32_t; typedef unsigned int __uint32_t; typedef union { double value; struct { __uint32_t msw; __uint32_t lsw; } parts; } ieee_double_shape_type; double __ieee754_fmod(double x, double y) { __int32_t n,hx,hy,hz,ix,iy,sx,i; __uint32_t lx,ly,lz; do { ieee_double_shape_type ew_u; ew_u.value =3D (x); (hx) =3D ew_u.parts.= msw; (lx) =3D ew_u.parts.lsw; } while (0); sx =3D hx&0x80000000; hx ^=3Dsx; if(hx<=3Dhy) { } if(hx<0x00100000) { if(hx=3D=3D0) { for (ix =3D -1043, i=3Dlx; i>0; i<<=3D1) ix -=3D1; } } else ix =3D (hx>>20)-1023; if(ix >=3D -1022) hx =3D 0x00100000|(0x000fffff&hx); while(hx<0x00100000) { if(n<=3D20) { } } } This yields: powerpc-rtems6-gcc -O2 -mcpu=3De6500 -c test.c test.c: In function '__ieee754_fmod': test.c:32:1: error: unrecognizable insn: 32 | } | ^ (insn 52 8 53 2 (parallel [ (set (reg:CC 100 0) (compare:CC (and:DI (ashift:DI (reg:DI 9 9 [123]) (const_int 33 [0x21])) (const_int -9007199254740992 [0xffe0000000000000])) (const_int 0 [0]))) (clobber (reg:DI 9 9 [129])) ]) "test.c":21:4 -1 (nil)) during RTL pass: split2 test.c:32:1: internal compiler error: in extract_insn, at recog.cc:2791 0x40730a _fatal_insn(char const*, rtx_def const*, char const*, int, char const*) /home/EB/sebastian_h/src/gcc/gcc/rtl-error.cc:108 0x407329 _fatal_insn_not_found(rtx_def const*, char const*, int, char const= *) /home/EB/sebastian_h/src/gcc/gcc/rtl-error.cc:116 0x957477 extract_insn(rtx_insn*) /home/EB/sebastian_h/src/gcc/gcc/recog.cc:2791 0x9574d1 extract_insn_cached(rtx_insn*) /home/EB/sebastian_h/src/gcc/gcc/recog.cc:2680 0x6a9a0b cleanup_subreg_operands(rtx_insn*) /home/EB/sebastian_h/src/gcc/gcc/final.cc:3054 0x95583c split_insn /home/EB/sebastian_h/src/gcc/gcc/recog.cc:3420 0x95a5b2 split_all_insns() /home/EB/sebastian_h/src/gcc/gcc/recog.cc:3488 0x95a6c8 execute /home/EB/sebastian_h/src/gcc/gcc/recog.cc:4412 Please submit a full bug report, with preprocessed source (by using -freport-bug). Please include the complete backtrace with any bug report. See for instructions.=