platform/upstream/llvm.git
4 years ago[compiler-rt] Provide a lit config variable that defines the minimum deployment OS...
Dan Liew [Fri, 14 Feb 2020 19:35:06 +0000 (11:35 -0800)]
[compiler-rt] Provide a lit config variable that defines the minimum deployment OS version flag appropriate for the configured OS.

This patch defines `config.apple_platform_min_deployment_target_flag`
in the ASan, LibFuzzer, TSan, and UBSan lit test configs.

rdar://problem/59463146

4 years ago[compiler-rt] Add `DARWIN_osx_MIN_VER_FLAG` variable to match the other Apple platforms.
Dan Liew [Fri, 14 Feb 2020 19:01:02 +0000 (11:01 -0800)]
[compiler-rt] Add `DARWIN_osx_MIN_VER_FLAG` variable to match the other Apple platforms.

rdar://problem/59463146

4 years ago[compiler-rt] Use the correct minimum version flag for simulators on Apple
Dan Liew [Fri, 14 Feb 2020 18:28:05 +0000 (10:28 -0800)]
[compiler-rt] Use the correct minimum version flag for simulators on Apple
platforms.

For the simulators this changes the following compilation flags (
used both for building the runtime and lit tests).

iOS simulator: `-miphoneos-version-min` -> `-mios-simulator-version-min`
watchOS simulator: `-mwatchos-version-min` -> `-mwatchos-simulator-version-min`
tvOS simulator: `-mtvos-version-min` -> `-mtvos-simulator-version-min`

rdar://problem/59463146

4 years ago[llvm-exegesis] Rename range based for loop variable in a unit test so its different...
Craig Topper [Fri, 14 Feb 2020 21:41:50 +0000 (13:41 -0800)]
[llvm-exegesis] Rename range based for loop variable in a unit test so its different than the container being iterated over. NFC

It seems like gcc 5.5 wants to iterate over the new variable instead
of the container that lives outside the loop. But of course this
new container is empty.

Plus using a different variable names makes the code more readable.

4 years ago[Hexagon] Add an explicit makeArrayRef to pacify gcc 5.5
Craig Topper [Fri, 14 Feb 2020 21:38:50 +0000 (13:38 -0800)]
[Hexagon] Add an explicit makeArrayRef to pacify gcc 5.5

The array seemed to have decayed to a pointer before the ArrayRef
constructor got called so there was no size information available.

4 years ago[mlir] Add MemRef filter to affine data copy optimization
Diego Caballero [Fri, 14 Feb 2020 21:41:01 +0000 (13:41 -0800)]
[mlir] Add MemRef filter to affine data copy optimization

This patch extends affine data copy optimization utility with an
optional memref filter argument. When the memref filter is used, data
copy optimization will only generate copies for such a memref.

Note: this patch is just porting the memref filter feature from Uday's
'hop' branch: https://github.com/bondhugula/llvm-project/tree/hop.

Reviewed By: bondhugula

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

4 years ago[scudo][standalone] Allow setting release to OS
Christopher Ferris [Fri, 14 Feb 2020 20:24:03 +0000 (12:24 -0800)]
[scudo][standalone] Allow setting release to OS

Summary:
Add a method to set the release to OS value as the system runs,
and allow this to be set differently in the primary and the secondary.
Also, add a default value to use for primary and secondary. This
allows Android to have a default that is different for
primary/secondary.

Update mallopt to support setting the release to OS value.

Reviewers: pcc, cryptoad

Reviewed By: cryptoad

Subscribers: cryptoad, jfb, #sanitizers, llvm-commits

Tags: #sanitizers, #llvm

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

4 years ago[AsmPrinter] Use the McASMInfo to determine if we need descriptors.
Sean Fertile [Fri, 14 Feb 2020 16:15:26 +0000 (11:15 -0500)]
[AsmPrinter] Use the McASMInfo to determine if we need descriptors.

In https://reviews.llvm.org/rG8b737688c21a9755cae14cb9343930e0882164ab I
switched the condition gating the creation of the descriptor symbol from
checking the MCAsmInfo if we need to support descriptors, to if the OS
was AIX. Technically the 2 should be interchangeable: if we are
targeting AIX then we need to emit XCOFF object files, and the MCAsmInfo
must return true for needing function descriptors.

This doesn't account for lit test with runsteps that only set the arch.
Eg: test/CodeGen/XCore/section-name.ll
which when run natively on AIX we end up with a target xcore-ibm-aix and
needFunctionDescriptors is false.

This patch reverts to using the MCAsmInfo and adds an assert that the
target OS must be AIX since that is the only target using the descriptor
hook.

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

4 years agofix some comment typos to cycle bots
Nico Weber [Fri, 14 Feb 2020 20:18:50 +0000 (15:18 -0500)]
fix some comment typos to cycle bots

4 years ago[windows] Add /Gw to compiler flags
Nico Weber [Fri, 14 Feb 2020 20:15:00 +0000 (15:15 -0500)]
[windows] Add /Gw to compiler flags

This is like -fdata-sections, and it's not part of /O2 by default for some reason.

In the cmake build, reduces the size of clang.exe from 70,358,016 bytes to 69,982,720 bytes.

clang-format.exe goes from 3,703,296 bytes to 3,331,072 bytes.

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

4 years ago[AMDGPU] Always enable XNACK feature when support is explicitly requested
Austin Kerbow [Fri, 14 Feb 2020 17:22:33 +0000 (09:22 -0800)]
[AMDGPU] Always enable XNACK feature when support is explicitly requested

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

4 years ago[docs] Add note on using cmake to perform the build
Evandro Menezes [Fri, 14 Feb 2020 19:41:42 +0000 (13:41 -0600)]
[docs] Add note on using cmake to perform the build

Repeat the build instructions from the top level README in the Getting
Started guide.

4 years agoAMDGPU: Add option to disable CGP division expansion
Matt Arsenault [Tue, 11 Feb 2020 22:00:11 +0000 (17:00 -0500)]
AMDGPU: Add option to disable CGP division expansion

The division expansions in AMDGPUCodeGenPrepare can't be relied on for
correctness, since they punt to later optimization and possibly
legalization in some cases. We still need a way to be able to write
tests for the legalizer versions of the expansion. This is mostly for
GlobalISel, since the expected optimzations is expecting aren't
implemented.

