platform/upstream/llvm.git
4 years ago[libc++] Run the builders Docker containers 'as 'buildbot instead of 'root'
Louis Dionne [Wed, 25 Mar 2020 15:11:31 +0000 (11:11 -0400)]
[libc++] Run the builders Docker containers 'as 'buildbot instead of 'root'

4 years agotsan: fix leak of ThreadSignalContext for fibers
Dmitry Vyukov [Wed, 25 Mar 2020 16:03:29 +0000 (17:03 +0100)]
tsan: fix leak of ThreadSignalContext for fibers

When creating and destroying fibers in tsan a thread state
is created and destroyed. Currently, a memory mapping is
leaked with each fiber (in __tsan_destroy_fiber).
This causes applications with many short running fibers
to crash or hang because of linux vm.max_map_count.

The root of this is that ThreadState holds a pointer to
ThreadSignalContext for handling signals. The initialization
and destruction of it is tied to platform specific events
in tsan_interceptors_posix and missed when destroying a fiber
(specifically, SigCtx is used to lazily create the
ThreadSignalContext in tsan_interceptors_posix). This patch
cleans up the memory by inverting the control from the
platform specific code calling the generic ThreadFinish to
ThreadFinish calling a platform specific clean-up routine
after finishing a thread.

The relevant code causing the leak with fibers is the fiber destruction:

void FiberDestroy(ThreadState *thr, uptr pc, ThreadState *fiber) {
  FiberSwitchImpl(thr, fiber);
  ThreadFinish(fiber);
  FiberSwitchImpl(fiber, thr);
  internal_free(fiber);
}

I would appreciate feedback if this way of fixing the leak is ok.
Also, I think it would be worthwhile to more closely look at the
lifecycle of ThreadState (i.e. it uses no constructor/destructor,
thus requiring manual callbacks for cleanup) and how OS-Threads/user
level fibers are differentiated in the codebase. I would be happy to
contribute more if someone could point me at the right place to
discuss this issue.

Reviewed-in: https://reviews.llvm.org/D76073
Author: Florian (Florian)

4 years agocompiler-rt: allow golang race detector to run on musl-c
Dmitry Vyukov [Wed, 25 Mar 2020 10:30:25 +0000 (11:30 +0100)]
compiler-rt: allow golang race detector to run on musl-c

tsan while used by golang's race detector was not working on alpine
linux, since it is using musl-c instead of glibc. Since alpine is very
popular distribution for container deployments, having working race
detector would be nice. This commits adds some ifdefs to get it working.

It fixes https://github.com/golang/go/issues/14481 on golang's issue tracker.

Reviewed-in: https://reviews.llvm.org/D75849
Author: graywolf-at-work (Tomas Volf)

4 years ago[lldb] add lit.local.cfg for breakpad tests
Pavel Labath [Wed, 25 Mar 2020 15:07:05 +0000 (16:07 +0100)]
[lldb] add lit.local.cfg for breakpad tests

The reason is to add .yaml as a valid test suffix. The test folder
contains one yaml file, which wasn't being run because of that.

Unsurprisingly the test fails, but this was not because the underlying
functionality was broken, but rather because the test was setup
incorrectly (most likely due to overly aggressive simplification of the
test data on my part).

Therefore this patch also tweaks the test inputs in order to test what
they are supposed to test, and also updates some other breakpad tests
(because they depend on the same inputs as this one) to be more
realistic -- specifically it avoids putting symbols to the first page of
the module, as that's where normally the COFF header would reside.

4 years ago[ARM] Move ConstantIsland and LowOverheadLoops Passes.
Yvan Roux [Wed, 25 Mar 2020 15:40:30 +0000 (16:40 +0100)]
[ARM] Move ConstantIsland and LowOverheadLoops Passes.

Move ARM ConstantIsland and LowOverheadLopps passes later in the pipeline
such that they will be run after the upcoming Machine Outlining pass.

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

4 years ago[mlir] Removed TanHOp lowering from ConvertStandardToLLVM since there is no reasonabl...
Marcel Koester [Tue, 3 Mar 2020 10:07:14 +0000 (11:07 +0100)]
[mlir] Removed TanHOp lowering from ConvertStandardToLLVM since there is no reasonable TanH representation in LLVM.

Summary: The current ConvertStandardToLLVM phase lowers the standard TanHOp to function calls to external tanh symbols. However, this leads to misunderstandings since these external symbols are not defined anywhere. This commit removes the TanHOp lowering functionality from ConvertStandardToLLVM, adapts the LowerGpuOpsToNVVMOps and LowerGpuOpsToROCDLOps passes and adjusts the affected test cases.

Reviewers: mravishankar, herhut

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

Tags: #llvm

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

4 years ago[gn build] Port ce984129eaa
LLVM GN Syncbot [Wed, 25 Mar 2020 15:36:51 +0000 (15:36 +0000)]
[gn build] Port ce984129eaa

4 years ago[AMDGPU] Add SIPreEmitPeephole pass.
cdevadas [Wed, 25 Mar 2020 14:15:16 +0000 (14:15 +0000)]
[AMDGPU] Add SIPreEmitPeephole pass.

This pass can handle all the optimization
opportunities found just before code emission.
Presently it includes the handling of vcc branch
optimization that was handled earlier in SIInsertSkips.

Reviewed By: arsenm

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

4 years ago[X86][AVX] Add common prefix to merge 32/64-bit AVX1 checks
Simon Pilgrim [Wed, 25 Mar 2020 15:33:11 +0000 (15:33 +0000)]
[X86][AVX] Add common prefix to merge 32/64-bit AVX1 checks

4 years ago[SystemZ] Improve foldMemoryOperandImpl()
Jonas Paulsson [Wed, 11 Mar 2020 14:18:35 +0000 (15:18 +0100)]
[SystemZ] Improve foldMemoryOperandImpl()

A spilled load of an immediate can use MVHI/MVGHI instead.
A compare of a spilled register against an immediate can use CHSI/CGHSI.
A logical compare can use CLFHSI/CLGHSI.

Review: Ulrich Weigand

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

