From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id CC084385828E; Wed, 7 Feb 2024 14:22:23 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org CC084385828E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1707315743; bh=ty+iPta45NIbgYztfPs+IEZfy83So0tjcTlEsHRcU/U=; h=From:To:Subject:Date:In-Reply-To:References:From; b=DkbczdrjD39sl6nir9T8SGEmI4vOHOKYlEFCamCpOfKDZQ4SNjOU0qBYVpBBwHn7u KlTRYI6UPsqLVbekJ6KfzPuIQ2C0GlxlroJAl+ksd6OckfMu6DWGwi/EyJKx+iZ/Vc 1j40elTEcRJxyxQnXg2PS6KPE5ngnQf3yjibTeWk= From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/113690] [13/14 Regression] ICE: in as_a, at machmode.h:381 with -O2 -fno-dce -fno-forward-propagate -fno-split-wide-types -funroll-loops Date: Wed, 07 Feb 2024 14:22:22 +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: 14.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: P2 X-Bugzilla-Assigned-To: roger at nextmovesoftware dot com X-Bugzilla-Target-Milestone: 13.3 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 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D113690 --- Comment #5 from GCC Commits --- The master branch has been updated by Roger Sayle : https://gcc.gnu.org/g:99200573096c03120c8d4514383951acecdd5ab1 commit r14-8868-g99200573096c03120c8d4514383951acecdd5ab1 Author: Roger Sayle Date: Wed Feb 7 14:21:34 2024 +0000 PR target/113690: Remove TImode REG_EQUAL notes in STV. This patch fixes PR target/113690, an ICE-on-valid regression on x86_64 that exhibits with a specific combination of command line options. The cause is that x86's scalar-to-vector pass converts a chain of instructi= ons from TImode to V1TImode, but fails to appropriately update or delete the attached REG_EQUAL note. This implements Uros' recommendation of remov= ing these notes. For convenience, this code (re)factors the logic to conve= rt a TImode constant into a V1TImode constant vector into a subroutine and reuses it. For the record, STV is actually doing something useful in this strange testcase, GCC with -O2 -fno-dce -fno-forward-propagate -fno-split-wide-types -funroll-loops generates: foo: movl $v, %eax pxor %xmm0, %xmm0 movaps %xmm0, 48(%rax) movaps %xmm0, (%rax) movaps %xmm0, 16(%rax) movaps %xmm0, 32(%rax) ret With the addition of -mno-stv (to disable the patched code) it gives: foo: movl $v, %eax movq $0, 48(%rax) movq $0, 56(%rax) movq $0, (%rax) movq $0, 8(%rax) movq $0, 16(%rax) movq $0, 24(%rax) movq $0, 32(%rax) movq $0, 40(%rax) ret 2024-02-07 Roger Sayle Uros Bizjak gcc/ChangeLog PR target/113690 * config/i386/i386-features.cc (timode_convert_cst): New helper function to convert a TImode CONST_SCALAR_INT_P to a V1TImode CONST_VECTOR. (timode_scalar_chain::convert_op): Use timode_convert_cst. (timode_scalar_chain::convert_insn): Delete REG_EQUAL notes. Use timode_convert_cst. gcc/testsuite/ChangeLog PR target/113690 * gcc.target/i386/pr113690.c: New test case.=