platform/upstream/llvm.git
4 years ago[AArch64][SVE] Add bfloat16 support to store intrinsics
Kerry McLaughlin [Fri, 26 Jun 2020 09:47:18 +0000 (10:47 +0100)]
[AArch64][SVE] Add bfloat16 support to store intrinsics

Summary:
Bfloat16 support added for the following intrinsics:
 - ST1
 - STNT1

Reviewers: sdesmalen, c-rhodes, fpetrogalli, efriedma, stuij, david-arm

Reviewed By: fpetrogalli

Subscribers: tschuett, kristof.beyls, hiraditya, rkruppe, psnobl, danielkiss, cfe-commits, llvm-commits

Tags: #clang, #llvm

Differential Revision: https://reviews.llvm.org/D82448

4 years agoLoopVectorize.h - reduce AliasAnalysis.h include to forward declaration. NFC.
Simon Pilgrim [Fri, 26 Jun 2020 09:48:40 +0000 (10:48 +0100)]
LoopVectorize.h - reduce AliasAnalysis.h include to forward declaration. NFC.

Replace legacy AliasAnalysis typedef with AAResults where necessary.

4 years ago[lldb/Unwind] Use eh_frame plan directly when it doesn't need to be augmented
Pavel Labath [Tue, 23 Jun 2020 13:40:36 +0000 (15:40 +0200)]
[lldb/Unwind] Use eh_frame plan directly when it doesn't need to be augmented

