Eli Friedman
9bb51adcce
Tweak *mmintrin.h so that they don't make any bad assumptions about alignment (which probably has little effect in practice, but better to get it right). Make the load in _mm_loadh_pi and _mm_loadl_pi a single LLVM IR instruction to make optimizing easier for CodeGen.
...
rdar://10054986
llvm-svn: 139874
2011-09-15 23:15:27 +00:00
Bill Wendling
03e7e430c3
Add 'may_alias' attribute. Noticed by Eli.
...
llvm-svn: 131278
2011-05-13 01:24:00 +00:00
Bill Wendling
502931fad9
Represent the unaligned loads natively. These are converted into a call to the
...
correct unaligned load.
llvm-svn: 131268
2011-05-13 00:11:39 +00:00
Bill Wendling
e106c34817
LLVM doesn't always optimize away the four loads from this:
...
(__m128){ p[0], p[1], p[2], p[3] }
which produces really bad code. This could be done in instcombine, but it's
probably better to do it in the front-end instead.
<rdar://problem/9424836>
llvm-svn: 131237
2011-05-12 19:02:15 +00:00
Bill Wendling
2c1c33552d
Remove comment that snuck in there.
...
llvm-svn: 129434
2011-04-13 10:05:14 +00:00
Bill Wendling
b9c9e34cb3
Just use a native "load" instead of translating the builtin later. Clang can
...
take it!
I wasn't able to get __builtin_ia32_loaddqu to transform into an unaligned
load...I'll have to look into it further.
llvm-svn: 129427
2011-04-13 05:58:17 +00:00
Chandler Carruth
45c2fb1e69
Undo part of my previous commit to mm_malloc.h, going back to the use of
...
stdlib.h. There were numerous problems with forward declaring 'malloc' and
'free', but the most important is that these are reserved by POSIX and may be
implemented via a function-like macro.
As suggested by Dale Johannesen, I'm instead guarding the only include of this
in our builtin headers with __STDC_HOSTED__, and I've removed the include of
the header from the test suite. I'll discuss with folks whether we want to have
a hosted section of the test suite or not, and add it (and perhaps other tests)
back there if that's the direction.
llvm-svn: 119958
2010-11-22 08:06:31 +00:00
Chris Lattner
07704f1d7e
the mmx intrinsic for pshufw should map to the IR intrinsic, not
...
to a shufflevector. Otherwise it doesn't turn into a pshufw.
This bug was introduced in the mmx rewrite.
llvm-svn: 115423
2010-10-02 21:32:59 +00:00
Chris Lattner
212a492063
fix incorrect MM_HINT_ definitions, PR8011
...
llvm-svn: 112283
2010-08-27 20:10:06 +00:00
Chandler Carruth
7579c008ec
Fix some typos I made when adding alternate intrinsic names.
...
llvm-svn: 110545
2010-08-08 08:30:05 +00:00
Chandler Carruth
96f2e9e418
Add alternate names for x86 SIMD intrinsics. These aren't as common, but show
...
up enough to be worth supporting properly. Fixes PR7674.
llvm-svn: 109086
2010-07-22 06:47:28 +00:00
Daniel Dunbar
f5e075d392
Headers: Fix quoting of macro arguments in a couple more places.
...
llvm-svn: 105331
2010-06-02 16:35:01 +00:00
Nick Lewycky
71eac6e114
Make macro safe in the face of users who pass "addr+64". Addition of void* is
...
invalid.
llvm-svn: 105172
2010-05-30 18:26:21 +00:00
Chris Lattner
6625c7028e
add type casts to _mm_shuffle_ps so the front-end applies
...
implicit conversions where needed. This fixes an error reported
on cfe-dev, not really worth a testcase though.
llvm-svn: 103864
2010-05-15 05:53:53 +00:00
Chris Lattner
7eac805bb0
fix PR6658: inline isn't a keyword in C89 mode, use __inline__ instead.
...
llvm-svn: 99190
2010-03-22 18:14:12 +00:00
Eric Christopher
33124e20c7
Migrate typedefs to the top level of xmmintrin.h and remove the same
...
one from emmintrin.h.
llvm-svn: 99020
2010-03-20 01:08:47 +00:00
Chris Lattner
e983eae273
add two aliases for SSE functions we already have, fixing PR6316.
...
llvm-svn: 96363
2010-02-16 18:21:25 +00:00
Chris Lattner
b18093e467
fix PR6187: various load functions in xmmintrin.h were missing 'const'.
...
emmintrin looks ok.
llvm-svn: 94998
2010-02-01 20:14:14 +00:00
Chris Lattner
0afd3a23cd
fix a bug in the _MM_TRANSPOSE4_PS definition, patch by Brian Sumner from
...
PR6138
llvm-svn: 94669
2010-01-27 07:54:50 +00:00
Chris Lattner
4debb32fdd
_mm_xor_ps does a xor not a nxor. The other 'xor' builtins look fine,
...
but this one is wrong. Thanks to Tanya for noticing this.
llvm-svn: 92881
2010-01-07 00:36:41 +00:00
Eli Friedman
9d79bdaaad
Following gcc, hide the hack to include the SSE2 intrinsics from
...
xmmintrin.h in an ifdef.
llvm-svn: 73200
2009-06-11 18:50:02 +00:00
Daniel Dunbar
fcec758f4e
xmmintrin needs to include emmintrin, Darwin system headers seem to depend on it
...
defining m128[id], at least.
llvm-svn: 73021
2009-06-07 08:33:23 +00:00
Eli Friedman
5a996fc0fc
Now that LLVM CodeGen can handle the generic variations a bit better,
...
get rid of a few more clang vector builtins.
llvm-svn: 73015
2009-06-07 07:12:56 +00:00
Eli Friedman
4d8d7d3263
Replace more calls to builtins with generic code.
...
llvm-svn: 72995
2009-06-06 08:08:06 +00:00
Eli Friedman
d00fd2885e
Fix some casts to work without -flax-vector-conversions.
...
llvm-svn: 72981
2009-06-06 03:45:06 +00:00
Eli Friedman
ebd9314f32
Misc fixes to MMX/SSE intrinsics: a few small bug fixes, and getting rid
...
of calls to builtins for constructs which can be expressed directly.
llvm-svn: 72979
2009-06-06 02:13:04 +00:00
Eli Friedman
f83c258eae
Add aliases for a couple of SSE intrinsics. Patch by Ed Schouten.
...
llvm-svn: 72717
2009-06-02 05:55:48 +00:00
Anders Carlsson
2081200b8c
Add 'cmp' SSE builtins and get rid of a bunch of other builtins.
...
llvm-svn: 72032
2009-05-18 19:16:46 +00:00
Chris Lattner
ff8a9e6ee4
fix misspelt attribute.
...
llvm-svn: 69362
2009-04-17 17:55:23 +00:00
Daniel Dunbar
c9feeb54a5
Spell __always_inline__ correctly.
...
llvm-svn: 64757
2009-02-17 07:57:58 +00:00
Anders Carlsson
11352f9d63
Fix more xmmintrin.h typos
...
llvm-svn: 64537
2009-02-14 04:01:38 +00:00
Anders Carlsson
823c02eaab
Add the nodebug attribute to intrinsics
...
llvm-svn: 64519
2009-02-14 01:00:11 +00:00
Mike Stump
5b31ed3ff0
80col.
...
llvm-svn: 64450
2009-02-13 14:24:50 +00:00
Anders Carlsson
5bc94e625b
Fix some mistakes I made when I tried to decipher the Intel documentation of the MXCSR register
...
llvm-svn: 64290
2009-02-11 06:29:32 +00:00
Anders Carlsson
43c2bab6d3
Fix more bugs I discovered
...
llvm-svn: 62656
2009-01-21 01:49:39 +00:00
Anders Carlsson
7322ea25a5
Fix some errors I noticed
...
llvm-svn: 62620
2009-01-20 21:51:44 +00:00
Anders Carlsson
f562b39e80
Add a MS specific intrinsic.
...
llvm-svn: 61446
2008-12-27 04:26:15 +00:00
Anders Carlsson
19ef5d49d4
OK, all tests pass. Let's start using the SSE2 header
...
llvm-svn: 61440
2008-12-26 00:57:11 +00:00
Anders Carlsson
c72502308d
Fix test failures noticed by Fariborz.
...
llvm-svn: 61334
2008-12-22 17:42:23 +00:00
Anders Carlsson
e5f993da3d
Flip the switch and start using the new xmmintrin.h
...
llvm-svn: 61332
2008-12-22 07:36:02 +00:00