diff options
author | Bob Wilson <bob.wilson@apple.com> | 2010-11-16 23:57:06 +0000 |
---|---|---|
committer | Bob Wilson <bob.wilson@apple.com> | 2010-11-16 23:57:06 +0000 |
commit | 6a8aceb50bb3280fc291e50647bff07ca4282ce0 (patch) | |
tree | f640dcae163b6c4133b5a8c0b0b29fefe7ab62a9 /utils | |
parent | 4fbf63845f3456bb168ab2e5b1cc682ceaa799f4 (diff) |
Use new neon_vector_type and neon_polyvector_type attributes for Neon vectors.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119406 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'utils')
-rw-r--r-- | utils/TableGen/NeonEmitter.cpp | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/utils/TableGen/NeonEmitter.cpp b/utils/TableGen/NeonEmitter.cpp index 333ca2f31c..f4f79493e4 100644 --- a/utils/TableGen/NeonEmitter.cpp +++ b/utils/TableGen/NeonEmitter.cpp @@ -844,21 +844,25 @@ void NeonEmitter::run(raw_ostream &OS) { // Emit vector typedefs. for (unsigned i = 0, e = TDTypeVec.size(); i != e; ++i) { - bool dummy, quad = false; - (void) ClassifyType(TDTypeVec[i], quad, dummy, dummy); - OS << "typedef __attribute__(( __vector_size__("; + bool dummy, quad = false, poly = false; + (void) ClassifyType(TDTypeVec[i], quad, poly, dummy); + if (poly) + OS << "typedef __attribute__((neon_polyvector_type("; + else + OS << "typedef __attribute__((neon_vector_type("; - OS << utostr(8*(quad ? 2 : 1)) << ") )) "; - if (!quad) + unsigned nElts = GetNumElements(TDTypeVec[i], quad); + OS << utostr(nElts) << "))) "; + if (nElts < 10) OS << " "; OS << TypeString('s', TDTypeVec[i]); OS << " " << TypeString('d', TDTypeVec[i]) << ";\n"; } OS << "\n"; - OS << "typedef __attribute__(( __vector_size__(8) )) " + OS << "typedef __attribute__((__vector_size__(8))) " "double float64x1_t;\n"; - OS << "typedef __attribute__(( __vector_size__(16) )) " + OS << "typedef __attribute__((__vector_size__(16))) " "double float64x2_t;\n"; OS << "\n"; |