From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 1F6E73858405; Tue, 4 Jan 2022 03:08:24 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 1F6E73858405 From: "crazylht at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/103897] x86: Missing optimizations with _mm_undefined_si128 and PMOVSX* Date: Tue, 04 Jan 2022 03:08:24 +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: 12.0 X-Bugzilla-Keywords: missed-optimization X-Bugzilla-Severity: enhancement X-Bugzilla-Who: crazylht at gmail dot com X-Bugzilla-Status: UNCONFIRMED 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 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: Tue, 04 Jan 2022 03:08:24 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D103897 --- Comment #4 from Hongtao.liu --- For 2), it seems to be a generic optimization to optimize (set (mem:V4SI (reg:DI 95) [0 *dst_7(D)+0 S16 A128]) (ashiftrt:V4SI (subreg:V4SI (vec_select:V8HI (vec_concat:V16HI (const_vector:V8HI [ (const_int 0 [0]) repeated x8 ]) (mem:V8HI (reg:DI 96) [0 *src_3(D)+0 S16 A128])) (parallel [ (const_int 0 [0]) (const_int 8 [0x8]) (const_int 1 [0x1]) (const_int 9 [0x9]) (const_int 2 [0x2]) (const_int 10 [0xa]) (const_int 3 [0x3]) (const_int 11 [0xb]) ])) 0) (const_int 16 [0x10]))) to sign_extend of (mem:V8HI (reg:DI 96)=