From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 1D2033858CDB; Thu, 20 Jul 2023 17:22:57 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 1D2033858CDB DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1689873777; bh=DN6HfCmek8fulNiToN0KBVg5yJbBz80XHaOvzHUQjXY=; h=From:To:Subject:Date:In-Reply-To:References:From; b=UnoewmD3fC3+wKqR7aTV+IQygKFkB8QNC2McaFvyykdVMo9Af3r8wlQmiLVrw7ndI Fm1ddPyWnwSTJAdezDpY2Uw1REBYRNHtV/qI6EP0a/f0aI17PUR8TyixiciL0hMEQn UNiK2XDY3is35LFUlHbfzQuKfjtweZ+UoV865XU4= From: "palmer at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/110748] RISC-V: optimize store of DF 0.0 Date: Thu, 20 Jul 2023 17:22:57 +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: missed-optimization X-Bugzilla-Severity: normal X-Bugzilla-Who: palmer at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: vineetg at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- 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=3D110748 --- Comment #7 from palmer at gcc dot gnu.org --- (In reply to palmer from comment #6) > (In reply to Jeffrey A. Law from comment #5) > > I'd bet it's const_0_operand not allowing CONST_DOUBLE. > >=20 > > The question is what unintended side effects we'd have if we allowed > > CONST_DOUBLE 0.0 in const_0_operand. >=20 > We don't have a architectural 0 register, so we'd probably end up needing= to > refactor some stuff. It's probably smoother to add some sort of > "reg_or_0_or_0f_operand" type predicate, and then convert the floating-po= int > stuff that takes X registers over to that (at least stores and > integer->float conversions, but maybe some comparisons too?). Should have said "We don't have a architectural 0 floating-point register",= we have x0 (which is why that reg_or_0 stuff shows up).=