[clang] [Clang][AArch64] Add fix vector types to header into SVE (PR #73258)
via cfe-commits
cfe-commits at lists.llvm.org
Fri Dec 1 03:24:56 PST 2023
================
@@ -2546,6 +2548,44 @@ void NeonEmitter::runFP16(raw_ostream &OS) {
OS << "#endif /* __ARM_FP16_H */\n";
}
+void NeonEmitter::runVectorType(raw_ostream &OS) {
+ OS << "/*===---- arm_vector_type - ARM vector type "
+ "------===\n"
+ " *\n"
+ " *\n"
+ " * Part of the LLVM Project, under the Apache License v2.0 with LLVM "
+ "Exceptions.\n"
+ " * See https://llvm.org/LICENSE.txt for license information.\n"
+ " * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception\n"
+ " *\n"
+ " *===-----------------------------------------------------------------"
+ "------===\n"
+ " */\n\n";
+ OS << "#ifndef __ARM_NEON_TYPES_H\n";
+ OS << "#define __ARM_NEON_TYPES_H\n";
+ OS << "#ifdef __cplusplus\n";
+ OS << "extern \"C\" {\n";
+ OS << "#endif\n";
+ OS << "#ifndef __ARM_NEON_H\n";
+
+ std::string TypedefTypes("QcQsQiQlQUcQUsQUiQUlQhQfQdQb");
+ std::vector<TypeSpec> TDTypeVec = TypeSpec::fromTypeSpecs(TypedefTypes);
+ for (auto &TS : TDTypeVec) {
+ Type T(TS, ".");
+ OS << "typedef __attribute__((vector_size(16))) ";
----------------
CarolineConcatto wrote:
I believe this problem is solved with the logic of the new headers now
I did almost like this:
https://godbolt.org/z/vYrcKKs3P
https://github.com/llvm/llvm-project/pull/73258
More information about the cfe-commits
mailing list