From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 0B7E03858431; Wed, 15 May 2024 09:05:28 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 0B7E03858431 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1715763929; bh=A94tn8KZ4JhPwnaspyY3INE1hBTGT+Uj14C7AkRywmk=; h=From:To:Subject:Date:In-Reply-To:References:From; b=VBqkxjM1Zaqy2sMvOGTrP+Odrb/oc05aCiPk4MtwTjt58Ia0I5JmY1RkzlqiaTR0M 3uoIxLexk2lxLifZ7IinwIFl15IOA22IQamHA6PpMrOStQsDTFBO7/4q/gsen2xJ7S F558zSyRue1BKeIRn4ZT0x+MyDKK4U0KhWmabyPQ= From: "pinskia at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug middle-end/90323] powerpc should convert equivalent sequences to vec_sel() Date: Wed, 15 May 2024 09:05:18 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: middle-end X-Bugzilla-Version: 10.0 X-Bugzilla-Keywords: missed-optimization X-Bugzilla-Severity: enhancement X-Bugzilla-Who: pinskia at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned 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=3D90323 --- Comment #21 from Andrew Pinski --- (In reply to Andrew Pinski from comment #20) > The aarch64 backend matches this: > (insn 15 10 16 2 (set (reg/i:V4SI 32 v0) > (xor:V4SI (and:V4SI (xor:V4SI (reg:V4SI 101) > (reg:V4SI 102)) > (reg:V4SI 103)) > (reg:V4SI 101))) "/app/example.cpp":7:1 3103 > {aarch64_simd_bslv4si_internal} >=20 > for the `bit v0.16b, v1.16b, v2.16b` instruction. which was done r5-6601 = (PR > 64448) . One thing for the middle-end here is if we have `(xor (and (xor A B) C) B)`= we could try expand it into `(a&c)|(b&~c)` if there is an optab for the &~ (wh= ich I am aiming to add for other reasons). I am not sure if powerpc vsx has &~ though. I will doing my development on both x86_64 and aarch64 and it will = be up to the other targets to add the optab pattern if needed.=