Commit Graph

69 Commits

Author SHA1 Message Date
Bob Wilson
2196caab82 Add an operator for vdup_lane so it can be implemented without a clang builtin.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121190 91177308-0d34-0410-b5e6-96231b3b80d8
2010-12-07 22:39:24 +00:00
Bob Wilson
3467cd0d03 Add an operator for vmull_lane so it can be implemented without a clang builtin.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121187 91177308-0d34-0410-b5e6-96231b3b80d8
2010-12-07 22:02:48 +00:00
Bob Wilson
c4ba09da60 Add new built-in operations for vmull and vmull_n
so they can be implemented without requiring clang builtins.
Radar 8446238.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121173 91177308-0d34-0410-b5e6-96231b3b80d8
2010-12-07 20:02:45 +00:00
Bob Wilson
3890e397c3 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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121087 91177308-0d34-0410-b5e6-96231b3b80d8
2010-12-07 01:12:23 +00:00
Bob Wilson
d8b847066e Fix whitespace.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121086 91177308-0d34-0410-b5e6-96231b3b80d8
2010-12-07 01:12:19 +00:00
Bob Wilson
7f76218720 Remove trailing whitespace.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120891 91177308-0d34-0410-b5e6-96231b3b80d8
2010-12-04 04:40:15 +00:00
Bob Wilson
ce0bb5479a Get Neon intrinsic names from the new "Name" field in the tblgen records
instead of just converting the record name to lowercase.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120809 91177308-0d34-0410-b5e6-96231b3b80d8
2010-12-03 17:19:39 +00:00
Bob Wilson
b0d98692a6 Add support for "_lane" variants of VMUL, VMLA, and VMLS Neon intrinsics.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120764 91177308-0d34-0410-b5e6-96231b3b80d8
2010-12-03 00:34:12 +00:00
Bob Wilson
194aa58066 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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120763 91177308-0d34-0410-b5e6-96231b3b80d8
2010-12-03 00:34:09 +00:00
Bob Wilson
37a0b54fb5 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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120695 91177308-0d34-0410-b5e6-96231b3b80d8
2010-12-02 07:44:23 +00:00
Bob Wilson
377296e301 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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120693 91177308-0d34-0410-b5e6-96231b3b80d8
2010-12-02 07:10:39 +00:00
Bob Wilson
052008bc3d 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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120649 91177308-0d34-0410-b5e6-96231b3b80d8
2010-12-02 02:42:51 +00:00
Bob Wilson
4a6c7fc872 Add casts for splatted scalars in calls to Neon builtins.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120641 91177308-0d34-0410-b5e6-96231b3b80d8
2010-12-02 01:18:23 +00:00
Bob Wilson
1dbfa91671 Add a missing cast for Neon vsbl results.
The bitwise operations are always done with unsigned values, but the result may
be signed.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120640 91177308-0d34-0410-b5e6-96231b3b80d8
2010-12-02 01:18:20 +00:00
Bob Wilson
b322fc2ece Add another missing cast for Neon vcombine results.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120639 91177308-0d34-0410-b5e6-96231b3b80d8
2010-12-02 01:18:18 +00:00
Bob Wilson
c79528a112 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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120638 91177308-0d34-0410-b5e6-96231b3b80d8
2010-12-02 01:18:15 +00:00
Bob Wilson
317bafb82c Avoid "char" for Neon vector elements; make it explicitly signed (or unsigned).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120632 91177308-0d34-0410-b5e6-96231b3b80d8
2010-12-02 00:24:59 +00:00
Bob Wilson
e106bc17a3 Cast scalar results of Neon macros to the correct type.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120631 91177308-0d34-0410-b5e6-96231b3b80d8
2010-12-02 00:24:56 +00:00
Bob Wilson
f00140c8e1 Add explicit casts for vector arguments to Neon builtins.
This avoids warnings with -Wvector-conversions.  Radar 8228022.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120597 91177308-0d34-0410-b5e6-96231b3b80d8
2010-12-01 19:49:58 +00:00
Bob Wilson
95148ad023 Add some comments for TableGen's NeonEmitter.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120596 91177308-0d34-0410-b5e6-96231b3b80d8
2010-12-01 19:49:56 +00:00
Bob Wilson
5b7fe5920d Cleanup: simplify checks for integers between 2 and 4.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120595 91177308-0d34-0410-b5e6-96231b3b80d8
2010-12-01 19:49:51 +00:00
Bob Wilson
b055f740bd Fix copy-and-paste error in exception message.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120033 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-23 19:38:34 +00:00
Bob Wilson
181b76d503 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).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119742 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-18 21:43:22 +00:00
Bob Wilson
6a8aceb50b 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
2010-11-16 23:57:06 +00:00
Bob Wilson
4fbf63845f Change Neon polynomial types to be signed to match GCC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119405 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-16 23:57:03 +00:00
Bob Wilson
b308b62e6a Refactor to new GetNumElements function.
No functional change.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119404 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-16 23:57:01 +00:00
Bob Wilson
6904d7af1c 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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119369 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-16 19:39:14 +00:00
Bob Wilson
f18dfec0f7 Reapply "Stop using struct wrappers for Neon vector types in <arm_neon.h>."
I've temporarily disabled the failing clang test.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119367 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-16 19:16:06 +00:00
Bob Wilson
1ce588c970 Revert "Stop using struct wrappers for Neon vector types in <arm_neon.h>."
It's breaking buildbots.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119363 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-16 18:43:07 +00:00
Bob Wilson
f93cbbd72e Stop using struct wrappers for Neon vector types in <arm_neon.h>.
Thanks to Nate Begeman for an earlier version of this patch.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119358 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-16 18:17:03 +00:00
Nate Begeman
8a6e7e1214 Revert r114596, it's breaking a few tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114659 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-23 16:49:17 +00:00
Nate Begeman
e5cb26fab9 <rdar://problem/8228022> Wvector-conversions warnings in arm_neon.h
Explicitly cast arguments to the type the builtin expects, which is <vN x i8>



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114596 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-22 22:28:42 +00:00
Bob Wilson
ee9ca07e7f 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113919 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-15 01:52:33 +00:00
Bob Wilson
72774c9a83 Tidy whitespace in generated arm_neon.h.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113865 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-14 21:52:34 +00:00
Nate Begeman
59d70cbc29 Add tablegen support for vdup_lane
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110419 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-06 01:24:11 +00:00
Bob Wilson
fdb530d406 Fix a warning from gcc-4.0 (from the ppc buildbot).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109605 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-28 18:21:10 +00:00
Bob Wilson
e9c2615b76 Change array references to match my previous change to use the public type
names for the array fields.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106803 91177308-0d34-0410-b5e6-96231b3b80d8
2010-06-24 22:21:19 +00:00
Bob Wilson
1ac27cf5ae Fix up some comments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106795 91177308-0d34-0410-b5e6-96231b3b80d8
2010-06-24 22:04:30 +00:00
Bob Wilson
9969bc3d19 Use the struct tags mandated by ARM's ABI. Also use the public type names for
the array fields in these structs.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106794 91177308-0d34-0410-b5e6-96231b3b80d8
2010-06-24 22:03:41 +00:00
Nate Begeman
c4a1b652b2 Add support for returning multiple vectors via sret, which is how the ARM target expects the intrinsics to work.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106406 91177308-0d34-0410-b5e6-96231b3b80d8
2010-06-20 21:09:52 +00:00
Nate Begeman
f8c4c27d84 Modify tablegen to support generating all NEON code used by clang at once.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106207 91177308-0d34-0410-b5e6-96231b3b80d8
2010-06-17 04:15:13 +00:00
Nate Begeman
4da883a56f Make VC++ happy
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106054 91177308-0d34-0410-b5e6-96231b3b80d8
2010-06-15 22:10:31 +00:00
Nate Begeman
918f8e4ab0 Add the last of the SemaChecking-gen code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@105929 91177308-0d34-0410-b5e6-96231b3b80d8
2010-06-14 05:17:23 +00:00
Nate Begeman
d72c900152 Add a helping of comments
Add code for generating bits of semachecking


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@105907 91177308-0d34-0410-b5e6-96231b3b80d8
2010-06-13 04:47:03 +00:00
Chris Lattner
5ca96988b0 declare a class with 'class' instead of struct to avoid tag mismatch
warnings, and don't shift by a bool.  Patch by Rizky Herucakra!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@105886 91177308-0d34-0410-b5e6-96231b3b80d8
2010-06-12 15:46:56 +00:00
Nate Begeman
cc3c41a9c3 Add generic vector support for bitselect & element byteswap
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@105874 91177308-0d34-0410-b5e6-96231b3b80d8
2010-06-12 03:09:49 +00:00
Nate Begeman
d6645dd4fe Add support for polynomial type, for polynomial multiply
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@105792 91177308-0d34-0410-b5e6-96231b3b80d8
2010-06-10 18:06:07 +00:00
Nate Begeman
4b425a8caa NEON support for _lane ops, and multiplies by scalar.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@105769 91177308-0d34-0410-b5e6-96231b3b80d8
2010-06-10 00:16:56 +00:00
Nate Begeman
f50551eb08 Further refine types for operations which take scalars.
This will be used primarily by NEON shift intrinsics.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@105733 91177308-0d34-0410-b5e6-96231b3b80d8
2010-06-09 18:02:26 +00:00
Nate Begeman
007afe4b4b Specialize I-Class instructions better so that we have less work to do in codegen.
Parenthesize macro args


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@105682 91177308-0d34-0410-b5e6-96231b3b80d8
2010-06-09 05:11:55 +00:00