From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 88F40394D8AA; Mon, 8 Mar 2021 11:54:06 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 88F40394D8AA From: "marxin at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/99464] New: #pragma GCC target("arch=cannonlake") does not work with a -msha builtin Date: Mon, 08 Mar 2021 11:54:06 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: target X-Bugzilla-Version: 11.0 X-Bugzilla-Keywords: rejects-valid X-Bugzilla-Severity: normal X-Bugzilla-Who: marxin at gcc dot gnu.org 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 keywords bug_severity priority component assigned_to reporter target_milestone cf_gcchost 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 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: Mon, 08 Mar 2021 11:54:06 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D99464 Bug ID: 99464 Summary: #pragma GCC target("arch=3Dcannonlake") does not work with a -msha builtin Product: gcc Version: 11.0 Status: UNCONFIRMED Keywords: rejects-valid Severity: normal Priority: P3 Component: target Assignee: unassigned at gcc dot gnu.org Reporter: marxin at gcc dot gnu.org Target Milestone: --- Host: x86_64-linux-gnu The following does not work: $ cat pragma.c #pragma GCC target("arch=3Dcannonlake") #include volatile __m128i x; void extern sha_test (void) { x =3D _mm_sha1msg1_epu32 (x, x); } $ gcc pragma.c -c In file included from /home/marxin/bin/gcc/lib64/gcc/x86_64-pc-linux-gnu/11.0.1/include/immintrin= .h:97, from pragma.c:3: /home/marxin/bin/gcc/lib64/gcc/x86_64-pc-linux-gnu/11.0.1/include/shaintrin= .h: In function =E2=80=98sha_test=E2=80=99: /home/marxin/bin/gcc/lib64/gcc/x86_64-pc-linux-gnu/11.0.1/include/shaintrin= .h:41:20: error: =E2=80=98__builtin_ia32_sha1msg1=E2=80=99 needs isa option -msha 41 | return (__m128i) __builtin_ia32_sha1msg1 ((__v4si) __A, (__v4si) __B); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~= ~~~~ I've got patch for it.=