The interaction with the flag to expand 64-bit division in the IR is
pretty confusing, but these flags have different purposes.

4 years ago[x86] remove stray test assertions; NFC
Sanjay Patel [Fri, 14 Feb 2020 19:28:50 +0000 (14:28 -0500)]
[x86] remove stray test assertions; NFC

I updated the prefix and forgot to manually remove the old names
as part of rG6071fc57a45.f

4 years ago[x86] regenerate complete test checks for sqrt{est}; NFC
Sanjay Patel [Fri, 14 Feb 2020 19:06:00 +0000 (14:06 -0500)]
[x86] regenerate complete test checks for sqrt{est}; NFC

The existing checks were trying to test both CPU-specific
codegen and generic codegen with explicit attributes for
the various sqrt estimate possibilities, but that was hard
to decipher and update (D69989).

Instead generate the complete results for various CPUs,
and that makes it clear which models have slow/fast sqrt
attributes along with all of the other potential diffs
(FMA, AVX2, scheduling).

Also, explicitly add the function attributes corresponding
to whether DAZ/FTZ denorm settings are expected.

4 years agoAMDGPU: Add option to expand 64-bit integer division in IR
Matt Arsenault [Sun, 19 Jan 2020 03:41:36 +0000 (22:41 -0500)]
AMDGPU: Add option to expand 64-bit integer division in IR

I didn't realize we were already expanding 24/32-bit division here
already. Use the available IntegerDivision utilities. This uses loops,
so produces significantly smaller code than the inline DAG expansion.

This now requires width reductions of 64-bit divisions before
introducing the expanded loops.

This helps work around missing legalization in GlobalISel for
division, which are the only remaining core instructions that didn't
work at all.

I think this is plausibly a better implementation than exists in the
DAG, although turning it on by default misses out on the constant
value optimizations and also needs benchmarking.

4 years ago[X86] Use ZERO_EXTEND instead of SIGN_EXTEND in the fast isel handling of convert_fro...
Craig Topper [Fri, 14 Feb 2020 18:37:06 +0000 (10:37 -0800)]
[X86] Use ZERO_EXTEND instead of SIGN_EXTEND in the fast isel handling of convert_from_fp16.

4 years ago[X86] Add AVX512 support to the fast isel code for Intrinsic::convert_from_fp16/conve...
Craig Topper [Fri, 14 Feb 2020 18:26:14 +0000 (10:26 -0800)]
[X86] Add AVX512 support to the fast isel code for Intrinsic::convert_from_fp16/convert_to_fp16.

4 years ago[LoopRotate] Get and update MSSA only if available in legacy pass manager.
Alina Sbirlea [Thu, 13 Feb 2020 18:49:44 +0000 (10:49 -0800)]
[LoopRotate] Get and update MSSA only if available in legacy pass manager.

Summary:
Potential fix for: https://bugs.llvm.org/show_bug.cgi?id=44889 and https://bugs.llvm.org/show_bug.cgi?id=44408

In the legacy pass manager, loop rotate need not compute MemorySSA when not being in the same loop pass manager with other loop passes.
There isn't currently a way to differentiate between the two cases, so this attempts to limit the usage in LoopRotate to only update MemorySSA when the analysis is already available.
The side-effect of this is that it will split the Loop pipeline.

This issue does not apply to the new pass manager, where we have a flag specifying if all loop passes in that loop pass manager preserve MemorySSA.

Reviewers: dmgreen, fedor.sergeev, nikic

Subscribers: Prazek, hiraditya, george.burgess.iv, llvm-commits

Tags: #llvm

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

4 years agoGlobalISel: Lower s64->s16 G_FPTRUNC
Matt Arsenault [Sat, 18 Jan 2020 15:08:11 +0000 (10:08 -0500)]
GlobalISel: Lower s64->s16 G_FPTRUNC

This is more or less directly ported from the AMDGPU custom lowering
for FP_TO_FP16. I made a few minor fixups (using G_UNMERGE_VALUES
instead of creating shift/trunc to extract the two halves, and zexting
an inverted compare instead of select_cc).

This also does not include the fast math expansion the DAG which
converts to f32 and then to f16. I think that belongs in a
pre-legalize combine instead.

4 years ago[GlobalISel] LegalizationArtifactCombiner: Fix a bug in tryCombineMerges
Volkan Keles [Fri, 14 Feb 2020 18:43:12 +0000 (10:43 -0800)]
[GlobalISel] LegalizationArtifactCombiner: Fix a bug in tryCombineMerges

Like COPY instructions explained in D70616, we don't check the constraints
when combining G_UNMERGE_VALUES. Use the same logic used in D70616 to check
if registers can be replaced, or a COPY instruction needs to be built.

https://reviews.llvm.org/D70564

4 years ago[Hexagon] v67+ HVX register pairs should support either direction
Brian Cain [Tue, 14 Aug 2018 21:17:46 +0000 (16:17 -0500)]
[Hexagon] v67+ HVX register pairs should support either direction

Assembler now permits pairs like 'v0:1', which are encoded
differently from the odd-first pairs like 'v1:0'.

The compiler will require more work to leverage these new register
pairs.

4 years agoFix tests after previous commit
Aaron Puchert [Fri, 14 Feb 2020 18:41:01 +0000 (19:41 +0100)]
Fix tests after previous commit

We don't want to test for this warning, so we just fix it.

4 years agoWarn about zero-parameter K&R definitions in -Wstrict-prototypes
Aaron Puchert [Fri, 14 Feb 2020 17:42:44 +0000 (18:42 +0100)]
Warn about zero-parameter K&R definitions in -Wstrict-prototypes

Summary:
Zero-parameter K&R definitions specify that the function has no
parameters, but they are still not prototypes, so calling the function
with the wrong number of parameters is just a warning, not an error.

The C11 standard doesn't seem to directly define what a prototype is,
but it can be inferred from 6.9.1p7: "If the declarator includes a
parameter type list, the list also specifies the types of all the
parameters; such a declarator also serves as a function prototype
for later calls to the same function in the same translation unit."
This refers to 6.7.6.3p5: "If, in the declaration “T D1”, D1 has
the form
    D(parameter-type-list)
or
    D(identifier-list_opt)
[...]". Later in 6.11.7 it also refers only to the parameter-type-list
variant as prototype: "The use of function definitions with separate
parameter identifier and declaration lists (not prototype-format
parameter type and identifier declarators) is an obsolescent feature."

