[clang] [clang-tools-extra] [llvm] [Clang][AArch64] Add fix vector types to header into SVE (PR #73258)

Sander de Smalen via cfe-commits cfe-commits at lists.llvm.org
Tue Dec 12 01:33:06 PST 2023


================
@@ -2355,13 +2357,7 @@ void NeonEmitter::run(raw_ostream &OS) {
 
   OS << "#include <arm_bf16.h>\n";
 
-  // Emit NEON-specific scalar typedefs.
-  OS << "typedef float float32_t;\n";
-  OS << "typedef __fp16 float16_t;\n";
-
-  OS << "#ifdef __aarch64__\n";
-  OS << "typedef double float64_t;\n";
-  OS << "#endif\n\n";
+  OS << "#include <arm_vector_types.h>\n";
----------------
sdesmalen-arm wrote:

Omitting the poly types was a suggestion I made to allow including `#arm_common_vector_types.h` into contexts when NEON is not available, but you still want to use the shared vector types (e.g. for SVE/SME).

Strictly speaking you could use the types for interfaces despite of which feature flags are set, but this seems to have been the chosen approach historically. Given that there is no requirement for these types to be available outside of arm_neon.h, I thought it made sense to only share the common types and preserve existing behaviour for the poly types.

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


More information about the cfe-commits mailing list