Craig Topper
2a383c9273
[X86] Use undefined instead of setzero in shufflevector based intrinsics when the second source is unused. Rewrite immediate extractions in shuffle intrinsics to be in ((c >> x) & y) form instead of ((c & z) >> x). This way only x varies between each use instead of having to vary x and z.
...
llvm-svn: 274525
2016-07-04 22:18:01 +00:00
Simon Pilgrim
427154db2a
[X86][AVX512] Converted the VSHUFPD intrinsics to generic IR
...
llvm-svn: 274523
2016-07-04 21:30:47 +00:00
Simon Pilgrim
30db811526
[X86][AVX512] Converted the VPERMPD/VPERMQ intrinsics to generic IR
...
llvm-svn: 274502
2016-07-04 13:34:44 +00:00
Simon Pilgrim
17388f2569
[X86][AVX512] Converted the VPERMILPD/VPERMILPS intrinsics to generic IR
...
llvm-svn: 274492
2016-07-04 11:06:15 +00:00
Simon Pilgrim
275d721485
[X86][AVX512] Converted the MOVDDUP/MOVSLDUP/MOVSHDUP masked intrinsics to generic IR
...
llvm companion patch imminent
llvm-svn: 274442
2016-07-02 17:16:25 +00:00
Craig Topper
b3a4477b13
[X86] Replace 128-bit and 256 masked vpermilps/vpermilpd builtins with native IR.
...
llvm-svn: 274425
2016-07-02 05:36:43 +00:00
Michael Zuckerman
3f316abdce
[Clang][Intrinsics][AVX512][BuiltIn] adding intrinsics for vrangesd instruction set
...
Differential Revision: http://reviews.llvm.org/D21734
llvm-svn: 274218
2016-06-30 08:05:46 +00:00
Alexey Bader
e5b3aebfb5
[OpenCL] Add attribute 'pure' to read_image built-in functions to enable optimizations.
...
Reviewers: Anastasia, yaxunl
Subscribers: pekka.jaaskelainen, pxli168, cfe-commits
Differential Revision: http://reviews.llvm.org/D21795
llvm-svn: 274122
2016-06-29 12:30:26 +00:00
David Majnemer
2916a612cd
[intrin.h] Certain _Interlocked intrinsics return the old value
...
This fixes PR28326.
llvm-svn: 273986
2016-06-28 02:54:43 +00:00
Asaf Badouh
57819aa185
[X86] add _mm_loadu_si64
...
Differential Revision: http://reviews.llvm.org/D21504
llvm-svn: 273812
2016-06-26 13:51:54 +00:00
Craig Topper
50e3dfe9d0
[X86] Fix pslldq/psrldq intrinsics to not fail compilation with immediates larger than 16. This was accidentally broken in r272246.
...
llvm-svn: 273775
2016-06-25 07:31:14 +00:00
Craig Topper
79f53ca0b5
[AVX512] Replace masked unpack builtins with shufflevector and selects.
...
llvm-svn: 273533
2016-06-23 06:36:42 +00:00
Michael Zuckerman
716859aa64
[Clang][bmi][intrinsics] Adding _mm_tzcnt_64 _mm_tzcnt_32 intrinsics to clang.
...
Differential Revision: http://reviews.llvm.org/D21373
llvm-svn: 273401
2016-06-22 12:32:43 +00:00
Craig Topper
9ce3ddf2e6
[AVX512] Use a __v8hi vector inside of _mm_setzero_hi to match its name. Probably no real functional change.
...
llvm-svn: 273389
2016-06-22 06:36:23 +00:00
Craig Topper
08181f795f
[AVX512] Fix _mm_setzero_di to not require avx512vl since its used by the avx512dqintrin.h. Also update the avx512dq test to not enable avx512vl feature so we can ensure correct dependencies.
...
llvm-svn: 273388
2016-06-22 06:36:21 +00:00
Craig Topper
c89dda5938
[AVX512] Add missing typecasts to intrinsics.
...
llvm-svn: 273386
2016-06-22 06:36:16 +00:00
Craig Topper
879b0978f4
[AVX512] Move the 128-bit and 256-bit lzcnt intrinsics to avx512vlcdintrin.h where they belong.
...
llvm-svn: 273249
2016-06-21 06:53:58 +00:00
Yaxun Liu
143f083e4b
[OpenCL] Include opencl-c.h by default as a clang module
...
Include opencl-c.h by default as a module to utilize the automatic AST caching mechanism of clang modules.
Add an option -finclude-default-header to enable default header for OpenCL, which is off by default.
Differential Revision: http://reviews.llvm.org/D20444
llvm-svn: 273191
2016-06-20 19:26:00 +00:00
Zvi Rackover
453d734201
[X86] _MM_ALIGN16 attribute support for non-windows targets
...
Summary:
This patch adds support for the _MM_ALIGN16 attribute on non-windows targets. This aligns Clang with ICC which supports the attribute on all targets.
Fixes PR28056
Reviewers: aaboud, echristo, cfe-commits, mkuper
Subscribers: zvi, mehdi_amini
Projects: #clang-c
Differential Revision: http://reviews.llvm.org/D21173
llvm-svn: 273095
2016-06-18 20:01:07 +00:00
Saleem Abdulrasool
5065d8cfc9
Headers: wordsmith error message
...
Use the marketing name for the MSVC release as pointed out by Nico Weber!
llvm-svn: 272979
2016-06-17 00:27:02 +00:00
Saleem Abdulrasool
13f3baf572
Headers: tweak for MSVC[<1800]
...
Earlier versions of MSVC did not include inttypes.h. Ensure that we dont try to
include_next on those releases.
llvm-svn: 272741
2016-06-15 00:28:15 +00:00
Hans Wennborg
f8b91f8336
s/Intrin.h/intrin.h/, trying to fix the build after r272701
...
llvm-svn: 272702
2016-06-14 20:14:24 +00:00
Nico Weber
73384a8f76
Rename Intrin.h to intrin.h, that's how all the documentation calls it.
...
llvm-svn: 272701
2016-06-14 19:54:40 +00:00
Michael Zuckerman
c49f6ce3e1
[Clang][avx512][Intrinsics] adding prefetch gather intrinsics
...
Differential Revision: http://reviews.llvm.org/D21322
llvm-svn: 272667
2016-06-14 13:45:17 +00:00
Michael Zuckerman
223676d2cc
[Clang][AVX512][intrinsics] Adding missing intrinsics div_pd and div_ps
...
Differential Revision: http://reviews.llvm.org/D20626
llvm-svn: 272658
2016-06-14 12:38:58 +00:00
David Majnemer
d423574fde
[immintrin] Reimplement _bit_scan_{forward,reverse}
...
There is no need to use a target-specific intrinsic to implement
_bit_scan_forward or _bit_scan_reverse, reimplementing them using
generic intrinsics makes it more likely that the middle end will
understand what's going on.
llvm-svn: 272564
2016-06-13 17:26:16 +00:00
Asaf Badouh
880f0c252b
[X86][AVX512F] bugfix - sqrtps should get __mask16 as mask parameter
...
CR: Michael Zuckerman
llvm-svn: 272549
2016-06-13 15:15:57 +00:00
Simon Pilgrim
beca5f295c
[Clang][X86] Convert non-temporal store builtins to generic __builtin_nontemporal_store in headers
...
We can now use __builtin_nontemporal_store instead of target specific builtins for naturally aligned nontemporal stores which avoids the need for handling in CGBuiltin.cpp
The scalar integer nontemporal (unaligned) store builtins will have to wait as __builtin_nontemporal_store currently assumes natural alignment and doesn't accept the 'packed struct' trick that we use for normal unaligned load/stores.
The nontemporal loads require further backend support before we can safely convert them to __builtin_nontemporal_load
Differential Revision: http://reviews.llvm.org/D21272
llvm-svn: 272540
2016-06-13 09:57:52 +00:00
Craig Topper
fc07498e4a
[AVX512] Masked pcmpeqd, pcmpeqq, pcmpgtd, and pcmpgtq don't require avx512bw, just avx512vl.
...
llvm-svn: 272532
2016-06-13 04:15:11 +00:00
Craig Topper
7cc9263ec2
[AVX512] Implement masked and 512-bit pshufd intrinsics directly with __builtin_shufflevector and __builtin_ia32_select.
...
llvm-svn: 272467
2016-06-11 12:50:19 +00:00
Craig Topper
26d5b87316
[X86] Add explicit typecasts to some intrinsics.
...
llvm-svn: 272466
2016-06-11 12:50:12 +00:00
Craig Topper
68738332b8
[AVX512] Implement 512-bit and masked shufflelo and shufflehi intrinsics directly with __builtin_shufflevector and __builtin_ia32_select. Also improve the formatting of the AVX2 version.
...
llvm-svn: 272452
2016-06-11 03:31:13 +00:00
Craig Topper
d4273a425e
[AVX512] Add _mm512_bsrli_epi128 and _mm512_bslli_epi128 intrinsics.
...
llvm-svn: 272451
2016-06-11 03:31:07 +00:00
Ekaterina Romanova
71a68c928a
Add doxygen comments to mmintrin.h's intrinsics.
...
The doxygen comments are automatically generated based on Sony's intrinsics docu
ment.
I got an OK from Eric Christopher to commit doxygen comments without prior code
review upstream.
llvm-svn: 272350
2016-06-10 00:10:40 +00:00
Justin Lebar
4fb5711751
[CUDA] Implement __shfl* intrinsics in clang headers.
...
Summary: Clang changes to make use of the LLVM intrinsics added in D21160.
Reviewers: tra
Subscribers: jholewinski, cfe-commits
Differential Revision: http://reviews.llvm.org/D21162
llvm-svn: 272299
2016-06-09 20:04:57 +00:00
Craig Topper
2769bb5753
[X86] Handle AVX2 pslldqi and psrldqi intrinsics shufflevector creation directly in the header file instead of in CGBuiltin.cpp. Simplify the sse2 equivalents as well.
...
llvm-svn: 272246
2016-06-09 05:15:12 +00:00
Craig Topper
3a0c7260f4
[X86] Add void to the argument list of intrinsics that don't take arguments since empty argument list mean something else in C.
...
llvm-svn: 272244
2016-06-09 05:14:28 +00:00
Igor Breger
aadb876200
[AVX512] Emit select instruction instead of using x86 specific instrinsics.
...
This will allow us to remove the x86 instrinics from the backend.
Differential Revision: http://reviews.llvm.org/D21060
llvm-svn: 272141
2016-06-08 13:59:20 +00:00
Michael Zuckerman
c4ae8537cf
[Clang][AVX512][BUILTIN]Adding intrinsics for range_round_{sd|ss}
...
Differential Revision: http://reviews.llvm.org/D21002
llvm-svn: 272123
2016-06-08 08:19:27 +00:00
Ekaterina Romanova
50e94a3b34
Add doxygen comments to xmmintrin.h's intrinsics.
...
Only half of the intrinsics in this file is documented here. The patch for the o
ther half will be sent out later.
The doxygen comments are automatically generated based on Sony's intrinsics docu
ment.
I got an OK from Eric Christopher to commit doxygen comments without prior code
review upstream.
llvm-svn: 272121
2016-06-08 07:34:31 +00:00
Craig Topper
f3efec65bb
[AVX512] Reformat macro intrinsics, ensure arguments have proper typecasts, ensure result is typecasted back to the generic types.
...
llvm-svn: 272119
2016-06-08 06:08:07 +00:00
Craig Topper
605894985f
[X86] Put parentheses around macro arguments in intrinsics.
...
llvm-svn: 272118
2016-06-08 06:08:04 +00:00
Michael Zuckerman
96d0399658
[clang][AVX512][Intrinsics] Adding intrinsics reduce_[round]_{ss|sd} to clang
...
Differential Revision: http://reviews.llvm.org/D21014
llvm-svn: 272012
2016-06-07 14:00:20 +00:00
Michael Zuckerman
1a7889f203
Fixing problem with rsqrt28_sd
...
maskz_rsqrt28_sd mapped to mask_rsqrt28_sd and not to the maskz.
llvm-svn: 271836
2016-06-05 15:57:49 +00:00
Michael Zuckerman
95721ac863
[Clang][AVX512]Adding set4 intrinsics
...
Differential Revision: http://reviews.llvm.org/D20866
llvm-svn: 271835
2016-06-05 15:43:30 +00:00
Michael Zuckerman
f36f6eb036
[Clang][AVX512][Intrinsics] Adding two definitions _mm512_setzero and _mm512_setzero_epi32
...
Differential Revision: http://reviews.llvm.org/D20871
llvm-svn: 271832
2016-06-05 15:12:52 +00:00
Craig Topper
6a77b62640
[X86] Use unsigned types for vector arithmetic in intrinsics to avoid undefined behavior for signed integer overflow.
...
This is really only needed for addition, subtraction, and multiplication, but I did the bitwise ops too for overall consistency. Clang currently doesn't set NSW for signed vector operations so the undefined behavior shouldn't happen today.
llvm-svn: 271778
2016-06-04 05:43:41 +00:00
Craig Topper
406d5cdf7c
[AVX512] Remove space in -1 constants. NFC
...
llvm-svn: 271777
2016-06-04 05:43:37 +00:00
Asaf Badouh
89f657611c
[X86][AVX512] add intrinsics of Scalar FP to integer
...
Differential Revision: http://reviews.llvm.org/D20861
llvm-svn: 271499
2016-06-02 08:11:35 +00:00
Michael Zuckerman
9e7d0a98fa
[Clang][AVX512][INTRINSICS] adding round cvt and fix regular cvtps_ph
...
Differential Revision: http://reviews.llvm.org/D20870
llvm-svn: 271498
2016-06-02 07:44:08 +00:00