We already correctly treat an empty parameter list as non-prototype
declaration, so we can just take that information.

GCC also warns about this with -Wstrict-prototypes.

This shouldn't affect C++, because there all FunctionType's are
FunctionProtoTypes. I added a simple test for that.

Reviewed By: aaron.ballman

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

4 years ago[APInt] Add some basic APInt::byteSwap unit tests
Simon Pilgrim [Fri, 14 Feb 2020 18:15:02 +0000 (18:15 +0000)]
[APInt] Add some basic APInt::byteSwap unit tests

As noted on D74621 we currently have no test coverage

4 years agoTTI: Fix vectorization cost for bswap
Matt Arsenault [Fri, 14 Feb 2020 15:32:02 +0000 (10:32 -0500)]
TTI: Fix vectorization cost for bswap

4 years ago[lldb/Plugin] s/LLDB_PLUGIN/LLDB_PLUGIN_DEFINE/ (NFC)
Jonas Devlieghere [Fri, 14 Feb 2020 17:46:02 +0000 (09:46 -0800)]
[lldb/Plugin] s/LLDB_PLUGIN/LLDB_PLUGIN_DEFINE/ (NFC)

Rename LLDB_PLUGIN to LLDB_PLUGIN_DEFINE as Pavel suggested in D73067 to
avoid name conflict.

4 years ago[libc++] Add missing include for is_same in test
Eric Fiselier [Fri, 14 Feb 2020 17:55:02 +0000 (18:55 +0100)]
[libc++] Add missing include for is_same in test

4 years agoAMDGPU: Improve i16/v2i16 bswap
Matt Arsenault [Fri, 14 Feb 2020 15:31:38 +0000 (10:31 -0500)]
AMDGPU: Improve i16/v2i16 bswap

4 years ago[X86] Fix copy/paste mistake in comment. NFC
Craig Topper [Thu, 13 Feb 2020 22:49:07 +0000 (14:49 -0800)]
[X86] Fix copy/paste mistake in comment. NFC

4 years agoAMDGPU: Add baseline tests for 16-bit bswap
Matt Arsenault [Fri, 14 Feb 2020 15:15:20 +0000 (10:15 -0500)]
AMDGPU: Add baseline tests for 16-bit bswap

4 years agoAMDGPU/GlobalISel: Handle G_BSWAP
Matt Arsenault [Thu, 13 Feb 2020 02:09:09 +0000 (21:09 -0500)]
AMDGPU/GlobalISel: Handle G_BSWAP

4 years ago[libc++] Remove cycle between <type_traits> and <cstddef>
Eric Fiselier [Fri, 14 Feb 2020 16:34:46 +0000 (17:34 +0100)]
[libc++] Remove cycle between <type_traits> and <cstddef>

This was caused by byte depending on traits. This patch moves
the minimal amount of meta-programming into <cstddef> to break the cycle.

4 years agoFix compilation breakage introduced by 8404aeb56a73ab24f9b295111de3b37a37f0b841.
Alexandre Ganea [Fri, 14 Feb 2020 16:16:32 +0000 (11:16 -0500)]
Fix compilation breakage introduced by 8404aeb56a73ab24f9b295111de3b37a37f0b841.

Also fix BitVector unittest failure when DLLVM_ENABLE_ASSERTIONS are OFF, introduced by d110c3a9f5253c4d94c10299c61fbbb33edab7db.

4 years ago[Driver] Rename AddGoldPlugin to addLTOOptions. NFC
Fangrui Song [Fri, 14 Feb 2020 06:35:18 +0000 (22:35 -0800)]
[Driver] Rename AddGoldPlugin to addLTOOptions. NFC

AddGoldPlugin does more than adding `-plugin path/to/LLVMgold.so`.
It works with lld and GNU ld, and adds other LTO options.
So AddGoldPlugin is no longer a suitable name.

Reviewed By: tejohnson

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

4 years agoReverting D73027 [DependenceAnalysis] Dependecies for loads marked with "ivnariant...
Evgeniy Brevnov [Fri, 14 Feb 2020 15:55:13 +0000 (22:55 +0700)]
Reverting D73027 [DependenceAnalysis] Dependecies for loads marked with "ivnariant.load" should not be shared with general accesses(PR42151).

4 years agoadd type_traits include as required for std::integral_constant
Eric Fiselier [Fri, 14 Feb 2020 15:38:16 +0000 (16:38 +0100)]
add type_traits include as required for std::integral_constant

4 years agoRevert "Reland D74436 "Change clang option -ffp-model=precise to select ffp-contract...
Melanie Blower [Fri, 14 Feb 2020 14:44:20 +0000 (06:44 -0800)]
Revert "Reland D74436 "Change clang option -ffp-model=precise to select ffp-contract=on""

This reverts commit 0a1123eb43f945593b26dd037490e0c909fa3c4f.
Want to revert this because it's causing trouble for PowerPC
I also fixed test fp-model.c which was looking for an incorrect error message

4 years ago[Support] On Windows, ensure hardware_concurrency() extends to all CPU sockets and...
Alexandre Ganea [Fri, 14 Feb 2020 03:49:57 +0000 (22:49 -0500)]
[Support] On Windows, ensure hardware_concurrency() extends to all CPU sockets and all NUMA groups

The goal of this patch is to maximize CPU utilization on multi-socket or high core count systems, so that parallel computations such as LLD/ThinLTO can use all hardware threads in the system. Before this patch, on Windows, a maximum of 64 hardware threads could be used at most, in some cases dispatched only on one CPU socket.

== Background ==
Windows doesn't have a flat cpu_set_t like Linux. Instead, it projects hardware CPUs (or NUMA nodes) to applications through a concept of "processor groups". A "processor" is the smallest unit of execution on a CPU, that is, an hyper-thread if SMT is active; a core otherwise. There's a limit of 32-bit processors on older 32-bit versions of Windows, which later was raised to 64-processors with 64-bit versions of Windows. This limit comes from the affinity mask, which historically is represented by the sizeof(void*). Consequently, the concept of "processor groups" was introduced for dealing with systems with more than 64 hyper-threads.

By default, the Windows OS assigns only one "processor group" to each starting application, in a round-robin manner. If the application wants to use more processors, it needs to programmatically enable it, by assigning threads to other "processor groups". This also means that affinity cannot cross "processor group" boundaries; one can only specify a "preferred" group on start-up, but the application is free to allocate more groups if it wants to.

