platform/upstream/llvm.git
5 years ago[llvm] Fix typo: 's/ ot / to /' [NFC]
Mandeep Singh Grang [Thu, 21 Feb 2019 20:04:20 +0000 (20:04 +0000)]
[llvm] Fix typo: 's/ ot / to /' [NFC]

llvm-svn: 354614

5 years ago[LoopSimplifyCFG] Update MemorySSA after r353911.
Alina Sbirlea [Thu, 21 Feb 2019 19:54:05 +0000 (19:54 +0000)]
[LoopSimplifyCFG] Update MemorySSA after r353911.

Summary:
MemorySSA is not properly updated in LoopSimplifyCFG after recent changes. Use SplitBlock utility to resolve that and clear all updates once handleDeadExits is finished.
All updates that follow are removal of edges which are safe to handle via the removeEdge() API.
Also, deleting dead blocks is done correctly as is, i.e. delete from MemorySSA before updating the CFG and DT.

Reviewers: mkazantsev, rtereshin

Subscribers: sanjoy, jlebar, Prazek, george.burgess.iv, llvm-commits

Tags: #llvm

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

llvm-svn: 354613

5 years ago[EarlyCSE] Cleanup deadcode. [NFCI]
Alina Sbirlea [Thu, 21 Feb 2019 19:49:57 +0000 (19:49 +0000)]
[EarlyCSE] Cleanup deadcode. [NFCI]

Summary: Cleanup nop assignments.

Reviewers: george.burgess.iv, davide

Subscribers: sanjoy, jlebar, llvm-commits

Tags: #llvm

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

llvm-svn: 354612