4 years ago[llvm-objdump] Replace array_pod_sort with llvm::stable_sort
Fangrui Song [Tue, 24 Mar 2020 22:55:34 +0000 (15:55 -0700)]
[llvm-objdump] Replace array_pod_sort with llvm::stable_sort

llvm-objdump.cpp has 3 array_pod_sort() calls used for symbolization.
array_pod_start() calls qsort() internally and can have different
behaviors across different libcs. Use llvm::stable_sort instead.

Reviewed By: davidb, thopre

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

4 years ago[PowerPC][AIX] ByVal formal arguments in a single register.
Sean Fertile [Wed, 25 Mar 2020 14:17:49 +0000 (10:17 -0400)]
[PowerPC][AIX] ByVal formal arguments in a single register.

Adds support for passing ByVal formal arguments as long as they fit in a
single register.

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

4 years agoAdd MS Mangling for OpenCL Pipe types, add mangling test.
Erich Keane [Thu, 5 Mar 2020 16:10:00 +0000 (08:10 -0800)]
Add MS Mangling for OpenCL Pipe types, add mangling test.

SPIRV2.0 Spec only specifies Linux mangling, however our downstream has
use for a Windows mangling for these types.

Unfortunately, the SPIRV
spec specifies a single mangling for all pipe types, despite clang
allowing overloading on these types.  Because of this, this patch
chooses to mangle the read/writability and element type for the windows
mangling.

The windows manglings in the test all demangle according to demangler:
"void __cdecl test1(struct __clang::ocl_pipe<int,1>)
"void __cdecl test2(struct __clang::ocl_pipe<float,0>)
"void __cdecl test2(struct __clang::ocl_pipe<int,1>)
"void __cdecl test3(struct __clang::ocl_pipe<int const,1>)
"void __cdecl test4(struct __clang::ocl_pipe<union
__clang::__vector<unsigned char,3>,1>)
"void __cdecl test5(struct __clang::ocl_pipe<union
__clang::__vector<int,4>,1>)
"void __cdecl test_reserved_read_pipe(struct __clang::_ASCLglobal<struct
Person > * __ptr64,struct __clang::ocl_pipe<struct Person,1>)

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

4 years agoBuild fix: AttributeCommonInfo::AS_C2x
Hans Wennborg [Wed, 25 Mar 2020 14:42:21 +0000 (15:42 +0100)]
Build fix: AttributeCommonInfo::AS_C2x

4 years ago[VectorCombine] add shuffle tests; NFC
Sanjay Patel [Wed, 25 Mar 2020 14:33:59 +0000 (10:33 -0400)]
[VectorCombine] add shuffle tests; NFC
Goes with DD76727.

4 years agoAdd an attribute plugin example
John Brawn [Wed, 25 Mar 2020 13:49:02 +0000 (13:49 +0000)]
Add an attribute plugin example

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

4 years agoDon't normalise CXX11/C2X attribute names to start with ::
John Brawn [Wed, 25 Mar 2020 10:53:30 +0000 (10:53 +0000)]
Don't normalise CXX11/C2X attribute names to start with ::

Currently square-bracket-style (CXX11/C2X) attribute names are normalised to
start with :: if they don't have a namespace. This is a bit odd, as such
names are rejected when parsing, so don't do this.

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

4 years agoOpenMP] Adding InaccessibleMemOnly and InaccessibleMemOrArgMemOnly for runtime calls.
sstefan1 [Wed, 25 Mar 2020 14:08:50 +0000 (14:08 +0000)]
OpenMP] Adding InaccessibleMemOnly and InaccessibleMemOrArgMemOnly for runtime calls.

Summary: Attempt to add more attributes for runtime calls.

Reviewers: jdoerfert

Subscribers: guansong, llvm-commits

Tags: #llvm

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

4 years ago[SYCL] Implement __builtin_unique_stable_name.
Erich Keane [Wed, 18 Mar 2020 20:45:58 +0000 (13:45 -0700)]
[SYCL] Implement __builtin_unique_stable_name.

In order to support non-user-named kernels, SYCL needs some way in the
integration headers to name the kernel object themselves. Initially, the
design considered just RTTI naming of the lambdas, this results in a
quite unstable situation in light of some device/host macros.
Additionally, this ends up needing to use RTTI, which is a burden on the
implementation and typically unsupported.

Instead, we've introduced a builtin, __builtin_unique_stable_name, which
takes a type or expression, and results in a constexpr constant
character array that uniquely represents the type (or type of the
expression) being passed to it.

The implementation accomplishes that simply by using a slightly modified
version of the Itanium Mangling. The one exception is when mangling
lambdas, instead of appending the index of the lambda in the function,
it appends the macro-expansion back-trace of the lambda itself in the
form LINE->COL[~LINE->COL...].

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

4 years ago[lldb][NFC] lldb_assert->lldbassert in ClangExpressionParser
Raphael Isemann [Wed, 25 Mar 2020 10:52:33 +0000 (11:52 +0100)]
[lldb][NFC] lldb_assert->lldbassert in ClangExpressionParser

lldbassert is the macro that takes care of passing along line/file/function
to the lldb_assert function. Let's call that instead of manually calling the
function.

4 years ago[libcxx] Allow tests to link with static libc++abi/libc++ even if the shared version...
Sergej Jaskiewicz [Wed, 25 Mar 2020 12:27:05 +0000 (15:27 +0300)]
[libcxx] Allow tests to link with static libc++abi/libc++ even if the shared version is present

Summary:
This is essentially D71894, but for libc++.

This is needed for running libc++ tests over SSH.

Reviewers: EricWF, ldionne, phosek, mehdi_amini, mclow.lists, jroelofs, bcraig, #libc

Reviewed By: ldionne, phosek, #libc

Subscribers: mgorny, christof, dexonsmith, libcxx-commits

Tags: #libc

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

4 years ago[AArch64][SVE] Add SVE intrinsics for masked loads & stores
Kerry McLaughlin [Wed, 25 Mar 2020 11:26:25 +0000 (11:26 +0000)]
[AArch64][SVE] Add SVE intrinsics for masked loads & stores

Summary:
Implements the following intrinsics for contiguous loads & stores:
  - @llvm.aarch64.sve.ld1
  - @llvm.aarch64.sve.st1