Summary:
This fixes a bug in the logic for choosing the unwind plan. Based on the
comment in UnwindAssembly-x86, the intention was that a plan which
describes the function epilogue correctly does not need to be augmented
(and it should be used directly). However, the way this was implemented
(by returning false) meant that the higher level code
(FuncUnwinders::GetEHFrameAugmentedUnwindPlan) interpreted this as a
failure to produce _any_ plan and proceeded with other fallback options.
The fallback usually chosed for "asynchronous" plans was the
"instruction emulation" plan, which tended to fall over on certain
functions with multiple epilogues (that's a separate bug).

This patch simply changes the function to return true, which signals the
caller that the unmodified plan is ready to be used.

The attached test case demonstrates the case where we would previously
fall back to the instruction emulation plan, and unwind incorrectly --
the test asserts that the "augmented" eh_frame plan is used, and that
the unwind is correct.

Reviewers: jasonmolenda, jankratochvil

Subscribers: davide, echristo, lldb-commits

Tags: #lldb

Differential Revision: https://reviews.llvm.org/D82378

4 years ago[lldb] Rewrite Scalar::Promote
Pavel Labath [Fri, 26 Jun 2020 09:32:22 +0000 (11:32 +0200)]
[lldb] Rewrite Scalar::Promote

This function was implementing c-like promotion rules by switching on
the both types. C promotion rules are complicated, but they are not
*that* complicated -- they basically boil down to:
- wider types trump narrower ones
- unsigned trump signed
- floating point trumps integral

With a couple of helper functions, we can rewrite the function in terms
of these rules and greatly reduce the size and complexity of this
function.

4 years ago[AArch64][SVE] Predicate bfloat16 load patterns with HasBF16
Kerry McLaughlin [Fri, 26 Jun 2020 08:48:53 +0000 (09:48 +0100)]
[AArch64][SVE] Predicate bfloat16 load patterns with HasBF16

Reviewers: sdesmalen, c-rhodes, efriedma, fpetrogalli

Reviewed By: fpetrogalli

Subscribers: tschuett, kristof.beyls, hiraditya, rkruppe, psnobl, danielkiss, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D82464

4 years ago[AArch64][SVE] Guard perm and select bfloat16 intrinsic patterns
Cullen Rhodes [Wed, 24 Jun 2020 16:00:41 +0000 (16:00 +0000)]
[AArch64][SVE] Guard perm and select bfloat16 intrinsic patterns

Summary:
Permutation and selection bfloat16 intrinsic patterns should be guarded
on the feature flag `+bf16`. Missed in D82182 and D80850.

Reviewers: sdesmalen, fpetrogalli, kmclaughlin, efriedma

Reviewed By: fpetrogalli

Differential Revision: https://reviews.llvm.org/D82492

4 years ago[ARM] VCVTT fpround instruction selection
David Green [Fri, 26 Jun 2020 08:01:56 +0000 (09:01 +0100)]
[ARM] VCVTT fpround instruction selection

Similar to the recent patch for fpext, this adds vcvtb and vcvtt with
insert into vector instruction selection patterns for fptruncs. This
helps clear up a lot of register shuffling that we would otherwise do.

Differential Revision: https://reviews.llvm.org/D81637

4 years agoConstants.h - remove unnecessary forward declarations. NFC.
Simon Pilgrim [Fri, 26 Jun 2020 08:57:41 +0000 (09:57 +0100)]
Constants.h - remove unnecessary forward declarations. NFC.

We have to include DerivedTypes.h

4 years agoMemoryLocation.h - reduce Instruction.h include to forward declaration. NFC.
Simon Pilgrim [Thu, 25 Jun 2020 17:32:47 +0000 (18:32 +0100)]
MemoryLocation.h - reduce Instruction.h include to forward declaration. NFC.

4 years agoLiveRangeEdit.h - reduce AliasAnalysis.h include to forward declaration. NFC.
Simon Pilgrim [Thu, 25 Jun 2020 17:12:55 +0000 (18:12 +0100)]
LiveRangeEdit.h - reduce AliasAnalysis.h include to forward declaration. NFC.

Move include to LiveRangeEdit.cpp and replace legacy AliasAnalysis typedef with AAResults where necessary.

4 years agoFix some clang-tidy namespace closing comments warnings. NFC.
Simon Pilgrim [Thu, 25 Jun 2020 16:48:29 +0000 (17:48 +0100)]
Fix some clang-tidy namespace closing comments warnings. NFC.

4 years agoVNCoercion.cpp - remove unused includes. NFC.
Simon Pilgrim [Thu, 25 Jun 2020 16:46:23 +0000 (17:46 +0100)]
VNCoercion.cpp - remove unused includes. NFC.

4 years agoAggressiveInstCombineInternal.h - reduce unnecessary includes to forward declarations...
Simon Pilgrim [Thu, 25 Jun 2020 16:28:41 +0000 (17:28 +0100)]
AggressiveInstCombineInternal.h - reduce unnecessary includes to forward declarations. NFC.

4 years ago[CodeComplete] Tweak code completion for `typename`.
Kadir Cetinkaya [Fri, 26 Jun 2020 08:31:13 +0000 (10:31 +0200)]
[CodeComplete] Tweak code completion for `typename`.

Summary:
Currently, clangd always completes `typename` as `typename qualifier::name`, I think the current behavior is not useful when the code completion is triggered in `template <>`. So I tweak it to `typename identifier`.

Patch by @lh123 !

Reviewers: sammccall, kadircet

Reviewed By: kadircet

Subscribers: ilya-biryukov, usaxena95, cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D82373

4 years agoPrevent unused error when assertions are disabled.
Tres Popp [Fri, 26 Jun 2020 08:12:04 +0000 (10:12 +0200)]
Prevent unused error when assertions are disabled.

4 years ago[ARM] VCVTT instruction selection
David Green [Fri, 26 Jun 2020 07:02:26 +0000 (08:02 +0100)]
[ARM] VCVTT instruction selection

We current extract and convert from a top lane of a f16 vector using a
VMOVX;VCVTB pair. We can simplify that to use a single VCVTT. The
pattern is mostly copied from a vector extract pattern, but produces a
VCVTTHS f32 directly.

This had to move some code around so that ARMInstrVFP had access to the
required pattern frags that were previously part of ARMInstrNEON.

Differential Revision: https://reviews.llvm.org/D81556

4 years ago[mlir] parallel loop canonicalization
Tobias Gysi [Fri, 26 Jun 2020 07:47:01 +0000 (09:47 +0200)]
[mlir] parallel loop canonicalization

Summary:
The patch introduces a canonicalization pattern for parallel loops. The pattern removes single-iteration loop dimensions if the loop bounds and steps are constants.

Reviewers: herhut, ftynse

Reviewed By: herhut

Subscribers: mehdi_amini, rriddle, jpienaar, shauheen, antiagainst, nicolasvasilache, arpith-jacob, mgester, lucyrfox, aartbik, liufengdb, stephenneuendorffer, Joonsoo, grosul1, Kayjukh, jurahul, msifontes

Tags: #mlir

Differential Revision: https://reviews.llvm.org/D82191

4 years agoRemove "rm -f" workaround in acle_sve_adda.c
David Sherwood [Fri, 26 Jun 2020 07:13:27 +0000 (08:13 +0100)]
Remove "rm -f" workaround in acle_sve_adda.c

4 years ago[X86] Make XSAVEC/XSAVEOPT/XSAVES properly depend on XSAVE in both the frontend and...
Craig Topper [Fri, 26 Jun 2020 07:14:58 +0000 (00:14 -0700)]
[X86] Make XSAVEC/XSAVEOPT/XSAVES properly depend on XSAVE in both the frontend and the backend.

These features implicitly enabled XSAVE in the frontend, but not
the backend. Disabling XSAVE in the frontend disabled XSAVEOPT, but
not the other 2. Nothing happened in the backend.

4 years ago[SVE] Fix scalable vector bug in DataLayout::getIntPtrType
David Sherwood [Mon, 22 Jun 2020 13:09:34 +0000 (14:09 +0100)]
[SVE] Fix scalable vector bug in DataLayout::getIntPtrType

Fixed an issue in DataLayout::getIntPtrType where we were assuming
the input type was always a fixed vector type, which isn't true.

Added a test that exposed the problem to:

  Transforms/InstCombine/vector_gep1.ll

Differential Revision: https://reviews.llvm.org/D82294

4 years ago[SelectionDAG] Lower @llvm.get.active.lane.mask to setcc
Sjoerd Meijer [Fri, 26 Jun 2020 06:46:38 +0000 (07:46 +0100)]
[SelectionDAG] Lower @llvm.get.active.lane.mask to setcc

This lowers intrinsic @llvm.get.active.lane.mask to a setcc node, i.e. an icmp
ule, and creates vectors for its 2 arguments on which the comparison is
performed.

Differential Revision: https://reviews.llvm.org/D82292

4 years ago[ARM] Don't revert get.active.lane.mask in ARM Tail-Predication pass
Sjoerd Meijer [Mon, 22 Jun 2020 10:39:31 +0000 (11:39 +0100)]
[ARM] Don't revert get.active.lane.mask in ARM Tail-Predication pass

Don't revert intrinsic get.active.lane.mask here, this is moved to isel
legalization in D82292.

Differential Revision: https://reviews.llvm.org/D82105

4 years ago[X86] Add CMPXCHG16B feature to amdfam10 in the frontend.
Craig Topper [Fri, 26 Jun 2020 05:55:36 +0000 (22:55 -0700)]
[X86] Add CMPXCHG16B feature to amdfam10 in the frontend.

We already have this feature on it in the backend.

4 years ago[libc] Add the remaining long double flavors of nearest integer functions.
Siva Chandra Reddy [Thu, 25 Jun 2020 19:09:02 +0000 (12:09 -0700)]
[libc] Add the remaining long double flavors of nearest integer functions.

Specifically: ceill, floorl and roundl have been added.

Reviewers: asteinhauser

Differential Revision: https://reviews.llvm.org/D82591

4 years ago[libc++] Fix the runtimes build after making __config_site mandatory
Louis Dionne [Fri, 26 Jun 2020 05:23:43 +0000 (01:23 -0400)]
[libc++] Fix the runtimes build after making __config_site mandatory

The runtimes build includes libcxx/include/CMakeLists.txt directly instead
of going through the top-level CMake file. This not-very-hygienic inclusion
caused some variables like LIBCXX_BINARY_DIR not to be defined properly,
and the config_site generation logic to fail after landing 53623d4aa710.

This patch works around this issue by defining the missing variables.
However, the proper fix for this would be for the runtimes build to
always go through libc++'s top-level CMakeLists.txt. Doing otherwise
is unsupported.

4 years ago[DebugInfo] Fix emitting offsets to CUs with -dwarf-sections-as-references=Enable.
Igor Kudrin [Mon, 22 Jun 2020 16:22:18 +0000 (23:22 +0700)]
[DebugInfo] Fix emitting offsets to CUs with -dwarf-sections-as-references=Enable.

The size of the field depends on the DWARF format, not the address size
of the target.

Differential Revision: https://reviews.llvm.org/D82311

4 years ago[libc++] Always generate a __config_site header
Louis Dionne [Fri, 15 May 2020 18:54:27 +0000 (14:54 -0400)]
[libc++] Always generate a __config_site header

Before this patch, the __config_site header was only generated when at
least one __config_site macro needed to be defined. This lead to two
different code paths in how libc++ is configured, depending on whether
a __config_site header was generated or not. After this patch, the
__config_site is always generated, but it can be empty in case there
are no macros to define in it.

More context on why this change is important
--------------------------------------------
In addition to being confusing, this double-code-path situation lead to
broken code being checked in undetected in 2405bd689815, which introduced
the LIBCXX_HAS_MERGED_TYPEINFO_NAMES_DEFAULT CMake setting. Specifically,
the _LIBCPP_HAS_MERGED_TYPEINFO_NAMES_DEFAULT <__config_site> macro was
supposed NOT to be defined unless LIBCXX_HAS_MERGED_TYPEINFO_NAMES_DEFAULT
was specified explicitly on the CMake command line. Instead, what happened
is that it was defined to 0 if it wasn't specified explicitly and a
<__config_site> header was generated. And defining that macro to 0 had
the important effect of using the non-unique RTTI comparison implementation,
which changes the ABI.

This change in behavior wasn't noticed because the <__config_site> header
is not generated by default. However, the Apple configuration does cause
a <__config_site> header to be generated, which lead to the wrong RTTI
implementation being used, and to https://llvm.org/PR45549. We came close
to an ABI break in the dylib, but were saved due to a downstream-only
change that overrode the decision of the <__config_site> for the purpose
of RTTI comparisons in libc++abi. This is an incredible luck that we should
not rely on ever again.

While the problem itself was fixed with 2464d8135e2a by setting
LIBCXX_HAS_MERGED_TYPEINFO_NAMES_DEFAULT explicitly in the Apple
CMake cache and then in d0fcdcd28f95 by making the setting less
brittle, the point still is that we should have had a single code
path from the beginning. Unlike most normal libraries, the macros
that configure libc++ are really complex, there's a lot of them and
they control important properties of the C++ runtime. There must be
a single code path for that, and it must be simple and robust.

Differential Revision: https://reviews.llvm.org/D80927

4 years ago[HIP] Add missing options for lto
Yaxun (Sam) Liu [Wed, 24 Jun 2020 21:34:21 +0000 (17:34 -0400)]
[HIP] Add missing options for lto

Add -mcpu, -mattr, -mllvm, and -save-temps options for lto when necessary.

Differential Revision: https://reviews.llvm.org/D82506

4 years ago[hip] Refine `clang/test/CodeGenCUDA/amdgpu-kernel-arg-pointer-type.cu`
Michael Liao [Fri, 26 Jun 2020 03:54:03 +0000 (23:54 -0400)]
[hip] Refine `clang/test/CodeGenCUDA/amdgpu-kernel-arg-pointer-type.cu`

- Require target x86 being enabled as well.

4 years ago[NFC] Extract unifyTargetFeatures
Yaxun (Sam) Liu [Thu, 25 Jun 2020 14:03:31 +0000 (10:03 -0400)]
[NFC] Extract unifyTargetFeatures

Differential Revision: https://reviews.llvm.org/D82579

4 years ago[PowerPC][Power10] Implement centrifuge, vector gather every nth bit, vector evaluate...
Amy Kwan [Thu, 25 Jun 2020 23:04:00 +0000 (18:04 -0500)]
[PowerPC][Power10] Implement centrifuge, vector gather every nth bit, vector evaluate Builtins in LLVM/Clang

This patch implements builtins for the following prototypes:

unsigned long long __builtin_cfuged (unsigned long long, unsigned long long);
vector unsigned long long vec_cfuge (vector unsigned long long, vector unsigned long long);
unsigned long long vec_gnb (vector unsigned __int128, const unsigned int);
vector unsigned char vec_ternarylogic (vector unsigned char, vector unsigned char, vector unsigned char, const unsigned int);
vector unsigned short vec_ternarylogic (vector unsigned short, vector unsigned short, vector unsigned short, const unsigned int);
vector unsigned int vec_ternarylogic (vector unsigned int, vector unsigned int, vector unsigned int, const unsigned int);
vector unsigned long long vec_ternarylogic (vector unsigned long long, vector unsigned long long, vector unsigned long long, const unsigned int);
vector unsigned __int128 vec_ternarylogic (vector unsigned __int128, vector unsigned __int128, vector unsigned __int128, const unsigned int);

Differential Revision: https://reviews.llvm.org/D80970

4 years ago[hip] Re-enable `clang/test/CodeGenCUDA/amdgpu-kernel-arg-pointer-type.cu`
Michael Liao [Fri, 26 Jun 2020 02:29:27 +0000 (22:29 -0400)]
[hip] Re-enable `clang/test/CodeGenCUDA/amdgpu-kernel-arg-pointer-type.cu`

- Require amdgpu target being enabled.

4 years ago[hip] Disable test temporarily due to failures on build servers.
Michael Liao [Fri, 26 Jun 2020 02:04:20 +0000 (22:04 -0400)]
[hip] Disable test temporarily due to failures on build servers.

4 years ago[CMake] Add optional lldb dependency to DEBUGINFO_TEST_DEPS
Fangrui Song [Fri, 26 Jun 2020 01:28:12 +0000 (18:28 -0700)]
[CMake] Add optional lldb dependency to DEBUGINFO_TEST_DEPS

if(TARGET asan) is still brittle as it depends on the order of
compiler-rt and debuginfo-tests in LLVM_ENABLE_PROJECTS.

4 years ago[NewPM][BasicAA] Rename basicaa -> basic-aa, add alias
Arthur Eubanks [Wed, 24 Jun 2020 23:41:24 +0000 (16:41 -0700)]
[NewPM][BasicAA] Rename basicaa -> basic-aa, add alias

Summary:
BasicAA under the new pass manager is called "basic-aa", which fits more
with the other AA names which almost always contain a dash.

Keep an alias from basicaa -> basic-aa.

Will change all references of "basicaa" to "basic-aa", then remove the
alias.

Makes check-llvm failures under NPM go from 2307 to 1867.

Reviewers: asbirlea, ychen

Subscribers: hiraditya, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D82607

4 years ago[clangd] Fix test compile with GCC (name conflict)
Sam McCall [Fri, 26 Jun 2020 01:02:28 +0000 (03:02 +0200)]
[clangd] Fix test compile with GCC (name conflict)

4 years ago[CMake] Add optional asan & safestack dependencies to DEBUGINFO_TEST_DEPS
Fangrui Song [Fri, 26 Jun 2020 00:56:22 +0000 (17:56 -0700)]
[CMake] Add optional asan & safestack dependencies to DEBUGINFO_TEST_DEPS

4 years ago[InferAddressSpaces] Handle the pair of `ptrtoint`/`inttoptr`.
Michael Liao [Tue, 16 Jun 2020 04:08:16 +0000 (00:08 -0400)]
[InferAddressSpaces] Handle the pair of `ptrtoint`/`inttoptr`.

Summary:
- `ptrtoint` and `inttoptr` are defined as no-op casts if the integer
  value as the same size as the pointer value. The pair of
  `ptrtoint`/`inttoptr` is in fact a no-op cast sequence between
  different address spaces. Teach `infer-address-spaces` to handle them
  like a `bitcast`.

Reviewers: arsenm, chandlerc

Subscribers: jvesely, wdng, nhaehnle, hiraditya, kerbowa, cfe-commits, llvm-commits

Tags: #clang, #llvm

Differential Revision: https://reviews.llvm.org/D81938

4 years ago[debuginfo-tests] Require "lldb" for some dexter tests
Fangrui Song [Fri, 26 Jun 2020 00:35:01 +0000 (17:35 -0700)]
[debuginfo-tests] Require "lldb" for some dexter tests

4 years ago[AArch64][GlobalISel] Fix extended shift addressing mode selection not handling sxth.
Amara Emerson [Fri, 26 Jun 2020 00:21:37 +0000 (17:21 -0700)]
[AArch64][GlobalISel] Fix extended shift addressing mode selection not handling sxth.

The complex pattern for extended shift offsets only allow sxtw as the extend,
not sxth. Our equivalent function to do this was not rejecting SXTH so we
were miscompiling. This was exposed by D81992.

4 years ago[lldb/ScriptInterpreter] Fix Windows error C2371: 'pid_t': redefinition
Jonas Devlieghere [Fri, 26 Jun 2020 00:14:47 +0000 (17:14 -0700)]
[lldb/ScriptInterpreter] Fix Windows error C2371: 'pid_t': redefinition

pyconfig.h(194): error C2371: 'pid_t': redefinition; different basic types
PosixApi.h(82): note: see declaration of 'pid_t'

4 years ago[CMake] Add llvm-config to DEBUGINFO_TEST_DEPS
Fangrui Song [Thu, 25 Jun 2020 23:49:05 +0000 (16:49 -0700)]
[CMake] Add llvm-config to DEBUGINFO_TEST_DEPS

Fix `fatal: Could not run process ['/path/to/build/./bin/llvm-config', '--build-mode']`
when running check-debuginfo in a fresh build directory.

4 years agoRemove references to the 4.0 release as a major breaking (NFC)
Mehdi Amini [Thu, 25 Jun 2020 23:49:07 +0000 (23:49 +0000)]
Remove references to the 4.0 release as a major breaking (NFC)

This is cleaning up comments (mostly in the bitcode handling) about
removing some backward compatibility aspect in the 4.0 release.
Historically, "4.0" was used during the development of the 3.x
versions as "this future major breaking change version". At the time
the major number was used to indicate the compatibility. When we
reached 3.9 we decided to change the numbering, instead of going to
3.10 we went to 4.0 but after changing the meaning of the major
number to not mean anything anymore with respect to bitcode backward
compatibility.

The current policy
(https://llvm.org/docs/DeveloperPolicy.html#ir-backwards-compatibility)
indicates only now:

  The current LLVM version supports loading any bitcode since version 3.0.

Differential Revision: https://reviews.llvm.org/D82514

4 years ago[compiler-rt] Add support for arm64 macOS
Steven Wu [Thu, 25 Jun 2020 23:44:13 +0000 (16:44 -0700)]
[compiler-rt] Add support for arm64 macOS

Summary: Allow compiler-rt to build for arm64 support on macOS.

Reviewers: arphaman, doug.gregor, dexonsmith

Reviewed By: arphaman, dexonsmith

Subscribers: dberris, mgorny, kristof.beyls, jkorous, ributzka, danielkiss, #sanitizers, llvm-commits

Tags: #sanitizers

Differential Revision: https://reviews.llvm.org/D82610

4 years ago[libc++] Add missing <stddef.h> include to <wchar.h>
Louis Dionne [Thu, 25 Jun 2020 23:27:32 +0000 (19:27 -0400)]
[libc++] Add missing <stddef.h> include to <wchar.h>

It is needed because <wchar.h> uses size_t.

4 years ago[test] XFail TestStepNoDebug based on arch rather than OS
Davide Italiano [Thu, 25 Jun 2020 23:23:59 +0000 (16:23 -0700)]
[test] XFail TestStepNoDebug based on arch rather than OS

4 years ago[test] XFail TestSigtrampUnwind based on arch rather than OS
Davide Italiano [Thu, 25 Jun 2020 23:22:52 +0000 (16:22 -0700)]
[test] XFail TestSigtrampUnwind based on arch rather than OS

4 years ago[lldb/test] XFAIL TestHWBreakMultiThread on arch rather platform.
Davide Italiano [Thu, 25 Jun 2020 23:21:23 +0000 (16:21 -0700)]
[lldb/test] XFAIL TestHWBreakMultiThread on arch rather platform.

4 years ago[lldb/test] Skip TestBreakpointThumbCodesection on arm64.
Davide Italiano [Thu, 25 Jun 2020 23:19:32 +0000 (16:19 -0700)]
[lldb/test] Skip TestBreakpointThumbCodesection on arm64.

This test relies on thumb, which is a 32-bits feature only.

4 years ago[WebAssembly] Add warnings for -shared and -pie
Dan Gohman [Fri, 12 Jun 2020 19:05:40 +0000 (12:05 -0700)]
[WebAssembly] Add warnings for -shared and -pie

The meaning of -shared and -pie are expected to be changed in the
future when Module Linking-style libraries are implemented. Begin
issuing warnings to give people a heads-up that they will be changing.

For compatibility with Emscripten, add a --experimental-pic flag which
disables these warnings.

Differential Revision: https://reviews.llvm.org/D81760

4 years ago[WebAssembly] Adding 64-bit versions of __stack_pointer and other globals
Wouter van Oortmerssen [Mon, 15 Jun 2020 22:31:10 +0000 (15:31 -0700)]
[WebAssembly] Adding 64-bit versions of __stack_pointer and other globals

We have 6 globals, all of which except for __table_base are 64-bit under wasm64.

Differential Revision: https://reviews.llvm.org/D82130

4 years agoFix polly build after 8c2082e1dc9505da21806b707dfb3eae3f0550ff
Fangrui Song [Thu, 25 Jun 2020 21:39:08 +0000 (14:39 -0700)]
Fix polly build after 8c2082e1dc9505da21806b707dfb3eae3f0550ff

4 years ago[libc++] Remove unnecessary LLVM_INCLUDE_BENCHMARKS option in the Apple build
Louis Dionne [Thu, 25 Jun 2020 21:33:31 +0000 (17:33 -0400)]
[libc++] Remove unnecessary LLVM_INCLUDE_BENCHMARKS option in the Apple build

Since we're using an empty top-level CMakeLists.txt instead of the CMakeLists.txt
inside llvm/, we don't need to specify LLVM_INCLUDE_BENCHMARKS anymore.

4 years ago[AArch64][GlobalISel] Port buildvector -> dup pattern from AArch64ISelLowering
Jessica Paquette [Tue, 16 Jun 2020 22:57:28 +0000 (15:57 -0700)]
[AArch64][GlobalISel] Port buildvector -> dup pattern from AArch64ISelLowering

Given this:

```
%x:_(<n x sK>) = G_BUILD_VECTOR %lane, ...
...
%y:_(<n x sK>) = G_SHUFFLE_VECTOR %x(<n x sK>), %foo, shufflemask(0, 0, ...)
```

We can produce:

```
%y:_(<n x sK) = G_DUP %lane(sK)
```

Doesn't seem to be too common, but AArch64ISelLowering attempts to do this
before trying to produce a DUPLANE. Might as well port it.

Also make it so that when the splat has an undef mask, we try setting it to
0. SDAG does this, and it makes sure that when we get the build vector operand,
we actually get a source operand.

Differential Revision: https://reviews.llvm.org/D81979

4 years ago[MVT] Add missing floating point types for 1024/2048-bit vectors.
Paul Walker [Sun, 21 Jun 2020 04:17:40 +0000 (05:17 +0100)]
[MVT] Add missing floating point types for 1024/2048-bit vectors.

Summary:
This patch adds entries for:
  v64f16
  v128f16
  v64bf16
  v128bf16
  v32f64

Subscribers: dschuff, hiraditya, aheejin, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D82466

4 years agoMigrate a couple of codegen tests to gc-live format
Philip Reames [Thu, 25 Jun 2020 20:08:06 +0000 (13:08 -0700)]
Migrate a couple of codegen tests to gc-live format

4 years ago[gn build] Port e9fb1506b83
LLVM GN Syncbot [Thu, 25 Jun 2020 21:03:06 +0000 (21:03 +0000)]
[gn build] Port e9fb1506b83

4 years ago[clangd] Config: Fragments and parsing from YAML
Sam McCall [Tue, 23 Jun 2020 15:21:56 +0000 (17:21 +0200)]
[clangd] Config: Fragments and parsing from YAML

Summary:
This is a piece from the design in https://tinyurl.com/clangd-config
https://reviews.llvm.org/D82335 is a draft with all the bits linked together.
It doesn't do anything yet, it's just a library + tests.

It deliberately implements a minimal set of actual configuration options.

Reviewers: kadircet, adamcz

Subscribers: mgorny, ilya-biryukov, MaskRay, jkorous, arphaman, usaxena95, cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D82386

4 years ago[ARM] Split FPExt loads
David Green [Thu, 25 Jun 2020 20:02:02 +0000 (21:02 +0100)]
[ARM] Split FPExt loads

This extends PerformSplittingToWideningLoad to also handle FP_Ext, as
well as sign and zero extends. It uses an integer extending load
followed by a VCVTL on the bottom lanes to efficiently perform an fpext
on a smaller than legal type.

The existing code had to be rewritten a little to not just split the
node in two and let legalization handle it from there, but to actually
split into legal chunks.

Differential Revision: https://reviews.llvm.org/D81340

4 years ago[libc++] Remove deprecated _LIBCPP_ALTERNATE_STRING_LAYOUT macro
Louis Dionne [Thu, 25 Jun 2020 20:31:14 +0000 (16:31 -0400)]
[libc++] Remove deprecated _LIBCPP_ALTERNATE_STRING_LAYOUT macro

We use the _LIBCPP_ABI_ALTERNATE_STRING_LAYOUT macro for that now instead.
I did leave a check behind to make sure that nobody was still using the old
macro name. I'll remove it a couple of months down the road.

4 years ago[x86] add vector test for merged condition branching; NFC
Sanjay Patel [Thu, 25 Jun 2020 19:43:40 +0000 (15:43 -0400)]
[x86] add vector test for merged condition branching; NFC

4 years agoMigrate a couple of codegen tests to gc-live format
Philip Reames [Thu, 25 Jun 2020 19:33:32 +0000 (12:33 -0700)]
Migrate a couple of codegen tests to gc-live format

4 years ago[ARM] MVE VCVT lowering for f16->f32 extends
David Green [Thu, 25 Jun 2020 18:49:27 +0000 (19:49 +0100)]
[ARM] MVE VCVT lowering for f16->f32 extends

This adds code to lower f16 to f32 fp_exts's using an MVE VCVT
instructions, similar to a recent similar patch for fp_trunc. Again it
goes through the lowering of a BUILD_VECTOR, but is slightly simpler
only having to deal with interleaved indices. It adds a VCVTL node to
lower to, similar to VCVTN.

Differential Revision: https://reviews.llvm.org/D81339

4 years ago[X86] Don't imply -mprfchw when -m3dnow is specified. Enable prefetchw in the backend...
Craig Topper [Thu, 25 Jun 2020 18:45:09 +0000 (11:45 -0700)]
[X86] Don't imply -mprfchw when -m3dnow is specified. Enable prefetchw in the backend with 3dnow feature.

The PREFETCHW instruction was originally part of the 3DNow. But
it was given its own CPUID bit on later CPUs just before 3DNow
was deprecated.

We were setting the -mprfchw flag if -m3dnow was passed or the CPU
supported 3dnow unless -mno-prfchw was passed. But -march=native
on a CPU without the PRFCHW CPUID bit set will pass -mno-prfchw.
So -march=k8 will behave differently than -march=native on a K8
for example.

So remove this implicit setting from the frontend and instead
enable the backend to use PREFETCHW if 3dnow OR prfchw is enabled.

Also enable PRFCHW flag on amdfam10/barcelona which seems to be
where this CPUID bit was introduced. That CPU also supported
3dnow.

4 years ago[NFC][Support] Add unit of measure to comment for PeakMemory
Hubert Tong [Thu, 25 Jun 2020 19:41:33 +0000 (15:41 -0400)]
[NFC][Support] Add unit of measure to comment for PeakMemory

4 years ago[NFC][Support] Make Unix/Program.inc separately compilable
Hubert Tong [Thu, 25 Jun 2020 19:41:17 +0000 (15:41 -0400)]
[NFC][Support] Make Unix/Program.inc separately compilable

To improve CI checks, make `Unix/Program.inc` separately compilable.

4 years ago[Support][AIX] Add declaration of wait4 to fix build
Hubert Tong [Thu, 25 Jun 2020 19:40:07 +0000 (15:40 -0400)]
[Support][AIX] Add declaration of wait4 to fix build

While `wait4` is not documented for AIX, it is available; however, even
on systems where it is available, the system headers do not always
provide a declaration of the function. This patch provides a declaration
of `wait4` for AIX.

Reviewed By: daltenty

Differential Revision: https://reviews.llvm.org/D82282

4 years ago[libc++] Fix some typos in the comment header for <regex>
Arthur O'Dwyer [Thu, 25 Jun 2020 19:31:03 +0000 (15:31 -0400)]
[libc++] Fix some typos in the comment header for <regex>

No functional change because all the changed "code" is actually inside
comments.

Differential Revision: https://reviews.llvm.org/D82589

4 years ago[builtins] Move more float128-related helpers to GENERIC_TF_SOURCES list
Anatoly Trosinenko [Thu, 25 Jun 2020 19:32:41 +0000 (22:32 +0300)]
[builtins] Move more float128-related helpers to GENERIC_TF_SOURCES list

There are two different _generic_ lists of source files in the compiler-rt/lib/builtins/CMakeLists.txt. Now there is no simple way to not use the tf-variants of helpers at all.

Since there exists a separate `GENERIC_TF_SOURCES` list, it seems quite natural to move all float128-related helpers there. If it is not possible for some reason, it would be useful to have an explanation of that reason somewhere near the `GENERIC_TF_SOURCES` definition.

Differential Revision: https://reviews.llvm.org/D81282

4 years ago[lldb/ScriptInterpreter] Fix missing include on Windows
Jonas Devlieghere [Thu, 25 Jun 2020 19:19:00 +0000 (12:19 -0700)]
[lldb/ScriptInterpreter] Fix missing include on Windows

4 years ago[HIP] Improve check patterns to avoid test failures in case string "opt", etc. happen...
Hiroshi Yamauchi [Thu, 25 Jun 2020 17:49:55 +0000 (10:49 -0700)]
[HIP] Improve check patterns to avoid test failures in case string "opt", etc. happens to be in the command path.

Similarly to D82046.

Differential Revision: https://reviews.llvm.org/D82586

4 years ago[openmp] Use config.test_extra_flags in archer and multiplex tests
Han Zhu [Thu, 25 Jun 2020 18:58:35 +0000 (11:58 -0700)]
[openmp] Use config.test_extra_flags in archer and multiplex tests

Summary:
`config.test_extra_flags` is passed in from `lit.site.cfg.in` files, but they're not used in the LIT configs. This variable can be useful for distros which don't have the standard c/c++ headers in the default search paths. Since the tests run clang on c/c++ source code, we rely on `test_extra_flags` to pass in the necessary header files.

This is a similar setup that's also done in litomptarget https://github.com/llvm/llvm-project/blob/master/openmp/libomptarget/test/lit.cfg#L42 and openmp/runtime.

Reviewers: jdoerfert, jdenny, protze.joachim

Reviewed By: jdoerfert

Subscribers: yaxunl, guansong, sstefan1, openmp-commits

Tags: #openmp

Differential Revision: https://reviews.llvm.org/D82516

4 years ago[flang] Replace ATTRIBUTE_UNUSED with LLVM_ATTRIBUTE_UNUSED
Mehdi Chinoune [Thu, 25 Jun 2020 17:38:08 +0000 (18:38 +0100)]
[flang] Replace ATTRIBUTE_UNUSED with LLVM_ATTRIBUTE_UNUSED

ATTRIBUTE_UNUSED wasn't defined with MSVC.

Patch by: Mehdi Chinoune <chinoune.mehdi@hotmail.com>

Differential Revision: https://reviews.llvm.org/D78356

4 years ago[libc++abi] NFCI: Minor refactoring of abort_message()
Louis Dionne [Thu, 25 Jun 2020 18:03:48 +0000 (14:03 -0400)]
[libc++abi] NFCI: Minor refactoring of abort_message()

Remove small code duplication and add comments explaining why we do things
in a given order.

4 years agoRevert "[X86] Don't imply -mprfchw when -m3dnow is specified. Enable prefetchw in...
Craig Topper [Thu, 25 Jun 2020 18:43:02 +0000 (11:43 -0700)]
Revert "[X86] Don't imply -mprfchw when -m3dnow is specified. Enable prefetchw in the backend with 3dnow feature."

This is failing on the bots.

This reverts commit 636d31a5c341ff2ca5eefd6075ff059eb60b5a80.

4 years ago[ARM] Add FP_ROUND handling to splitting MVE stores
David Green [Thu, 25 Jun 2020 15:02:36 +0000 (16:02 +0100)]
[ARM] Add FP_ROUND handling to splitting MVE stores

This splits MVE vector stores of a fp_trunc in the same way that we do
for standard trunc's. It extends PerformSplittingToNarrowingStores to
handle fp_round, splitting the store into pieces and adding a VCVTNb to
perform the actual fp_round. The actual store is then converted to an
integer store so that it can truncate bottom lanes of the result.

Differential Revision: https://reviews.llvm.org/D81141

4 years ago[Coroutines] Handle dependent promise types for final_suspend non-throw check
Xun Li [Mon, 22 Jun 2020 21:38:41 +0000 (14:38 -0700)]
[Coroutines] Handle dependent promise types for final_suspend non-throw check

Summary:
Check that the co_await promise.final_suspend() does not potentially throw again after we have resolved dependent types.
This takes care of the cases where promises types are templated.
Added test cases for this scenario and confirmed that the checks happen now.
Also run libcxx tests locally to make sure all tests pass.

Reviewers: Benabik, lewissbaker, junparser, modocache

Reviewed By: modocache

Subscribers: modocache, cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D82332

4 years ago[X86] Don't imply -mprfchw when -m3dnow is specified. Enable prefetchw in the backend...
Craig Topper [Thu, 25 Jun 2020 17:08:03 +0000 (10:08 -0700)]
[X86] Don't imply -mprfchw when -m3dnow is specified. Enable prefetchw in the backend with 3dnow feature.

The PREFETCHW instruction was originally part of the 3DNow. But
it was given its own CPUID bit on later CPUs just before 3DNow
was deprecated.

We were setting the -mprfchw flag if -m3dnow was passed or the CPU
supported 3dnow unless -mno-prfchw was passed. But -march=native
on a CPU without the PRFCHW CPUID bit set will pass -mno-prfchw.
So -march=k8 will behave differently than -march=native on a K8
for example.

So remove this implicit setting from the frontend and instead
enable the backend to use PREFETCHW if 3dnow OR prfchw is enabled.

Also enable PRFCHW flag on amdfam10/barcelona which seems to be
where this CPUID bit was introduced. That CPU also supported
3dnow.

4 years ago[gn build] Port 9878996c708
LLVM GN Syncbot [Thu, 25 Jun 2020 18:14:55 +0000 (18:14 +0000)]
[gn build] Port 9878996c708

4 years agoRevert "[PGO] Extend the value profile buckets for mem op sizes."
Hiroshi Yamauchi [Thu, 25 Jun 2020 17:58:13 +0000 (10:58 -0700)]
Revert "[PGO] Extend the value profile buckets for mem op sizes."

This reverts commit 63a89693f09f6b24ce4f2350d828150bd9c4f3e8.

Due to a build failure like http://lab.llvm.org:8011/builders/sanitizer-windows/builds/65386/steps/annotate/logs/stdio

4 years ago[InlineCost] GetElementPtr with constant operands
Kirill Naumov [Tue, 2 Jun 2020 19:22:41 +0000 (19:22 +0000)]
[InlineCost] GetElementPtr with constant operands

If the GEP instruction contanins only constants as its arguments,
then it should be recognized as a constant. For now, there was
also added a flag to turn off this simplification if it causes
any regressions ("disable-gep-const-evaluation") which is off
by default. Once I gather needed data of the effectiveness of
this simplification, the flag will be deleted.

Reviewers: apilipenko, davidxl, mtrofin

Reviewed By: mtrofin

Differential Revision: https://reviews.llvm.org/D81026

4 years ago[gn build] Port 63a89693f09
LLVM GN Syncbot [Thu, 25 Jun 2020 17:59:53 +0000 (17:59 +0000)]
[gn build] Port 63a89693f09

4 years ago[Sema][CodeComplete][ObjC] Don't split the first selector fragment
David Goldman [Mon, 22 Jun 2020 14:50:54 +0000 (10:50 -0400)]
[Sema][CodeComplete][ObjC] Don't split the first selector fragment

Summary:
Standardize the formatting of selector fragments to include the ':',
e.g. for `- (void)foobar:(int)foobar;`, report `{foobar:}` instead of
`{foobar}{:}`. This was normally the case except for a couple of places
where it was split.

This also improves integration with clangd since it relies upon the `:`
to identify ObjC selectors.

NOTE: It is possible to have selector fragments that are just `:` with
no text, we now handle this properly for the first fragment.

Reviewers: sammccall, doug.gregor

Subscribers: ilya-biryukov, dexonsmith, arphaman, kadircet, usaxena95, cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D82306

4 years ago[lldb/Docs] Add more details to the issues with custom Python installs on macOS
Jonas Devlieghere [Thu, 25 Jun 2020 17:51:59 +0000 (10:51 -0700)]
[lldb/Docs] Add more details to the issues with custom Python installs on macOS

Although this issue is not specific to macOS, Python (in)compatibility
comes up quite often and we've been linking users to this page. This
just adds more details for this particular scenario.

Differential revision: https://reviews.llvm.org/D82507

4 years ago[Coroutines] Special handle __builtin_coro_resume for final_suspend nothrow check
Xun Li [Tue, 23 Jun 2020 22:06:18 +0000 (15:06 -0700)]
[Coroutines] Special handle __builtin_coro_resume for final_suspend nothrow check

Summary:
In https://reviews.llvm.org/D82029 we added the conformance check that the expression co_await promise.final_suspend() should not potentially throw.
As part of this expression, in cases when the await_suspend() method of the final suspend awaiter returns a handle, __builtin_coro_resume could be called on the handle to immediately resume that coroutine.
__builtin_coro_resume is not declared with noexcept and it shouldn't. We need to special check this case here.

Reviewers: modocache, lewissbaker, junparser

Reviewed By: lewissbaker

Subscribers: modocache, cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D82415

4 years ago[PGO] Extend the value profile buckets for mem op sizes.
Hiroshi Yamauchi [Tue, 2 Jun 2020 19:10:15 +0000 (12:10 -0700)]
[PGO] Extend the value profile buckets for mem op sizes.

Extend the memop value profile buckets to be more flexible (could accommodate a
mix of individual values and ranges) and to cover more value ranges (from 11 to
22 buckets).

Disabled behind a flag (to be enabled separately) and the existing code to be
removed later.

Differential Revision: https://reviews.llvm.org/D81682

4 years ago[lldb][NFC] Use expect_expr in TestDollarInVariable
Raphael Isemann [Thu, 25 Jun 2020 15:51:43 +0000 (17:51 +0200)]
[lldb][NFC] Use expect_expr in TestDollarInVariable

4 years agoAdd `FloatingLiteral` to SyntaxTree
Eduardo Caldas [Mon, 22 Jun 2020 17:35:38 +0000 (17:35 +0000)]
Add `FloatingLiteral` to SyntaxTree

Subscribers: cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D82318

4 years agoAdd StringLiteral to SyntaxTree
Eduardo Caldas [Thu, 25 Jun 2020 16:25:42 +0000 (16:25 +0000)]
Add StringLiteral to SyntaxTree

Subscribers: cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D82360

4 years agoAdd `CharLiteral` to SyntaxTree
Eduardo Caldas [Thu, 25 Jun 2020 16:10:19 +0000 (16:10 +0000)]
Add `CharLiteral` to SyntaxTree

Subscribers: cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D82312

4 years ago[NewPM] Move debugging log printing after PassInstrumentation before-pass-callbacks
Yuanfang Chen [Thu, 25 Jun 2020 17:02:50 +0000 (10:02 -0700)]
[NewPM] Move debugging log printing after PassInstrumentation before-pass-callbacks

For passes got skipped, this is confusing because the log said it is `running pass`
but it is skipped later.

Reviewed By: asbirlea

Differential Revision: https://reviews.llvm.org/D82511

4 years ago[Clang][SourceManager] optimize getFileIDLocal()
Nick Desaulniers [Thu, 25 Jun 2020 16:53:11 +0000 (09:53 -0700)]
[Clang][SourceManager] optimize getFileIDLocal()

Summary:
A recent Linux kernel commit exposed a performance cliff in Clang. Calls
to SourceManager::getFileIDLocal() when there's a cache miss against
LastFileIDLookup can be relatively expensive, as getFileIDLocal() tries
a few linear probes, then falls back to binary search.  The use of
SourceManager::isOffsetInFileID() is also relatively expensive (both
isOffsetInFileID and getFileIDLocal dominated a trace of the performance
cliff case).

As a FIXME notes (and as @kadircet helpfully noted in review of D80681),
there's a few optimizations we can do here since we've already
identified that an offset is local (as opposed to "loaded").

This patch was forked off of D80681, which additionally did this and
modified some caching behavior, as we expect this change to be less
controversial.

In terms of optimizations, we've already determined that the SLocOffset
parameter to SourceManager::getFileIDLocal() is local in the caller
SourceManager::getFileIDSlow(). Also, there's an early continue in the
binary search loop in getFileIDLocal() that are duplicated in
isOffsetInFileID() as pointed out by @kadircet.

Take advantage of these to optimize the binary search patch, and remove
the FIXME.

Reviewers: kadircet

Reviewed By: kadircet

Subscribers: cfe-commits, kadircet, srhines

Tags: #clang

Differential Revision: https://reviews.llvm.org/D82497

4 years ago[lldb/Lua] Redirect Lua stdout/stderr to the CommandReturnObject
Jonas Devlieghere [Thu, 25 Jun 2020 16:55:19 +0000 (09:55 -0700)]
[lldb/Lua] Redirect Lua stdout/stderr to the CommandReturnObject

Redirect the output of stdout and stderr to the CommandReturnObject for
one line commands.

Differential revision: https://reviews.llvm.org/D82412

4 years ago[lldb/ScriptInterpreter] Let the IORedirect factory handle IO being disabled.
Jonas Devlieghere [Thu, 25 Jun 2020 16:51:55 +0000 (09:51 -0700)]
[lldb/ScriptInterpreter] Let the IORedirect factory handle IO being disabled.

Have one factory method that decides how to initialize the
ScriptInterpreterIORedirect object based on whether IO is enabled or
disabled.

4 years ago[llvm-readobj][COFF] add .llvm.call-graph-profile section dump
Zequan Wu [Mon, 15 Jun 2020 23:29:36 +0000 (16:29 -0700)]
[llvm-readobj][COFF] add .llvm.call-graph-profile section dump

Summary: Dumping contents of `.llvm.call-graph-profile` section of COFF in the same format as ELF.

Reviewers: jhenderson, MaskRay, hans

Reviewed By: jhenderson

Subscribers: grimar, rupprecht, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D81894

4 years agoEnsure that default value for -triple is correctly normalizedvalues
Daniel Grumberg [Thu, 25 Jun 2020 16:47:41 +0000 (17:47 +0100)]
Ensure that default value for -triple is correctly normalizedvalues

This fixes the build failure at http://lab.llvm.org:8011/builders/llvm-clang-win-x-aarch64/builds/240/steps/test-check-clang/logs/FAIL%3A%20Clang-Unit%3A%3ACC1CommandLineGenerationTest.CanGenerateCC1CommandLineSeparateRequiredAbsent

4 years ago[analyzer] Enable constructor support in evalCall event.
Nithin Vadukkumchery Rajendrakumar [Thu, 25 Jun 2020 01:30:41 +0000 (18:30 -0700)]
[analyzer] Enable constructor support in evalCall event.

Pass EvalCallOptions via runCheckersForEvalCall into defaultEvalCall.
Update the AnalysisOrderChecker to support evalCall for testing.

Differential Revision: https://reviews.llvm.org/D82256

4 years ago[lldb/ScriptInterpreter] Extract IO redirection logic
Jonas Devlieghere [Thu, 25 Jun 2020 16:43:17 +0000 (09:43 -0700)]
[lldb/ScriptInterpreter] Extract IO redirection logic

This patch takes the IO redirection logic from ScriptInterpreterPython
and moves it into the interpreter library so that it can be used by
other script interpreters. I've turned it into a RAII object so that we
don't have to worry about cleaning up in the calling code.

Differential revision: https://reviews.llvm.org/D82396

4 years ago[FileCheck][NFC] Remove redundant DumpInputDefault
Joel E. Denny [Thu, 25 Jun 2020 16:33:20 +0000 (12:33 -0400)]
[FileCheck][NFC] Remove redundant DumpInputDefault

Reviewed By: mehdi_amini, jhenderson

Differential Revision: https://reviews.llvm.org/D82480

4 years ago[sve][acle] Add some C intrinsics for brain float types.
Francesco Petrogalli [Tue, 23 Jun 2020 22:06:13 +0000 (22:06 +0000)]
[sve][acle] Add some C intrinsics for brain float types.

Summary:
The following intrinsics has been added:

svuint16_t svcnt[_bf16]_m(svuint16_t inactive, svbool_t pg, svbfloat16_t op)
svuint16_t svcnt[_bf16]_x(svbool_t pg, svbfloat16_t op)
svuint16_t svcnt[_bf16]_z(svbool_t pg, svbfloat16_t op)

svbfloat16_t svtbl[_bf16](svbfloat16_t data, svuint16_t indices)

svbfloat16_t svtbl2[_bf16](svbfloat16x2_t data, svuint16_t indices)

svbfloat16_t svtbx[_bf16](svbfloat16_t fallback, svbfloat16_t data, svuint16_t indices)

Reviewers: c-rhodes, kmclaughlin, efriedma, sdesmalen, ctetreau

Subscribers: tschuett, hiraditya, rkruppe, psnobl, cfe-commits, llvm-commits

Tags: #clang, #llvm

Differential Revision: https://reviews.llvm.org/D82429