This creates a peculiar situation, where newer CPUs like the AMD EPYC 7702P (64-cores, 128-hyperthreads) are projected by the OS as two (2) "processor groups". This means that by default, an application can only use half of the cores. This situation could only get worse in the years to come, as dies with more cores will appear on the market.

== The problem ==
The heavyweight_hardware_concurrency() API was introduced so that only *one hardware thread per core* was used. Once that API returns, that original intention is lost, only the number of threads is retained. Consider a situation, on Windows, where the system has 2 CPU sockets, 18 cores each, each core having 2 hyper-threads, for a total of 72 hyper-threads. Both heavyweight_hardware_concurrency() and hardware_concurrency() currently return 36, because on Windows they are simply wrappers over std::thread::hardware_concurrency() -- which can only return processors from the current "processor group".

== The changes in this patch ==
To solve this situation, we capture (and retain) the initial intention until the point of usage, through a new ThreadPoolStrategy class. The number of threads to use is deferred as late as possible, until the moment where the std::threads are created (ThreadPool in the case of ThinLTO).

When using hardware_concurrency(), setting ThreadCount to 0 now means to use all the possible hardware CPU (SMT) threads. Providing a ThreadCount above to the maximum number of threads will have no effect, the maximum will be used instead.
The heavyweight_hardware_concurrency() is similar to hardware_concurrency(), except that only one thread per hardware *core* will be used.

When LLVM_ENABLE_THREADS is OFF, the threading APIs will always return 1, to ensure any caller loops will be exercised at least once.

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

4 years ago[clang-scan-deps] Switch to using a ThreadPool
Alexandre Ganea [Thu, 13 Feb 2020 21:53:25 +0000 (16:53 -0500)]
[clang-scan-deps] Switch to using a ThreadPool

Use a ThreadPool instead of plain std::threads in clang-scan-deps.
This is needed to further support https://reviews.llvm.org/D71775.

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

4 years ago[ADT] Support BitVector as a key in DenseSet/Map
Alexandre Ganea [Thu, 13 Feb 2020 21:31:05 +0000 (16:31 -0500)]
[ADT] Support BitVector as a key in DenseSet/Map

This patch adds DenseMapInfo<> support for BitVector and SmallBitVector.

This is part of https://reviews.llvm.org/D71775, where a BitVector is used as a thread affinity mask.

4 years agoFix line endings produced by update_cc_test_checks.py
Alex Richardson [Fri, 14 Feb 2020 15:17:27 +0000 (15:17 +0000)]
Fix line endings produced by update_cc_test_checks.py

Use the same appraoch as update_llc_test_checks.py to always write \n
line endings. This should fix the Windows buildbots.

4 years ago[libc++] Remove unnecessary typenames from std/numerics/c.math/abs.pass.cpp
Louis Dionne [Fri, 14 Feb 2020 15:03:25 +0000 (16:03 +0100)]
[libc++] Remove unnecessary typenames from std/numerics/c.math/abs.pass.cpp

There are some unnecessary typenames in std/numerics/c.math/abs.pass.cpp;
e.g. they're not in a dependent context.

Patch by Bryce Adelstein Lelbach

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

4 years agoRevert "[clang-tools-extra] fix the check for if '-latomic' is necessary"
Luís Marques [Fri, 14 Feb 2020 15:01:52 +0000 (15:01 +0000)]
Revert "[clang-tools-extra] fix the check for if '-latomic' is necessary"

This reverts commit 1d40c4150630729a9c1ce5119a8027dac93a5b2d.
This seemed to have caused build failures on ARM/AArch64.

4 years ago[clangd] Update the CompletionItemKind.
Haojian Wu [Fri, 14 Feb 2020 13:55:51 +0000 (14:55 +0100)]
[clangd] Update the CompletionItemKind.

Summary: Fix some FIXMEs.

Reviewers: kadircet

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

Tags: #clang

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

4 years agoMove update_cc_test_checks.py tests to clang
Alex Richardson [Fri, 14 Feb 2020 10:26:07 +0000 (10:26 +0000)]
Move update_cc_test_checks.py tests to clang

Having tests that depend on clang inside llvm/ are not a good idea since
it can break incremental `ninja check-llvm`.

Fixes https://llvm.org/PR44798

Reviewed By: lebedev.ri, MaskRay, rsmith
Differential Revision: https://reviews.llvm.org/D74051

4 years ago[clangd] Add tracer to the rename workflow, NFC
Haojian Wu [Tue, 11 Feb 2020 11:37:09 +0000 (12:37 +0100)]
[clangd] Add tracer to the rename workflow, NFC

Reviewers: kbobyrev

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

Tags: #clang

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

4 years agoReenable "Always import constants" after compile time fixes
Teresa Johnson [Wed, 12 Feb 2020 23:17:56 +0000 (15:17 -0800)]
Reenable "Always import constants" after compile time fixes

Summary:
Reenables importing of constants by default, which was disabled in
D73724 due to excessive thin link times. These inefficiencies were
fixed in D73851.

I re-measured thin link times for a number of binaries that had compile
time explosions with importing of constants previously and confirmed
they no longer have any notable increases with it enabled.

Reviewers: wmi, evgeny777

Subscribers: hiraditya, arphaman, llvm-commits

Tags: #llvm

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

4 years ago[AArch64] Add BIT/BIF support.
Pavel Iliin [Tue, 4 Feb 2020 14:51:17 +0000 (14:51 +0000)]
[AArch64] Add BIT/BIF support.

This patch added generation of SIMD bitwise insert BIT/BIF instructions.
In the absence of GCC-like functionality for optimal constraints satisfaction
during register allocation the bitwise insert and select patterns are matched
by pseudo bitwise select BSP instruction with not tied def.
It is expanded later after register allocation with def tied
to BSL/BIT/BIF depending on operands registers.
This allows to get rid of redundant moves.

Reviewers: t.p.northover, samparker, dmgreen

Reviewed By: dmgreen

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

4 years ago[clang-tools-extra] fix the check for if '-latomic' is necessary
Gokturk Yuksek [Fri, 14 Feb 2020 14:12:45 +0000 (14:12 +0000)]
[clang-tools-extra] fix the check for if '-latomic' is necessary

