[clang] [clang] Separate Intel ADC instrinsics from ADX intrinsics (PR #75992)

Max Winkler via cfe-commits cfe-commits at lists.llvm.org
Tue Dec 19 18:14:52 PST 2023


================
@@ -580,8 +580,7 @@ _storebe_i64(void * __P, long long __D) {
 #include <cetintrin.h>
 #endif
 
-/* Some intrinsics inside adxintrin.h are available only on processors with ADX,
- * whereas others are also available at all times. */
----------------
MaxEW707 wrote:

> add comment for adcintrin.h

Up to you. I felt the header names imply that `<adxintrin.h>` has adx specific intrinsics and `<adcintrin.h>` has the always available adc intrinsics.

Let me know and I can add a, "/* Intrinsics inside adcintrin.h are available at all times. */", comment above `<adcintrin.h>`.

> should we use the same format for adxintrin.h

I didn't protect `<adxintrin.h>` since it was unprotected earlier and didn't want to introduce a behavioural change there.

For `_MSC_VER` this header isn't large enough to cause the current compile-time issues with MSVC STL.

For `__SCE__` the git blame here, https://github.com/llvm/llvm-project/commit/046130490f230559e8dae7d7cb4959bd04f89bb8, appears to have missed guarding this header to prevent accidental usage of these intrinsics on PS4 since Intel ADX isn't available on the PS4 Jaguar chips.

https://github.com/llvm/llvm-project/pull/75992


More information about the cfe-commits mailing list