From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 12DC138555AB; Mon, 2 Oct 2023 17:29:11 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 12DC138555AB DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1696267751; bh=y8/KPHLOo/1a4u9EfDcG+CH7rJI2v7D/Vr+gzjqzv5w=; h=From:To:Subject:Date:In-Reply-To:References:From; b=i5Be6zOv6LEeZwZTbt2GZLqi8RTAxy7WILwNnCEFFcebIzqx3F6NckQtOpacAgrCe nGS5dVG8BCAQLTZJTwqrfvRIsLPkNiiA4u33eAp5aL7Wkw4/XkjUFhhTS1oUAwR3/7 glxeiw0H27wSMpluPs6XnRCV39I9ivqNafC5f2Cc= From: "joseph at codesourcery dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/111506] RISC-V: Failed to vectorize conversion from INT64 -> _Float16 Date: Mon, 02 Oct 2023 17:29:09 +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: normal X-Bugzilla-Who: joseph at codesourcery dot com X-Bugzilla-Status: RESOLVED X-Bugzilla-Resolution: FIXED 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: 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=3D111506 --- Comment #4 from joseph at codesourcery dot com --- Conversion from 64-bit integers for _Float16 is fully defined, it produces= =20 the correctly rounded result according to the current rounding direction=20 (round-to-nearest may be assumed in the absence of -frounding-math), which= =20 may be an infinity (depending on the rounding mode) in case of overflow=20 (and in particular, anything not representable in a 32-bit integer=20 certainly overflows on conversion to _Float16). That's just the same as=20 for any integer-to-floating conversions.=