From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id D3F943858D35; Fri, 27 Oct 2023 06:11:27 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D3F943858D35 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1698387087; bh=UYhW+Qm5fx6U/dghIlDH3InIC7dUxS4eMwa1SI/dAio=; h=From:To:Subject:Date:In-Reply-To:References:From; b=jTihi1j1NL88vzbFvBU5gl0O7pjsq8QQV2I8vxCLbgRejNLEv2W3y3npfDuMmbw1q rA+TrPf2TDjsPQt9Q+yd8s5HdRF5S1QGK/zaYdBIbd0lo0mk/pUkJDnxg6/7XdhEfP kYn/CPBnb1Ux/br3PFo+qerTN9soz0gatXwOSS/8= From: "pinskia at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/111972] [14 regression] missed vectorzation for bool a = j != 1; j = (long int)a; Date: Fri, 27 Oct 2023 06:11:27 +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: missed-optimization X-Bugzilla-Severity: normal X-Bugzilla-Who: pinskia 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: 14.0 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=3D111972 --- Comment #9 from Andrew Pinski --- (In reply to Andrew Pinski from comment #8) > These should work: >=20 > (simplify > (convert (eq one_zero_valued_p@1 one_zero_valued_p@2)) > (if (types_match (type, TREE_TYPE (@1))) > (bit_xor @1 (bit_xor! @2 { build_one_cst (type); })))) >=20 > (simplify > (convert (ne one_zero_valued_p@1 one_zero_valued_p@2)) > (if (types_match (type, TREE_TYPE (@1))) > (bit_xor @1 @2}))) >=20 >=20 > Will test tomorrow. Maybe we don't need the types_match either ... But then we need a convert. That would fix PR 110637 too.=