From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id BC9753858D3C; Fri, 12 Jan 2024 20:08:58 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org BC9753858D3C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1705090138; bh=DQEUDqSCFjmEh21NEZBtb2Y0SadpwodLnI32mbAeDYE=; h=From:To:Subject:Date:In-Reply-To:References:From; b=lgN676lp/e1WDYUu+NFUhe5btSBrYsIt+96GKLe5BuJklEsbCAJJHVdLJIO2rqn5s 4r48JOFD9bhBdeNeJM1HskPyP9z8d5YRb6e6pplMlhIwhkvOoMz+y3WStVqAXhwTPV +WCiE4G6Z+mdUopN4hp8mXJtZe4foMYlc0FIyvuU= From: "pinskia at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/113362] RISCV64 divide and remainder with the same operands generates two divide operations Date: Fri, 12 Jan 2024 20:08:58 +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: missed-optimization X-Bugzilla-Severity: enhancement X-Bugzilla-Who: pinskia at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_status everconfirmed cf_reconfirmed_on 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=3D113362 Andrew Pinski changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Ever confirmed|0 |1 Last reconfirmed| |2024-01-12 --- Comment #2 from Andrew Pinski --- The way divu/remu should be modeled as one instruction (using also the divmod/udivmod optab to expand them) and then split into either divu or rem= u or divu/mul/sub in split1 depending on the REG_UNUSED notes.=