From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id C41A238650D0; Thu, 20 Oct 2022 19:03:14 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C41A238650D0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1666292594; bh=nfOUkjXsK7IKYznoVFqi7ePo5bL+2QlEaOn14Mjz564=; h=From:To:Subject:Date:In-Reply-To:References:From; b=GnAfgiwfxtvpVG8YxyDEOx34b7fN5jl2CJymKcsELJ/96TPSn93ZQrD9GttOkYZg8 3emPDvPEp4Z4a9sGkmHqPKgeimgGduvChcqURdZwCNY4r6lHJfMSSpz5HePZeGrvh6 AeaYaQMeEzsdfbflZTwHcgGsrN8e/uQN4ya1x/FI= From: "hjl.tools at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/107172] [13 Regression] wrong code with "-O1 -ftree-vrp" on x86_64-linux-gnu since r13-1268-g8c99e307b20c502e Date: Thu, 20 Oct 2022 19:03:13 +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: wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: hjl.tools at gmail dot com X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P1 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org 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 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D107172 --- Comment #44 from H.J. Lu --- (In reply to Segher Boessenkool from comment #42) > (In reply to H.J. Lu from comment #41) > > (In reply to Segher Boessenkool from comment #40) > > > Let me repeat: A const_int cannot be assigned to a MODE_CC. It has no > > > meaning. > > > This is invalid RTL. If it ever works, or worked, that is an acciden= t. > >=20 > > Can we make it to work with a target hook? It will allow more backed > > optimizations. >=20 > No, you cannot. A lot of generic code will not work with your special > re-interpretation of basic RTL rules. Just write correct code in your > backend, it is not hard. Does it look correct: (set (reg:CCC FLAGS_REG) (unspec:CCC [(match_dup 1) (const_int 0)] UNSPEC_CC_NE))=