Summary:
The CheckAtomic module performs two tests to determine if passing
'-latomic' to the linker is required: one for 64-bit atomics, and
another for non-64-bit atomics. clangd only uses the result from
HAVE_CXX_ATOMICS64_WITHOUT_LIB. This is incomplete because there are
uses of non-64-bit atomics in the code, such as the ReplyOnce::Replied
of type std::atomic<bool> defined in clangd/ClangdLSPServer.cpp.

Fix by also checking for the result of HAVE_CXX_ATOMICS_WITHOUT_LIB.

See also: https://reviews.llvm.org/D68964

Reviewers: ilya-biryukov, nridge, kadircet, beanz, compnerd, luismarques
Reviewed By: luismarques
Tags: #clang
Differential Revision: https://reviews.llvm.org/D69869

4 years ago[Driver][RISCV] Add RedHat Linux RISC-V triple
Luís Marques [Fri, 14 Feb 2020 13:44:42 +0000 (13:44 +0000)]
[Driver][RISCV] Add RedHat Linux RISC-V triple

Summary: Adds the RedHat Linux triple to the list of 64-bit RISC-V triples.
Without this the gcc libraries wouldn't be found by clang on a redhat/fedora
system, as the search list included `/usr/lib/gcc/riscv64-redhat-linux-gnu`
but the correct path didn't include the `-gnu` suffix.

Reviewers: lenary, asb, dlj
Reviewed By: lenary
Tags: #clang
Differential Revision: https://reviews.llvm.org/D74399

4 years ago[test][DebugInfo] Fix signed/unsigned comparison problem in test
James Henderson [Fri, 14 Feb 2020 13:39:41 +0000 (13:39 +0000)]
[test][DebugInfo] Fix signed/unsigned comparison problem in test

This caused build bot failures:
http://lab.llvm.org:8011/builders/ppc64le-lld-multistage-test/builds/8568/

4 years ago[libc++] span: Fix incorrect static asserts
Louis Dionne [Fri, 14 Feb 2020 13:31:15 +0000 (14:31 +0100)]
[libc++] span: Fix incorrect static asserts

The static asserts in span<T, N>::front() and span<T, N>::back() are
incorrect as they may be triggered from valid code due to evaluation
of a never taken branch:

    span<int, 0> foo;
    if (!foo.empty()) {
        auto x = foo.front();
    }

The problem is that the branch is always evaluated by the compiler,
creating invalid compile errors for span<T, 0>.

Thanks to Michael Schellenberger Costa for the patch.

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

4 years ago[clang][Index] Introduce a TemplateParm SymbolKind
Kadir Cetinkaya [Thu, 30 Jan 2020 13:07:42 +0000 (14:07 +0100)]
[clang][Index] Introduce a TemplateParm SymbolKind

Summary:
Currently template parameters has symbolkind `Unknown`. This patch
introduces a new kind `TemplateParm` for templatetemplate, templatetype and
nontypetemplate parameters.

Also adds tests in clangd hover feature.

Reviewers: sammccall

Subscribers: kristof.beyls, ilya-biryukov, jkorous, arphaman, usaxena95, cfe-commits

Tags: #clang

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

4 years ago[clang][DeclPrinter] Implement visitors for {TemplateType,NonTypeTemplate}Parms
Kadir Cetinkaya [Thu, 30 Jan 2020 13:00:51 +0000 (14:00 +0100)]
[clang][DeclPrinter] Implement visitors for {TemplateType,NonTypeTemplate}Parms

Reviewers: sammccall, hokein

Subscribers: kristof.beyls, jkorous, arphaman, usaxena95, cfe-commits

Tags: #clang

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

4 years ago[lldb] Print result when expect_expr unexpectedly succeeds
Raphael Isemann [Fri, 14 Feb 2020 11:57:10 +0000 (12:57 +0100)]
[lldb] Print result when expect_expr unexpectedly succeeds

4 years ago[X86][SSE] lowerShuffleAsBitRotate - lower to vXi8 shuffles to ROTL on pre-SSSE3...
Simon Pilgrim [Fri, 14 Feb 2020 11:54:55 +0000 (11:54 +0000)]
[X86][SSE] lowerShuffleAsBitRotate - lower to vXi8 shuffles to ROTL on pre-SSSE3 targets

Without PSHUFB we are better using ROTL (expanding to OR(SHL,SRL)) than using the generic v16i8 shuffle lowering - but if we can widen to v8i16 or more then the existing shuffles are still the better option.

REAPPLIED: Original commit rG11c16e71598d was reverted at rGde1d90299b16 as it wasn't accounting for later lowering. This version emits ROTLI or the OR(VSHLI/VSRLI) directly to avoid the issue.

4 years agollvm/cmake/config.guess: add support for riscv32 and riscv64
Luís Marques [Fri, 14 Feb 2020 11:49:18 +0000 (11:49 +0000)]
llvm/cmake/config.guess: add support for riscv32 and  riscv64

Summary: LLVM configuration fails with 'unable to guess system type' on riscv64.
Add support for detecting riscv32 and riscv64 systems.

Patch by Gokturk Yuksek (gokturk)
Reviewers: erichkeane, rengolin, mgorny, aaron.ballman, beanz, luismarques
Reviewed By: luismarques
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D68899

4 years ago[OpenMP] Lower taskyield using OpenMP IR Builder
Roger Ferrer Ibanez [Thu, 12 Dec 2019 08:55:46 +0000 (08:55 +0000)]
[OpenMP] Lower taskyield using OpenMP IR Builder

This is similar to D69828.

Special codegen for enclosing untied tasks is still done in clang.

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

4 years ago[llvm-ar] Simplify Windows comparePaths NFCI
Andrew Ng [Tue, 11 Feb 2020 12:28:17 +0000 (12:28 +0000)]
[llvm-ar] Simplify Windows comparePaths NFCI

Replace use of widenPath in comparePaths with UTF8ToUTF16. widenPath
does a lot more than just conversion from UTF-8 to UTF-16. This is not
necessary for CompareStringOrdinal and could possibly even cause
problems.

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

4 years ago[DebugInfo] Error if unsupported address size detected in line table
James Henderson [Mon, 3 Feb 2020 16:43:03 +0000 (16:43 +0000)]
[DebugInfo] Error if unsupported address size detected in line table

Prior to this patch, if a DW_LNE_set_address opcode was parsed with an
address size (i.e. with a length after the opcode) of anything other 1,
2, 4, or 8, an llvm_unreachable would be hit, as the data extractor does
not support other values. This patch introduces a new error check that
verifies the address size is one of the supported sizes, in common with
other places within the DWARF parsing.

