[cfe-commits] r146963 - /cfe/trunk/utils/TableGen/NeonEmitter.cpp
Bob Wilson
bob.wilson at apple.com
Mon Dec 19 22:16:48 PST 2011
Author: bwilson
Date: Tue Dec 20 00:16:48 2011
New Revision: 146963
URL: http://llvm.org/viewvc/llvm-project?rev=146963&view=rev
Log:
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.
Modified:
cfe/trunk/utils/TableGen/NeonEmitter.cpp
Modified: cfe/trunk/utils/TableGen/NeonEmitter.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/utils/TableGen/NeonEmitter.cpp?rev=146963&r1=146962&r2=146963&view=diff
==============================================================================
--- cfe/trunk/utils/TableGen/NeonEmitter.cpp (original)
+++ cfe/trunk/utils/TableGen/NeonEmitter.cpp Tue Dec 20 00:16:48 2011
@@ -1356,6 +1356,17 @@
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)
More information about the cfe-commits
mailing list