From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id B6FFB3853D12; Wed, 23 Aug 2023 14:54:58 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org B6FFB3853D12 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1692802498; bh=8keJsJWmWuZeu1rvJNhlwuK+kwCG9d3OtpEbLd6CMBc=; h=From:To:Subject:Date:In-Reply-To:References:From; b=I4uP7okArkQ8tBjBbmYLVfQvLlUzc7oNr2joiPLniStEmvyHCTr0jNvaaOq9C8ImN S1WdU7jo2oMENIgh1MoNryZkh3gW0WWMq1MhgaNDYDoeUC0AnF0Pt0/FPQOFYZXX6I kSCEu91fHrkxZsvWYq/aPvZEdUkKzHNtTx4LzuBE= From: "ubizjak 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: Wed, 23 Aug 2023 14:54:57 +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: ubizjak 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 #7 from Uro=C5=A1 Bizjak --- (In reply to Hongtao.liu from comment #6)=20 > > So, the compiler still expects vec_concat/vec_select patterns to be pre= sent. >=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. I guess the original patch is the way to go then.=