This patch also fixes calculation of a generated line table's size in
unit tests. One of the tests in this patch highlighted a bug introduced
in 1271cde4745, when non-byte operands were used as arguments for
extended or standard opcodes.

Reviewed by: dblaikie

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

4 years ago[lldb/DWARF] Don't hold a unique SymbolFileDWARFDwo in a DWARFUnit
Pavel Labath [Thu, 6 Feb 2020 14:24:39 +0000 (06:24 -0800)]
[lldb/DWARF] Don't hold a unique SymbolFileDWARFDwo in a DWARFUnit

This is the second dwp preparatory patch. When a SymbolFileDWARFDwo will
hold more than one split unit, it will not be able to be uniquely owned
by a single DWARFUnit. I achieve this by changing the
unique_ptr<SymbolFileDWARFDwo> member of DWARFUnit to
shared_ptr<DWARFUnit>. The shared_ptr points to a DWARFUnit, but it is
in fact holding the entire SymbolFileDWARFDwo alive. This is the same
method used by llvm DWARFUnit (except that is uses the DWARFContext
class).

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

4 years ago[OpenMP] Lower taskwait using OpenMP IR Builder
Roger Ferrer Ibanez [Thu, 12 Dec 2019 09:19:10 +0000 (09:19 +0000)]
[OpenMP] Lower taskwait using OpenMP IR Builder

The code generation is exactly the same as it was.

But not that the special handling of untied tasks is still handled by
emitUntiedSwitch in clang.

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

4 years ago[doc] Clarify responsibility for fixing experimental target problems
James Henderson [Thu, 13 Feb 2020 10:21:55 +0000 (10:21 +0000)]
[doc] Clarify responsibility for fixing experimental target problems

Experimental targets are meant to be maintained by the community behind
the target. They are not monitored by the primary build bots. This
change clarifies that it is this communities responsibility for things
like test fixes related to the target caused by changes unrelated to
that target.

See http://lists.llvm.org/pipermail/llvm-dev/2020-February/139115.html
for a full discussion.

Reviewed by: rupprecht, lattner, MaskRay

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

4 years agoDo not build the CUBIN conversion pass when NVPTX Backend isn't configured
Mehdi Amini [Fri, 14 Feb 2020 09:12:41 +0000 (09:12 +0000)]
Do not build the CUBIN conversion pass when NVPTX Backend isn't configured

This pass would currently build, but fail to run when this backend isn't
linked in. On the other hand, we'd like it to initialize only the NVPTX
backend, which isn't possible if we continue to build it without the
backend available. Instead of building a broken configuration, let's
skip building the pass entirely.

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

4 years ago[lldb/dotest] Remove the "exclusive test subdir" concept
Pavel Labath [Thu, 13 Feb 2020 13:40:09 +0000 (14:40 +0100)]
[lldb/dotest] Remove the "exclusive test subdir" concept

Summary:
This was added in 2018 (r339929), when we were still using the
hand-rolled test runner.

It does not seem to be relevant anymore. In fact as far as I can tell,
it's a big no-op now as the exclusive_test_subdir variable is never set.

Reviewers: vsk, JDevlieghere

Subscribers: lldb-commits

Tags: #lldb

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

4 years ago[mlir] Fix argument attribute attribute reassignment in ConvertStandardToLLVM
Alex Zinenko [Fri, 14 Feb 2020 09:18:19 +0000 (10:18 +0100)]
[mlir] Fix argument attribute attribute reassignment in ConvertStandardToLLVM

The commit switching the calling convention for memrefs (5a1778057)
inadvertently introduced a bug in the function argument attribute conversion:
due to incorrect indexing of function arguments it was not assigning the
attributes to the arguments beyond those generated from the first original
argument. This was not caught in the commit since the test suite does have a
test for converting multi-argument functions with argument attributes. Fix the
bug and add relevant tests.

4 years ago[lldb] Remove accidentally checked-in debugging code
Pavel Labath [Fri, 14 Feb 2020 08:35:13 +0000 (09:35 +0100)]
[lldb] Remove accidentally checked-in debugging code

4 years ago[VE] Support for PIC (global data and calls)
Kazushi (Jam) Marukawa [Fri, 14 Feb 2020 08:31:06 +0000 (09:31 +0100)]
[VE] Support for PIC (global data and calls)

Summary: Support for PIC with tests for global variables and function calls.

Reviewed By: arsenm

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

4 years ago[VecotrCombine] Fix unused variable for assertion disabled builds
Kadir Cetinkaya [Fri, 14 Feb 2020 08:29:56 +0000 (09:29 +0100)]
[VecotrCombine] Fix unused variable for assertion disabled builds

4 years ago[NFC][ARM] Convert some pointers to references.
Sam Parker [Fri, 14 Feb 2020 08:28:26 +0000 (08:28 +0000)]
[NFC][ARM] Convert some pointers to references.

4 years ago[NFC][clang-tidy] Move recently newly-added tests into checkers/ subdir
Roman Lebedev [Fri, 14 Feb 2020 08:22:29 +0000 (11:22 +0300)]
[NFC][clang-tidy] Move recently newly-added tests into checkers/ subdir

That's where nowadays those tests reside, those outliers were created
before the migration but committed after,
so they just awkwardly reside in the old place.

4 years ago[lldb] Add a test for launch failure and its error message
Pavel Labath [Fri, 14 Feb 2020 07:33:42 +0000 (08:33 +0100)]
[lldb] Add a test for launch failure and its error message

4 years ago[AsmPrinter][MCStreamer] De-capitalize EmitInstruction and EmitCFI*
Fangrui Song [Fri, 14 Feb 2020 05:58:16 +0000 (21:58 -0800)]
[AsmPrinter][MCStreamer] De-capitalize EmitInstruction and EmitCFI*

4 years ago[lldb/Test] Partially revert assertTrue change
Jonas Devlieghere [Fri, 14 Feb 2020 05:55:41 +0000 (21:55 -0800)]
[lldb/Test] Partially revert assertTrue change

This reverts b3a0c4d7dcfa252be17ef5f5b63ffaaa83e01a2b for
TestBreakpointHitCount.py because it's now timing out on the Windows
bot. I'm not sure this is the cause, but the substitution doesn't look
correct anyway...

