[clang] Change AMX macros to match names from GCC
authorJoe Loser <joeloser@fastmail.com>
Wed, 1 Feb 2023 17:19:27 +0000 (10:19 -0700)
committerJoe Loser <joeloser@fastmail.com>
Fri, 3 Feb 2023 14:00:16 +0000 (07:00 -0700)
commit8998fa6c14f1e19957858aa0e4b592d62ae56041
tree6d321ef52cdc13295e60aff40319e21ae8206a14
parent434992c96ed1c41316e029877bdb516fddeddb16
[clang] Change AMX macros to match names from GCC

The current behavior for AMX macros is:

```
gcc -march=native -dM -E - < /dev/null | grep TILE

clang -march=native -dM -E - < /dev/null | grep TILE
```

which is not ideal.  Change `__AMXTILE__` and friends to `__AMX_TILE__` (i.e.
have an underscore in them).  This makes GCC and Clang agree on the naming of
these AMX macros to simplify downstream user code.

Fix this for `__AMXTILE__`, `__AMX_INT8__`, `__AMX_BF16__`, and `__AMX_FP16__`.

Differential Revision: https://reviews.llvm.org/D143094
clang/lib/Basic/Targets/X86.cpp
clang/lib/Headers/immintrin.h
clang/test/Preprocessor/predefined-arch-macros.c
clang/test/Preprocessor/x86_amx_target_features.c
clang/test/Preprocessor/x86_target_features.c