From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 9447D3858CD1; Wed, 5 Jul 2023 07:13:31 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 9447D3858CD1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1688541211; bh=jc9j935urdMaDAGnkAaxMH053f5nTwqIVMVSq73yT1o=; h=From:To:Subject:Date:In-Reply-To:References:From; b=PZj24imGw1soomhuLIZOyX22ZhcgayedmERn4BHmpdy4Pr4n6LVAisOyll+nqEeQj zDtpZVfiC7zVcQSPmUa+dcMBvv5YtCDvIijwF800DHCR0qYOm4CoBUnjIvJP8Mpdtr F86T6qSYsgDAp3kXva7qmnQBjS56ChRZGpxyRlec= From: "rguenth at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/110554] veclowering introduces invalid wide Boolean values Date: Wed, 05 Jul 2023 07:13:31 +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: rguenth 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 #7 from Richard Biener --- (In reply to Andrew Pinski from comment #6) > Created attachment 55472 [details] > Fix veclowering types >=20 > So the problem is veclowering should have just use boolean_type_node here > for the comparison. >=20 > There is another type issue when dealing with not a comparison and not=20 > scalar bitmask which fix is included here. >=20 > Still need to test it. I think this gets the case wrong where lowering splits a wide vector into smaller vectors. I think 'cond_type' is wrong in this case already, but unconditionally using boolean_type_node looks wrong as well. In the small vector case the code also uses COND_EXPR instead of VEC_COND_EXPR. Hmm, maybe we don't support big to small vector split here at all ... in that case the patch looks good to me.=