From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 8FD8C3858D35; Fri, 8 Mar 2024 09:10:25 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 8FD8C3858D35 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1709889025; bh=g+wcnexcXkClMimsmSI2ELEjU+GM2EQKDICOF40kf6M=; h=From:To:Subject:Date:In-Reply-To:References:From; b=FpKXW5WF0rbbWUCdzhjNC4yZnleglOPzy3YWjhT5FQM99sBl1DGzbA63UcCRMImqM pJ2ZMENTolDHoP/bXnKqfBImu0oV0n30NmW8aiLY/1NRgQfrMu0MytwqyUiRnlTiU3 b76uaXTwEBMxEQmbx74cvZEaf/YkZxpTx659HZyQ= From: "jakub 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 09:10:25 +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: jakub 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: cc 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 Jakub Jelinek changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jakub at gcc dot gnu.org --- Comment #3 from Jakub Jelinek --- (In reply to Andrew Pinski from comment #1) > The rules for this to be done are a bit more complex than what is describ= ed > here. >=20 > 1) Significand precision of the floating point type needs to be >=3D prec= ision > of the integer type I'd also verify that minimum/maximum of the integer type are exactly representable in the floating point type, such that even limitations on exponent don't stand in a way.=