From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 52451385DC1B; Wed, 15 Apr 2020 23:12:47 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 52451385DC1B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1586992367; bh=RpRTcA43fsvcGj15kS7Q6oMcVIsTfaCjXBNsae6hRxM=; h=From:To:Subject:Date:In-Reply-To:References:From; b=sDy8ruKNl2f5gfiEJ3g3GCCjO6KeVJuGFjRo0GvcjGWs1ZdRvbudpgiP1uon7Up15 /y5ZakBvqBuYZbcqZWsDECUWi1pV8FtGnXechv7XQudPx8c+pxxQJn7K2xm5HnqX6v 0Gpfy+MJl+V4Z5+82NT3ccxK7bvf2077VH+XmE5A= From: "law at redhat dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/94567] [10 Regression] wrong code at -O2 and -O3 on x86_64-linux-gnu Date: Wed, 15 Apr 2020 23:12:47 +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: 10.0 X-Bugzilla-Keywords: wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: law at redhat dot com X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P1 X-Bugzilla-Assigned-To: law at redhat dot com X-Bugzilla-Target-Milestone: 10.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: Wed, 15 Apr 2020 23:12:47 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D94567 --- Comment #13 from Jeffrey A. Law --- Sigh. That code is good in that it's rejecting matching the pattern for the SImode sign bit that we can't implement. For some dumb reason I was think= ing it was changing how we split, but it's actually the main condition. So cal= ling it a "hack" was a mistake. The only time we have to widen is when the pos + len exactly hits the sign = bit in the operand's mode, which is what I thought my patch did. Certainly we don't want to be changing sizes unnecessarily, that's a given. I guess wha= t I did could be refined to allow that case for CCZmode. Your test of: + || (INTVAL (operands[3]) + INTVAL (operands[4]) + =3D=3D GET_MODE (operands[2])) Looks wrong. Didn't you mean to get the precision of the mode of operand2?=