From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 377633858436; Wed, 21 Dec 2022 08:05:28 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 377633858436 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1671609928; bh=tGf1RL7Vwo6sa8lRPzn+ZRLbcNknXDRSLnNDAlHS4Ts=; h=From:To:Subject:Date:In-Reply-To:References:From; b=iEH3IQkSqI/y0TlaC2tU+rXls3vaWwPSulr/tztTMaqn/2QNXpbWI7yGEA4sjZTsw 8+C3Rc1Hxainas0aMNz36fSIUU0ZbShgUyYRdy87KNDfYw+iKbFWFNaRFV/0mKX1lx uEO+eeXNrBt9ZEa+rsc3VEMLv3O7QYTYlEWs3Bak= From: "rguenth at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/108191] Add support to usage of *intrin.h without -mavx512f -mavx512cd Date: Wed, 21 Dec 2022 08:05:27 +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: 13.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: enhancement X-Bugzilla-Who: rguenth at gcc dot gnu.org X-Bugzilla-Status: RESOLVED X-Bugzilla-Resolution: WONTFIX 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 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D108191 --- Comment #5 from Richard Biener --- (In reply to =E7=BD=97=E5=8B=87=E5=88=9A(Yonggang Luo) from comment #2) > (In reply to Jakub Jelinek from comment #1) > > You are lying to the compiler, don't. In GCC you can #include > > with SSE2 only and later in say __attribute__((target ("avx512cd"))) > > function use avx512f/avx512cd intrinsics, no need to do the what you sh= ow > > above. >=20 > Can you be more specific, show me the code, thanks:) #include int __attribute__((target("avx512f"))) foo(float f) { __m128 m =3D _mm_set_ss(f); return _mm_cvtss_i32(m); } results in (with just SSE2): foo: .LFB6614: .cfi_startproc vcvtss2sil %xmm0, %eax ret=