platform/upstream/llvm.git
4 years ago[X86] Enable isel to fold broadcast loads that have been bitcasted from FP into a...
Craig Topper [Sun, 29 Sep 2019 01:24:33 +0000 (01:24 +0000)]
[X86] Enable isel to fold broadcast loads that have been bitcasted from FP into a vpternlog.

llvm-svn: 373157

4 years ago[X86] Move bitselect matching to vpternlog into X86ISelDAGToDAG.cpp
Craig Topper [Sun, 29 Sep 2019 01:24:29 +0000 (01:24 +0000)]
[X86] Move bitselect matching to vpternlog into X86ISelDAGToDAG.cpp

This allows us to reduce the use count on the condition node before
the match. This enables load folding for that operand without
relying on the peephole pass. This will be improved on for
broadcast load folding in a subsequent commit.

This still requires a bunch of isel patterns for vXi16/vXi8 types
though.

llvm-svn: 373156

4 years ago[X86] Enable canonicalizeBitSelect for AVX512 since we can use VPTERNLOG now.
Craig Topper [Sun, 29 Sep 2019 01:24:22 +0000 (01:24 +0000)]
[X86] Enable canonicalizeBitSelect for AVX512 since we can use VPTERNLOG now.

llvm-svn: 373155

4 years ago[X86] Match (or (and A, B), (andn (A, C))) to VPTERNLOG with AVX512.
Craig Topper [Sun, 29 Sep 2019 01:24:16 +0000 (01:24 +0000)]
[X86] Match (or (and A, B), (andn (A, C))) to VPTERNLOG with AVX512.

This uses a similar isel pattern as we used for vpcmov with XOP.

llvm-svn: 373154

4 years ago[OpenMP] FreeBSD address check if mapped more native
David Carlier [Sat, 28 Sep 2019 19:01:59 +0000 (19:01 +0000)]
[OpenMP] FreeBSD address check if mapped more native

/proc unless Linux layer compatibility is activated for CentOS is activated is not present
thus relying on a more native for checking the address.

Reviewers: Hahnfeld, kongyl, jdoerfert, jlpeyton, AndreyChurbanov, emaster, dim

Reviewed By: Hahnfeld

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

llvm-svn: 373152

4 years ago[NFC] Move hot cold splitting class to header file
Aditya Kumar [Sat, 28 Sep 2019 18:13:33 +0000 (18:13 +0000)]
[NFC] Move hot cold splitting class to header file

Summary:  This is to facilitate unittests

Reviewers: compnerd, vsk, tejohnson, sebpop, brzycki, SirishP

Reviewed By: tejohnson

Subscribers: llvm-commits

Tags: #llvm

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

llvm-svn: 373151

4 years agoSemaExpr - silence static analyzer getAs<> null dereference warnings. NFCI.
Simon Pilgrim [Sat, 28 Sep 2019 14:01:52 +0000 (14:01 +0000)]
SemaExpr - silence static analyzer getAs<> null dereference warnings. NFCI.

The static analyzer is warning about potential null dereferences, but in these cases we should be able to use castAs<> directly and if not assert will fire for us.

llvm-svn: 373150

4 years ago[PowerPC] make tests immune to improved undef handling
Sanjay Patel [Sat, 28 Sep 2019 13:34:53 +0000 (13:34 +0000)]
[PowerPC] make tests immune to improved undef handling

The fma mutate test will not exercise what it was intended to test
once we simplify those ops immediately, but the test will still
pass with the existing CHECKs, so I'm leaving it in case that
still has minimal value.

llvm-svn: 373149

4 years agoDon't install example analyzer plugins
Aaron Puchert [Sat, 28 Sep 2019 13:28:50 +0000 (13:28 +0000)]
Don't install example analyzer plugins

Summary: Fixes PR43430.

Reviewers: hintonda, NoQ, Szelethus, lebedev.ri

Reviewed By: lebedev.ri

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

llvm-svn: 373148

4 years agoDriver tests: set `--sysroot=""` to support clang with `DEFAULT_SYSROOT`
Serge Pavlov [Sat, 28 Sep 2019 12:21:06 +0000 (12:21 +0000)]
Driver tests: set `--sysroot=""` to support clang with `DEFAULT_SYSROOT`

When testing clang that has been compiled with `-DDEFAULT_SYSROOT` set to some path,
some tests would fail. Override sysroot to be empty string for the tests to succeed
when clang is configured with `DEFAULT_SYSROOT`.

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

Patch by Sergej Jaskiewicz <jaskiewiczs@icloud.com>.

llvm-svn: 373147

4 years agoRevert "[LLDB] Use the llvm microsoft demangler instead of the windows dbghelp api...
Martin Storsjo [Sat, 28 Sep 2019 10:25:22 +0000 (10:25 +0000)]
Revert "[LLDB] Use the llvm microsoft demangler instead of the windows dbghelp api. NFC."

This reverts SVN r373144, as it changed the demangled output a little, see
http://lab.llvm.org:8011/builders/lldb-x64-windows-ninja/builds/9306.

llvm-svn: 373146

4 years ago[LLD] [test] Add a forgotten comment. NFC.
Martin Storsjo [Sat, 28 Sep 2019 09:51:02 +0000 (09:51 +0000)]
[LLD] [test] Add a forgotten comment. NFC.

This was requested in https://reviews.llvm.org/D68014, but I forgot
to add it before pushing the commit.

llvm-svn: 373145

4 years ago[LLDB] Use the llvm microsoft demangler instead of the windows dbghelp api. NFC.
Martin Storsjo [Sat, 28 Sep 2019 09:33:44 +0000 (09:33 +0000)]
[LLDB] Use the llvm microsoft demangler instead of the windows dbghelp api. NFC.

If there's any testcases that only do demangling (I didn't find any),
they could be made available for all platforms now.

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

llvm-svn: 373144