Reviewers: sdesmalen, andwar, efriedma, cameron.mcinally, dancgr, rengolin

Reviewed By: cameron.mcinally

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

Tags: #llvm

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

4 years agoRename test name, add more tests for codegenprepare
Juneyoung Lee [Wed, 25 Mar 2020 11:24:40 +0000 (20:24 +0900)]
Rename test name, add more tests for codegenprepare

4 years ago[ARM][MVE] Add HorizontalReduction flag
Sam Parker [Wed, 25 Mar 2020 11:12:03 +0000 (11:12 +0000)]
[ARM][MVE] Add HorizontalReduction flag

Add a target flag for instructions that reduce into one, or more,
scalar reg(s), including variants of:
- VADDV
- VABAV
- VMINV/VMAXV
- VMLADAV

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

4 years ago[Sema][SVE] Allow casting SVE types to themselves in C
Richard Sandiford [Thu, 5 Mar 2020 20:33:19 +0000 (20:33 +0000)]
[Sema][SVE] Allow casting SVE types to themselves in C

Casts from an SVE type to itself aren't very useful, but they are
supposed to be valid, and could occur in things like macro expansions.

Such casts already work for C++ and are tested by sizeless-1.cpp.
This patch makes them work for C too.

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

4 years ago[Sema][SVE] Allow ?: to select between SVE types in C
Richard Sandiford [Mon, 2 Mar 2020 18:58:03 +0000 (18:58 +0000)]
[Sema][SVE] Allow ?: to select between SVE types in C

When compiling C, a ?: between two values of the same SVE type
currently gives an error such as:

  incompatible operand types ('svint8_t' (aka '__SVInt8_t') and 'svint8_t')

It's supposed to be valid to select between (cv-qualified versions of)
the same SVE type, so this patch adds that case.

These expressions already work for C++ and are tested by
SemaCXX/sizeless-1.cpp.

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

4 years ago[ARM,MVE] Add missing tests for vqdmlash intrinsics.
Simon Tatham [Wed, 25 Mar 2020 09:46:08 +0000 (09:46 +0000)]
[ARM,MVE] Add missing tests for vqdmlash intrinsics.

Summary:
These were accidentally left out of D76123. I added tests for the
other three instructions in this small cross-product family (vqdmlah,
vqrdmlah, vqrdmlash) but missed this one.

Reviewers: miyuki

Reviewed By: miyuki

Subscribers: kristof.beyls, dmgreen, cfe-commits

Tags: #clang

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

4 years ago[clang-apply-replacements] No longer deduplucates replacements from the same TU
Nathan James [Mon, 23 Mar 2020 13:42:17 +0000 (13:42 +0000)]
[clang-apply-replacements] No longer deduplucates replacements from the same TU

