https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101127
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");