Michael Zuckerman
6a0e0871db
[Clang][avx512][builtin] Adding intrinsics for vexpand{d|q|ps|pd} instrctuon set
...
Differential Revision: http://reviews.llvm.org/D19467
llvm-svn: 268214
2016-05-02 08:36:41 +00:00
Michael Zuckerman
c62f27e3f4
[Clang][BuiltIn][avx512] Adding intrinsics for vpshufd instruction set
...
Differential Revision: http://reviews.llvm.org/D19580
llvm-svn: 268213
2016-05-02 07:35:27 +00:00
Michael Zuckerman
ac1e519944
[clang][Builtin][AVX512] Adding intrinsics for vmovshdup and vmovsldup instruction set
...
Differential Revision: http://reviews.llvm.org/D19595
llvm-svn: 268196
2016-05-01 14:43:43 +00:00
Michael Zuckerman
0b9d105a16
[clang][BuiltIn][AVX512]Adding intrinsics for cmp{ss|sd} instruction set.
...
Differential Revision: http://reviews.llvm.org/D19601
llvm-svn: 268028
2016-04-29 11:01:16 +00:00
Michael Zuckerman
41f5a37707
[Clang][AVX512][Builtin] Adding intrinsics for compress instruction set
...
Differential Revision: http://reviews.llvm.org/D19599
llvm-svn: 268013
2016-04-29 08:52:02 +00:00
Michael Zuckerman
de8d3753d3
[clang][AVX512][Builtin] Adding intrinsics for the SAD instruction set.
...
Differential Revision: http://reviews.llvm.org/D19591
llvm-svn: 267942
2016-04-28 21:21:08 +00:00
Adrian Prantl
06f445d65b
Debug info: Apply an artificial debug location to __cyg_profile_func.* calls.
...
The LLVM Verifier expects all inlinable calls in debuggable functions to
have a location.
rdar://problem/25818489
llvm-svn: 267904
2016-04-28 17:21:56 +00:00
Vassil Vassilev
928c8254a9
Reland r267691 fixing PR27535.
...
llvm-svn: 267882
2016-04-28 14:13:28 +00:00
Michael Zuckerman
533e065bdc
[Clang][BuiltIn][AVX512] Adding intrinsics fot align{d|q} and palignr instruction set
...
Differential Revision: http://reviews.llvm.org/D19588
llvm-svn: 267876
2016-04-28 12:47:30 +00:00
Silviu Baranga
632fdc5919
PR27216: Only define __ARM_FEATURE_FMA when the target has VFPv4
...
Summary:
According to the ACLE spec, "__ARM_FEATURE_FMA is defined to 1 if
the hardware floating-point architecture supports fused floating-point
multiply-accumulate".
This changes clang's behaviour from emitting this macro for v7-A and v7-R
cores to only emitting it when the target has VFPv4 (and therefore support
for the floating point multiply-accumulate instruction).
Fixes PR27216
Reviewers: t.p.northover, rengolin
Subscribers: aemerson, rengolin, cfe-commits
Differential Revision: http://reviews.llvm.org/D18963
llvm-svn: 267869
2016-04-28 11:29:08 +00:00
Michael Zuckerman
514f05543f
[Clang][Builtin][AVX512] Adding intrisnics for the vpconflict{q|d} instruction set
...
Differential Revision: http://reviews.llvm.org/D19525
llvm-svn: 267728
2016-04-27 15:35:13 +00:00
Michael Zuckerman
8c2900f44d
[Clang][BuiltIn][AVX512] Adding intrinsics without mask for VBROADCAST and VPBROADCAST instruction set .
...
Differential Revision: http://reviews.llvm.org/D19196
llvm-svn: 267696
2016-04-27 11:43:14 +00:00
Michael Zuckerman
7c85a8cb46
[Clang][BuiltIn][AVX512]Adding intrinsics for vmovntdqa vmovntpd vmovntps instruction set
...
Differential Revision: http://reviews.llvm.org/D19529
llvm-svn: 267690
2016-04-27 10:44:15 +00:00
Jacques Pienaar
e74d91314a
[lanai] Update handling of structs in arguments to be passed in registers.
...
Previously aggregate types were passed byval, change the ABI to pass these in registers instead.
llvm-svn: 267496
2016-04-26 00:09:29 +00:00
Michael Zuckerman
fa508e8b6d
[Clang][Builtin][AVX512]Adding k-register logic intrinsics KAND, KANDN, KOR, KORTEST, KXNOR, KXOR, KUNPACK instruction set.
...
Differential Revision: http://reviews.llvm.org/D19466
llvm-svn: 267425
2016-04-25 16:42:29 +00:00
Michael Zuckerman
edc82fe3ef
[Clang][Builtin][AVX512]Adding intrinsics for vfpclass{sd|ss} vfpclass{pd|ps} instruction set
...
Differential Revision: http://reviews.llvm.org/D19476
llvm-svn: 267414
2016-04-25 14:48:23 +00:00
Michael Zuckerman
fcf32c2f00
[Clang][AVX512][BUILTIN] Adding intrinsics for VSCATTERPF{1|0}{DPS|QPS|DPD|QPD} instruction set
...
Differential Revision: http://reviews.llvm.org/D19313
llvm-svn: 267398
2016-04-25 13:01:40 +00:00
Michael Zuckerman
8938e836c4
[Clang][AVX512][BuiltIn] Adding support to intrinsics of VPERMD and VPERMW instruction set
...
Differential Revision: http://reviews.llvm.org/D19195
llvm-svn: 267380
2016-04-25 05:32:35 +00:00
Duncan P. N. Exon Smith
383f8413cf
DebugInfo: Adapt to loss of DITypeRef in LLVM r267296
...
LLVM stopped using MDString-based type references, and DIBuilder no
longer fills 'retainedTypes:' with every DICompositeType that has an
'identifier:' field. There are just minor changes to keep the same
behaviour in CFE.
Leaving 'retainedTypes:' unfilled has a dramatic impact on the output
order of the IR though. There are a huge number of testcase changes,
which were unfortunately not really scriptable.
llvm-svn: 267297
2016-04-23 21:08:27 +00:00
Krzysztof Parzyszek
4dde0e352a
[Hexagon] Add definitions for circular and bit-reverse loads/stores
...
llvm-svn: 267159
2016-04-22 14:58:46 +00:00
Michael Zuckerman
743d68c3cb
[clang][AVX512][Builtin] adding intrinsics for vf{n}madd{ss|sd} and vf{n}sub{ss|sd} instruction set
...
Differential Revision: http://reviews.llvm.org/D19320
llvm-svn: 267135
2016-04-22 10:56:24 +00:00
Michael Zuckerman
a1ceca20b6
[Clang][AVX512][BUILTIN] Adding scalar intrinsics for rsqrt14 ,rcp14, getexp and getmant instruction set
...
Differential Revision: http://reviews.llvm.org/D19326
llvm-svn: 267129
2016-04-22 10:06:10 +00:00
Renato Golin
1f04213e98
[x86] Force mixes asm syntax test to check for x86
...
llvm-svn: 266993
2016-04-21 14:40:06 +00:00
Michael Zuckerman
4fa96af4db
[Clang][AVX512][BuiltIn] Adding intrinsics of VGATHER{DPS|DPD} , VPGATHER{QD|QQ|DD|DQ} and VGATHERPF{0|1}{DPS|QPS|DPD|QPD} instruction set .
...
Differential Revision: http://reviews.llvm.org/D19224
llvm-svn: 266983
2016-04-21 12:47:27 +00:00
Denis Zobnin
628b022a0e
Correctly parse GCC-style asm line following MS-style asm line.
...
Quit parsing MS-style inline assembly if the following statement has GCC style.
Enables compilation of code like
void f() {
__asm mov ebx, ecx
__asm__("movl %ecx, %edx");
}
Differential Revision: http://reviews.llvm.org/D18652
llvm-svn: 266976
2016-04-21 10:59:18 +00:00
Mandeep Singh Grang
d9d3b21c32
[Clang] Remove unwanted --check-prefix=CHECK from unit tests. NFC.
...
Summary:
Removed unwanted --check-prefix=CHECK from the following unit tests:
test/CXX/special/class.copy/implicit-move-def.cpp
test/CodeGen/cleanup-destslot-simple.c
test/CodeGen/inline-asm-immediate-ubsan.c
test/CodeGen/mips-interrupt-attr.c
test/CodeGenCXX/cfi-stats.cpp
test/CodeGenCXX/copy-constructor-elim.cpp
test/CodeGenCXX/microsoft-templ-uuidof.cpp
test/CodeGenCXX/vtable-linkage.cpp
test/CodeGenObjC/messages-2.m
test/Driver/noinline.c
test/Index/remap-load.c
test/Index/retain-comments-from-system-headers.c
test/OpenMP/task_if_codegen.cpp
test/Preprocessor/comment_save_macro.c
Patch by: Mandeep Singh Grang (mgrang)
Reviewers: rafael, ABataev, rengolin
Projects: #clang-c
Differential Revision: http://reviews.llvm.org/D19232
llvm-svn: 266843
2016-04-20 01:02:18 +00:00
Marcin Koscielnicki
4005070e1b
[AArch64] Fix D19098 fallout.
...
The intrinsic is now called llvm.thread.pointer, not
llvm.aarch64.thread.pointer. Also, the code handling it in CGBuiltin.cpp
is dead - it's already covered by GCCBuiltin. Remove it.
Differential Revision: http://reviews.llvm.org/D19099
llvm-svn: 266817
2016-04-19 20:51:00 +00:00
Ahmed Bougacha
1d9de10130
[ARM NEON] Define vfms_f32 on ARM, and all vfms using vfma.
...
r259537 added vfma/vfms to armv7, but the builtin was only lowered
on the AArch64 side. Instead of supporting it on ARM, get rid of it.
The vfms builtin lowered to:
%nb = fsub float -0.0, %b
%r = @llvm.fma.f32(%a, %nb, %c)
Instead, define the operation in terms of vfma, and swap the
multiplicands. It now lowers to:
%na = fsub float -0.0, %a
%r = @llvm.fma.f32(%na, %b, %c)
This matches the instruction more closely, and lets current LLVM
generate the "natural" operand ordering:
fmls.2s v0, v1, v2
instead of the crooked (but equivalent):
fmls.2s v0, v2, v1
Except for theses changes, assembly is identical.
LLVM accepts both commutations, and the LLVM tests in:
test/CodeGen/AArch64/arm64-fmadd.ll
test/CodeGen/AArch64/fp-dp3.ll
test/CodeGen/AArch64/neon-fma.ll
test/CodeGen/ARM/fusedMAC.ll
already check either the new one only, or both.
Also verified against the test-suite unittests.
llvm-svn: 266807
2016-04-19 19:44:45 +00:00
Sanjay Patel
461f2ff445
[builtin_expect] tighten checks, add test, add comments
...
llvm-svn: 266788
2016-04-19 18:17:34 +00:00
Ahmed Bougacha
40a34c2e2a
[CodeGen] Widen non-power-of-2 vector HFA base types.
...
Currently, for the ppc64--gnu and aarch64 ABIs, we recognize:
typedef __attribute__((__ext_vector_type__(3))) float v3f32;
typedef __attribute__((__ext_vector_type__(16))) char v16i8;
struct HFA {
v3f32 a;
v16i8 b;
};
as an HFA. Since the first type encountered is used as the base type,
we pass the HFA as:
[2 x <3 x float>]
Which leads to incorrect IR (relying on padding values) when the
second field is used.
Instead, explicitly widen the vector (after size rounding) in
isHomogeneousAggregate.
Differential Revision: http://reviews.llvm.org/D18998
llvm-svn: 266784
2016-04-19 17:54:29 +00:00
Michael Zuckerman
6fa512cecf
[Clang][Builtin][AVX512] Adding intrinsics for VGETMANT{PD|PS} and VGETEXP{PD|PS} instruction set
...
Differential Revision: http://reviews.llvm.org/D19197
llvm-svn: 266763
2016-04-19 17:10:29 +00:00
Michael Zuckerman
ef2979af50
[Clang][AVX512][BUILTIN] Adding intrinsics support to VEXTRACT{I|F} and VINSERT{I|F} instruction set
...
Differential Revision: http://reviews.llvm.org/D19097
llvm-svn: 266745
2016-04-19 15:18:23 +00:00
Krzysztof Parzyszek
e2bd2dcc9d
[Hexagon] V60/HVX builtin definitions for clang
...
The builtins already exist in LLVM, but are not exposed to the C/C++
programmers. This patch adds all the information about the builtins
needed for clang, as well as a test for all available intrinsics.
llvm-svn: 266671
2016-04-18 21:27:59 +00:00
Adrian Prantl
80578e7ef0
Update testcase to new debug info metadata format.
...
llvm-svn: 266447
2016-04-15 16:05:13 +00:00
Adrian Prantl
e76bda544b
Update to match LLVM changes for PR27284.
...
(Reverse the ownership between DICompileUnit and DISubprogram.)
http://reviews.llvm.org/D19034
<rdar://problem/25256815>
llvm-svn: 266445
2016-04-15 15:55:45 +00:00
Reid Kleckner
e1a16467a3
In vector comparisons, handle scalar LHS just as we handle scalar RHS
...
Summary: Fixes PR27258
Reviewers: rsmith
Subscribers: cfe-commits
Differential Revision: http://reviews.llvm.org/D19123
llvm-svn: 266366
2016-04-14 21:03:38 +00:00
Michael Zuckerman
0a3508a8d3
[Clang][AVX512][BUILTIN] Adding support for intrinsics of vpmov{d|q}{b|w|d}{128|256|512} instruction set
...
Differential Revision: http://reviews.llvm.org/D19055
llvm-svn: 266280
2016-04-14 07:56:51 +00:00
Michael Zuckerman
d871531687
[Clang][AVX512][Builtin] Adding intrinsics of vpmovus{d|q}{b|w|d}{128|256|512} instruction set
...
Differential Revision: http://reviews.llvm.org/D19050
llvm-svn: 266278
2016-04-14 06:48:09 +00:00
Michael Zuckerman
e1680617b0
[Clang][AVX512][Builtin] Adding support to intrinsics of pmovs{d|q}{b|w|d}{128|256|512} instruction set
...
Differential Revision: http://reviews.llvm.org/D19023
llvm-svn: 266202
2016-04-13 15:02:04 +00:00
Michael Zuckerman
c2b6128a8f
[Clang][AVX512][Builtin] Adding support for VBROADCAST and VPBROADCASTB/W/D/Q instruction set
...
Differential Revision: http://reviews.llvm.org/D19012
llvm-svn: 266195
2016-04-13 12:58:01 +00:00
Michael Zuckerman
074edd7c1e
[Clang][AVX512][Builtin] Adding supporting to intrinsics of cvt{b|d|q}2mask{128|256|512} and cvtmask2{b|d|q}{128|256|512} instruction set.
...
Differential Revision: http://reviews.llvm.org/D19009
llvm-svn: 266188
2016-04-13 10:49:37 +00:00
Chuang-Yu Cheng
8eac7ae9ad
[PPC64][VSX] Add a couple of new data types for vec_vsx_ld and vec_vsx_st intrinsics and fix incorrect testcases with minor refactoring
...
New added data types:
vector double vec_vsx_ld (int, const double *);
vector float vec_vsx_ld (int, const float *);
vector bool short vec_vsx_ld (int, const vector bool short *);
vector bool int vec_vsx_ld (int, const vector bool int *);
vector signed int vec_vsx_ld (int, const signed int *);
vector unsigned int vec_vsx_ld (int, const unsigned int *);
void vec_vsx_st (vector double, int, double *);
void vec_vsx_st (vector float, int, float *);
void vec_vsx_st (vector bool short, int, vector bool short *);
void vec_vsx_st (vector bool short, int, signed short *);
void vec_vsx_st (vector bool short, int, unsigned short *);
void vec_vsx_st (vector bool int, int, vector bool int *);
void vec_vsx_st (vector bool int, int, signed int *);
void vec_vsx_st (vector bool int, int, unsigned int *);
Also fix testcases which use non-vector argument version of vec_vsx_ld or
vec_vsx_st, but pass incorrect parameter.
llvm-svn: 266166
2016-04-13 05:16:31 +00:00
Eric Christopher
d5c75eed44
Add a couple of missing vsx load and store intrinsics.
...
Patch by Jing Yu!
llvm-svn: 266122
2016-04-12 21:08:54 +00:00
Evgeniy Stepanov
b0c887762a
Stricter checks in the stack-protector codegen test.
...
llvm-svn: 266095
2016-04-12 17:51:59 +00:00
Michael Zuckerman
04fb3bc682
[Clang][BuiltIn][avx512] Adding avx512 (shuf,sqrt{ss|sd},rsqrt ) builtin to clang
...
llvm-svn: 266048
2016-04-12 07:59:39 +00:00
Evgeniy Stepanov
368d3074ba
Allow simultaneous safestack and stackprotector attributes.
...
This is the clang part of http://reviews.llvm.org/D18846 .
SafeStack instrumentation pass adds stack protector canaries if both
attributes are present on a function. StackProtector pass will step
back if the function has a safestack attribute.
llvm-svn: 266005
2016-04-11 22:27:55 +00:00
Michael Zuckerman
81f468c859
[Clang][AVX512][BuiltIn] Adding avx512 ( psll{d|q}512,psllv{16si|8di},psra{d|q}512,psrav{16si|8di},pternlog{d|q}{128|256|512} ) builtin to clang
...
Differential Revision: http://reviews.llvm.org/D18926
llvm-svn: 265964
2016-04-11 17:04:21 +00:00
Michael Zuckerman
6b5f4d8ad1
[CLANG] [AVX512] [BUILTIN] Adding PSRA{Q|D|QI|DI}{128|256|512} builtin
...
Differential Revision: http://reviews.llvm.org/D17693
llvm-svn: 265952
2016-04-11 15:46:39 +00:00
Michael Zuckerman
1af947a7b3
[Clang][AVX512][BuiltIn] Adding avx512 ( punpck{h|l}{dq|qdq}{128|256|512},rndscale{ss|sd}, {scalef{ss|sd|pd512|ps512} ) builtin to clang
...
Differential Revision: http://reviews.llvm.org/D18929
llvm-svn: 265935
2016-04-11 12:32:31 +00:00
Michael Zuckerman
07525091e6
[Clang][AVX512][BuiltIn] Adding avx512 ( ptest{n}m{b|w}{128|256|512} ) builtin to clang
...
Differential Revision: http://reviews.llvm.org/D18924
llvm-svn: 265928
2016-04-11 10:22:07 +00:00