4 years ago[GlobalISel Enable memcpy inlining with optsize.
Amara Emerson [Sat, 28 Sep 2019 07:55:42 +0000 (07:55 +0000)]
[GlobalISel Enable memcpy inlining with optsize.

We should be disabling inline for minsize, not optsize.

llvm-svn: 373143

4 years ago[TimeProfiler] Fix "OptModule" section and add new "Backend" sections
Anton Afanasyev [Sat, 28 Sep 2019 07:14:12 +0000 (07:14 +0000)]
[TimeProfiler] Fix "OptModule" section and add new "Backend" sections

Remove unnecessary "OptModule" section. Add "PerFunctionPasses",
"PerModulePasses" and "CodeGenPasses" sections under "Backend" section.

llvm-svn: 373142

4 years agoAdd an operand to memory intrinsics to denote the "tail" marker.
Amara Emerson [Sat, 28 Sep 2019 05:33:21 +0000 (05:33 +0000)]
Add an operand to memory intrinsics to denote the "tail" marker.

We need to propagate this information from the IR in order to be able to safely
do tail call optimizations on the intrinsics during legalization. Assuming
it's safe to do tail call opt without checking for the marker isn't safe because
the mem libcall may use allocas from the caller.

This adds an extra immediate operand to the end of the intrinsics and fixes the
legalizer to handle it.

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

llvm-svn: 373140

4 years agoAMDGPU/GlobalISel: Avoid getting MRI in every function
Matt Arsenault [Sat, 28 Sep 2019 03:41:13 +0000 (03:41 +0000)]
AMDGPU/GlobalISel: Avoid getting MRI in every function

Store it in AMDGPUInstructionSelector to avoid boilerplate in nearly
every select function.

llvm-svn: 373139

4 years ago[X86] Add broadcast load unfolding support for VPTESTMD/Q and VPTESTNMD/Q.
Craig Topper [Sat, 28 Sep 2019 01:56:36 +0000 (01:56 +0000)]
[X86] Add broadcast load unfolding support for VPTESTMD/Q and VPTESTNMD/Q.

llvm-svn: 373138

4 years ago[X86] Stop using UpdateNodeOperands in combineGatherScatter. Create new nodes like...
Craig Topper [Sat, 28 Sep 2019 01:08:46 +0000 (01:08 +0000)]
[X86] Stop using UpdateNodeOperands in combineGatherScatter. Create new nodes like most other DAG combines.

Creating new nodes is what we usually do. Have to explicitly
check that we don't update to an existing node and having
to manually manage the worklist is unusual.

We can probably add a helper function to reduce the duplication
of having to check if we should create a gather or scatter, but
I wanted to just get the simple thing done.

llvm-svn: 373137

4 years ago[X86] Split combineGatherScatter into a version for generic ISD nodes and another...
Craig Topper [Sat, 28 Sep 2019 01:06:58 +0000 (01:06 +0000)]
[X86] Split combineGatherScatter into a version for generic ISD nodes and another version for X86 specific nodes.

The majority of the code doesn't run on the X86 nodes today since
its gated by isBeforeLegalizeOps and we don't formm X86 nodes
until after that. Except for a couple special case in type
legalization. But I think we would probably break those if
some of the transforms fire on them.

I want to remove the hardcoded operand numbers and the unusual
use of UpdateNodeOperands. Being able to know which ISD opcodes
are present should help with that.

llvm-svn: 373136

4 years agoGive an error when StepUsingScriptedThreadPlan is passed a bad classname.
Jim Ingham [Sat, 28 Sep 2019 00:53:45 +0000 (00:53 +0000)]
Give an error when StepUsingScriptedThreadPlan is passed a bad classname.

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

llvm-svn: 373135

4 years ago[Core] Remove unused dependency on clangAST
Alex Langford [Sat, 28 Sep 2019 00:27:24 +0000 (00:27 +0000)]
[Core] Remove unused dependency on clangAST

llvm-svn: 373134

4 years ago[SampleFDO] Create a separate flag profile-accurate-for-symsinlist to handle
Wei Mi [Fri, 27 Sep 2019 22:33:59 +0000 (22:33 +0000)]
[SampleFDO] Create a separate flag profile-accurate-for-symsinlist to handle
profile symbol list.

Currently many existing users using profile-sample-accurate want to reduce
code size as much as possible. Their use cases are different from the scenario
profile symbol list tries to handle -- the major motivation of adding profile
symbol list is to get the major memory/code size saving without introduce
performance regression. So to keep the behavior of profile-sample-accurate
unchanged, we think decoupling these two things and using a new flag to
control the handling of profile symbol list may be better.

When profile-sample-accurate and the new flag profile-accurate-for-symsinlist
are both present, since profile-sample-accurate is a user assertion we let it
have a higher precedence.

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

llvm-svn: 373133

4 years ago[llvm-lipo] Add support for -arch
Alexander Shaposhnikov [Fri, 27 Sep 2019 22:33:18 +0000 (22:33 +0000)]
[llvm-lipo] Add support for -arch

Add support for -arch.

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

Test plan: make check-all

llvm-svn: 373132

4 years ago[X86] Add test case to show missed opportunity to turn (add (zext (vXi1 X)), Y) ...
Craig Topper [Fri, 27 Sep 2019 22:30:24 +0000 (22:30 +0000)]
[X86] Add test case to show missed opportunity to turn (add (zext (vXi1 X)), Y) -> (sub Y, (sext (vXi1 X))) with avx512.

With avx512, the vXi1 type is legal. And we can more easily sign
extend them to vector registers. zext requires a sign extend and
a shift.

If we can easily turn the zext into a sext we should.

llvm-svn: 373131

4 years ago[libFuzzer] Dump trace and provide correct msg for overwritten input.
Mitch Phillips [Fri, 27 Sep 2019 22:04:36 +0000 (22:04 +0000)]
[libFuzzer] Dump trace and provide correct msg for overwritten input.

Summary:
Now crashes with a stacktrace and uses 'overwrites-const-input' as the error
message instead of 'out-of-memory'.

Reviewers: morehouse, Dor1s

Reviewed By: morehouse, Dor1s

Subscribers: #sanitizers, llvm-commits, metzman, Dor1s

Tags: #sanitizers, #llvm

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

llvm-svn: 373130

4 years ago[PatternMatch] Add m_SExtOrSelf(), m_ZExtOrSExtOrSelf() matchers + unittests
Roman Lebedev [Fri, 27 Sep 2019 21:53:04 +0000 (21:53 +0000)]
[PatternMatch] Add m_SExtOrSelf(), m_ZExtOrSExtOrSelf() matchers + unittests

m_SExtOrSelf() is for consistency.

m_ZExtOrSExtOrSelf() is motivated by the D68103/r373106 :
sometimes it is useful to look past any extensions of the shift amount,
and m_ZExtOrSExtOrSelf() may be exactly the tool to do that.

llvm-svn: 373128

4 years ago[debugserver] Add --version/-V command line option to debugserver.
Jonas Devlieghere [Fri, 27 Sep 2019 21:26:44 +0000 (21:26 +0000)]
[debugserver] Add --version/-V command line option to debugserver.

When not running under a TTY the output is buffered and not flushed
before debugserver exits which makes it impossible to parse the version
string. This adds a -V/--version command that just prints the version to
stdout and exits with an exit code zero.

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

llvm-svn: 373127

4 years agorefactor: move IOObject::m_should_close_fd into subclasses
Lawrence D'Anna [Fri, 27 Sep 2019 20:43:50 +0000 (20:43 +0000)]
refactor: move IOObject::m_should_close_fd into subclasses

Summary:
m_should_close_fd doesn't need to be in IOObject.   It will be useful
for my next change to move it down into File and Socket.

Reviewers: labath, JDevlieghere, jasonmolenda

Reviewed By: JDevlieghere

Subscribers: lldb-commits

Tags: #lldb

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

llvm-svn: 373126

4 years ago[llvm-readobj] Rename --arm-attributes to --arch-specific
Yi Kong [Fri, 27 Sep 2019 20:38:18 +0000 (20:38 +0000)]
[llvm-readobj] Rename --arm-attributes to --arch-specific

This is for compatibility with GNU readobj. --arm-attributes option is
left as a hidden alias due to large number of tests using it.

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

llvm-svn: 373125

4 years ago[Reproducer] Use // in the unit tests
Jonas Devlieghere [Fri, 27 Sep 2019 20:35:55 +0000 (20:35 +0000)]
[Reproducer] Use // in the unit tests

This should be a valid absolute path on both POSIX and Windows.

llvm-svn: 373124

4 years agoRevert "[profile] Add a test dependency on cxx-headers"
Vedant Kumar [Fri, 27 Sep 2019 20:24:48 +0000 (20:24 +0000)]
Revert "[profile] Add a test dependency on cxx-headers"

This reverts commit b539350f7d006b7d6f42c5c4b5715da87a52e5d8.

See: http://lab.llvm.org:8011/builders/sanitizer-windows/builds/52140/steps/annotate/logs/stdio

The cxx-headers target doesn't exist everywhere.

llvm-svn: 373123

4 years agoFor P0784R7: add support for explicit destructor calls and
Richard Smith [Fri, 27 Sep 2019 20:24:36 +0000 (20:24 +0000)]
For P0784R7: add support for explicit destructor calls and
pseudo-destructor calls in constant evaluation.

llvm-svn: 373122

4 years ago[profile] Mark instrprof-gcov-fork.test UNSUPPORTED on Darwin as well
Vedant Kumar [Fri, 27 Sep 2019 20:12:38 +0000 (20:12 +0000)]
[profile] Mark instrprof-gcov-fork.test UNSUPPORTED on Darwin as well

This test remains flaky everywhere, I think. We should consider deleting
it and accompanying support code in GCOVProfiling: I've stopped short of
doing that now as the gcov exec* tests appear to be stable.

See the thread re: r347779.

llvm-svn: 373121

4 years ago[profile] Add a test dependency on cxx-headers
Vedant Kumar [Fri, 27 Sep 2019 20:12:35 +0000 (20:12 +0000)]
[profile] Add a test dependency on cxx-headers

This enables running profile runtime tests which #include <string>, etc.
via just `check-profile`.

llvm-svn: 373120

4 years ago[InstSimplify] generalize FP folds with undef/NaN; NFC
Sanjay Patel [Fri, 27 Sep 2019 20:09:09 +0000 (20:09 +0000)]
[InstSimplify] generalize FP folds with undef/NaN; NFC

We can reuse this logic for things like fma.

llvm-svn: 373119

4 years ago[Clang][OpenMP Offload] Create start/end symbols for the offloading entry table with...
Sergey Dmitriev [Fri, 27 Sep 2019 20:00:51 +0000 (20:00 +0000)]
[Clang][OpenMP Offload] Create start/end symbols for the offloading entry table with a help of a linker

Linker automatically provides __start_<section name> and __stop_<section name> symbols to satisfy unresolved references if <section name> is representable as a C identifier (see https://sourceware.org/binutils/docs/ld/Input-Section-Example.html for details). These symbols indicate the start address and end address of the output section respectively. Therefore, renaming OpenMP offload entries section name from ".omp.offloading_entries" to "omp_offloading_entries" to use this feature.

This is the first part of the patch for eliminating OpenMP linker script (please see https://reviews.llvm.org/D64943).

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

llvm-svn: 373118

4 years agoRevert [Dominators][CodeGen] Clean up MachineDominators
Jakub Kuderski [Fri, 27 Sep 2019 19:33:39 +0000 (19:33 +0000)]
Revert [Dominators][CodeGen] Clean up MachineDominators

This reverts r373101 (git commit 72c57ec3e6b320c31274dadb888dc16772b8e7b6)

llvm-svn: 373117

4 years agoRevert XFAIL a codegen test AArch64/tailmerging_in_mbp.ll
Jakub Kuderski [Fri, 27 Sep 2019 19:33:35 +0000 (19:33 +0000)]
Revert XFAIL a codegen test AArch64/tailmerging_in_mbp.ll

This reverts r373103 (git commit a524e630a793e18e7d5fabc2262781f310eb0279)

llvm-svn: 373116

4 years ago[NFC][PhaseOrdering] Add end-to-end tests for the 'two shifts by sext' problem
Roman Lebedev [Fri, 27 Sep 2019 19:32:43 +0000 (19:32 +0000)]
[NFC][PhaseOrdering] Add end-to-end tests for the 'two shifts by sext' problem

We start with two separate sext's, but EarlyCSE runs before InstCombine,
so when we get them, they are a single sext, and we just ignore that.
Likewise, if we had a single sext, we don't do anything there.

llvm-svn: 373115

4 years ago[Reproducer] Update the unit tests to specify the path style.
Jonas Devlieghere [Fri, 27 Sep 2019 19:12:18 +0000 (19:12 +0000)]
[Reproducer] Update the unit tests to specify the path style.

The unit tests started failing on Windows after my recent patch that
ensured we always deal with absolute paths. This should fix that.

llvm-svn: 373114

4 years ago[Docs] Adds new section to User Guides page
DeForest Richards [Fri, 27 Sep 2019 19:12:00 +0000 (19:12 +0000)]
[Docs] Adds new section to User Guides page

Adds a section to the User Guides page for articles related to building, packaging, and distributing LLVM. Includes sub-sections for CMake, Clang, and Docker.

llvm-svn: 373113

4 years ago[CMake] Depend on clang-tablegen-targets
Jonas Devlieghere [Fri, 27 Sep 2019 19:07:06 +0000 (19:07 +0000)]
[CMake] Depend on clang-tablegen-targets

The ClangDriverOptions target is not available for standalone builds.

Thanks Alex for pointing this out!

llvm-svn: 373112

4 years agoRevert: [lldb] [testsuite] Remove redundant MAKE_DSYM := NO
Jan Kratochvil [Fri, 27 Sep 2019 18:52:34 +0000 (18:52 +0000)]
Revert: [lldb] [testsuite] Remove redundant MAKE_DSYM := NO

Revert: llvm-svn: 373061

It broke OSX testsuite:
https://reviews.llvm.org/D67589#1686150
lldb/packages/Python/lldbsuite/test/macosx/function-starts/TestFunctionStarts.py

llvm-svn: 373110

4 years ago[InstSimplify] add tests for fma/fmuladd with undef operand; NFC
Sanjay Patel [Fri, 27 Sep 2019 18:38:51 +0000 (18:38 +0000)]
[InstSimplify] add tests for fma/fmuladd with undef operand; NFC

llvm-svn: 373109

4 years ago[X86] Call SimplifyDemandedBits in combineGatherScatter any time the mask element...
Craig Topper [Fri, 27 Sep 2019 18:23:55 +0000 (18:23 +0000)]
[X86] Call SimplifyDemandedBits in combineGatherScatter any time the mask element is wider than i1, not just when AVX512 is disabled.

The AVX2 intrinsics can still be used when AVX512 is enabled and
those go through this path. So we should simplify them.

llvm-svn: 373108

4 years ago[X86] Add test case to show failure to perform SimplifyDemandedBits on mask of avx2...
Craig Topper [Fri, 27 Sep 2019 18:23:46 +0000 (18:23 +0000)]
[X86] Add test case to show failure to perform SimplifyDemandedBits on mask of avx2 gather intrinsics when avx512 is enabled.

llvm-svn: 373107

4 years ago[InstCombine] Simplify shift-by-sext to shift-by-zext
Roman Lebedev [Fri, 27 Sep 2019 18:12:15 +0000 (18:12 +0000)]
[InstCombine] Simplify shift-by-sext to shift-by-zext

Summary:
This is valid for any `sext` bitwidth pair:
```
Processing /tmp/opt.ll..

----------------------------------------
  %signed = sext %y
  %r = shl %x, %signed
  ret %r
=>
  %unsigned = zext %y
  %r = shl %x, %unsigned
  ret %r
  %signed = sext %y

Done: 2016
Optimization is correct!
```

(This isn't so for funnel shifts, there it's illegal for e.g. i6->i7.)

Main motivation is the C++ semantics:
```
int shl(int a, char b) {
    return a << b;
}
```
ends as
```
  %3 = sext i8 %1 to i32
  %4 = shl i32 %0, %3
```
https://godbolt.org/z/0jgqUq
which is, as this shows, too pessimistic.

There is another problem here - we can only do the fold
if sext is one-use. But we can trivially have cases
where several shifts have the same sext shift amount.
This should be resolved, later.

Reviewers: spatel, nikic, RKSimon

Reviewed By: spatel

Subscribers: efriedma, hiraditya, nlopes, llvm-commits

Tags: #llvm

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

llvm-svn: 373106

4 years ago[CMake] Make Core depend on ClangDriverOptions (NFC)
Jonas Devlieghere [Fri, 27 Sep 2019 17:55:49 +0000 (17:55 +0000)]
[CMake] Make Core depend on ClangDriverOptions (NFC)

ModuleList.cpp includes clang/Driver/Driver.h which depends on
clang/Driver/Options.inc. This patch adds the corresponding TableGen
target to Core.

llvm-svn: 373105

4 years ago[clangd] Fix template type aliases in findExplicitReference
Ilya Biryukov [Fri, 27 Sep 2019 17:55:46 +0000 (17:55 +0000)]
[clangd] Fix template type aliases in findExplicitReference

Reviewers: kadircet

Reviewed By: kadircet

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

Tags: #clang

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

llvm-svn: 373104

4 years agoXFAIL a codegen test AArch64/tailmerging_in_mbp.ll
Jakub Kuderski [Fri, 27 Sep 2019 17:41:17 +0000 (17:41 +0000)]
XFAIL a codegen test AArch64/tailmerging_in_mbp.ll

This test fails when machine dominator tree verifier is run.
Needs more investigation, as this is not a new failure.

llvm-svn: 373103

4 years ago[Reproducer] Always use absolute paths for capture & replay.
Jonas Devlieghere [Fri, 27 Sep 2019 17:30:40 +0000 (17:30 +0000)]
[Reproducer] Always use absolute paths for capture & replay.

The VFS requires files to be have absolute paths. The file collector
makes paths relative to the reproducer root. If the root is a relative
path, this would trigger an assert in the VFS. This patch ensures that
we always make the given path absolute.

Thank you Ted Woodward for pointing this out!

llvm-svn: 373102

4 years ago[Dominators][CodeGen] Clean up MachineDominators
Jakub Kuderski [Fri, 27 Sep 2019 17:25:39 +0000 (17:25 +0000)]
[Dominators][CodeGen] Clean up MachineDominators

Summary: This is a cleanup patch for MachineDominatorTree. It would be an NFC, except for replacing custom DomTree verification with the generic one.

Reviewers: tstellar, tpr, nhaehnle, arsenm, NutshellySima, grosser, hliao

Reviewed By: arsenm

Subscribers: wdng, hiraditya, llvm-commits

Tags: #llvm

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

llvm-svn: 373101

4 years agoFix MSVC "not all control paths return a value" warning. NFCI.
Simon Pilgrim [Fri, 27 Sep 2019 16:56:07 +0000 (16:56 +0000)]
Fix MSVC "not all control paths return a value" warning. NFCI.

llvm-svn: 373100

4 years agoModuleUtils - silence static analyzer dyn_cast<> null dereference warning. NFCI.
Simon Pilgrim [Fri, 27 Sep 2019 16:55:49 +0000 (16:55 +0000)]
ModuleUtils - silence static analyzer dyn_cast<> null dereference warning. NFCI.

The static analyzer is warning about a potential null dereference, but we should be able to use cast<> directly and if not assert will fire for us.

llvm-svn: 373099

4 years agoChange -march=systemz to triple and fix test
Kai Nacke [Fri, 27 Sep 2019 16:19:15 +0000 (16:19 +0000)]
Change -march=systemz to triple and fix test

These two test cases use -march=systemz instead of a triple. In
particular, the used file format is then based on the default host
triple. This leads to different behaviour on different platforms.

The SystemZ implementation uses the integrated assembler for a
long time now. The mature-mc-support test can be fully enabled.

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

llvm-svn: 373098

4 years agoFunctionImportGlobalProcessing::processGlobalForThinLTO - silence static analyzer...
Simon Pilgrim [Fri, 27 Sep 2019 15:49:19 +0000 (15:49 +0000)]
FunctionImportGlobalProcessing::processGlobalForThinLTO - silence static analyzer dyn_cast<FunctionSummary> null dereference warning. NFCI.

The static analyzer is warning about a potential null dereference, but we should be able to use cast<FunctionSummary> directly and if not assert will fire for us.

llvm-svn: 373097

4 years ago[RISCV] Rename FPRs and use Register arithmetic
Luis Marques [Fri, 27 Sep 2019 15:49:10 +0000 (15:49 +0000)]
[RISCV] Rename FPRs and use Register arithmetic

The new names for FPRs ensure that the Register values within the same class are
enumerated consecutively (the order is determined by the `LessRecordRegister`
function object). Where there were tables mapping between 32- and 64-bit FPRs
(and vice versa) this patch replaces them with Register arithmetic. The
enumeration order between different register classes is expected to continue to
be arbitrary, although it does impact the conversion from the (overloaded) asm
FPR names to Register values, and therefore might require updates to the target
if the sorting algorithm is changed. Static asserts were added to ensure that
changes to the ordering that would impact the current implementation are
detected.

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

llvm-svn: 373096

4 years agoSCCP - silence static analyzer dyn_cast<StructType> null dereference warning. NFCI.
Simon Pilgrim [Fri, 27 Sep 2019 15:49:10 +0000 (15:49 +0000)]
SCCP - silence static analyzer dyn_cast<StructType> null dereference warning. NFCI.

The static analyzer is warning about a potential null dereference, but we should be able to use cast<StructType> directly and if not assert will fire for us.

llvm-svn: 373095

4 years ago[AMDGPU][MC] Corrected parsing of registers
Dmitry Preobrazhensky [Fri, 27 Sep 2019 15:41:31 +0000 (15:41 +0000)]
[AMDGPU][MC] Corrected parsing of registers

Summary of changes:

refactored code for better readability and future improvements;
fixed bug 41281: https://bugs.llvm.org/show_bug.cgi?id=41281

Reviewers: artem.tamazov, arsenm

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

llvm-svn: 373094

4 years ago[libTooling] Transformer: refine `SourceLocation` specified as anchor of changes.
Yitzhak Mandelbaum [Fri, 27 Sep 2019 15:26:04 +0000 (15:26 +0000)]
[libTooling] Transformer: refine `SourceLocation` specified as anchor of changes.

Summary: Every change triggered by a rewrite rule is anchored at a particular
location in the source code.  This patch refines how that location is chosen and
defines it as an explicit function so it can be shared by other Transformer
implementations.

This patch was inspired by a bug found by a clang tidy, wherein two changes were
anchored at the same location (the expansion loc of the macro) resulting in the
discarding of the second change.

Reviewers: gribozavr

Subscribers: cfe-commits

Tags: #clang

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

llvm-svn: 373093

4 years ago[libc++] Take 2: Implement LWG 3158
Louis Dionne [Fri, 27 Sep 2019 15:06:52 +0000 (15:06 +0000)]
[libc++] Take 2: Implement LWG 3158

Summary:
LWG 3158 marks the allocator_arg_t constructor of std::tuple as
conditionnally explicit based on whether the default constructors
of the tuple's members are explicitly default constructible.

This was previously committed as r372778 and reverted in r372832 due to
the commit breaking LLVM's build in C++14 mode. This issue has now been
addressed.

Reviewers: mclow.lists

Subscribers: christof, jkorous, dexonsmith, libcxx-commits

Tags: #libc

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

llvm-svn: 373092

4 years agoremove File::SetStream(), make new files instead.
Lawrence D'Anna [Fri, 27 Sep 2019 14:33:35 +0000 (14:33 +0000)]
remove File::SetStream(), make new files instead.

Summary:
This patch removes File::SetStream() and File::SetDescriptor(),
and replaces most direct uses of File with pointers to File.
Instead of calling SetStream() on a file, we make a new file and
replace it.

My ultimate goal here is to introduce a new API class SBFile, which
has full support for python io.IOStream file objects.   These can
redirect read() and write() to python code, so lldb::Files will
need a way to dispatch those methods.   Additionally it will need some
form of sharing and assigning files, as a SBFile will be passed in and
assigned to the main IO streams of the debugger.

In my prototype patch queue, I make File itself copyable and add a
secondary class FileOps to manage the sharing and dispatch.  In that
case SBFile was a unique_ptr<File>.
(here: https://github.com/smoofra/llvm-project/tree/files)

However in review, Pavel Labath suggested that it be shared_ptr instead.
(here: https://reviews.llvm.org/D67793)

In order for SBFile to use shared_ptr<File>, everything else should
as well.

If this patch is accepted, I will make SBFile use a shared_ptr
I will remove FileOps from future patches and use subclasses of File
instead.

Reviewers: JDevlieghere, jasonmolenda, zturner, jingham, labath

Reviewed By: labath

Subscribers: lldb-commits

Tags: #lldb

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

llvm-svn: 373090

4 years ago[DebugInfo] Exclude memory location values as parameter entry values
Djordje Todorovic [Fri, 27 Sep 2019 13:52:43 +0000 (13:52 +0000)]
[DebugInfo] Exclude memory location values as parameter entry values

Abandon describing of loaded values due to safety concerns. Loaded
values are described as derefed memory location at caller point.
At callee we can unintentionally change that memory location which
would lead to different entry being printed value before and after
the memory location clobbering. This problem is described in
llvm.org/PR43343.

Patch by Nikola Prica

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

llvm-svn: 373089

4 years ago[OpenCL] Pass LangOptions as const ref
Sven van Haastregt [Fri, 27 Sep 2019 13:31:29 +0000 (13:31 +0000)]
[OpenCL] Pass LangOptions as const ref

llvm-svn: 373088

4 years ago[llvm-exegesis] Fix r373083: Module -> Mod.
Clement Courbet [Fri, 27 Sep 2019 13:21:37 +0000 (13:21 +0000)]
[llvm-exegesis] Fix r373083: Module -> Mod.

SnippetRepetitorTest.cpp:66:27: error: declaration of ‘std::unique_ptr<llvm::Module> llvm::exegesis::{anonymous}::X86SnippetRepetitorTest::Module’ [-fpermissive]
   std::unique_ptr<Module> Module;

llvm-svn: 373087

4 years agogn build: (manually) merge r373082
Nico Weber [Fri, 27 Sep 2019 13:14:34 +0000 (13:14 +0000)]
gn build: (manually) merge r373082

llvm-svn: 373086

4 years agogn build: Merge r373083
GN Sync Bot [Fri, 27 Sep 2019 13:04:46 +0000 (13:04 +0000)]
gn build: Merge r373083

llvm-svn: 373085

4 years ago[CodeGenPrepare] Mend "avoid crashing from replacing a phi twice" fix.
Jesper Antonsson [Fri, 27 Sep 2019 13:01:37 +0000 (13:01 +0000)]
[CodeGenPrepare] Mend "avoid crashing from replacing a phi twice" fix.

Summary:
An erroneously negated if-statement by an earlier (March 2019) bugfix left phi replacement/simplification under optimizeMemoryInst()  in CodeGenPrepare largely inactivated. The error was found when csmith found that the same assert as in the original bug report could still be triggered in a different way. This patch fixes the bugfix. The original bug was:
 https://bugs.llvm.org/show_bug.cgi?id=41052
... and the previous fix was D59358.

Reviewers: aprantl, skatkov

Reviewed By: skatkov

Subscribers: hiraditya, llvm-commits

Tags: #llvm

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

llvm-svn: 373084

4 years ago[llvm-exegesis] Add loop mode for repeating the snippet.
Clement Courbet [Fri, 27 Sep 2019 12:56:24 +0000 (12:56 +0000)]
[llvm-exegesis] Add loop mode for repeating the snippet.

Summary:
Before this change the Executable function was made by duplicating the
snippet. This change adds a --repetion-mode={loop|duplicate} flag that
allows choosing between this behaviour and wrapping the snippet instructions
in a loop.

The new mode can help measurements when the snippet fits in the DSB by
short-cirtcuiting decoding. The loop adds a dec + jmp to the measurements, but
since these are not part of the critical path, they execute in parallel
with the measured code and do not impact measurements in practice.

Overview of the change:
 - New SnippetRepetitor abstraction that handles repeating the snippet.
   The assembler delegates repeating the instructions to this class.
 - ExegesisTarget learns how to decrement loop counter and jump.
 - Some refactoring of the assembler into FunctionFiller/BasicBlockFiller.

Reviewers: gchatelet

Subscribers: mgorny, tschuett, llvm-commits

Tags: #llvm

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

llvm-svn: 373083

4 years agoclang-tidy: Don't repeat list of all checks in three places.
Nico Weber [Fri, 27 Sep 2019 12:56:14 +0000 (12:56 +0000)]
clang-tidy: Don't repeat list of all checks in three places.

Instead, put all checks in a cmake variable and reference this.

Also, make clangd use the the ClangTidyForceLinker.h header instead
of duplicating the list of modules -- the duplicate copy was missing
the new "darwin" checker added in r373065.

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

llvm-svn: 373082

4 years ago[Alignment][NFC] Remove unneeded llvm:: scoping on Align types
Guillaume Chatelet [Fri, 27 Sep 2019 12:54:21 +0000 (12:54 +0000)]
[Alignment][NFC] Remove unneeded llvm:: scoping on Align types

llvm-svn: 373081

4 years ago[clangd] Remove an unrelated comment, NFC.
Haojian Wu [Fri, 27 Sep 2019 12:32:19 +0000 (12:32 +0000)]
[clangd] Remove an unrelated comment, NFC.

llvm-svn: 373079

4 years ago[clang] [AST] Treat "inline gnu_inline" the same way as "extern inline gnu_inline...
Martin Storsjo [Fri, 27 Sep 2019 12:25:19 +0000 (12:25 +0000)]
[clang] [AST] Treat "inline gnu_inline" the same way as "extern inline gnu_inline" in C++ mode

This matches how GCC handles it, see e.g. https://gcc.godbolt.org/z/HPplnl.
GCC documents the gnu_inline attribute with "In C++, this attribute does
not depend on extern in any way, but it still requires the inline keyword
to enable its special behavior."

The previous behaviour of gnu_inline in C++, without the extern
keyword, can be traced back to the original commit that added
support for gnu_inline, SVN r69045.

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

llvm-svn: 373078

4 years ago[LLD] Simplify the demangleItanium function. NFC.
Martin Storsjo [Fri, 27 Sep 2019 12:24:18 +0000 (12:24 +0000)]
[LLD] Simplify the demangleItanium function. NFC.

Instead of returning an optional, just return the input string if
demangling fails, as that's what all callers use anyway.

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

llvm-svn: 373077

4 years ago[LLD] Convert demangleItanium to use the higher level llvm::demangle function. NFC.
Martin Storsjo [Fri, 27 Sep 2019 12:24:03 +0000 (12:24 +0000)]
[LLD] Convert demangleItanium to use the higher level llvm::demangle function. NFC.

This avoids a few lines of boilerplate of dealing with C string
allocations.

Add a testcase for a case where demangling shouldn't happen.

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

llvm-svn: 373076

4 years ago[LLD] [COFF] Use the unified llvm demangle frontend function. NFC.
Martin Storsjo [Fri, 27 Sep 2019 12:23:45 +0000 (12:23 +0000)]
[LLD] [COFF] Use the unified llvm demangle frontend function. NFC.

Add test cases for some cases where we don't want demangling to happen.

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

llvm-svn: 373075

4 years ago[lldb] Disable testing entry values as memory location
Djordje Todorovic [Fri, 27 Sep 2019 12:16:29 +0000 (12:16 +0000)]
[lldb] Disable testing entry values as memory location

The D67717 excludes such locations for now.

llvm-svn: 373074

4 years ago[lldb/cmake] add lldbCore -> clangDriver dependency
Pavel Labath [Fri, 27 Sep 2019 12:10:12 +0000 (12:10 +0000)]
[lldb/cmake] add lldbCore -> clangDriver dependency

ModuleList.cpp includes clang/Driver/Driver.h. Reflect that in the build
system. Not having this can cause build failures if ModuleList.cpp is
built before Driver.inc is generated.

llvm-svn: 373073

4 years agoUnwind: Add a stack scanning mechanism to support win32 unwinding
Pavel Labath [Fri, 27 Sep 2019 12:10:06 +0000 (12:10 +0000)]
Unwind: Add a stack scanning mechanism to support win32 unwinding

Summary:
Windows unwinding is weird. The unwind rules do not (always) describe
the precise layout of the stack, but rather expect the debugger to scan
the stack for something which looks like a plausible return address, and
the unwind based on that. The reason this works somewhat reliably is
because the the unwinder also has access to the frame sizes of the
functions on the stack. This allows it (in most cases) to skip function
pointers in local variables or function arguments, which could otherwise
be mistaken for return addresses.

Implementing this kind of unwind mechanism in lldb was a bit challenging
because we expect to be able to statically describe (in the UnwindPlan)
structure, the layout of the stack for any given instruction. Giving a
precise desription of this is not possible, because it requires
correlating information from two functions -- the pushed arguments to a
function are considered a part of the callers stack frame, and their
size needs to be considered when unwinding the caller, but they are only
present in the unwind entry of the callee. The callee may end up being
in a completely different module, or it may not even be possible to
determine it statically (indirect calls).

This patch implements this functionality by introducing a couple of new
APIs:
SymbolFile::GetParameterStackSize - return the amount of stack space
  taken up by parameters of this function.
SymbolFile::GetOwnFrameSize - the size of this function's frame. This
  excludes the parameters, but includes stuff like local variables and
  spilled registers.

These functions are then used by the unwinder to compute the estimated
location of the return address. This address is not always exact,
because the stack may contain some additional values -- for instance, if
we're getting ready to call a function then the stack will also contain
partially set up arguments, but we will not know their size because we
haven't called the function yet. For this reason the unwinder will crawl
up the stack from the return address position, and look for something
that looks like a possible return address. Currently, we assume that
something is a valid return address if it ends up pointing to an
executable section.

All of this logic kicks in when the UnwindPlan sets the value of CFA as
"isHeuristicallyDetected", which is also the final new API here. Right
now, only SymbolFileBreakpad implements these APIs, but in the future
SymbolFilePDB will use them too.

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

llvm-svn: 373072

4 years agoDisable the empty string check in TestDataFormatterStdString
Pavel Labath [Fri, 27 Sep 2019 11:39:27 +0000 (11:39 +0000)]
Disable the empty string check in TestDataFormatterStdString

This check was failing since it was added in r372837. It should be
possible to re-enable it once D68010 lands.

llvm-svn: 373071

4 years agoReland "gn build: (manually) merge r373028"
Nico Weber [Fri, 27 Sep 2019 11:37:59 +0000 (11:37 +0000)]
Reland "gn build: (manually) merge r373028"

This relands r373029, reverted in 373033, because r373028 relanded in r373066.

llvm-svn: 373070

4 years agoFix some swig warnings
Pavel Labath [Fri, 27 Sep 2019 11:30:16 +0000 (11:30 +0000)]
Fix some swig warnings

Previously, these were unseen because the wrapper script would swallow
them. This fixes the following types of warnings:
- methods being declared more than once
- swig complained about ignoring operator=, so I just removed it

llvm-svn: 373069

4 years agoFixed indentation in a ClangTidy test
Dmitri Gribenko [Fri, 27 Sep 2019 10:58:10 +0000 (10:58 +0000)]
Fixed indentation in a ClangTidy test

llvm-svn: 373068

4 years ago[clangd] Handle type template parameters in findExplicitReferences
Ilya Biryukov [Fri, 27 Sep 2019 10:55:53 +0000 (10:55 +0000)]
[clangd] Handle type template parameters in findExplicitReferences

Reviewers: kadircet

Reviewed By: kadircet

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

Tags: #clang

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

llvm-svn: 373067

4 years agoMoved -fblocks from an individual test to check_clang_tidy.py
Dmitri Gribenko [Fri, 27 Sep 2019 10:54:28 +0000 (10:54 +0000)]
Moved -fblocks from an individual test to check_clang_tidy.py

This way, all tests will benefit from it and will not have to worry
about setting up language options properly.

llvm-svn: 373066

4 years ago[clang-tidy] New check to warn when storing dispatch_once_t in non-static, non-global...
Dmitri Gribenko [Fri, 27 Sep 2019 10:49:12 +0000 (10:49 +0000)]
[clang-tidy] New check to warn when storing dispatch_once_t in non-static, non-global storage.

Summary:
Creates a new darwin ClangTidy module and adds the darwin-dispatch-once-nonstatic check that warns about dispatch_once_t variables not in static or global storage. This catches a missing static for local variables in e.g. singleton initialization behavior, and also warns on storing dispatch_once_t values in Objective-C instance variables. C/C++ struct/class instances may potentially live in static/global storage, and are ignored for this check.

The osx.API static analysis checker can find the non-static storage use of dispatch_once_t; I thought it useful to also catch this issue in clang-tidy when possible.

This is a re-land of https://reviews.llvm.org/D67567

Reviewers: thakis, gribozavr, stephanemoore

Subscribers: Eugene.Zelenko, mgorny, xazax.hun, jkorous, arphaman, kadircet, usaxena95

Tags: #clang-tools-extra, #clang, #llvm

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

llvm-svn: 373065

4 years ago[NFC][ARM] Add some tail-predication tests
Sam Parker [Fri, 27 Sep 2019 10:33:53 +0000 (10:33 +0000)]
[NFC][ARM] Add some tail-predication tests

Use different data types for some simple loops.

llvm-svn: 373064

4 years ago[SLPVectorizer][X86] Regenerate arith-fp tests
Simon Pilgrim [Fri, 27 Sep 2019 10:04:25 +0000 (10:04 +0000)]
[SLPVectorizer][X86] Regenerate arith-fp tests

llvm-svn: 373063

4 years ago[UpdateTestChecks] Fix wildcard support on DOS prompts
Simon Pilgrim [Fri, 27 Sep 2019 10:04:16 +0000 (10:04 +0000)]
[UpdateTestChecks] Fix wildcard support on DOS prompts

D64572 / rL365818 changed the way that the file paths were collected, which meant we lost the file pattern expansion necessary when working with DOS command prompt

llvm-svn: 373062

4 years ago[lldb] [testsuite] Remove redundant MAKE_DSYM := NO
Jan Kratochvil [Fri, 27 Sep 2019 09:59:53 +0000 (09:59 +0000)]
[lldb] [testsuite] Remove redundant MAKE_DSYM := NO

According to a comment by Pavel Labath:
https://reviews.llvm.org/D67589#inline-612375

llvm-svn: 373061

4 years agoRevert r372893 "[CodeGen] Replace -max-jump-table-size with -max-jump-table-targets"
Hans Wennborg [Fri, 27 Sep 2019 09:54:26 +0000 (09:54 +0000)]
Revert r372893 "[CodeGen] Replace -max-jump-table-size with -max-jump-table-targets"

This caused severe compile-time regressions, see PR43455.

> Modern processors predict the targets of an indirect branch regardless of
> the size of any jump table used to glean its target address.  Moreover,
> branch predictors typically use resources limited by the number of actual
> targets that occur at run time.
>
> This patch changes the semantics of the option `-max-jump-table-size` to limit
> the number of different targets instead of the number of entries in a jump
> table.  Thus, it is now renamed to `-max-jump-table-targets`.
>
> Before, when `-max-jump-table-size` was specified, it could happen that
> cluster jump tables could have targets used repeatedly, but each one was
> counted and typically resulted in tables with the same number of entries.
> With this patch, when specifying `-max-jump-table-targets`, tables may have
> different lengths, since the number of unique targets is counted towards the
> limit, but the number of unique targets in tables is the same, but for the
> last one containing the balance of targets.
>
> Differential revision: https://reviews.llvm.org/D60295

llvm-svn: 373060

4 years agoRevert r373056: [clang-format] Reference qualifiers in member templates causing extra...
Ilya Biryukov [Fri, 27 Sep 2019 09:49:20 +0000 (09:49 +0000)]
Revert r373056: [clang-format] Reference qualifiers in member templates causing extra indentation

Reason: this breaks unit tests.
llvm-svn: 373059

4 years ago[sancov][NFC] Make filename Regexes "const"
Thomas Preud'homme [Fri, 27 Sep 2019 09:39:13 +0000 (09:39 +0000)]
[sancov][NFC] Make filename Regexes "const"

Summary:
The const-correctness of match() was fixed in rL372764, which allows
such static Regex objects to be marked const.

Reviewers: thopre

Reviewed By: thopre

Subscribers: llvm-commits

Tags: #llvm

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

llvm-svn: 373058

4 years ago[clangd] Support OverloadExpr in findExplicitReferences
Ilya Biryukov [Fri, 27 Sep 2019 09:39:10 +0000 (09:39 +0000)]
[clangd] Support OverloadExpr in findExplicitReferences

Reviewers: kadircet

Reviewed By: kadircet

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

Tags: #clang

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

llvm-svn: 373057

4 years ago[clang-format] Reference qualifiers in member templates causing extra indentation
Ilya Biryukov [Fri, 27 Sep 2019 09:24:58 +0000 (09:24 +0000)]
[clang-format] Reference qualifiers in member templates causing extra indentation

The following code

```
struct f {
  template <class T>
  void bar() && noexcept {}
};
```

will be formatted to the following with LLVM style, and
`AlwaysBreakTemplateDeclarations: Yes`

```
struct f {
  template <class T>
      void bar() && noexcept {}
};
```

The indentation of the `void bar()` line is wrong.

Patch by Andreas Wass (AndWass)!

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

llvm-svn: 373056

4 years ago[NFC][InstCombine] Revisit shift-by-signext tests
Roman Lebedev [Fri, 27 Sep 2019 09:09:15 +0000 (09:09 +0000)]
[NFC][InstCombine] Revisit shift-by-signext tests

llvm-svn: 373055

4 years ago[Alignment][NFC] MaybeAlign in GVNExpression
Guillaume Chatelet [Fri, 27 Sep 2019 08:56:43 +0000 (08:56 +0000)]
[Alignment][NFC] MaybeAlign in GVNExpression

Summary:
This is patch is part of a series to introduce an Alignment type.
See this thread for context: http://lists.llvm.org/pipermail/llvm-dev/2019-July/133851.html
See this patch for the introduction of the type: https://reviews.llvm.org/D64790

Reviewers: courbet

Subscribers: hiraditya, llvm-commits

Tags: #llvm

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

llvm-svn: 373054

4 years ago[lldb] Print an error message for an empty subcommand
Raphael Isemann [Fri, 27 Sep 2019 08:49:41 +0000 (08:49 +0000)]
[lldb] Print an error message for an empty subcommand

llvm-svn: 373053

4 years ago[MC][ARM] vscclrm disassembles as vldmia
Alexandros Lamprineas [Fri, 27 Sep 2019 08:22:24 +0000 (08:22 +0000)]
[MC][ARM] vscclrm disassembles as vldmia

Happens only when the mve.fp subtarget feature is enabled:

$ llvm-mc -triple thumbv8.1m.main -mattr=+mve.fp,+8msecext -disassemble <<< "0x9f,0xec,0x08,0x0b"
  .text
  vldmia  pc, {d0, d1, d2, d3}
$ llvm-mc -triple thumbv8.1m.main -mattr=+8msecext -disassemble <<< "0x9f,0xec,0x08,0x0b"
  .text
  vscclrm {d0, d1, d2, d3, vpr}

Assembling returns the correct encoding with or without mve.fp:

$ llvm-mc -triple thumbv8.1m.main -mattr=+mve.fp,+8msecext -show-encoding <<< "vscclrm {d0-d3, vpr}"
  .text
  vscclrm {d0, d1, d2, d3, vpr}   @ encoding: [0x9f,0xec,0x08,0x0b]
$ llvm-mc -triple thumbv8.1m.main -mattr=+8msecext -show-encoding <<< "vscclrm {d0-d3, vpr}"
  .text
  vscclrm {d0, d1, d2, d3, vpr}   @ encoding: [0x9f,0xec,0x08,0x0b]

The problem seems to be in the TableGen description of VSCCLRMD.
The least significant bit should be set to zero.

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

llvm-svn: 373052