From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 345E73858C62; Fri, 3 Mar 2023 00:26:15 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 345E73858C62 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1677803175; bh=HQ7rbo/PN/3KRqgL+nm6aNQa3TNtMjdAw6dgB2JqVbA=; h=From:To:Subject:Date:In-Reply-To:References:From; b=CKlo0uUFgeiOepGX+3KfQQ9gLcNBCMYnvjHK7rkeiIrGXW4jezWwGtVb1EDhECzNM ykBxaY/N4Qs/TL26WpfEl8yk/173zscuF5sMu06i1uDi5vIXv8n3Q9HXhaCxtb43KW h9QGr8vWTrKuG5AfhxwA5Pm6wQ6Unk9Yk0vxTFEs= From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug d/108945] [13.0] d: vector float comparison doesn't result in 0 or -1 Date: Fri, 03 Mar 2023 00:26:14 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: d X-Bugzilla-Version: 13.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: cvs-commit at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: ibuclaw at gdcproject dot 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=3D108945 --- Comment #1 from CVS Commits --- The master branch has been updated by Iain Buclaw : https://gcc.gnu.org/g:51af8a6401eea726d3498e6b2aba456b6af246d6 commit r13-6430-g51af8a6401eea726d3498e6b2aba456b6af246d6 Author: Iain Buclaw Date: Mon Feb 27 16:02:21 2023 +0100 d: vector float comparison doesn't result in 0 or -1 [PR108945] When comparing two vectors, the type of vector was used as the result of the condition result. This meant that for floating point comparisons, each value would either be `0.0' or `-1.0' reinterpreted as an integer, not the expected integral bitmask values `0' and `-1'. Instead, use the comparison type determined by truth_type_for as the result of the comparison. If a reinterpret is later required by the final conversion for generating CmpExp, it is still only going to reinterpret one integer kind as another. PR d/108945 gcc/d/ChangeLog: * d-codegen.cc (build_boolop): Evaluate vector comparison as the truth_type_for vector type. gcc/testsuite/ChangeLog: * gdc.dg/pr108945.d: New test.=