4 years ago[lldb/Plugins] Have one initializer per ABI plugin
Jonas Devlieghere [Fri, 14 Feb 2020 05:49:12 +0000 (21:49 -0800)]
[lldb/Plugins] Have one initializer per ABI plugin

After the recent change that grouped some of the ABI plugins together,
those plugins ended up with multiple initializers per plugin. This is
incompatible with my proposed approach of generating the initializers
dynamically, which is why I've grouped them together in a new entry
point.

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

4 years ago[DependenceAnalysis] Dependecies for loads marked with "ivnariant.load" should not...
Evgeniy Brevnov [Thu, 16 Jan 2020 08:17:43 +0000 (15:17 +0700)]
[DependenceAnalysis] Dependecies for loads marked with "ivnariant.load" should not be shared with general accesses(PR42151).

Summary:
This is second attempt to fix the problem with incorrect dependencies reported in presence of invariant load. Initial fix (https://reviews.llvm.org/D64405) was reverted due to a regression reported in https://reviews.llvm.org/D70516.

The original fix changed caching behavior for invariant loads. Namely such loads are not put into the second level cache (NonLocalDepInfo). The problem with that fix is the first level cache  (CachedNonLocalPointerInfo) still works as if invariant loads were in the second level cache. The solution is in addition to not putting dependence results into the second level cache avoid putting info about invariant loads into the first level cache as well.

Reviewers: jdoerfert, reames, hfinkel, efriedma

Reviewed By: jdoerfert

Subscribers: DaniilSuchkov, hiraditya, bmahjour, llvm-commits

Tags: #llvm

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

4 years ago[ELF][AArch64] Rename pacPlt to zPacPlt and forceBti to zForceIbt after D71327. NFC
Fangrui Song [Fri, 14 Feb 2020 04:57:03 +0000 (20:57 -0800)]
[ELF][AArch64] Rename pacPlt to zPacPlt and forceBti to zForceIbt after D71327. NFC

We use config->z* for -z options.

4 years ago[dsymutil] Fix double relocation of DW_AT_call_return_pc
Jonas Devlieghere [Fri, 14 Feb 2020 01:39:29 +0000 (17:39 -0800)]
[dsymutil] Fix double relocation of DW_AT_call_return_pc

When the DW_AT_call_return_pc matches a relocation, the call return pc
would get relocated twice, once because of the relocation in the object
file and once because of dsymutil. The same problem exists for the low
and high PC and the fix is the same. We remember the low, high and
return pc of the original DIE and relocate that, rather than the
potentially already relocated value.

Reviewed offline by Fred Riss.

4 years ago[X86] Fix the bug that _mm_mask_cvtsepi64_epi32 generates result without
Liu, Chen3 [Thu, 13 Feb 2020 13:16:18 +0000 (21:16 +0800)]
[X86] Fix the bug that _mm_mask_cvtsepi64_epi32 generates result without
zero the upper 64bit.

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

4 years agoRemove unused lambda argument.
Eric Christopher [Fri, 14 Feb 2020 01:18:53 +0000 (17:18 -0800)]
Remove unused lambda argument.

4 years agoReinstate llvm-go to test the go bindings.
Eric Christopher [Thu, 13 Feb 2020 20:53:32 +0000 (12:53 -0800)]
Reinstate llvm-go to test the go bindings.

This partially reverts commit 102814b4d36ad004a2e37cd2a1e84bd2c3593d29.

4 years ago[mlir][DeclarativeParser] Add support for formatting enum attributes in the string...
River Riddle [Fri, 14 Feb 2020 01:11:01 +0000 (17:11 -0800)]
[mlir][DeclarativeParser] Add support for formatting enum attributes in the string form.

Summary: This revision adds support to the declarative parser for formatting enum attributes in the symbolized form. It uses this new functionality to port several of the SPIRV parsers over to the declarative form.

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

4 years ago[AsmPrinter] De-capitalize all AsmPrinter::Emit* but EmitInstruction
Fangrui Song [Fri, 14 Feb 2020 00:36:27 +0000 (16:36 -0800)]
[AsmPrinter] De-capitalize all AsmPrinter::Emit* but EmitInstruction

Similar to rL328848.

4 years ago[WebAssembly] Make stack pointer args inhibit tail calls
Thomas Lively [Tue, 4 Feb 2020 05:26:43 +0000 (21:26 -0800)]
[WebAssembly] Make stack pointer args inhibit tail calls

Summary:
Also make return calls terminator instructions so epilogues are
inserted before them rather than after them. Together, these changes
make WebAssembly's tail call optimization more stack-safe.

Reviewers: aheejin, dschuff

Subscribers: sbc100, jgravelle-google, hiraditya, sunfish, llvm-commits

Tags: #llvm

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

4 years agoReland D74436 "Change clang option -ffp-model=precise to select ffp-contract=on"
Fangrui Song [Fri, 14 Feb 2020 00:17:21 +0000 (16:17 -0800)]
Reland D74436 "Change clang option -ffp-model=precise to select ffp-contract=on"

Buildbot are failing with the current revert status. So reland with a
fix to fp-model.c

4 years ago[AArch64][NFC] Update test checks.
Pavel Iliin [Wed, 12 Feb 2020 18:31:18 +0000 (18:31 +0000)]
[AArch64][NFC] Update test checks.
This NFC commit updates several llc tests checks by automatically generated ones.

4 years agoAdd a test for debugserver handling threads suspended from within a program.
Jim Ingham [Thu, 13 Feb 2020 23:48:38 +0000 (15:48 -0800)]
Add a test for debugserver handling threads suspended from within a program.

Mach allows you to suspend and resume other threads within a program, so
debugserver has to be careful not to interfere with this when it goes to supend and
resume threads while stepping over breakpoints and calling functions.  Even
trickier, if you call a function on a suspended thread, it has to resume the
thread to get the expression to run, and then suspend it properly when done.

This all works already, but there wasn't a test for it.  Adding that here.

This same test could be written for a unix that supports pthread_{suspend,resume}_np, but
macOS doesn't support these calls, only the mach version.  It doesn't look like
a lot of Linux'es support this (AIX does apparently...)  And IIUC Windows allows
you to suspend and resume other threads, but the code for that would look pretty
different than this main.c.  So for simplicity's sake I wrote this test for Darwin-only.

4 years ago[mlir] [VectorOps] Initial framework for progressively lowering vector.contract
aartbik [Thu, 13 Feb 2020 22:50:07 +0000 (14:50 -0800)]
[mlir] [VectorOps] Initial framework for progressively lowering vector.contract

Summary:
This sets the basic framework for lowering vector.contract progressively
into simpler vector.contract operations until a direct vector.reduction
operation is reached. More details will be filled out progressively as well.

Reviewers: nicolasvasilache

Reviewed By: nicolasvasilache

Subscribers: mehdi_amini, rriddle, jpienaar, burmako, shauheen, antiagainst, nicolasvasilache, arpith-jacob, mgester, lucyrfox, liufengdb, Joonsoo, llvm-commits

Tags: #llvm

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

4 years agoRevert "Revert "Revert "Change clang option -ffp-model=precise to select ffp-contract...
Melanie Blower [Thu, 13 Feb 2020 22:40:01 +0000 (14:40 -0800)]
Revert "Revert "Revert "Change clang option -ffp-model=precise to select ffp-contract=on"""

This reverts commit abd09053bc7aa6144873c196a7d50aa6ce6ca430.
It's causing internal buildbot fails on ppc

Conflicts:
clang/lib/Driver/ToolChains/Clang.cpp

4 years agoAdd dbgs() output to help track down missing DW_AT_location bugs, NFC
Vedant Kumar [Thu, 13 Feb 2020 22:38:42 +0000 (14:38 -0800)]
Add dbgs() output to help track down missing DW_AT_location bugs, NFC

4 years ago[Local] Do not move around dbg.declares during replaceDbgDeclare
Vedant Kumar [Mon, 10 Feb 2020 23:37:56 +0000 (15:37 -0800)]
[Local] Do not move around dbg.declares during replaceDbgDeclare

replaceDbgDeclare is used to update the descriptions of stack variables
when they are moved (e.g. by ASan or SafeStack). A side effect of
replaceDbgDeclare is that it moves dbg.declares around in the
instruction stream (typically by hoisting them into the entry block).
This behavior was introduced in llvm/r227544 to fix an assertion failure
(llvm.org/PR22386), but no longer appears to be necessary.

Hoisting a dbg.declare generally does not create problems. Usually,
dbg.declare either describes an argument or an alloca in the entry
block, and backends have special handling to emit locations for these.
In optimized builds, LowerDbgDeclare places dbg.values in the right
spots regardless of where the dbg.declare is. And no one uses
replaceDbgDeclare to handle things like VLAs.

However, there doesn't seem to be a positive case for moving
dbg.declares around anymore, and this reordering can get in the way of
understanding other bugs. I propose getting rid of it.

Testing: stage2 RelWithDebInfo sanitized build, check-llvm

rdar://59397340

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

4 years ago[VectorCombine] try to form vector binop to eliminate an extract element
Sanjay Patel [Thu, 13 Feb 2020 21:08:15 +0000 (16:08 -0500)]
[VectorCombine] try to form vector binop to eliminate an extract element

binop (extelt X, C), (extelt Y, C) --> extelt (binop X, Y), C

This is a transform that has been considered for canonicalization (instcombine)
in the past because it reduces instruction count. But as shown in the x86 tests,
it's impossible to know if it's profitable without a cost model. There are many
potential target constraints to consider.

We have implemented similar transforms in the backend (DAGCombiner and
target-specific), but I don't think we have this exact fold there either (and if
we did it in SDAG, it wouldn't work across blocks).

Note: this patch was intended to handle the more general case where the extract
indexes do not match, but it got too big, so I scaled it back to this pattern
for now.

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

4 years ago[build] Fix shared lib builds.
Francesco Petrogalli [Thu, 13 Feb 2020 22:03:41 +0000 (22:03 +0000)]
[build] Fix shared lib builds.

4 years ago[clang] Fix bad line ending (DOS instead of Unix) inside the release notes.
Wawha [Thu, 13 Feb 2020 21:46:33 +0000 (22:46 +0100)]
[clang] Fix bad line ending (DOS instead of Unix) inside the release notes.

4 years ago[AsmPrinter] De-capitalize some AsmPrinter::Emit* functions
Fangrui Song [Thu, 13 Feb 2020 21:26:21 +0000 (13:26 -0800)]
[AsmPrinter] De-capitalize some AsmPrinter::Emit* functions

Similar to rL328848.

4 years ago[X86] Don't widen 128/256-bit strict compares with vXi1 result to 512-bits on KNL.
Craig Topper [Thu, 13 Feb 2020 19:10:57 +0000 (11:10 -0800)]
[X86] Don't widen 128/256-bit strict compares with vXi1 result to 512-bits on KNL.

If we widen the compare we might trigger a spurious exception from
the garbage data.

We have two choices here. Explicitly force the upper bits to zero.
Or use a legacy VEX vcmpps/pd instruction and convert the XMM/YMM
result to mask register.

I've chosen to go with the second option. I'm not sure which is
really best. In some cases we could get rid of the zeroing since
the producing instruction probably already zeroed it. But we lose
the ability to fold a load. So which is best is dependent on
surrounding code.

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

4 years ago[AsmPrinter] De-capitalize Emit{Function,BasicBlock]* and Emit{Start,End}OfAsmFile
Fangrui Song [Thu, 13 Feb 2020 21:10:49 +0000 (13:10 -0800)]
[AsmPrinter] De-capitalize Emit{Function,BasicBlock]* and Emit{Start,End}OfAsmFile

4 years ago[WebAssembly] Add cbrt function signatures
Thomas Lively [Fri, 7 Feb 2020 23:01:34 +0000 (15:01 -0800)]
[WebAssembly] Add cbrt function signatures

Summary:
Fixes a crash in the backend where optimizations produce calls to the
cbrt runtime functions. Fixes PR 44227.

Reviewers: aheejin

Subscribers: dschuff, sbc100, jgravelle-google, hiraditya, sunfish, llvm-commits

Tags: #llvm

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

4 years ago[clang-format] Add new option BeforeLambdaBody in Allman style.
Wawha [Thu, 13 Feb 2020 19:25:34 +0000 (20:25 +0100)]
[clang-format] Add new option BeforeLambdaBody in Allman style.

This option add a line break then a lambda is inside a function call.

Reviewers : djasper, klimek, krasimir, MyDeveloperDay

Reviewed By: MyDeveloperDay

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