Summary:
clang-apply-replacements currently deduplicates all diagnostic replacements. However if you get a duplicated replacement from one TU then its expected that it should not be deduplicated. This goes some way to solving [[ https://bugs.llvm.org/show_bug.cgi?id=45150 | export-fixes to yaml adds extra newlines and breaks offsets. ]]

Take this example yaml.
```
---
MainSourceFile:  '/home/nathan/test/test.cpp'
Diagnostics:
  - DiagnosticName:  readability-braces-around-statements
    DiagnosticMessage:
      Message:         statement should be inside braces
      FilePath:        '/home/nathan/test/test.cpp'
      FileOffset:      14
      Replacements:
        - FilePath:        '/home/nathan/test/test.cpp'
          Offset:          14
          Length:          0
          ReplacementText: ' {'
        - FilePath:        '/home/nathan/test/test.cpp'
          Offset:          28
          Length:          0
          ReplacementText: '

}'
  - DiagnosticName:  readability-braces-around-statements
    DiagnosticMessage:
      Message:         statement should be inside braces
      FilePath:        '/home/nathan/test/test.cpp'
      FileOffset:      20
      Replacements:
        - FilePath:        '/home/nathan/test/test.cpp'
          Offset:          20
          Length:          0
          ReplacementText: ' {'
        - FilePath:        '/home/nathan/test/test.cpp'
          Offset:          28
          Length:          0
          ReplacementText: '

}'
...```

The current behaviour is to deduplicate the text insertions at Offset 28 and only apply one of the replacements.
However as both of these replacements came from the same translation unit we can be confident they were both meant to be applied together
The new behaviour won't deduplicate the text insertion and instead insert both of the replacements.
If the duplicate replacement is found inside different translation units (from a header file change perhaps) then they will still be deduplicated as before.

Reviewers: aaron.ballman, gribozavr2, klimek, ymandel

Reviewed By: ymandel

Subscribers: ymandel, cfe-commits

Tags: #clang

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

4 years agoAdd freeze(and x, const) case to codegenprepare's freeze-cmp.ll
Juneyoung Lee [Wed, 25 Mar 2020 08:18:19 +0000 (17:18 +0900)]
Add freeze(and x, const) case to codegenprepare's freeze-cmp.ll

4 years ago[VE] Change name of enum to CondCode
Kazushi (Jam) Marukawa [Wed, 25 Mar 2020 08:19:52 +0000 (09:19 +0100)]
[VE] Change name of enum to CondCode

Summary: Change enum name for condition codes from CondCodes to CondCode.

Reviewers: arsenm, simoll, k-ishizaka

Reviewed By: arsenm

Subscribers: wdng, hiraditya, llvm-commits

Tags: #llvm, #ve

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

4 years ago[AST] Build recovery expressions by default for C++.
Haojian Wu [Tue, 24 Mar 2020 12:43:25 +0000 (13:43 +0100)]
[AST] Build recovery expressions by default for C++.

Update the existing tests.

Reviewers: sammccall

Subscribers: cfe-commits

Tags: #clang

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

4 years ago[compiler-rt] FuzzedDataProvider: make linter happy.
Max Moroz [Wed, 25 Mar 2020 07:39:17 +0000 (00:39 -0700)]
[compiler-rt] FuzzedDataProvider: make linter happy.

4 years agoMinor fixes to a comment in CodeGenPrepare
Juneyoung Lee [Wed, 25 Mar 2020 07:34:34 +0000 (16:34 +0900)]
Minor fixes to a comment in CodeGenPrepare

4 years ago[compiler-rt] Refactor FuzzedDataProvider for better readability.
Max Moroz [Thu, 19 Mar 2020 19:39:37 +0000 (12:39 -0700)]
[compiler-rt] Refactor FuzzedDataProvider for better readability.

Summary: Separate class definition and actual methods implementation. The main
goal is to keep the list of available methods in a concise readable form inside
the class definition.

Reviewers: hctim, metzman

Subscribers: dberris, #sanitizers

Tags: #sanitizers

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

4 years ago[X86] Split masked instruction tests to enable D60940.
Craig Topper [Wed, 25 Mar 2020 02:03:36 +0000 (19:03 -0700)]
[X86] Split masked instruction tests to enable D60940.

We need to split tests that rely on isel duplicating operations
for different masking conditions. Repeating the operation is
more costly than emitting the masking separately.

The change here is a mechanical splitting of tests that
call multiple intrinsics in one function into separate
functions that call one intrinsic. We could obviously avoid
the splitting by giving the intrinsics different operands, but
that would need closer scrutiny than just splitting.

4 years ago[PowerPC] Pre-commit reduced test case for PR45297. NFC.
Kai Luo [Wed, 25 Mar 2020 06:19:59 +0000 (06:19 +0000)]
[PowerPC] Pre-commit reduced test case for PR45297. NFC.

4 years ago[libc] Generate math.h instead of the static file it is currently.
Siva Chandra Reddy [Tue, 24 Mar 2020 17:52:56 +0000 (10:52 -0700)]
[libc] Generate math.h instead of the static file it is currently.

Just enough to help a follow up patch adding cosf and sinf has been
added.

Reviewers: abrachet

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

4 years ago[MLIR][NFC] std::is_same || -> llvm::is_one_of
Uday Bondhugula [Wed, 25 Mar 2020 02:23:05 +0000 (07:53 +0530)]
[MLIR][NFC] std::is_same || -> llvm::is_one_of

 Switch std::is_same disjunctions to llvm::is_one_of

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

4 years ago[gn build] Port ba1f4405c68
LLVM GN Syncbot [Wed, 25 Mar 2020 03:27:56 +0000 (03:27 +0000)]
[gn build] Port ba1f4405c68

4 years ago[profile] Move RuntimeCounterRelocation and ProfileDumped into a separate file
Petr Hosek [Wed, 25 Mar 2020 03:02:44 +0000 (20:02 -0700)]
[profile] Move RuntimeCounterRelocation and ProfileDumped into a separate file

This avoids the test failure that was introduced in rG32bddad where
this function pulls in the rest of InstrProfilingFile.c which is
undesirable in use cases when profile runtime is being used without
the rest of libc.

This also allows additional cleanup by eliminating another variable
from platforms that don't need it.

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

4 years agoRevert "[libc++] Build the dylib with C++17 to allow aligned new/delete"
Louis Dionne [Wed, 25 Mar 2020 02:53:47 +0000 (22:53 -0400)]
Revert "[libc++] Build the dylib with C++17 to allow aligned new/delete"

This reverts commit 1ac403bd145dadfa1004af29bd6c77f871caf42c, which
broke some non-libc++ build bots because they use an ancient CMake.

4 years ago[NFC][Test][PowerPC] Add one test to verify the behavior of vector
QingShan Zhang [Wed, 25 Mar 2020 02:37:26 +0000 (02:37 +0000)]
[NFC][Test][PowerPC] Add one test to verify the behavior of vector
mul/add for v8i16

4 years agoAMDGPU/GlobalISel: Add a testcase for G_UNMERGE_VALUES legalization
Matt Arsenault [Wed, 25 Mar 2020 01:52:03 +0000 (21:52 -0400)]
AMDGPU/GlobalISel: Add a testcase for G_UNMERGE_VALUES legalization

I had a note that this doesn't work, but it seems to now.

4 years ago[profile] Make atexit hook a no-op on Fuchsia
Petr Hosek [Sat, 21 Mar 2020 23:41:00 +0000 (16:41 -0700)]
[profile] Make atexit hook a no-op on Fuchsia

On Fuchsia, we always use the continuous mode with runtime counter
relocation, so there's no need for atexit hook or support for dumping
the profile manually.

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

4 years ago[libc++] Update a bad documentation link
Eric Fiselier [Wed, 25 Mar 2020 01:33:42 +0000 (21:33 -0400)]
[libc++] Update a bad documentation link

4 years agoAMDGPU/GlobalISel: Add some end to end tests for fma selection
Matt Arsenault [Wed, 25 Mar 2020 01:21:59 +0000 (21:21 -0400)]
AMDGPU/GlobalISel: Add some end to end tests for fma selection

4 years agoRevert "Allow remapping Clang module include paths"
Adrian Prantl [Wed, 25 Mar 2020 00:56:36 +0000 (17:56 -0700)]
Revert "Allow remapping Clang module include paths"

to investigate why this commit broke a test in the LLDB testsuite.

This reverts commit dca920a904c27f4c86e909ef2e4e343d48168cca.

4 years agoAMDGPU/GlobalISel: Add select patterns for v_and_or_b32
Matt Arsenault [Wed, 25 Mar 2020 00:47:54 +0000 (20:47 -0400)]
AMDGPU/GlobalISel: Add select patterns for v_and_or_b32

4 years agoAMDGPU/GlobalISel: Add load legalization tests
Matt Arsenault [Wed, 25 Mar 2020 00:33:39 +0000 (20:33 -0400)]
AMDGPU/GlobalISel: Add load legalization tests

4 years agoAMDGPU/GlobalISel: Add missing tests for G_FRINT selection
Matt Arsenault [Wed, 25 Mar 2020 00:27:00 +0000 (20:27 -0400)]
AMDGPU/GlobalISel: Add missing tests for G_FRINT selection

4 years agoAllow remapping Clang module include paths
Adrian Prantl [Wed, 18 Mar 2020 22:30:20 +0000 (15:30 -0700)]
Allow remapping Clang module include paths

rdar://problem/55685132

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

4 years agoAdd an -object-path-prefix option to dsymutil
Adrian Prantl [Wed, 18 Mar 2020 22:31:39 +0000 (15:31 -0700)]
Add an -object-path-prefix option to dsymutil

to remap object file paths (but no source paths) before
processing. This is meant to be used for Clang objects where the
module cache location was remapped using ``-fdebug-prefix-map``; to
help dsymutil find the Clang module cache.

<rdar://problem/55685132>

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

4 years agoGlobalISel: Introduce bitcast legalize action
Matt Arsenault [Thu, 13 Feb 2020 20:52:32 +0000 (15:52 -0500)]
GlobalISel: Introduce bitcast legalize action

For some operations, the type is unimportant and only the number of
bits matters. For example I don't want to treat <4 x s8> as a legal
type, but I also don't want to decompose loads of this into smaller
pieces to get legal register types.

On AMDGPU in SelectionDAG, we legalize a number of operations (most
notably load and store) by coercing all types to vectors of i32. For
GlobalISel, I'm trying very hard to avoid doing this for every type,
but I don't think this strategy can be completely avoided. I'm trying
to avoid bitcasts for any legitimately legal type we can operate on,
since the intervening bitcasts have proven to be a hassle.

For loads, I think I can get away without ever casting the result
type, and handling any arbitrary bitwidth during selection (I will
eventually want new tablegen support to help with this, rather than
having to add every possible type as legal). The unmerge required to
do anything with the value should expand to the expected shifts. This
is trickier for stores, since it would now require handling a wide
array of truncates during selection which I don't want.

Future potentially interesting case are for vector indexing, where
sub-dword type should be indexed in s32 pieces.

4 years ago[mlir][GPU] Use StructAttr to drive lowering from loop.parallel to
MaheshRavishankar [Tue, 24 Mar 2020 22:55:36 +0000 (15:55 -0700)]
[mlir][GPU] Use StructAttr to drive lowering from loop.parallel to
gpu.launch

Current implementation of lowering from loop.parallel to gpu.launch
uses a DictionaryAttr to specify the mapping. Moving this attribute to
be auto-generated from specification as a StructAttr. This simplifies
a lot the logic of looking up and creating this attribute.

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

4 years agoAdd a `Symbolizer::GetEnvP()` method that allows symbolizer implementations to custom...
Dan Liew [Tue, 24 Mar 2020 02:57:33 +0000 (19:57 -0700)]
Add a `Symbolizer::GetEnvP()` method that allows symbolizer implementations to customise the environment of the symbolizer binary.

Summary:
This change introduces the `Symbolizer::GetEnvP()` method that returns a
pointer to environment array used for spawning the symbolizer process.
The motivation is to allow implementations to customise the environment
if required.  The default implementation just returns
`__sanitizer::GetEnviron()` which (provided it's implemented) should
preserve the existing behaviours of the various implementations.

This change has been plumbed through the `internal_spawn(...)` and
`StartSubprocess(...)` process spawning implementations.

For the `StartSubprocess()` implementation we need to call `execve()`
rather than `execv()` to pass the environment. However, it appears that
`internal_execve(...)` exists in sanitizer_common so this patch use that
which seems like a nice clean up.

Support in the Windows implementation of
`SymbolizerProcess:StartSymbolizerSubprocess()` has not been added
because the Windows sanitizer runtime doesn't implement `GetEnviron()`.

rdar://problem/58789439

Reviewers: kubamracek, yln, dvyukov, vitalybuka, eugenis, phosek, aizatsky, rnk

Subscribers: #sanitizers, llvm-commits

Tags: #sanitizers

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

4 years ago[LVI] Convert some checks to assertions; NFC
Nikita Popov [Tue, 24 Mar 2020 21:39:25 +0000 (22:39 +0100)]
[LVI] Convert some checks to assertions; NFC

solveBlockValue() should only be called if the value isn't cached
yet. Similarly, it does not make sense to "solve" a constant.

4 years ago[libc++] Install a recent CMake in the Docker build bots
Louis Dionne [Tue, 24 Mar 2020 22:06:23 +0000 (18:06 -0400)]
[libc++] Install a recent CMake in the Docker build bots

4 years ago[libc++] Build the dylib with C++17 to allow aligned new/delete
Louis Dionne [Thu, 27 Feb 2020 13:14:38 +0000 (08:14 -0500)]
[libc++] Build the dylib with C++17 to allow aligned new/delete

This allows simplifying the implementation of barriers.

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

4 years ago[GWP-ASan] Only pack frames that are stored.
Mitch Phillips [Tue, 24 Mar 2020 21:37:07 +0000 (14:37 -0700)]
[GWP-ASan] Only pack frames that are stored.

Summary:
Backtrace() returns the number of frames that are *available*, rather
than the number of frames stored. When we pack, we supply the number of
frames we have stored. The number of available frames can exceed the
number of stored frames, leading to stack OOB read.

Fix up this problem.

Reviewers: eugenis

Reviewed By: eugenis

Subscribers: #sanitizers, morehouse, cferris, pcc

Tags: #sanitizers

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

4 years ago[clang codegen] Clean up handling of vectors with trivial-auto-var-init.
Eli Friedman [Fri, 20 Mar 2020 21:18:04 +0000 (14:18 -0700)]
[clang codegen] Clean up handling of vectors with trivial-auto-var-init.

The code was pretending to be doing something useful with vectors, but
really it was doing nothing: the element type of a vector is always a
scalar type, so constWithPadding would always just return the input constant.

Split off from D75661 so it can be reviewed separately.

While I'm here, also add testcase to show missing vector handling.

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

4 years ago[test][clang][driver] Add required features.
Michael Liao [Tue, 24 Mar 2020 20:58:15 +0000 (16:58 -0400)]
[test][clang][driver] Add required features.

- to avoid false alarms on builds without that features.

4 years ago[AArch64][GlobalISel] Don't localize TLS G_GLOBAL_VALUEs on Darwin.
Amara Emerson [Mon, 23 Mar 2020 22:49:55 +0000 (15:49 -0700)]
[AArch64][GlobalISel] Don't localize TLS G_GLOBAL_VALUEs on Darwin.

On Darwin these need to be selected into a function call for the TLS
address lookup. As a result, they can't be moved below a physreg write,
which happens in call sequences. In the long term, we should have some
mechanism in the localizer to prevent localizing into target-specific
atomic instruction sequences.

rdar://60056248

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

4 years ago[Attributor] Use knowledge retained in llvm.assume (operand bundles)
Johannes Doerfert [Thu, 20 Feb 2020 08:06:48 +0000 (02:06 -0600)]
[Attributor] Use knowledge retained in llvm.assume (operand bundles)

This patch integrates operand bundle llvm.assumes [0] with the
Attributor. Most IRAttributes will now look at uses of the associated
value and if there are llvm.assume operand bundle uses with the right
tag we will check if they are in the must-be-executed-context (around
the context instruction). Droppable users, which is currently only
llvm::assume, are handled special in some places now as well.

[0] http://lists.llvm.org/pipermail/llvm-dev/2019-December/137632.html

Reviewed By: uenoku

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

4 years agoRevert "Convert a reachable llvm_unreachable into an assert."
Aaron Ballman [Tue, 24 Mar 2020 20:05:42 +0000 (16:05 -0400)]
Revert "Convert a reachable llvm_unreachable into an assert."

This reverts commit 4a0267e3ad8c4d47f267d7d960f127e099fb4818.

4 years ago[Darwin] Add another hint to find the kernel. NFC.
Davide Italiano [Tue, 24 Mar 2020 20:04:08 +0000 (13:04 -0700)]
[Darwin] Add another hint to find the kernel. NFC.

4 years ago[mlir] Clarify constraint on derived attribute
Jacques Pienaar [Tue, 24 Mar 2020 17:18:46 +0000 (10:18 -0700)]
[mlir] Clarify constraint on derived attribute

Summary:
The restriction that a derived attribute should represent an
attribute/be materializable as an attribute was not made clear.

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

4 years ago[lldb/DWARF] Reland: Use DW_AT_call_pc to determine artificial frame address
Vedant Kumar [Wed, 18 Mar 2020 00:59:08 +0000 (17:59 -0700)]
[lldb/DWARF] Reland: Use DW_AT_call_pc to determine artificial frame address

Reland with changes: the test modified in this change originally failed
on a Debian/x86_64 builder, and I suspect the cause was that lldb looked
up the line location for an artificial frame by subtracting 1 from the
frame's address. For artificial frames, the subtraction must not happen
because the address is already exact.

---

lldb currently guesses the address to use when creating an artificial
frame (i.e., a frame constructed by determining the sequence of (tail)
calls which must have happened).

Guessing the address creates problems -- use the actual address provided
by the DW_AT_call_pc attribute instead.

Depends on D76336.

rdar://60307600

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

4 years ago[X86] Disable autoupgrade support for avx512.mask.broadcasti32x2.* and avx512.mask...
Craig Topper [Tue, 24 Mar 2020 19:23:18 +0000 (12:23 -0700)]
[X86] Disable autoupgrade support for avx512.mask.broadcasti32x2.* and avx512.mask.broadcastf32x2.*.

These intrinsics take a v4i32/v4f32 input and are supposed to
broadcast elements 0 and 1. Instead the autoupgrade code was
broadcasting elements 0, 1, 2, and 3.

I could fix the autoupgrade, but since its been broken for years
it seemed better just to steer anyone still trying to use it away
completely.

4 years ago[CodeGen] Add an alignment attribute to all sret parameters
Erik Pilkington [Tue, 24 Mar 2020 16:36:19 +0000 (12:36 -0400)]
[CodeGen] Add an alignment attribute to all sret parameters

This fixes a miscompile when the parameter is actually underaligned.
rdar://58316406

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

4 years ago[libc++] NFC: Reuse the TEST_CONCAT macro instead of reimplementing one
Louis Dionne [Tue, 24 Mar 2020 19:28:03 +0000 (15:28 -0400)]
[libc++] NFC: Reuse the TEST_CONCAT macro instead of reimplementing one

4 years ago[lldb] Always log if acquiring packet sequence mutex fails
Raphael Isemann [Tue, 24 Mar 2020 19:24:48 +0000 (20:24 +0100)]
[lldb] Always log if acquiring packet sequence mutex fails

Summary:
Currently we only log in debug builds but I don't see why we would do this as this is neither
expensive and seems useful.

I looked into the git history of this code and it seems originally there was also an assert here
and the logging here was the #else branch branch for non-Debug builds.

Reviewers: #lldb, labath

Reviewed By: labath

Subscribers: JDevlieghere

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

4 years agoRevert "[lldb/DWARF] Use DW_AT_call_pc to determine artificial frame address"
Vedant Kumar [Tue, 24 Mar 2020 19:22:12 +0000 (12:22 -0700)]
Revert "[lldb/DWARF] Use DW_AT_call_pc to determine artificial frame address"

This reverts commit 6905394d153960ded3a7b884a9747ed2d4a6e8d8. The
changed test is failing on Debian/x86_64, possibly because lldb is
subtracting an offset from the DW_AT_call_pc address used for the
artificial frame:

http://lab.llvm.org:8011/builders/lldb-x86_64-debian/builds/7171/steps/test/logs/stdio

/home/worker/lldb-x86_64-debian/lldb-x86_64-debian/llvm-project/lldb/test/API/functionalities/tail_call_frames/unambiguous_sequence/main.cpp:6:17: error: CHECK-NEXT: expected string not found in input
 // CHECK-NEXT: frame #1: 0x{{[0-9a-f]+}} a.out`func3() at main.cpp:14:3 [opt] [artificial]
                ^
<stdin>:3:2: note: scanning from here
 frame #1: 0x0000000000401127 a.out`func3() at main.cpp:13:4 [opt] [artificial]

4 years ago[VectorCombine] add tests for bitcast (shuffle); NFC
Sanjay Patel [Tue, 24 Mar 2020 19:11:15 +0000 (15:11 -0400)]
[VectorCombine] add tests for bitcast (shuffle); NFC

4 years ago[lldb][NFC] Always update m_cache_{hits/misses} in FormatCache
Raphael Isemann [Tue, 24 Mar 2020 19:16:41 +0000 (20:16 +0100)]
[lldb][NFC] Always update m_cache_{hits/misses} in FormatCache

Summary:
These two variables are only incremented under LLDB_CONFIGURATION_DEBUG but their
value is always logged when verbose lldb formatter logging is enabled, which causes that our
cache hit/miss log looks like this in non-Debug builds:

```
Cache hits: 0 - Cache Misses: 0
...
Cache hits: 0 - Cache Misses: 0
...
Cache hits: 0 - Cache Misses: 0
```

This just always increments those two counters independent of build mode.

Reviewers: JDevlieghere

Reviewed By: JDevlieghere

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

4 years ago[lldb] Don't dump the frame in SBTarget::EvaluateExpression in LLDB_CONFIGURATION_DEBUG
Raphael Isemann [Tue, 24 Mar 2020 19:16:07 +0000 (20:16 +0100)]
[lldb] Don't dump the frame in SBTarget::EvaluateExpression in LLDB_CONFIGURATION_DEBUG

Summary:
Dumping the frame using the user-set format could cause that a debug LLDB doesn't behave as a release LLDB,
which could potentially break replaying a reproducer.

Also it's kinda strange that the frame format set by the user is used in the internal log output.

Reviewers: JDevlieghere

Reviewed By: JDevlieghere

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

4 years ago[mlir] Revamp operation documentation generation
River Riddle [Tue, 24 Mar 2020 18:57:13 +0000 (11:57 -0700)]
[mlir] Revamp operation documentation generation

Summary:
This revisions performs several cleanups to the generated dialect documentation:
* Standardizes format of attributes/operands/results sections
* Splits out operation/type/dialect documentation generation to allow for composing generated and hand-written documentation
* Add section for declarative assembly syntax and successors
* General cleanup

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

4 years agoRe-land "Avoid emitting unreachable SP adjustments after `throw`"
Reid Kleckner [Tue, 24 Mar 2020 18:49:44 +0000 (11:49 -0700)]
Re-land "Avoid emitting unreachable SP adjustments after `throw`"

This reverts commit 4e0fe038f438ae1679eae9e156e1f248595b2373. Re-lands
65b21282c710afe9c275778820c6e3c1cf46734b.

After landing 5ff5ddd0adc89f8827b345577bbb3e7eb74fc644 to add int3 into
trailing unreachable blocks, we can now remove these extra stack
adjustments without confusing the Win64 unwinder. See
https://llvm.org/45064#c4 or X86AvoidTrailingCall.cpp for a full
explanation.

Fixes PR45064.

4 years ago[lit] Allow passing extra commands to executeShTest
Louis Dionne [Thu, 19 Mar 2020 03:17:11 +0000 (23:17 -0400)]
[lit] Allow passing extra commands to executeShTest

This allows creating custom test formats on top of `executeShTest` that
inject commands at the beginning of the file being parsed, without
requiring these commands to physically appear in the test file itself.

For example, one could define a test format that prints out additional
debug information at the beginning of each test. More realistically,
this has been used to define custom test formats like one that supports
compilation failure tests (e.g. with the extension `compile.fail.cpp`)
by injecting a command that calls the compiler on the file itself and
expects it to fail.

Without this change, the only alternative is to create a temporary file
with the same content as the original test, then prepend the desired
`// RUN:` lines to that file, and call `executeShTest` on that file
instead. This is both slow and cumbersome to do.

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

4 years ago[lldb/DWARF] Use DW_AT_call_pc to determine artificial frame address
Vedant Kumar [Wed, 18 Mar 2020 00:59:08 +0000 (17:59 -0700)]
[lldb/DWARF] Use DW_AT_call_pc to determine artificial frame address

lldb currently guesses the address to use when creating an artificial
frame (i.e., a frame constructed by determining the sequence of (tail)
calls which must have happened).

Guessing the address creates problems -- use the actual address provided
by the DW_AT_call_pc attribute instead.

Depends on D76336.

rdar://60307600

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

4 years ago[DWARF] Emit DW_AT_call_pc for tail calls
Vedant Kumar [Wed, 18 Mar 2020 00:56:28 +0000 (17:56 -0700)]
[DWARF] Emit DW_AT_call_pc for tail calls

Record the address of a tail-calling branch instruction within its call
site entry using DW_AT_call_pc. This allows a debugger to determine the
address to use when creating aritificial frames.

This creates an extra attribute + relocation at tail call sites, which
constitute 3-5% of all call sites in xnu/clang respectively.

rdar://60307600

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

4 years agoNFC: Fix typos in TestingGuide documentation
Louis Dionne [Tue, 24 Mar 2020 18:54:25 +0000 (14:54 -0400)]
NFC: Fix typos in TestingGuide documentation

4 years ago[libomptarget][nfc] Explicitly static function scope shared variables
JonChesterfield [Tue, 24 Mar 2020 18:51:36 +0000 (18:51 +0000)]
[libomptarget][nfc] Explicitly static function scope shared variables

Summary:
[libomptarget][nfc] Explicitly static function scope shared variables

`__shared__` in CUDA implies static in function scope. See e.g. D.2.1.1
in CUDA_C_Programming_Guide.pdf,
http://developer.download.nvidia.com/compute/DevZone/docs/html/C/doc/

This is surprising for non-cuda developers, see e.g. D73239 where I thought
local variables would be thread local.

Tested by IR diff of libomptarget.bc (no change), running in tree tests,
and binary diff of the nvcc static archives (no significant change).

Reviewers: jdoerfert, ABataev, grokos

Reviewed By: jdoerfert

Subscribers: openmp-commits

Tags: #openmp

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

4 years ago[lit] NFC: Document missing result codes
Louis Dionne [Tue, 24 Mar 2020 18:45:17 +0000 (14:45 -0400)]
[lit] NFC: Document missing result codes

These result codes already exist, but they were not documented. I assume
this is an oversight when adding these result codes.

4 years ago[DivRemPairs] Freeze operands if they can be undef values
Juneyoung Lee [Tue, 24 Mar 2020 18:31:45 +0000 (03:31 +0900)]
[DivRemPairs] Freeze operands if they can be undef values

Summary:
DivRemPairs is unsound with respect to undef values.

```
      // bb1:
      //   %rem = srem %x, %y
      // bb2:
      //   %div = sdiv %x, %y
      // -->
      // bb1:
      //   %div = sdiv %x, %y
      //   %mul = mul %div, %y
      //   %rem = sub %x, %mul
```

If X can be undef, X should be frozen first.
For example, let's assume that Y = 1 & X = undef:
```
   %div = sdiv undef, 1 // %div = undef
   %rem = srem undef, 1 // %rem = 0
 =>
   %div = sdiv undef, 1 // %div = undef
   %mul = mul %div, 1   // %mul = undef
   %rem = sub %x, %mul  // %rem = undef - undef = undef
```
http://volta.cs.utah.edu:8080/z/m7Xrx5

Same for Y. If X = 1 and Y = (undef | 1), %rem in src is either 1 or 0,
but %rem in tgt can be one of many integer values.

This resolves https://bugs.llvm.org/show_bug.cgi?id=42619 .

This miscompilation disappears if undef value is removed, but it may take a while.
DivRemPair happens pretty late during the optimization pipeline, so this optimization seemed as a good candidate to fix without major regression using freeze than other broken optimizations.

Reviewers: spatel, lebedev.ri, george.burgess.iv

Reviewed By: spatel

Subscribers: wuzish, regehr, nlopes, nemanjai, hiraditya, llvm-commits

Tags: #llvm

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

4 years ago[SelectionDAG] Don't crash when freezing illegal float types
Benjamin Kramer [Tue, 24 Mar 2020 18:44:18 +0000 (19:44 +0100)]
[SelectionDAG] Don't crash when freezing illegal float types

4 years ago[X86][AVX] Add some v32i16 to v32i8 style truncation shuffle tests
Simon Pilgrim [Tue, 24 Mar 2020 17:56:49 +0000 (17:56 +0000)]
[X86][AVX] Add some v32i16 to v32i8 style truncation shuffle tests

4 years agoAMDGPU/GlobalISel: Add more tests for add3 folding
Matt Arsenault [Tue, 24 Mar 2020 18:30:24 +0000 (14:30 -0400)]
AMDGPU/GlobalISel: Add more tests for add3 folding

Forget to squash into 2ea46051055b37faf95c58daad57608bb7610f58

4 years agoAMDGPU/GlobalISel: Add some more tests for add3 folding
Matt Arsenault [Tue, 24 Mar 2020 18:26:23 +0000 (14:26 -0400)]
AMDGPU/GlobalISel: Add some more tests for add3 folding

These currently fail to form add3 due to the pointer type, but they
should be handle.

4 years agoAMDGPU/GlobalISel: Fix smrd loads of v4i64
Matt Arsenault [Sun, 9 Feb 2020 21:30:22 +0000 (16:30 -0500)]
AMDGPU/GlobalISel: Fix smrd loads of v4i64

4 years ago[ValueTracking] improve undef/poison analysis for constant vectors
Sanjay Patel [Tue, 24 Mar 2020 17:34:39 +0000 (13:34 -0400)]
[ValueTracking] improve undef/poison analysis for constant vectors

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

4 years ago[lldb] Remove some debugging printfs from ITSession code
Raphael Isemann [Tue, 24 Mar 2020 17:09:25 +0000 (18:09 +0100)]
[lldb] Remove some debugging printfs from ITSession code

Summary:
This seems only useful for debugging and it's just plainly printf'ing to the console instead
of some log, so let's remove this.

Reviewers: #lldb, JDevlieghere

Reviewed By: JDevlieghere

Subscribers: JDevlieghere

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

4 years ago[gn build] Port b91905a2637
LLVM GN Syncbot [Tue, 24 Mar 2020 16:46:53 +0000 (16:46 +0000)]
[gn build] Port b91905a2637

4 years agoRevert "Include static prof data when collecting loop BBs"
Hiroshi Yamauchi [Tue, 24 Mar 2020 16:23:26 +0000 (09:23 -0700)]
Revert "Include static prof data when collecting loop BBs"

This reverts commit 129c911efaa492790c251b3eb18e4db36b55cbc5.

Due to an internal benchmark regression.

4 years ago[gn build] (manually) port 8140f6bcde4 better
Nico Weber [Tue, 24 Mar 2020 16:39:49 +0000 (12:39 -0400)]
[gn build] (manually) port 8140f6bcde4 better

4 years ago[gn build] (manually) port 8140f6bcde4
Nico Weber [Tue, 24 Mar 2020 16:38:25 +0000 (12:38 -0400)]
[gn build] (manually) port 8140f6bcde4

4 years ago[gn build] Port 49e5a97ec36
Nico Weber [Tue, 24 Mar 2020 16:36:08 +0000 (12:36 -0400)]
[gn build] Port 49e5a97ec36

4 years ago[lldb/Reproducers] Collect files imported by command script import
Jonas Devlieghere [Tue, 24 Mar 2020 15:54:26 +0000 (08:54 -0700)]
[lldb/Reproducers] Collect files imported by command script import

Files imported by the script interpreter aren't opened by LLDB so they
don't end up in the reproducer. The solution is to explicitly add them
to the FileCollector.

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

4 years ago[ARM] Fold VMOVrh VLDR to LDRH
David Green [Tue, 24 Mar 2020 10:14:52 +0000 (10:14 +0000)]
[ARM] Fold VMOVrh VLDR to LDRH

This adds a simple fold to combine VMOVrh load to a integer load.
Similar to what is already performed for BITCAST, but needs to account
for the types being of different sizes, creating an zero extending load.

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

4 years ago[InstSimplify] add tests for freeze(constexpr); NFC
Sanjay Patel [Tue, 24 Mar 2020 15:38:56 +0000 (11:38 -0400)]
[InstSimplify] add tests for freeze(constexpr); NFC

4 years ago[MachinePipeliner] Fix a bug in Output Dependency chains
Lama [Tue, 24 Mar 2020 14:32:00 +0000 (14:32 +0000)]
[MachinePipeliner] Fix a bug in Output Dependency chains

The current implementation collects all Preds/Succs of a Dep of kind Output, creating a long chain and subsequently a schedule with an unnecessarily large II.
Was this done on purpose for a reason I'm missing?

Reviewed By: bcahoon

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