From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id CCA36385B800; Thu, 6 Jul 2023 06:20:14 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org CCA36385B800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1688624414; bh=7pdXUfIiFiHmzPIhhKKFmBff3S2OLY3a3AHFf5eHGfU=; h=From:To:Subject:Date:In-Reply-To:References:From; b=yW9PDrd+ja16Iu0ksY0J525Ys2A5ZKzryOZSz0OxIqt1EbNJAWkPrYp9ylB2sMbp3 9uGnCpbDqdftT6/ZaHmRq0ScsVSRBCGLCXuvs/u5734hUpo+78e5TfeQz1I1olOeXL 80tyO21VEKwygByqqOZwRRIONJ+BW2HPLrmkKkUs= From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/110554] veclowering introduces invalid wide Boolean values Date: Thu, 06 Jul 2023 06:20:14 +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: 14.0 X-Bugzilla-Keywords: internal-improvement, wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: cvs-commit at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: pinskia 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=3D110554 --- Comment #8 from CVS Commits --- The trunk branch has been updated by Andrew Pinski : https://gcc.gnu.org/g:a73b65b74105e76473cc2825bb4e7253deaf18b3 commit r14-2338-ga73b65b74105e76473cc2825bb4e7253deaf18b3 Author: Andrew Pinski Date: Tue Jul 4 20:38:06 2023 -0700 Fix PR 110554: vec lowering introduces scalar signed-boolean:32 compari= sons So the problem is vector generic decided to do comparisons in signed-boolean:32 types but the rest of the middle-end was not ready for that. Since we a= re building the comparison which will feed into a cond_expr here, using boolean_type_node is better and also correct. The rest of the compiler thinks the ranges for comparison is always [0,1] too. Note this code does not currently lowers bigger vector sizes into small= er vector sizes so using boolean_type_node here is better. OK? bootstrapped and tested on x86_64-linux-gnu with no regressions. gcc/ChangeLog: PR middle-end/110554 * tree-vect-generic.cc (expand_vector_condition): For compariso= ns, just build using boolean_type_node instead of the cond_type. For non-comparisons/non-scalar-bitmask, build a ` !=3D 0` gimple that will feed into the COND_EXPR.=