Commit Graph

79 Commits

Author SHA1 Message Date
Bob Wilson 4959014850 The Neon vqdmlsl_lane and vqdmlal_lane intrinsics have 4 arguments, not 3.
llvm-svn: 121469
2010-12-10 06:37:53 +00:00
Bob Wilson 47206b840b 80-column fixes.
llvm-svn: 121395
2010-12-09 18:43:35 +00:00
Bob Wilson 38c3ca78e6 Add a license comment to the generated arm_neon.h header.
Remove the previous header.  I don't think we need to expose to end users
that we use TableGen to produce our version of arm_neon.h, and that header
was also using doubleslash comments which could be a problem when using it
in strict C89 compilations.

llvm-svn: 121390
2010-12-09 18:31:01 +00:00
Bob Wilson 4868ba0619 Add operators for "_lane" variants of some saturating Neon multiply intrinsics
so they can be implemented without separate clang builtins.

llvm-svn: 121299
2010-12-08 22:36:08 +00:00
Bob Wilson dbe9e7e3dd Add operators for vabdl and vabal so they can be implemented without builtins.
llvm-svn: 121287
2010-12-08 21:39:04 +00:00
Bob Wilson bf74755e62 Remove unused function parameter.
llvm-svn: 121286
2010-12-08 21:39:00 +00:00
Bob Wilson 194ad82666 Add an operator for vaba so it can be implemented using vabd.
llvm-svn: 121276
2010-12-08 20:09:10 +00:00
Bob Wilson 97b44b5b4a Add operators for vadd[lw] and vsub[lw]
so they can be implemented without clang builtins.

llvm-svn: 121213
2010-12-08 00:14:04 +00:00
Bob Wilson c40935fa0c Add operators for vmlal{_n,_lane} and vmlsl{_n,_lane}
so they can be implemented without clang builtins.

llvm-svn: 121209
2010-12-07 23:53:37 +00:00
Bob Wilson 7a36c68748 Emit vmovl intrinsics first in the arm_neon.h header
so they can be used in the implementations of other intrinsics.

llvm-svn: 121208
2010-12-07 23:53:32 +00:00
Bob Wilson 361afe4ef2 Add an operator for vdup_lane so it can be implemented without a clang builtin.
llvm-svn: 121190
2010-12-07 22:39:24 +00:00
Bob Wilson 17a233c0e5 Add an operator for vmull_lane so it can be implemented without a clang builtin.
llvm-svn: 121187
2010-12-07 22:02:48 +00:00
Bob Wilson 192336b865 Add new built-in operations for vmull and vmull_n
so they can be implemented without requiring clang builtins.
Radar 8446238.

llvm-svn: 121173
2010-12-07 20:02:45 +00:00
Bob Wilson 654db47903 Add an OpReinterpret operation to TableGen's NeonEmitter.
An OpReinterpret entry is handled by translating it to OpCast intrinsics for
all combinations of source and destination types with the same total size.
This will be used to generate all the vreinterpret intrinsics.

llvm-svn: 121087
2010-12-07 01:12:23 +00:00
Bob Wilson b87116e30a Fix whitespace.
llvm-svn: 121086
2010-12-07 01:12:19 +00:00
Bob Wilson 236ba8d862 Remove trailing whitespace.
llvm-svn: 120891
2010-12-04 04:40:15 +00:00
Bob Wilson 074436b090 Get Neon intrinsic names from the new "Name" field in the tblgen records
instead of just converting the record name to lowercase.

llvm-svn: 120809
2010-12-03 17:19:39 +00:00
Bob Wilson e6b421ccb5 Add support for "_lane" variants of VMUL, VMLA, and VMLS Neon intrinsics.
llvm-svn: 120764
2010-12-03 00:34:12 +00:00
Bob Wilson 791934e122 Support using macros for Neon intrinsics implemented without builtins.
Intrinsics implemented with Clang builtins could already be implemented as
either inline functions or macros, but intrinsics implemented directly
(without builtins) could only be inline functions.

llvm-svn: 120763
2010-12-03 00:34:09 +00:00
Bob Wilson 4375586bd9 Simplify code in Neon intrinsics. No functional changes intended.
For most intrinsics, there is no need to allocate a temporary to hold the
result value; just return it directly.

llvm-svn: 120695
2010-12-02 07:44:23 +00:00
Bob Wilson 79026235e6 Assign arguments of Neon intrinsic macros to local temporaries.
Since we're casting them for the calls to the builtins, we need this to
make sure their types get checked in the same way they would if the intrinsics
were implemented as inline functions.

llvm-svn: 120693
2010-12-02 07:10:39 +00:00
Bob Wilson 014fe01ac8 Use statement expressions in Neon intrinsics defined as macros.
This is in preparation for adding assignments to temporaries to ensure
that the proper type checking is done.

llvm-svn: 120649
2010-12-02 02:42:51 +00:00
Bob Wilson 492de6da40 Add casts for splatted scalars in calls to Neon builtins.
llvm-svn: 120641
2010-12-02 01:18:23 +00:00
Bob Wilson ec626b09cb Add a missing cast for Neon vsbl results.
The bitwise operations are always done with unsigned values, but the result may
be signed.

