From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 5C94F3858D35; Fri, 8 Mar 2024 08:28:21 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 5C94F3858D35 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1709886502; bh=PsXLENNkFMOqccUEVbUPwW3bPa4hXC/CCQIPO9URaR0=; h=From:To:Subject:Date:In-Reply-To:References:From; b=SaBTUxU6JTewL3f/B1/IS957vc+6yPRuXG6Vb4sIaR7Mwiyq+isDIKIq9sZSPmCoU axNbkddHoYZyXc4Irwt2k7ORqEJUvygwRUmSBBMY8OjnbXkJQ25I+dXoVW4dsGkyAQ WXr+FAlWv6ts888xr726gccUQ56nOyN7HjrwzWz8= From: "rguenth at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug middle-end/114270] Integer multiplication on floating point constant with conversion back to integer is not optimized Date: Fri, 08 Mar 2024 08:28:12 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: middle-end X-Bugzilla-Version: 14.0 X-Bugzilla-Keywords: missed-optimization X-Bugzilla-Severity: enhancement X-Bugzilla-Who: rguenth 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 cf_reconfirmed_on everconfirmed 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=3D114270 Richard Biener changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Last reconfirmed| |2024-03-08 Ever confirmed|0 |1 --- Comment #2 from Richard Biener --- I think it makes sense to optimize for 1/power-of-two only. Whether an actual integer division instruction we could replace x * FP_CST with would be faster than int->FP, FP multiply, FP->int is questionable. But a shift very likely is. Special-casing just * 0.5 might also an option.=