From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id CC6F9385802B; Mon, 1 Aug 2022 22:09:25 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org CC6F9385802B From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/106481] [13 Regression] ICE: in native_encode_rtx, at simplify-rtx.cc:6884 with -O2 -fno-dce -fno-forward-propagate -fno-rerun-cse-after-loop Date: Mon, 01 Aug 2022 22:09:25 +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: 13.0 X-Bugzilla-Keywords: ice-on-valid-code X-Bugzilla-Severity: normal X-Bugzilla-Who: cvs-commit at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: roger at nextmovesoftware dot com X-Bugzilla-Target-Milestone: 13.0 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: Mon, 01 Aug 2022 22:09:25 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D106481 --- Comment #3 from CVS Commits --- The master branch has been updated by Roger Sayle : https://gcc.gnu.org/g:96e5f6696a1fa90493c464884984e9f1de86d817 commit r13-1920-g96e5f6696a1fa90493c464884984e9f1de86d817 Author: Roger Sayle Date: Mon Aug 1 23:08:23 2022 +0100 PR target/106481: Handle CONST_WIDE_INT in REG_EQUAL during STV on x86_= 64. This patch resolves PR target/106481, and is an oversight in my recent battles with REG_EQUAL notes during TImode STV (see PR target/106278 https://gcc.gnu.org/pipermail/gcc-patches/2022-July/598416.html). The patch above's/current behaviour is that we check that the mode of the REG_EQUAL note is TImode before using PUT_MODE to set it to V1TImod= e. However, the new test case reveals that this doesn't consider REG_EQUAL notes that are CONST_INT or CONST_WIDE_INT, i.e. that are VOIDmode, and so STV produces: (insn 85 84 86 2 (set (reg:V1TI 113) (reg:V1TI 84)) "pr106481.c":13:3 1766 {movv1ti_internal} (expr_list:REG_EQUAL (const_wide_int 0x0ffffffff00000004) (nil))) which causes problems as the const_wide_int isn't a valid immediate constant for V1TImode. With this patch, we now generate the correct: (insn 85 84 86 2 (set (reg:V1TI 113) (reg:V1TI 84)) "pr106481.c":13:3 1766 {movv1ti_internal} (expr_list:REG_EQUAL (const_vector:V1TI [ (const_wide_int 0x0ffffffff00000004) ]) (nil))) 2022-08-01 Roger Sayle Uro=C3=85=C2=A1 Bizjak gcc/ChangeLog PR target/106481 * config/i386/i386-features.cc (timode_scalar_chain::convert_in= sn): Convert a CONST_SCALAR_INT_P in a REG_EQUAL note into a V1TImode CONST_VECTOR. gcc/testsuite/ChangeLog PR target/106481 * gcc.target/i386/pr106481.c: New test case.=