From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id EBC663858D20; Mon, 7 Nov 2022 22:56:33 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org EBC663858D20 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1667861793; bh=rMpU9bEiqtLDNUh06U/Ibg/lINTfycMyfGOmWVCpTFs=; h=From:To:Subject:Date:From; b=cb805JzO03tGG/N8epQbKmM2IA+7OqI4LU+1nIDjOe2eyH1ZYnxstlKYmV3YzkW4u 5j/9dmYCqFknBFwKEZZmDIey5uYEgkKwJdMcL04oe9lh5R0Xmgs7KPM40ktI0EPmV6 5NekPeOK8Gbva9bI3xoT3p1zD6+V2EWD8oARbxkc= From: "unlvsur at live dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug rtl-optimization/107563] New: __builtin_shufflevector fails to use pshufb and pshufd instructions under default x86_64 compilation toggle which is the sse2 one Date: Mon, 07 Nov 2022 22:56:27 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: rtl-optimization X-Bugzilla-Version: 13.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: unlvsur at live 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: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone Message-ID: 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=3D107563 Bug ID: 107563 Summary: __builtin_shufflevector fails to use pshufb and pshufd instructions under default x86_64 compilation toggle which is the sse2 one Product: gcc Version: 13.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: rtl-optimization Assignee: unassigned at gcc dot gnu.org Reporter: unlvsur at live dot com Target Milestone: --- #if defined(__SSE2__) using temp_vec_type [[__gnu__::__vector_size__ (16)]] =3D char; void foo(temp_vec_type& v) noexcept { v=3D__builtin_shufflevector(v,v,15,14,13,12,11,10,9,8,7,6,5,4,3,2,1= ,0); } #endif g++ -S pq.cc -Ofast proves sse2 is enabled by default, but it does not call https://www.felixcloutier.com/x86/pshufb neither https://www.felixcloutier.com/x86/pshufd while g++ -S pq.cc -Ofast -msse4.2 will generate them correctly. Which is b= uggy=