From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 63D373AA9C5D; Fri, 18 Jun 2021 15:51:42 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 63D373AA9C5D From: "ibuclaw at gdcproject dot org" To: gcc-bugs@gcc.gnu.org Subject: [Bug d/101127] New: d: Compile-time reflection for supported built-ins Date: Fri, 18 Jun 2021 15:51:42 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: d X-Bugzilla-Version: 11.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: ibuclaw at gdcproject dot org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: ibuclaw at gdcproject dot 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 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: Fri, 18 Jun 2021 15:51:42 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D101127 Bug ID: 101127 Summary: d: Compile-time reflection for supported built-ins Product: gcc Version: 11.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: d Assignee: ibuclaw at gdcproject dot org Reporter: ibuclaw at gdcproject dot org Target Milestone: --- With the 11 release, compile-time reflection support was added for vector types, but this does not extend to built-ins that use them. e.g: --- // This prints "Yes" with -mavx because vector(float[8]) also becomes available. static if (__traits(compiles, __builtin_ia32_andps256 )) pragma(msg, "Yes AVX support"); else pragma(msg, "No AVX support"); // Always prints "Yes", because vector(short[8]) is available from -msse static if (__traits(compiles, __builtin_ia32_pmulhrsw128)) pragma(msg, "Yes SSSE3 support"); else pragma(msg, "No SSSE3 support");=