From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 2868F3861012; Thu, 4 Feb 2021 07:10:08 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 2868F3861012 From: "pinskia at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/98867] Failure to use SRI instruction for shift-right-and-insert vector operations Date: Thu, 04 Feb 2021 07:10:07 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: target X-Bugzilla-Version: 11.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: cf_reconfirmed_on bug_severity everconfirmed bug_status 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 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Feb 2021 07:10:08 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D98867 Andrew Pinski changed: What |Removed |Added ---------------------------------------------------------------------------- Last reconfirmed| |2021-02-04 Severity|normal |enhancement Ever confirmed|0 |1 Status|UNCONFIRMED |NEW --- Comment #1 from Andrew Pinski --- >This may be a bit too complex for combine to match though I don't think so really: Trying 18, 13 -> 19: 18: r110:V16QI=3Dr111:V16QI&r112:V16QI REG_DEAD r111:V16QI REG_EQUAL r111:V16QI&const_vector 13: r106:V16QI=3Dr107:V16QI 0>>const_vector REG_DEAD r107:V16QI 19: r113:V16QI=3Dr106:V16QI|r110:V16QI REG_DEAD r110:V16QI REG_DEAD r106:V16QI Failed to match this instruction: (set (reg:V16QI 113 [ vect__6.15 ]) (ior:V16QI (and:V16QI (reg:V16QI 111 [ MEM[symbol: out, index: ivtmp.22= _30, offset: 0B] ]) (reg:V16QI 112)) (lshiftrt:V16QI (reg:V16QI 107 [ MEM[symbol: in, index: ivtmp.22_30, offset: 0B] ]) (const_vector:V16QI [ (const_int 6 [0x6]) repeated x16 ])))) The only problem is (reg:V16QI 112) was not replaced with const_vector, tha= t it was formed from. But insn 18 does have this REG_EQUAL: (expr_list:REG_EQUAL (and:V16QI (reg:V16QI 111 [ MEM[symbol: out, index: ivtmp.22_30, offset: 0B] ]) (const_vector:V16QI [ (const_int -4 [0xfffffffffffffffc]) repeated x16 ])) So it might be easy to match, just combine is not showing all of what is be= ing tried? So maybe adding a pattern for it might be easy ....=