5 years ago[Hexagon] Use misaligned load instead of trap0(#0) for __builtin_trap
Krzysztof Parzyszek [Thu, 21 Feb 2019 19:42:39 +0000 (19:42 +0000)]
[Hexagon] Use misaligned load instead of trap0(#0) for __builtin_trap

The trap instruction is intercepted by various runtime environments,
and instead of a crash it creates confusion.

This reapplies r354606 with a fix.

llvm-svn: 354611

5 years ago[CodeGen] Fix string literal address space casting.
Michael Liao [Thu, 21 Feb 2019 19:40:20 +0000 (19:40 +0000)]
[CodeGen] Fix string literal address space casting.

Summary:
- If a string literal is reused directly, need to add necessary address
  space casting if the target requires that.

Reviewers: yaxunl

Subscribers: jvesely, cfe-commits

Tags: #clang

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

llvm-svn: 354610

5 years agoRevert r354606, it breaks asan tests
Krzysztof Parzyszek [Thu, 21 Feb 2019 19:33:58 +0000 (19:33 +0000)]
Revert r354606, it breaks asan tests

llvm-svn: 354609

5 years ago[test] Fix typo: 's/ ot / to /' [NFC]
Mandeep Singh Grang [Thu, 21 Feb 2019 19:11:15 +0000 (19:11 +0000)]
[test] Fix typo: 's/ ot / to /' [NFC]

llvm-svn: 354608

5 years agoELF: Remove dead code. NFCI.
Peter Collingbourne [Thu, 21 Feb 2019 18:53:58 +0000 (18:53 +0000)]
ELF: Remove dead code. NFCI.

RelocationBaseSection is not used in -r links, so Config->Relocatable will
always be false.

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

llvm-svn: 354607

5 years ago[Hexagon] Use misaligned load instead of trap0(#0) for __builtin_trap
Krzysztof Parzyszek [Thu, 21 Feb 2019 18:39:22 +0000 (18:39 +0000)]
[Hexagon] Use misaligned load instead of trap0(#0) for __builtin_trap

The trap instruction is intercepted by various runtime environments,
and instead of a crash it creates confusion.

llvm-svn: 354606

5 years agoUpdate `ld.lld --version` string for monorepo.
Rui Ueyama [Thu, 21 Feb 2019 18:37:26 +0000 (18:37 +0000)]
Update `ld.lld --version` string for monorepo.

This patch basically does the same thing as
https://reviews.llvm.org/rL352729 did to clang.

With this patch, lld now prints out a correct version string including
a git commit id like this:

  $ bin/ld.lld --version
  LLD 9.0.0 (https://github.com/llvm/llvm-project.git c027658504fa9e68173f53dedaf223695a65e910) (compatible with GNU linkers)

Fixes https://bugs.llvm.org/show_bug.cgi?id=40780

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

llvm-svn: 354605

5 years ago[AMDGPU] remove unused AssemblerPredicates
Mark Searles [Thu, 21 Feb 2019 18:19:54 +0000 (18:19 +0000)]
[AMDGPU] remove unused AssemblerPredicates

An internal build is hitting asserts complaining about too many subtarget
features:
  llvm/utils/TableGen/Types.cpp:42:
    const char* llvm::getMinimalTypeForEnumBitfield(uint64_t):
    Assertion `MaxIndex <= 64 && "Too many bits"' failed.

  llvm/utils/TableGen/AsmMatcherEmitter.cpp:1476:
    void {anonymous}::AsmMatcherInfo::buildInfo():
    Assertion `SubtargetFeatures.size() <= 64 && "Too many subtarget features!"'
    failed.

The short-term solution is to remove a few unused AssemblerPredicates to get
under the limit.

The long-term solution seems to be to revisit these asserts. E.g., rather than
hardcoded '64', use the standard sized std::bitset like the other places that
track subtarget features.

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

llvm-svn: 354604

5 years ago[llvm-objcopy][NFC] Add std::move() to fix older BB
Jordan Rupprecht [Thu, 21 Feb 2019 17:24:55 +0000 (17:24 +0000)]
[llvm-objcopy][NFC] Add std::move() to fix older BB

llvm-svn: 354603

5 years ago[unittest] Fix missing user-provided default constructor
Jonas Devlieghere [Thu, 21 Feb 2019 17:18:06 +0000 (17:18 +0000)]
[unittest] Fix missing user-provided default constructor

error: default initialization of an object of const type 'const Pod'
without a user-provided default constructor

llvm-svn: 354602

5 years agoRevert "[sanitizers] Restore internal_readlink for x32"
Matt Morehouse [Thu, 21 Feb 2019 17:06:23 +0000 (17:06 +0000)]
Revert "[sanitizers] Restore internal_readlink for x32"

This reverts r354451 since it broke the Windows sanitizer bot.

llvm-svn: 354601

5 years ago[llvm-objcopy][NFC] More error cleanup
Jordan Rupprecht [Thu, 21 Feb 2019 17:05:19 +0000 (17:05 +0000)]
[llvm-objcopy][NFC] More error cleanup

Summary:
This removes calls to `error()`/`reportError()` in the main driver (llvm-objcopy.cpp) as well as the associated argv-parsing (CopyConfig.cpp). `logAllUnhandledErrors()` is now the main way to print errors.

There are still a few uses from within the per-arch drivers, so we can't delete them yet... but almost!

Reviewers: jhenderson, alexshap, espindola

Reviewed By: jhenderson

Subscribers: emaste, arichardson, jakehehrlich, jdoerfert, llvm-commits

Tags: #llvm

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

llvm-svn: 354600

5 years ago[WebAssembly] Don't create MSSymbolWasm object for non-symbols
Sam Clegg [Thu, 21 Feb 2019 17:05:19 +0000 (17:05 +0000)]
[WebAssembly] Don't create MSSymbolWasm object for non-symbols

`__linear_memory` and `__indirect_function_table` are both generated
as imports in wasm object files but are actually symbols and don't
appear in any symbols table or relocation entry.  Indeed we
don't have any symbol type to meaningfully represent either of them.

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

llvm-svn: 354599

5 years ago[Kaleidoscope] Fix symbol resolver to search in reverse order.
Lang Hames [Thu, 21 Feb 2019 16:53:04 +0000 (16:53 +0000)]
[Kaleidoscope] Fix symbol resolver to search in reverse order.

This should allow more recent definitions of functions in the Kaleidoscope REPL
to override old ones, as the tutorial text promises.

llvm-svn: 354598

5 years ago[llvm-objcopy] Make removeSectionReferences batched
Jordan Rupprecht [Thu, 21 Feb 2019 16:45:42 +0000 (16:45 +0000)]
[llvm-objcopy] Make removeSectionReferences batched

Summary:
Removing a large number of sections from a file with a lot of symbols can have abysmal (i.e. O(n^2)) performance, e.g. when running `--only-section` to extract one section out of a large file.

This comes from iterating over all symbols in the symbol table each time we remove a section, to remove references to the section we just removed.
Instead, do just one pass of symbol removal by passing a hash set of all the sections we'd like to remove references to.

This fixes a regression when running llvm-objcopy -j <one section> on an object file with many sections and symbols -- on my machine, running `objcopy -j .keep_me huge-input.o /tmp/foo.o` takes .3s with GNU objcopy, 1.3s with an updated llvm-objcopy, and 7+ minutes with llvm-objcopy prior to this patch.

Reviewers: MaskRay, jhenderson, jakehehrlich, alexshap, espindola

Reviewed By: MaskRay, jhenderson

Subscribers: echristo, emaste, arichardson, mgrang, jdoerfert, llvm-commits

Tags: #llvm

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

llvm-svn: 354597

5 years agoRevert "[CUDA]Delayed diagnostics for the asm instructions."
Alexey Bataev [Thu, 21 Feb 2019 16:40:21 +0000 (16:40 +0000)]
Revert "[CUDA]Delayed diagnostics for the asm instructions."

This reverts commit r354593 to fix the problem with the crash on
windows.

llvm-svn: 354596

5 years ago[PPC] Add store merging testcase.
Nirav Dave [Thu, 21 Feb 2019 16:34:48 +0000 (16:34 +0000)]
[PPC] Add store merging testcase.

llvm-svn: 354595

5 years ago[DAGCombiner] prevent infinite looping by truncating 'and' (PR40793)
Sanjay Patel [Thu, 21 Feb 2019 16:01:48 +0000 (16:01 +0000)]
[DAGCombiner] prevent infinite looping by truncating 'and' (PR40793)

This fold can occur during legalization, so it can fight with promotion
to the larger type. It apparently takes a special sequence and subtarget
to avoid more basic simplifications that would hide the problem.

But there's a bigger question raised here: why does distributeTruncateThroughAnd()
even exist? It duplicates functionality from a more minimal pattern that we
already have. But getting rid of this function requires some preliminary steps.

https://bugs.llvm.org/show_bug.cgi?id=40793

llvm-svn: 354594

5 years ago[CUDA]Delayed diagnostics for the asm instructions.
Alexey Bataev [Thu, 21 Feb 2019 15:51:30 +0000 (15:51 +0000)]
[CUDA]Delayed diagnostics for the asm instructions.

Summary:
Adapted targetDiag for the CUDA and used for the delayed diagnostics in
asm constructs. Works for both host and device compilation sides.

Reviewers: tra, jlebar

Subscribers: jdoerfert, cfe-commits

Tags: #clang

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

llvm-svn: 354593

5 years agoAMDGPU/GlobalISel: Make phis legal
Matt Arsenault [Thu, 21 Feb 2019 15:48:13 +0000 (15:48 +0000)]
AMDGPU/GlobalISel: Make phis legal

llvm-svn: 354592

5 years agoRegBankSelect: Allow targets to introduce control flow for mapping
Matt Arsenault [Thu, 21 Feb 2019 15:48:13 +0000 (15:48 +0000)]
RegBankSelect: Allow targets to introduce control flow for mapping

For AMDGPU, if an operand requires an SGPR but is only available as a
VGPR, a loop needs to be introduced to execute the instruction with
each unique combination of values across all lanes. The rest of the
instructions in the block will be moved to a new block following the
loop. Check if the next instruction's parent changed, and update the
iterators and insertion block if this happened.

Tests will be included in a future patch.

llvm-svn: 354591

5 years agoFix missing C++ mode comments
Matt Arsenault [Thu, 21 Feb 2019 15:48:10 +0000 (15:48 +0000)]
Fix missing C++ mode comments

llvm-svn: 354590

5 years ago[x86] regenerate checks; NFC
Sanjay Patel [Thu, 21 Feb 2019 15:30:28 +0000 (15:30 +0000)]
[x86] regenerate checks; NFC

llvm-svn: 354589

5 years ago[X86] Fix copy-paste error in @ccz flag.
Nirav Dave [Thu, 21 Feb 2019 15:28:31 +0000 (15:28 +0000)]
[X86] Fix copy-paste error in @ccz flag.

@ccz operand should be equivalent to @cce.

llvm-svn: 354588

5 years agoAMDGPU/GlobalISel: Fix bit count ops for non-power-of-2 types
Matt Arsenault [Thu, 21 Feb 2019 15:22:20 +0000 (15:22 +0000)]
AMDGPU/GlobalISel: Fix bit count ops for non-power-of-2 types

llvm-svn: 354587

5 years ago[llvm-readobj] Weaken a check in the test added by r354567
Ilya Biryukov [Thu, 21 Feb 2019 14:51:17 +0000 (14:51 +0000)]
[llvm-readobj] Weaken a check in the test added by r354567

The check includes a substring, configurable by PACKAGE_NAME in CMake.
This leads to failures if PACKAGE_NAME is not the default.

llvm-svn: 354586

5 years ago[clangd] Only report explicitly typed symbols during code navigation
Kadir Cetinkaya [Thu, 21 Feb 2019 14:48:33 +0000 (14:48 +0000)]
[clangd] Only report explicitly typed symbols during code navigation

Summary:
Clangd was reporting implicit symbols, like results of implicit cast
expressions during code navigation, which is not desired. For example:

```
struct Foo{ Foo(int); };
void bar(Foo);
vod foo() {
  int x;
  bar(^x);
}
```
Performing a GoTo on the point specified by ^ would give two results one
pointing to line `int x` and the other for definition of `Foo(int);`

Reviewers: ilya-biryukov, sammccall

Subscribers: ioeric, MaskRay, jkorous, mgrang, arphaman, cfe-commits

Tags: #clang

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

llvm-svn: 354585

5 years ago[RISCV][NFC] IsEligibleForTailCallOptimization -> isEligibleForTailCallOptimization
Alex Bradbury [Thu, 21 Feb 2019 14:31:41 +0000 (14:31 +0000)]
[RISCV][NFC] IsEligibleForTailCallOptimization -> isEligibleForTailCallOptimization

Also clang-format the modified hunks.

llvm-svn: 354584

5 years ago[RISCV] Add implied zero offset load/store alias patterns
Alex Bradbury [Thu, 21 Feb 2019 14:09:34 +0000 (14:09 +0000)]
[RISCV] Add implied zero offset load/store alias patterns

Allow load/store instructions with implied zero offset for compatibility with
GNU assembler.

Differential Revision: https://reviews.llvm.org/D57141
Patch by James Clarke.

llvm-svn: 354581

5 years ago[InferAddressSpaces] Fix fallthrough error
Joey Gouly [Thu, 21 Feb 2019 13:10:37 +0000 (13:10 +0000)]
[InferAddressSpaces] Fix fallthrough error

llvm-svn: 354580

5 years ago[ARM GlobalISel] Support G_FRAME_INDEX for Thumb2
Diana Picus [Thu, 21 Feb 2019 13:00:02 +0000 (13:00 +0000)]
[ARM GlobalISel] Support G_FRAME_INDEX for Thumb2

Same as arm mode.

llvm-svn: 354579

5 years agoRe-land part of r354244 "[DAGCombiner] Eliminate dead stores to stack."
Clement Courbet [Thu, 21 Feb 2019 12:59:36 +0000 (12:59 +0000)]
Re-land part of r354244 "[DAGCombiner] Eliminate dead stores to stack."

This part introduces the lifetime node.

llvm-svn: 354578

5 years ago[llvm-readobj]Add testing for ELF symbol and section table printing for a wider range...
James Henderson [Thu, 21 Feb 2019 12:47:10 +0000 (12:47 +0000)]
[llvm-readobj]Add testing for ELF symbol and section table printing for a wider range of values

The existing ELF symbol and section table testing doesn't test many of
the corner-cases or valid values for various ELF properties, including
things like binding, visibility, section type and so on. This patch adds
a series of tests that test these and other related edge-cases.

Reviewed by: grimar, MaskRay

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

llvm-svn: 354577

5 years ago[InferAddressSpaces] Fix crash on select of non-ptr operands
Joey Gouly [Thu, 21 Feb 2019 12:31:36 +0000 (12:31 +0000)]
[InferAddressSpaces] Fix crash on select of non-ptr operands

Check the operands of a select are pointers, to determine if it is an address
expression or not.

https://reviews.llvm.org/D58226

llvm-svn: 354576

5 years ago[X86][SSE] combineX86ShufflesRecursively - moved to generic op input index lookup...
Simon Pilgrim [Thu, 21 Feb 2019 12:24:49 +0000 (12:24 +0000)]
[X86][SSE] combineX86ShufflesRecursively - moved to generic op input index lookup. NFCI.

We currently bail if the target shuffle decodes to more than 2 input vectors, this change alters the input index to work for any number of inputs for when we drop that requirement.

llvm-svn: 354575

5 years ago[yaml2obj][obj2yaml] - Support SHT_GNU_verdef (.gnu.version_d) section.
George Rimar [Thu, 21 Feb 2019 12:21:43 +0000 (12:21 +0000)]
[yaml2obj][obj2yaml] - Support SHT_GNU_verdef (.gnu.version_d) section.

This patch adds support for parsing/dumping the .gnu.version section.

Description of the section is: https://refspecs.linuxfoundation.org/LSB_1.3.0/gLSB/gLSB/symverdefs.html

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

llvm-svn: 354574

5 years ago[LLD][ELF] - Simplify test case. NFC.
George Rimar [Thu, 21 Feb 2019 12:18:22 +0000 (12:18 +0000)]
[LLD][ELF] - Simplify test case. NFC.

It has an excessive section declaration.

llvm-svn: 354573

5 years ago[OpenMP] Fix check-openmp after r354553
Jonas Hahnfeld [Thu, 21 Feb 2019 12:00:57 +0000 (12:00 +0000)]
[OpenMP] Fix check-openmp after r354553

Calling add_openmp_testsuite will add the tests to check-openmp unless
EXCLUDE_FROM_ALL is set. This is problematic because the tests for OMPT
will be included twice which doesn't work if the same test is executed
concurrently by multiple threads.

See:
http://lab.llvm.org:8011/builders/openmp-gcc-x86_64-linux-debian/builds/163
http://lab.llvm.org:8011/builders/openmp-clang-x86_64-linux-debian/builds/184

http://lab.llvm.org:8011/builders/openmp-clang-ppc64le-linux-rhel/builds/133
(On PPC some failures are unrelated to r354553, the bot has been red before
and this commit is not expected to fix that. For a proper patch please see
https://reviews.llvm.org/D56286.)

llvm-svn: 354572

5 years ago[llvm-readobj] Change "SHT_MIPS_DWARF" to "MIPS_DWARF"
Fangrui Song [Thu, 21 Feb 2019 11:35:41 +0000 (11:35 +0000)]
[llvm-readobj] Change "SHT_MIPS_DWARF" to "MIPS_DWARF"

Summary:
This is to be consistent with the display of other MIPS section types.
This string is also used by binutils-gdb/binutils/readelf.c:get_mips_section_type_name

Since we are here, reorder the two enum constatns because SHT_MIPS_DWARF < SHT_MIPS_ABIFLAGS.

Reviewers: jhenderson, atanasyan

Reviewed By: jhenderson

Subscribers: aprantl, sdardis, arichardson, rupprecht, llvm-commits

Tags: #llvm

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

llvm-svn: 354571

5 years ago[CodeComplete] Collect visited contexts when scope specifier is invalid.
Eric Liu [Thu, 21 Feb 2019 11:22:58 +0000 (11:22 +0000)]
[CodeComplete] Collect visited contexts when scope specifier is invalid.

Summary:
This will allow completion consumers to guess the specified scope by
putting together scopes in the context with the specified scope (e.g. when the
specified namespace is not imported yet).

Reviewers: ilya-biryukov

Subscribers: jdoerfert, cfe-commits

Tags: #clang

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

llvm-svn: 354570

5 years agoRevert 354564: [ARM] Add some missing thumb1 opcodes to enable peephole optimisation...
David Green [Thu, 21 Feb 2019 11:03:13 +0000 (11:03 +0000)]
Revert 354564: [ARM] Add some missing thumb1 opcodes to enable peephole optimisation of CMPs

I believe it's causing bootstrap failures for A32 code. I'll take a look at
what's wrong.

llvm-svn: 354569

5 years ago[OpenCL] Simplify LLVM IR generated for OpenCL blocks
Andrew Savonichev [Thu, 21 Feb 2019 11:02:10 +0000 (11:02 +0000)]
[OpenCL] Simplify LLVM IR generated for OpenCL blocks

Summary:
Emit direct call of block invoke functions when possible, i.e. in case the
block is not passed as a function argument.
Also doing some refactoring of `CodeGenFunction::EmitBlockCallExpr()`

Reviewers: Anastasia, yaxunl, svenvh

Reviewed By: Anastasia

Subscribers: cfe-commits

Tags: #clang

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

llvm-svn: 354568

5 years ago[llvm-readobj]Test basic command-line handling
James Henderson [Thu, 21 Feb 2019 11:00:29 +0000 (11:00 +0000)]
[llvm-readobj]Test basic command-line handling

There was no real testing for llvm-readobj/llvm-readelf's behaviour
under various bad inputs and command-line switches. This patch adds some
testing of this, along with basic testing of --version and --help.

Reviewed by: MaskRay, grimar

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

llvm-svn: 354567

5 years ago[yaml2obj]Allow symbol Index field to take values lower than SHN_LORESERVE
James Henderson [Thu, 21 Feb 2019 10:57:15 +0000 (10:57 +0000)]
[yaml2obj]Allow symbol Index field to take values lower than SHN_LORESERVE

In order to test tool handling of invalid section indexes, I need to
create an object containing such an invalid section index. I could
create a hex-edited binary, but having the ability to use yaml2obj is
preferable. Prior to this change, yaml2obj would reject any explicit
section indexes less than SHN_LORESERVE. This patch changes it to allow
any value.

I had to change the test to use llvm-readelf instead of llvm-readobj,
because llvm-readobj does not like invalid section indexes. I've also
expanded the test to show that the most common SHN_* values are accepted
(SHN_UNDEF, SHN_ABS, SHN_COMMON).

Reviewed by: grimar, jakehehrlich

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

llvm-svn: 354566

5 years ago[AArch64] Print instruction before atomic semantic annotations
David Spickett [Thu, 21 Feb 2019 10:42:49 +0000 (10:42 +0000)]
[AArch64] Print instruction before atomic semantic annotations

Commit r353303 added annotations when acquire semantics
were dropped from an instruction.

printAnnotation was called before printInstruction.
So if you didn't set a separate comment output stream
you got <comment><instr> instead of <instr><comment>
as expected.

To fix this move the new printAnnotation to after
the instruction is printed.

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

llvm-svn: 354565

5 years ago[ARM] Add some missing thumb1 opcodes to enable peephole optimisation of CMPs
David Green [Thu, 21 Feb 2019 10:30:09 +0000 (10:30 +0000)]
[ARM] Add some missing thumb1 opcodes to enable peephole optimisation of CMPs

This adds a number of missing Thumb1 opcodes so that the peephole optimiser can
remove redundant CMP instructions.

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

llvm-svn: 354564

5 years ago[ObjectYAML] Support SHT_MIPS_DWARF section type flag
Fangrui Song [Thu, 21 Feb 2019 10:19:08 +0000 (10:19 +0000)]
[ObjectYAML] Support SHT_MIPS_DWARF section type flag

Also reorder SHT_MIPS_DWARF and SHT_MIPS_ABIFLAGS in Object/ELF.cpp.
The test will be added by D58457.

llvm-svn: 354563

5 years ago[NFC] Replace EOL in test file
Max Kazantsev [Thu, 21 Feb 2019 09:56:23 +0000 (09:56 +0000)]
[NFC] Replace EOL in test file

llvm-svn: 354562

5 years ago[clangd] Enable indexing of template type parameters
Kadir Cetinkaya [Thu, 21 Feb 2019 09:55:00 +0000 (09:55 +0000)]
[clangd] Enable indexing of template type parameters

Summary: Fixes https://bugs.llvm.org/show_bug.cgi?id=36285

Reviewers: ilya-biryukov

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

Tags: #clang

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

llvm-svn: 354561

5 years ago[clang][Index] Enable indexing of Template Type Parameters behind a flag
Kadir Cetinkaya [Thu, 21 Feb 2019 09:52:33 +0000 (09:52 +0000)]
[clang][Index] Enable indexing of Template Type Parameters behind a flag

Summary:
clangd uses indexing api to provide references and it was not possible
to perform symbol information for template parameters. This patch enables
visiting of TemplateTypeParmTypeLocs.

Reviewers: ilya-biryukov, akyrtzi

Subscribers: javed.absar, kristof.beyls, ioeric, arphaman, cfe-commits

Tags: #clang

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

llvm-svn: 354560

5 years ago[TEST] Add failing test that shows problems with MSSA update in LoopSimplifyCFG
Max Kazantsev [Thu, 21 Feb 2019 09:40:24 +0000 (09:40 +0000)]
[TEST] Add failing test that shows problems with MSSA update in LoopSimplifyCFG

llvm-svn: 354559

5 years ago[clangd] Handle another incomplete-type diagnostic case in IncludeFixer.
Eric Liu [Thu, 21 Feb 2019 09:33:49 +0000 (09:33 +0000)]
[clangd] Handle another incomplete-type diagnostic case in IncludeFixer.

llvm-svn: 354558

5 years ago[ARM] Negative constants mishandled in ARM CGP
Sam Parker [Thu, 21 Feb 2019 09:33:18 +0000 (09:33 +0000)]
[ARM] Negative constants mishandled in ARM CGP

During type promotion, sometimes we convert negative an add with a
negative constant into a sub with a positive constant. The loop that
performs this transformation has two issues:
- it iterates over a set, causing non-determinism.
- it breaks, instead of continuing, when it finds the first
  non-negative operand.

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

llvm-svn: 354557

5 years agotestsuite: Fix TestCompDirSymLink and TestSourceManager on Linux with symlinked build dir
Jan Kratochvil [Thu, 21 Feb 2019 09:05:27 +0000 (09:05 +0000)]
testsuite: Fix TestCompDirSymLink and TestSourceManager on Linux with symlinked build dir

Getting failure when building in a directory which is symlinked elsewhere:

Failing Tests (1):
    lldb-Suite :: functionalities/breakpoint/comp_dir_symlink/TestCompDirSymLink.py
    lldb-Suite :: source-manager/TestSourceManager.py

For TestCompDirSymLink:
------------------------------------------------------------------------------
runCmd: file .../lldb-test-build.noindex/functionalities/breakpoint/comp_dir_symlink/TestCompDirSymLink.test_symlink_paths_set_procselfcwd_dwarf/CompDirSymLink
output: Current executable set to '.../lldb-test-build.noindex/functionalities/breakpoint/comp_dir_symlink/TestCompDirSymLink.test_symlink_paths_set_procselfcwd_dwarf/CompDirSymLink' (x86_64).
runCmd: settings set plugin.symbol-file.dwarf.comp-dir-symlink-paths /proc/self/cwd
output: None
runCmd: breakpoint set -f ".../lldb-test-build.noindex/functionalities/breakpoint/comp_dir_symlink/TestCompDirSymLink.test_symlink_paths_set_procselfcwd_dwarf/relative.cpp" -l 11
output: Breakpoint 1: no locations (pending).
WARNING:  Unable to resolve breakpoint to any actual locations.

It is because /proc/self/cwd (used above for plugin.symbol-file.dwarf.comp-dir-symlink-paths) points to an already resolved directory:

(cd /tmp;mkdir real;ln -s real symlink;cd symlink;ls -l /proc/self/cwd)
lrwxrwxrwx 1 jkratoch jkratoch 0 Feb 20 19:55 /proc/self/cwd -> /tmp/real/
------------------------------------------------------------------------------

For TestSourceManager the resolving is done by 'make -C' as found by Pavel Labath.

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

llvm-svn: 354556

5 years ago[OpenMP][OMPT] Fix locking testcases for 32 bit architectures
Joachim Protze [Thu, 21 Feb 2019 08:50:49 +0000 (08:50 +0000)]
[OpenMP][OMPT] Fix locking testcases for 32 bit architectures

Fix for the bug reported in:
https://bugs.llvm.org/show_bug.cgi?id=40531

The address is now casted the same way as in the runtime code.

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

llvm-svn: 354553

5 years ago[DebugInfo] Prep llvm-dwarfdump for typed DW5 ops.
Markus Lavin [Thu, 21 Feb 2019 08:20:24 +0000 (08:20 +0000)]
[DebugInfo] Prep llvm-dwarfdump for typed DW5 ops.

Adds llvm-dwarfdump support for pretty printing Dwarf5 expressions ops
that reference a base type (right now only DW_OP_convert is added).
Includes verification to verify that the ops operand is actually a
DW_TAG_base_type DIE.

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

llvm-svn: 354552

5 years agoFix file header issues in fuzzers. NFC
Fangrui Song [Thu, 21 Feb 2019 07:57:14 +0000 (07:57 +0000)]
Fix file header issues in fuzzers. NFC

llvm-svn: 354551

5 years agoFix some include order and file headers issues. NFC
Fangrui Song [Thu, 21 Feb 2019 07:42:31 +0000 (07:42 +0000)]
Fix some include order and file headers issues. NFC

llvm-svn: 354550

5 years agoRevert r354546
Serge Guelton [Thu, 21 Feb 2019 06:59:21 +0000 (06:59 +0000)]
Revert r354546

This triggers an ICE on gcc 7, see http://lab.llvm.org:8011/builders/clang-cmake-aarch64-quick/builds/17598/steps/build%20stage%201/logs/stdio

llvm-svn: 354549

5 years agoFix typo in r354546
Serge Guelton [Thu, 21 Feb 2019 06:12:41 +0000 (06:12 +0000)]
Fix typo in r354546

llvm-svn: 354548

5 years ago[LoopSimplifyCFG] Add missing MSSA edge deletion
Max Kazantsev [Thu, 21 Feb 2019 05:51:29 +0000 (05:51 +0000)]
[LoopSimplifyCFG] Add missing MSSA edge deletion

When we create fictive switch in preheader, we should take
care about MSSA and delete edge between old preheader and
header.

llvm-svn: 354547

5 years ago[NFC] Always initialize all members in ABIArgInfo
Serge Guelton [Thu, 21 Feb 2019 04:55:50 +0000 (04:55 +0000)]
[NFC] Always initialize all members in ABIArgInfo

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

llvm-svn: 354546

5 years agoAttempt to fix VS2015 build breakage from r354517. NFCI.
Douglas Yung [Thu, 21 Feb 2019 04:55:31 +0000 (04:55 +0000)]
Attempt to fix VS2015 build breakage from r354517. NFCI.

llvm-svn: 354545

5 years ago[WebAssembly] Default to something reasonable in WebAssemblyAddMissingPrototypes
Sam Clegg [Thu, 21 Feb 2019 03:27:00 +0000 (03:27 +0000)]
[WebAssembly] Default to something reasonable in WebAssemblyAddMissingPrototypes

Previously if we couldn't derive a prototype for a "no-prototype"
function from C we would leave it as is:

  void foo(...)

With this change we instead give is an empty signature and remove
the "no-prototype" attribute.

This fixes the current wasm waterfall test failure.

Tags: #llvm

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

llvm-svn: 354544

5 years ago[AMDGPU] fix commuted case of sub combine
Stanislav Mekhanoshin [Thu, 21 Feb 2019 02:58:00 +0000 (02:58 +0000)]
[AMDGPU] fix commuted case of sub combine

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

llvm-svn: 354543

5 years ago[Inliner] Pass nullptr for the ORE param of getInlineCost if RemarkEnabled
Wei Mi [Thu, 21 Feb 2019 02:57:52 +0000 (02:57 +0000)]
[Inliner] Pass nullptr for the ORE param of getInlineCost if RemarkEnabled
is false.

Right now for inliner and partial inliner, we always pass the address of a
valid ORE object to getInlineCost even if RemarkEnabled is false because of
no -Rpass is specified. Since ComputeFullInlineCost will be set to true if
ORE is non-null in getInlineCost, this introduces the problem that in
getInlineCost we cannot return early even if we already know the cost is
definitely higher than the threshold. It is a general problem for compile
time.

This patch fixes that by pass nullptr as the ORE argument if RemarkEnabled is
false.

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

llvm-svn: 354542

5 years agoAdd skipFunction to PostRA machine sinking pass.
Xin Tong [Thu, 21 Feb 2019 02:11:06 +0000 (02:11 +0000)]
Add skipFunction to PostRA machine sinking pass.

Summary: Add skipFunction to PostRA machine sinking pass.

Reviewers: junbuml

Subscribers: arsenm, llvm-commits

Tags: #llvm

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

llvm-svn: 354541

5 years agoRevert "[lldb-mi] Move TestMIPrompt away from pexpect()."
Davide Italiano [Thu, 21 Feb 2019 01:55:31 +0000 (01:55 +0000)]
Revert "[lldb-mi] Move TestMIPrompt away from pexpect()."

I see a test failing on the macOS bots. I can't reproduce
locally, so try to get the bots green before I can investigate.

llvm-svn: 354540

5 years ago[WebAssembly] Remove redundant code added in rL354538. NFC.
Sam Clegg [Thu, 21 Feb 2019 01:33:26 +0000 (01:33 +0000)]
[WebAssembly] Remove redundant code added in rL354538. NFC.

The code for encoding the symbols signature into its name
was not actually being used in the final version of this change.

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

llvm-svn: 354539

5 years ago[AArch64] Change size suffix for FP16FML intrinsics.
Ahmed Bougacha [Thu, 21 Feb 2019 01:13:27 +0000 (01:13 +0000)]
[AArch64] Change size suffix for FP16FML intrinsics.

These currently use _u32, but they should instead use _f16, the
types of the multiplication (matching the various integer vmlal
variants).

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

llvm-svn: 354538

5 years ago[NFC] Fix incorrect comment in std::function test
Louis Dionne [Thu, 21 Feb 2019 00:53:26 +0000 (00:53 +0000)]
[NFC] Fix incorrect comment in std::function test

llvm-svn: 354537

5 years ago[libFuzzer] fix the docs
Kostya Serebryany [Thu, 21 Feb 2019 00:43:46 +0000 (00:43 +0000)]
[libFuzzer] fix the docs

llvm-svn: 354536

5 years agoFix unused variable warning.
Richard Trieu [Thu, 21 Feb 2019 00:36:14 +0000 (00:36 +0000)]
Fix unused variable warning.

llvm-svn: 354535

5 years ago[clang-tidy] Make google-objc-function-naming ignore implicit functions 🙈
Stephane Moore [Thu, 21 Feb 2019 00:34:01 +0000 (00:34 +0000)]
[clang-tidy] Make google-objc-function-naming ignore implicit functions ðŸ™ˆ

Summary:
Implicit functions are outside the control of source authors and should
be exempt from style restrictions.

Tested via running clang tools tests.

This is an amended followup to https://reviews.llvm.org/D57207

Reviewers: aaron.ballman

Reviewed By: aaron.ballman

Subscribers: jdoerfert, xazax.hun, cfe-commits

Tags: #clang

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

llvm-svn: 354534

5 years ago[libFuzzer] document -fork=N
Kostya Serebryany [Thu, 21 Feb 2019 00:32:30 +0000 (00:32 +0000)]
[libFuzzer] document -fork=N

llvm-svn: 354533

5 years agoRevert "[AArch64][GlobalISel] Implement partial support for G_SHUFFLE_VECTOR"
Amara Emerson [Thu, 21 Feb 2019 00:31:13 +0000 (00:31 +0000)]
Revert "[AArch64][GlobalISel] Implement partial support for G_SHUFFLE_VECTOR"

This reverts r354521 because it broke the bots, but passes on Darwin somehow.

llvm-svn: 354532

5 years ago[attributes] Fix buildbot after r354530.
Artem Dergachev [Thu, 21 Feb 2019 00:19:24 +0000 (00:19 +0000)]
[attributes] Fix buildbot after r354530.

Update the test after adding more attribute subjects.

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

llvm-svn: 354531

5 years ago[attributes] Add an attribute for server routines in Mach kernel and extensions.
Artem Dergachev [Thu, 21 Feb 2019 00:01:02 +0000 (00:01 +0000)]
[attributes] Add an attribute for server routines in Mach kernel and extensions.

The new __attribute__ ((mig_server_routine)) is going to be used for annotating
Mach Interface Generator (MIG) callback functions as such, so that additional
static analysis could be applied to their implementations. It can also be
applied to regular functions behavior of which is supposed to be identical to
that of a MIG server routine.

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

llvm-svn: 354530

5 years ago[GlobalISel] Add -O0 to some tests to see if it fixes them. I can't reproduce the...
Amara Emerson [Wed, 20 Feb 2019 23:22:15 +0000 (23:22 +0000)]
[GlobalISel] Add -O0 to some tests to see if it fixes them. I can't reproduce the failures locally,
and greendragon also passes, but some other bots fail for reasons I don't understand.
The only difference I can see between these tests is it's missing an -O0
If this doesn't work I'll revert and continue investigating.

llvm-svn: 354529

5 years ago[WebAssembly] Don't generate invalid modules when function signatures mismatch
Sam Clegg [Wed, 20 Feb 2019 23:19:31 +0000 (23:19 +0000)]
[WebAssembly] Don't generate invalid modules when function signatures mismatch

Previously we could emit a warning and generate a potentially invalid
wasm module (due to call sites and functions having conflicting
signatures). Now, rather than create invalid binaries we handle such
cases by creating stub functions containing unreachable, effectively
turning these into runtime errors rather than validation failures.

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

llvm-svn: 354528

5 years ago[clang] Add CMake target for installing clang's CMake exports
Shoaib Meenai [Wed, 20 Feb 2019 23:16:15 +0000 (23:16 +0000)]
[clang] Add CMake target for installing clang's CMake exports

This mirrors LLVM's install-cmake-exports target.

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

llvm-svn: 354527

5 years agoMerge target triple into module triple when constructing module from memory
Alex Langford [Wed, 20 Feb 2019 23:12:56 +0000 (23:12 +0000)]
Merge target triple into module triple when constructing module from memory

Summary:
While debugging an android process remotely from a windows machine, I
noticed that the modules constructed from an object file in memory only had
information about the architecture. Without knowledge of the OS or environment,
expression evaluation sometimes leads to incorrectly generated code or a
debugger crash. While we cannot know for certain what triple a module
constructed from an in-memory object file will have, we can use the
triple from the target to try and fill in the missing details.

Reviewers: clayborg, zturner, JDevlieghere, compnerd, aprantl, labath

Subscribers: jdoerfert, lldb-commits

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

llvm-svn: 354526

5 years ago[clang] Switch to LLVM_ENABLE_IDE
Shoaib Meenai [Wed, 20 Feb 2019 23:08:43 +0000 (23:08 +0000)]
[clang] Switch to LLVM_ENABLE_IDE

r344555 switched LLVM to guarding install targets with LLVM_ENABLE_IDE
instead of CMAKE_CONFIGURATION_TYPES, which expresses the intent more
directly and can be overridden by a user. Make the corresponding change
in clang. LLVM_ENABLE_IDE is computed by HandleLLVMOptions, so it should
be available for both standalone and integrated builds.

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

llvm-svn: 354525

5 years ago[CMake][runtimes] Set clang-header dependency for builtins
Petr Hosek [Wed, 20 Feb 2019 23:06:10 +0000 (23:06 +0000)]
[CMake][runtimes] Set clang-header dependency for builtins

compiler-rt builtins depend on clang headers, but that dependency
wasn't explicitly stated in the build system and we were relying
on the transitive depenendecy via clang. However, when we're
cross-compiling clang, we'll be using host compiler instead and
that depenendecy is missing, breaking the build.

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

llvm-svn: 354524

5 years ago[WebAssembly] Don't error on conflicting uses of prototype-less functions
Sam Clegg [Wed, 20 Feb 2019 22:40:57 +0000 (22:40 +0000)]
[WebAssembly] Don't error on conflicting uses of prototype-less functions

When we can't determine with certainty the signature of a function
import we pick the fist signature we find rather than error'ing out.

The resulting program might not do what is expected since we might pick
the wrong signature.  However since undefined behavior in C to use the
same function with different signatures this seems better than refusing
to compile such programs.

Fixes PR40472

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

llvm-svn: 354523

5 years ago[LSan] Fix `__sanitizer_print_stack_trace` via fast unwinder
Julian Lettner [Wed, 20 Feb 2019 22:28:11 +0000 (22:28 +0000)]
[LSan] Fix `__sanitizer_print_stack_trace` via fast unwinder

Summary: Quick follow-up to: https://reviews.llvm.org/D58156

Reviewers: vitalybuka

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

llvm-svn: 354522

5 years ago[AArch64][GlobalISel] Implement partial support for G_SHUFFLE_VECTOR
Amara Emerson [Wed, 20 Feb 2019 22:11:39 +0000 (22:11 +0000)]
[AArch64][GlobalISel] Implement partial support for G_SHUFFLE_VECTOR

This change makes some basic type combinations for G_SHUFFLE_VECTOR legal, and
implements them with a very pessimistic TBL2 instruction in the selector.

For TBL2, support is also needed to generate constant pool entries and load from
them in order to materialize the mask register.

Currently supports <2 x s64> and <4 x s32> result types.

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

llvm-svn: 354521

5 years ago[X86] Add test cases to show missed opportunities to remove AND mask from BTC/BTS...
Craig Topper [Wed, 20 Feb 2019 21:35:05 +0000 (21:35 +0000)]
[X86] Add test cases to show missed opportunities to remove AND mask from BTC/BTS/BTR instructions when LHS of AND has known zeros.

We can currently remove the mask if the immediate has all ones in the LSBs, but if the LHS of the AND is known zero, then the immediate might have had bits removed.

A similar issue also occurs with shifts and rotates. I'm preparing a common fix for all of them.

llvm-svn: 354520

5 years ago[CGP] match a special-case of unsigned subtract overflow
Sanjay Patel [Wed, 20 Feb 2019 21:23:04 +0000 (21:23 +0000)]
[CGP] match a special-case of unsigned subtract overflow

This is the 'sub0' (negate) pattern from PR31754:
https://bugs.llvm.org/show_bug.cgi?id=31754

llvm-svn: 354519

5 years ago[DAGCombine] Generalize Dead Store to overlapping stores.
Nirav Dave [Wed, 20 Feb 2019 21:07:50 +0000 (21:07 +0000)]
[DAGCombine] Generalize Dead Store to overlapping stores.

Summary:
Remove stores that are immediately overwritten by larger
stores.

Reviewers: courbet, rnk

Reviewed By: rnk

Subscribers: javed.absar, hiraditya, llvm-commits

Tags: #llvm

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

llvm-svn: 354518

5 years ago[clang-tidy] refactor ExceptionAnalyzer further to give ternary answer
Jonas Toth [Wed, 20 Feb 2019 21:04:36 +0000 (21:04 +0000)]
[clang-tidy] refactor ExceptionAnalyzer further to give ternary answer

Summary:
The analsis on the throwing behvaiour on functions and statements gave only
a binary answer whether an exception could occur and if yes which types are
thrown.
This refactoring allows keeping track if there is a unknown factor, because the
code calls to some functions with unavailable source code with no `noexcept`
information.
This 'potential Unknown' information is propagated properly and can be queried
separately.

Reviewers: lebedev.ri, aaron.ballman, baloghadamsoftware, alexfh

Reviewed By: lebedev.ri, baloghadamsoftware

Subscribers: xazax.hun, rnkovacs, a.sidorin, Szelethus, donat.nagy, dkrupp, cfe-commits

Tags: #clang

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

llvm-svn: 354517

5 years agoAMDGPU/GlobalISel: Move SMRD selection logic to TableGen
Tom Stellard [Wed, 20 Feb 2019 21:02:37 +0000 (21:02 +0000)]
AMDGPU/GlobalISel: Move SMRD selection logic to TableGen

Reviewers: arsenm

Reviewed By: arsenm

Subscribers: volkan, kzhuravl, jvesely, wdng, nhaehnle, yaxunl, rovka, kristof.beyls, dstuttard, tpr, t-tye, llvm-commits

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

llvm-svn: 354516

5 years agoFix the build with gcc when `-Wredundant-decls` is passed
Dimitry Andric [Wed, 20 Feb 2019 21:01:31 +0000 (21:01 +0000)]
Fix the build with gcc when `-Wredundant-decls` is passed

Summary:
gcc warns that `__throw_runtime_error` is declared both in `<__locale>`
and `<stdexcept>`, if `-Wredundant-decls` is passed on the command
line; this is the case with FreeBSD when ${WARNS} == 6.

Since `<__locale>` gets its first declaration via a transitive include
of `<stdexcept>`, and the second declaration is after the first
invocation of `__throw_runtime_error`, delete that second declaration.

Signed-off-by: Enji Cooper <yaneurabeya@gmail.com>
Reviewers: kristina, MaskRay, EricWF, ldionne, ngie

Reviewed By: EricWF

Subscribers: krytarowski, brooks, emaste, dim, christof, jdoerfert, libcxx-commits

Tags: #libc

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

llvm-svn: 354515

5 years ago[SelectionDAG] Teach GetDemandedBits to look at the known zeros of the LHS when handl...
Craig Topper [Wed, 20 Feb 2019 20:52:26 +0000 (20:52 +0000)]
[SelectionDAG] Teach GetDemandedBits to look at the known zeros of the LHS when handling ISD::AND

If the LHS has known zeros, then the RHS immediate mask might have been simplified to remove those bits.

This patch adds a call to computeKnownBits to get the known zeroes to handle that possibility. I left an early out to skip the call if all of the demanded bits are set in the mask.

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

llvm-svn: 354514

5 years ago[SDAG] Support vector UMULO/SMULO
Nikita Popov [Wed, 20 Feb 2019 20:41:44 +0000 (20:41 +0000)]
[SDAG] Support vector UMULO/SMULO

Second part of https://bugs.llvm.org/show_bug.cgi?id=40442.

This adds an extra UnrollVectorOverflowOp() method to SDAG, because
the general UnrollOverflowOp() method can't deal with multiple results.

Additionally we need to expand UMULO/SMULO during vector op
legalization, as it may result in unrolling, which may need additional
type legalization.

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

llvm-svn: 354513

5 years agoMake predefined FLT16 macros conditional on support for the type
Nemanja Ivanovic [Wed, 20 Feb 2019 20:27:33 +0000 (20:27 +0000)]
Make predefined FLT16 macros conditional on support for the type

We unconditionally predefine these macros. However, they may be used to
determine if the type is supported. In that case, there are unnecessary
failures to compile the code.

This is the proposed fix for https://bugs.llvm.org/show_bug.cgi?id=40559

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

llvm-svn: 354512

5 years ago[X86] Add more load folding patterns for blend instructions as a follow up to r354363.
Craig Topper [Wed, 20 Feb 2019 20:18:20 +0000 (20:18 +0000)]
[X86] Add more load folding patterns for blend instructions as a follow up to r354363.

This avoids depending on the peephole pass to do load folding.

Also adds some load folding for some insert_subvector patterns that use blend.

All of this was found by temporarily adding TB_NO_FORWARD to the blend immediate entries in the load folding tables.

I've added -disable-peephole to some of the affected tests from that experiment to ensure we're testing isel patterns.

llvm-svn: 354511