From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 4AC8F387103D; Fri, 15 Dec 2023 12:22:06 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 4AC8F387103D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1702642926; bh=iQ/cwQ4RXKqwXdTvmMwJHZEu5jGxU0JHm8Uj/FRCtlg=; h=From:To:Subject:Date:In-Reply-To:References:From; b=T4g7R481oXKTY9Gm6B3josF4ePKnHSComzGmosAo+im4LNYAJtSCip8Z3GDnir9dr PnjpBHgNy9hdN6/867A9thRNUX6gRkO2MGEwNp8o22dPKSRDjnEsyi1D3I1/g4xSXg yrZv+P/bwsnmkilD8PmiCxMubYQoAasi5ZGSFyAw= From: "rguenth at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/110182] [11 Regression] Vector(2) cast from double to float and back and subtraction seems to produce incorrect results Date: Fri, 15 Dec 2023 12:22:05 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: tree-optimization X-Bugzilla-Version: 13.1.1 X-Bugzilla-Keywords: wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: rguenth at gcc dot gnu.org X-Bugzilla-Status: RESOLVED X-Bugzilla-Resolution: FIXED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: rguenth at gcc dot gnu.org X-Bugzilla-Target-Milestone: 11.5 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cf_known_to_fail bug_status resolution cf_known_to_work 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=3D110182 Richard Biener changed: What |Removed |Added ---------------------------------------------------------------------------- Known to fail| |11.4.0 Status|ASSIGNED |RESOLVED Resolution|--- |FIXED Known to work| |11.4.1 --- Comment #8 from Richard Biener --- commit 40aa486160620d4270c9d6e777722c49823f552c Author: Richard Biener Date: Fri Jun 9 09:29:09 2023 +0200 middle-end/110182 - TYPE_PRECISION on VECTOR_TYPE causes wrong-code When folding two conversions in a row we use TYPE_PRECISION but that's invalid for VECTOR_TYPE. The following fixes this by using element_precision instead. * match.pd (two conversions in a row): Use element_precision to DTRT for VECTOR_TYPE. (cherry picked from commit 3e12669a0eb968cfcbe9242b382fd8020935edf8)=