llvm-svn: 120640
2010-12-02 01:18:20 +00:00
Bob Wilson c08944fd5a Add another missing cast for Neon vcombine results.
llvm-svn: 120639
2010-12-02 01:18:18 +00:00
Bob Wilson a9ea9ef840 Add casts in arm_neon.h for result values in inline functions as well as macros.
We should not rely on lax-vector-conversions for these intrinsics to work.

llvm-svn: 120638
2010-12-02 01:18:15 +00:00
Bob Wilson 743eeae937 Avoid "char" for Neon vector elements; make it explicitly signed (or unsigned).
llvm-svn: 120632
2010-12-02 00:24:59 +00:00
Bob Wilson be764f0cd1 Cast scalar results of Neon macros to the correct type.
llvm-svn: 120631
2010-12-02 00:24:56 +00:00
Bob Wilson 3e8f3f94ef Add explicit casts for vector arguments to Neon builtins.
This avoids warnings with -Wvector-conversions.  Radar 8228022.

llvm-svn: 120597
2010-12-01 19:49:58 +00:00
Bob Wilson fa5207595e Add some comments for TableGen's NeonEmitter.
llvm-svn: 120596
2010-12-01 19:49:56 +00:00
Bob Wilson 65a96d082a Cleanup: simplify checks for integers between 2 and 4.
llvm-svn: 120595
2010-12-01 19:49:51 +00:00
Bob Wilson b91ae1ac52 Fix copy-and-paste error in exception message.
llvm-svn: 120033
2010-11-23 19:38:34 +00:00
Bob Wilson 4e22a38759 Change the 'x' type modifier for Neon intrinsics to force a signed integer.
This makes it symmetric with the 'u' modifier that forces an unsigned type.
This is needed for unsigned vector shifts, where the shift amount still needs
to be signed.  PR8482 (Radar 8603521).

llvm-svn: 119742
2010-11-18 21:43:22 +00:00
Bob Wilson 712f07de0e Use new neon_vector_type and neon_polyvector_type attributes for Neon vectors.
llvm-svn: 119406
2010-11-16 23:57:06 +00:00
Bob Wilson 789e015ce7 Change Neon polynomial types to be signed to match GCC.
llvm-svn: 119405
2010-11-16 23:57:03 +00:00
Bob Wilson 0045702afe Refactor to new GetNumElements function.
No functional change.

llvm-svn: 119404
2010-11-16 23:57:01 +00:00
Bob Wilson dfac58bed1 Tidy up some things in <arm_neon.h>.
Stop defining types with "__neon_" prefixes and then using typedefs without
the prefix; there's no reason to do that anymore.  Remove types that combine
multiple Neon vectors and treat them as a single long vector; they are not
used.

llvm-svn: 119369
2010-11-16 19:39:14 +00:00
Bob Wilson 2880185194 Reapply "Stop using struct wrappers for Neon vector types in <arm_neon.h>."
I've temporarily disabled the failing clang test.

llvm-svn: 119367
2010-11-16 19:16:06 +00:00
Bob Wilson 4d9c9a646b Revert "Stop using struct wrappers for Neon vector types in <arm_neon.h>."
It's breaking buildbots.

llvm-svn: 119363
2010-11-16 18:43:07 +00:00
Bob Wilson d6b6755414 Stop using struct wrappers for Neon vector types in <arm_neon.h>.
Thanks to Nate Begeman for an earlier version of this patch.

llvm-svn: 119358
2010-11-16 18:17:03 +00:00
Nate Begeman b4e0cc0212 Revert r114596, it's breaking a few tests.
llvm-svn: 114659
2010-09-23 16:49:17 +00:00
Nate Begeman e9e9c08ce2 <rdar://problem/8228022> Wvector-conversions warnings in arm_neon.h
Explicitly cast arguments to the type the builtin expects, which is <vN x i8>

llvm-svn: 114596
2010-09-22 22:28:42 +00:00
Bob Wilson 02d6467291 Use float64 instead of int64 vector elements for NEON vget_low and vget_high
functions, since int64 is not a legal type and using it leads to inefficient
code.  PR8036.

llvm-svn: 113919
2010-09-15 01:52:33 +00:00
Bob Wilson 86ac3fc9af Tidy whitespace in generated arm_neon.h.
llvm-svn: 113865
2010-09-14 21:52:34 +00:00
Nate Begeman a59132e329 Add tablegen support for vdup_lane
llvm-svn: 110419
2010-08-06 01:24:11 +00:00
Bob Wilson 59fba9d2b9 Fix a warning from gcc-4.0 (from the ppc buildbot).
llvm-svn: 109605
2010-07-28 18:21:10 +00:00
Bob Wilson 99f28dad6e Change array references to match my previous change to use the public type
names for the array fields.

llvm-svn: 106803
2010-06-24 22:21:19 +00:00
Bob Wilson e26d710335 Fix up some comments.
llvm-svn: 106795
2010-06-24 22:04:30 +00:00
Bob Wilson 3808684055 Use the struct tags mandated by ARM's ABI. Also use the public type names for
the array fields in these structs.

llvm-svn: 106794
2010-06-24 22:03:41 +00:00
Nate Begeman 4713628816 Add support for returning multiple vectors via sret, which is how the ARM target expects the intrinsics to work.
llvm-svn: 106406
2010-06-20 21:09:52 +00:00