From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 0D4AC385C6EF; Thu, 24 Aug 2023 01:12:48 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 0D4AC385C6EF DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1692839569; bh=NRonJANSSJwwmAvbZjzRVYNmwX6Co9v1mxQl6n/WJkc=; h=From:To:Subject:Date:In-Reply-To:References:From; b=iMqosDWDznXwOA2fQ2dVgx0lS8OT40EUb/Vst4MV21ZsNQMa1XOPtU8enqGXqRJaD WOXqyw7HBIexzMXR29ycD2B4385zugh/SNIFOUNP2SZsQ9dWC1JJQlcJtQD/7FH1Av fR8KQfNF1r48PlK2KE4ucNXY5RIdnoz2HJ51hm4Q= From: "crazylht at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/94866] Failure to optimize pinsrq of 0 with index 1 into movq Date: Thu, 24 Aug 2023 01:12:45 +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: 10.0 X-Bugzilla-Keywords: missed-optimization X-Bugzilla-Severity: normal X-Bugzilla-Who: crazylht at gmail dot com X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: ubizjak at gmail dot com 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=3D94866 --- Comment #8 from Hongtao.liu --- (In reply to Uro=C5=A1 Bizjak from comment #7) > (In reply to Hongtao.liu from comment #6)=20 > > > So, the compiler still expects vec_concat/vec_select patterns to be p= resent. > >=20 > > v2df foo_v2df (v2df x) > > { > > return __builtin_shuffle (x, (v2df) { 0, 0 }, (v2di) { 0, 2 }); > > } > >=20 > > The testcase is not a typical vec_merge case, for vec_merge, the shuffle > > index should be {0, 3}. Here it happened to be a vec_merge because the > > second vector is all zero. And yes for this case, we still need to > > vec_concat:vec_select pattern. >=20 > I guess the original patch is the way to go then. Yes.=