diff options
author | Bob Wilson <bob.wilson@apple.com> | 2011-12-20 06:16:48 +0000 |
---|---|---|
committer | Bob Wilson <bob.wilson@apple.com> | 2011-12-20 06:16:48 +0000 |
commit | 9082cddf28e03c2f718e92457e2d9c7390056b2d (patch) | |
tree | 77c670b74f26d70e70a7c35d20ad41ca4bb6e8c5 /utils | |
parent | 2fbf373a56b762e274af187bcb193634815ba1d2 (diff) |
Relax type checking for a few Neon intrinsics. <rdar://problem/10538555>
Not long ago, I tightened up the type checking for pointer arguments of
Neon intrinsics to match the specifications provided by ARM. One consequence
was that it became impossible to access the unaligned versions of a few
Neon load/store operations. Since there are just a few of these intrinsics
where it makes a difference, I think it's better to relax the type checking
than to either introduce new non-standard unaligned intrinsics or to disallow
intrinsics for the unaligned operations.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146963 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'utils')
-rw-r--r-- | utils/TableGen/NeonEmitter.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/utils/TableGen/NeonEmitter.cpp b/utils/TableGen/NeonEmitter.cpp index 589fbde771..5d6dee6b44 100644 --- a/utils/TableGen/NeonEmitter.cpp +++ b/utils/TableGen/NeonEmitter.cpp @@ -1356,6 +1356,17 @@ void NeonEmitter::runHeader(raw_ostream &OS) { if (PtrArgNum >= 0 && (Proto[0] >= '2' && Proto[0] <= '4')) PtrArgNum += 1; + // Omit type checking for the pointer arguments of vld1_lane, vld1_dup, + // and vst1_lane intrinsics. Using a pointer to the vector element + // type with one of those operations causes codegen to select an aligned + // load/store instruction. If you want an unaligned operation, + // the pointer argument needs to have less alignment than element type, + // so just accept any pointer type. + if (name == "vld1_lane" || name == "vld1_dup" || name == "vst1_lane") { + PtrArgNum = -1; + HasConstPtr = false; + } + if (mask) { OS << "case ARM::BI__builtin_neon_" << MangleName(name, TypeVec[si], ClassB) |