platform/upstream/llvm.git
7 years ago[X86][AVX512] Add AVX512VL/AVX512BWVL vector truncation tests
Simon Pilgrim [Mon, 7 Nov 2016 13:34:29 +0000 (13:34 +0000)]
[X86][AVX512] Add AVX512VL/AVX512BWVL vector truncation tests

llvm-svn: 286105

7 years ago[X86][SSE] Drop unnecessary -mcpu argument from trunc tests
Simon Pilgrim [Mon, 7 Nov 2016 13:28:20 +0000 (13:28 +0000)]
[X86][SSE] Drop unnecessary -mcpu argument from trunc tests

cpu/triple duplication

llvm-svn: 286104

7 years ago[OPENMP] Fixed capturing of VLA variables.
Alexey Bataev [Mon, 7 Nov 2016 11:16:04 +0000 (11:16 +0000)]
[OPENMP] Fixed capturing of VLA variables.

After some changes in codegen capturing of VLA variables in OpenMP regions was broken, causing compiler crash. Patch fixes this issue.

llvm-svn: 286103

7 years agoRevert "[OPENMP] Fixed capturing of VLA variables."
Diana Picus [Mon, 7 Nov 2016 10:01:43 +0000 (10:01 +0000)]
Revert "[OPENMP] Fixed capturing of VLA variables."

This reverts commit r286098 because the modified test breaks on many of the
buildbots.

llvm-svn: 286102

7 years agoMake space for FreeBSD core file tests
Pavel Labath [Mon, 7 Nov 2016 09:58:58 +0000 (09:58 +0000)]
Make space for FreeBSD core file tests

This renames the functionalities/postmortem/linux-core to elf-core and puts the
"linux" part into the individual names of the core files. Since the tests for
linux and freebsd core files are going to be very similar, having them close
together means they can reuse most of the plumbing.

llvm-svn: 286101

7 years ago[ELF] Make InputSection<ELFT>::writeTo virtual
Eugene Leviant [Mon, 7 Nov 2016 09:04:06 +0000 (09:04 +0000)]
[ELF] Make InputSection<ELFT>::writeTo virtual

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

llvm-svn: 286100

7 years agoProtect std::experimental::optional tests under libcpp-no-exceptions
Roger Ferrer Ibanez [Mon, 7 Nov 2016 08:23:59 +0000 (08:23 +0000)]
Protect std::experimental::optional tests under libcpp-no-exceptions

In these tests there are some paths that explicitly throw, so use
the TEST_THROW macro that was proposed for this and then skip the tests
that may enter the throwing path.

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

llvm-svn: 286099

7 years ago[OPENMP] Fixed capturing of VLA variables.
Alexey Bataev [Mon, 7 Nov 2016 08:07:25 +0000 (08:07 +0000)]
[OPENMP] Fixed capturing of VLA variables.

After some changes in codegen capturing of VLA variables in OpenMP
regions was broken, causing compiler crash. Patch fixes this issue.

llvm-svn: 286098

7 years ago[AVX-512][Sema] Add more intrinsics to the checks for valid immediates for embedded...
Craig Topper [Mon, 7 Nov 2016 07:01:09 +0000 (07:01 +0000)]
[AVX-512][Sema] Add more intrinsics to the checks for valid immediates for embedded rounding control arguments.

llvm-svn: 286097

7 years agoDeduplicate replacements by FileEntry instead of file names.
Eric Liu [Mon, 7 Nov 2016 06:08:23 +0000 (06:08 +0000)]
Deduplicate replacements by FileEntry instead of file names.

Summary:
The current version does not deduplicate equivalent file paths correctly.
For example, a relative path and an absolute path are considered inequivalent.
Comparing FileEnry addresses these issues.

Reviewers: djasper

Subscribers: alexshap, klimek, cfe-commits

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

llvm-svn: 286096

7 years ago[AVR] Enable the ISel, frame analyzer, and alloca passes
Dylan McKay [Mon, 7 Nov 2016 06:02:55 +0000 (06:02 +0000)]
[AVR] Enable the ISel, frame analyzer, and alloca passes

llvm-svn: 286095

7 years agoUpdate CommandLine.rst getRegisteredOptions example
Brian Gesiak [Mon, 7 Nov 2016 02:43:01 +0000 (02:43 +0000)]
Update CommandLine.rst getRegisteredOptions example

Summary: Update the docs to match the changes in http://reviews.llvm.org/D7132

Reviewers: beanz, llvm-commits, modocache

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

llvm-svn: 286094

7 years ago[lldb] Fix -Waggressive-loop-optimizations warning
Vedant Kumar [Mon, 7 Nov 2016 02:39:37 +0000 (02:39 +0000)]
[lldb] Fix -Waggressive-loop-optimizations warning

We shouldn't access past the end of an array, even if we think that the
layout of the struct containing the array is always what we expect. The
compiler is free to optimize away the stores as undefined behavior, and
in fact, GCC 6.2.1 claims it will do exactly this.

llvm-svn: 286093

7 years ago[AVX-512] Remove masked pmovzx/pmovsx builtins and autoupgrade them to selects and...
Craig Topper [Mon, 7 Nov 2016 02:12:57 +0000 (02:12 +0000)]
[AVX-512] Remove masked pmovzx/pmovsx builtins and autoupgrade them to selects and native zext/sext.

This mostly reuses earlier autoupgrade support for the sse and avx equivalents. Just needed to add the code to add the select.

llvm-svn: 286092

7 years ago[X86] Remove GCCBuiltins from cvtsi2ss/cvtsi2sd/cvtss2sd intrinsics as they aren...
Craig Topper [Mon, 7 Nov 2016 00:13:46 +0000 (00:13 +0000)]
[X86] Remove GCCBuiltins from cvtsi2ss/cvtsi2sd/cvtss2sd intrinsics as they aren't used by clang. Add TODOs to remove these and some other unused intrinsics.

llvm-svn: 286091

7 years ago[X86] Use StringRef::startswith to reduce a few compares in the intrinsic autoupgrade...
Craig Topper [Mon, 7 Nov 2016 00:13:42 +0000 (00:13 +0000)]
[X86] Use StringRef::startswith to reduce a few compares in the intrinsic autoupgrade code.

llvm-svn: 286090

7 years ago[AVX-512] Remove 128/256 masked pshufb intrinsics. Autoupgrade them to legacy intrins...
Craig Topper [Mon, 7 Nov 2016 00:13:39 +0000 (00:13 +0000)]
[AVX-512] Remove 128/256 masked pshufb intrinsics. Autoupgrade them to legacy intrinsics and a select.

llvm-svn: 286089

7 years agoConvert some helper functions to use StringRef.
Zachary Turner [Mon, 7 Nov 2016 00:07:25 +0000 (00:07 +0000)]
Convert some helper functions to use StringRef.

I will probably submit a lot of small trivial changes
like this over the coming weeks.  The end goal is to
convert Options::SetOptionValue to take the option arg
as a StringRef, but doing so in one pass would be a huge
mess of disparate changes just to satisfy the compiler,
and with a high risk of breaking.  So I'm going to do
this in small pieces, changing seemingly random things
here and there until the final change to the signature
of Options::SetOptionValue() can be done trivially.

llvm-svn: 286088

7 years agoAlso delete the go side of the bindings deleted in r286085/r286086.
Daniel Jasper [Sun, 6 Nov 2016 23:21:22 +0000 (23:21 +0000)]
Also delete the go side of the bindings deleted in r286085/r286086.

Also delete a comment I forgot to delete.

llvm-svn: 286087

7 years agoDelete one more function that needs to go after r286062.
Daniel Jasper [Sun, 6 Nov 2016 21:20:45 +0000 (21:20 +0000)]
Delete one more function that needs to go after r286062.

llvm-svn: 286086

7 years agoRemove functions from go bindings that have been deleted in r286062.
Daniel Jasper [Sun, 6 Nov 2016 21:02:14 +0000 (21:02 +0000)]
Remove functions from go bindings that have been deleted in r286062.

llvm-svn: 286085

7 years agoReapply r286080 with a phony change in Hexagon's CMakeLists.txt
Krzysztof Parzyszek [Sun, 6 Nov 2016 20:55:57 +0000 (20:55 +0000)]
Reapply r286080 with a phony change in Hexagon's CMakeLists.txt

Cmake has not recognized that Hexagon.td has a new dependency in
HexagonPatterns.td. All changes to that file were not visible to
the build bots.

llvm-svn: 286084

7 years ago[RandomNumberGenerator] Remove MSVC 2013 compatibility hack.
Davide Italiano [Sun, 6 Nov 2016 20:55:40 +0000 (20:55 +0000)]
[RandomNumberGenerator] Remove MSVC 2013 compatibility hack.

llvm-svn: 286083

7 years agoARM: lower fpowi appropriately for Windows ARM
Saleem Abdulrasool [Sun, 6 Nov 2016 19:46:54 +0000 (19:46 +0000)]
ARM: lower fpowi appropriately for Windows ARM

This handles the last case of the builtin function calls that we would
generate code which differed from Microsoft's ABI.  Rather than
generating a call to `__pow{d,s}i2` we now promote the parameter to a
float or double and invoke `powf` or `pow` instead.

Addresses PR30825!

llvm-svn: 286082

7 years agoRevert r286080: it breaks build bots
Krzysztof Parzyszek [Sun, 6 Nov 2016 19:36:09 +0000 (19:36 +0000)]
Revert r286080: it breaks build bots

llvm-svn: 286081

7 years ago[Hexagon] Remove redundant custom selection code
Krzysztof Parzyszek [Sun, 6 Nov 2016 19:03:38 +0000 (19:03 +0000)]
[Hexagon] Remove redundant custom selection code

The clr/set/toggle-bit instructions (with the bit index given as an
immediate operand) had both, custom selection code that generated them,
and selection patterns at the same time. The selection patterns were
not used, because the custom selection code was executed first.
This patch removes the custom code in favor of the selection patterns.
The custom code handled 64-bit registers as well with an immediate bit
index, and so new patterns were added to implement that.

It was also the same case for the instruction "Rd += asr(Rs, Rt)",
except that the custom code did not offer any additional functionality,
and was simply removed.

llvm-svn: 286080

7 years ago[Hexagon] Round 5 of selection pattern simplifications
Krzysztof Parzyszek [Sun, 6 Nov 2016 18:13:14 +0000 (18:13 +0000)]
[Hexagon] Round 5 of selection pattern simplifications

Remove unnecessary type casts in patterns.

llvm-svn: 286079

7 years ago[Hexagon] Round 4 of selection pattern simplifications
Krzysztof Parzyszek [Sun, 6 Nov 2016 18:09:56 +0000 (18:09 +0000)]
[Hexagon] Round 4 of selection pattern simplifications

Give simpler or more meaningful names to pat frags and xforms.

llvm-svn: 286078

7 years ago[Hexagon] Round 3 of selection pattern simplifications
Krzysztof Parzyszek [Sun, 6 Nov 2016 18:05:14 +0000 (18:05 +0000)]
[Hexagon] Round 3 of selection pattern simplifications

Remove unnecessary C++ functions for SDNode transforms. Move more
pat frags to files where they are used.

llvm-svn: 286077

7 years ago[Hexagon] Round 2 of selection pattern simplifications
Krzysztof Parzyszek [Sun, 6 Nov 2016 17:56:48 +0000 (17:56 +0000)]
[Hexagon] Round 2 of selection pattern simplifications

Add pat frags for any-, sign-, and zero-extensions.

llvm-svn: 286076

7 years ago[SelectionDAG] Add support for vector demandedelts in XOR opcodes
Simon Pilgrim [Sun, 6 Nov 2016 16:49:19 +0000 (16:49 +0000)]
[SelectionDAG] Add support for vector demandedelts in XOR opcodes

llvm-svn: 286075

7 years ago[X86] Add knownbits vector xor test
Simon Pilgrim [Sun, 6 Nov 2016 16:36:29 +0000 (16:36 +0000)]
[X86] Add knownbits vector xor test

In preparation for demandedelts support

llvm-svn: 286074

7 years ago[AVX-512] Remove intrinsics for 128/256-bit masked variable shift. Instead upgrade...
Craig Topper [Sun, 6 Nov 2016 16:29:19 +0000 (16:29 +0000)]
[AVX-512] Remove intrinsics for 128/256-bit masked variable shift. Instead upgrade them to a select and the older AVX2 intrinsic.

llvm-svn: 286073

7 years ago[AVX-512] Remove intrinsics for 128/256-bit masked shift by immediate. Instead upgrad...
Craig Topper [Sun, 6 Nov 2016 16:29:14 +0000 (16:29 +0000)]
[AVX-512] Remove intrinsics for 128/256-bit masked shift by immediate. Instead upgrade them to a select and the older SSE/AVX2 intrinsic.

llvm-svn: 286072

7 years ago[SelectionDAG] Add support for vector demandedelts in OR opcodes
Simon Pilgrim [Sun, 6 Nov 2016 16:29:09 +0000 (16:29 +0000)]
[SelectionDAG] Add support for vector demandedelts in OR opcodes

llvm-svn: 286071

7 years ago[AVX-512] Remove intrinsics for 128/256-bit masked shift by single element in xmm...
Craig Topper [Sun, 6 Nov 2016 16:29:08 +0000 (16:29 +0000)]
[AVX-512] Remove intrinsics for 128/256-bit masked shift by single element in xmm. Instead upgrade them to a select and the older SSE/AVX2 intrinsic.

llvm-svn: 286070

7 years ago[AVX-512] Remove a 512-bit test cases from the avx512vl test file. It already exists...
Craig Topper [Sun, 6 Nov 2016 16:29:03 +0000 (16:29 +0000)]
[AVX-512] Remove a 512-bit test cases from the avx512vl test file. It already exists in the avx512f test file.

llvm-svn: 286069

7 years ago[X86] Add knownbits vector or test
Simon Pilgrim [Sun, 6 Nov 2016 16:05:59 +0000 (16:05 +0000)]
[X86] Add knownbits vector or test

In preparation for demandedelts support

llvm-svn: 286068

7 years ago[X86][SSE] Reuse zeroable element mask in lowerVectorShuffleAsElementInsertion. NFCI
Simon Pilgrim [Sun, 6 Nov 2016 14:20:29 +0000 (14:20 +0000)]
[X86][SSE] Reuse zeroable element mask in lowerVectorShuffleAsElementInsertion. NFCI

Don't regenerate a zeroable element mask with computeZeroableShuffleElements when its already available.

llvm-svn: 286067

7 years ago[BitcodeWriter] Replace a manual byteswap with read32be.
Benjamin Kramer [Sun, 6 Nov 2016 13:26:39 +0000 (13:26 +0000)]
[BitcodeWriter] Replace a manual byteswap with read32be.

No functional change intended.

llvm-svn: 286066

7 years ago[ELF] - Change argument of computeHash to MutableArrayRef. NFC.
George Rimar [Sun, 6 Nov 2016 08:39:46 +0000 (08:39 +0000)]
[ELF] - Change argument of computeHash to MutableArrayRef. NFC.

This fixes casting warning and removes the need of that cast at all.

llvm-svn: 286065

7 years ago[ELF] - Fix linux BB after r286061.
George Rimar [Sun, 6 Nov 2016 08:26:53 +0000 (08:26 +0000)]
[ELF] - Fix linux BB after r286061.

llvm-svn: 286064

7 years ago[X86] Add a few more fptoui test cases to the vec_fp_to_int.ll. The codegen for these...
Craig Topper [Sun, 6 Nov 2016 07:50:25 +0000 (07:50 +0000)]
[X86] Add a few more fptoui test cases to the vec_fp_to_int.ll. The codegen for these test cases will be improved for AVX512 in a future commit.

llvm-svn: 286063

7 years agoKill deprecated attribute API
Amaury Sechet [Sun, 6 Nov 2016 07:48:46 +0000 (07:48 +0000)]
Kill deprecated attribute API

Summary:
This kill various depreacated API related to attribute :
 - The deprecated C API attribute based on LLVMAttribute enum.
 - The Raw attribute set format (planned to be removed in 4.0).

Reviewers: bkramer, echristo, mehdi_amini, void

Subscribers: mehdi_amini, llvm-commits

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

llvm-svn: 286062

7 years ago[ELF] - Implemented threaded --build-id computation
George Rimar [Sun, 6 Nov 2016 07:42:55 +0000 (07:42 +0000)]
[ELF] - Implemented threaded --build-id computation

Patch switches computing of --build-id hash to tree.

This is the way when input data is splitted by chunks,
hash is computed for each one in threaded/non-threaded way.
At the end hash is conputed for result tree.

With or without -threads the result hash is the same.

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

llvm-svn: 286061

7 years ago[APFloat] Make functions that produce APFloaat objects use correct semantics.
Tim Shen [Sun, 6 Nov 2016 07:38:37 +0000 (07:38 +0000)]
[APFloat] Make functions that produce APFloaat objects use correct semantics.

Summary:
Fixes PR30869.

In D25977 I meant to change all functions that care about lifetime. I
changed constructors, factory functions, but I missed member/free
functions that return new instances. This patch changes them.

Reviewers: hfinkel, kbarton, echristo, joerg

Subscribers: llvm-commits, mehdi_amini

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

llvm-svn: 286060

7 years ago[AVX-512] Add missing EVEX version of pattern for (v2f64 (extloadv2f32 addr:)) -...
Craig Topper [Sun, 6 Nov 2016 04:12:52 +0000 (04:12 +0000)]
[AVX-512] Add missing EVEX version of pattern for (v2f64 (extloadv2f32 addr:)) -> VCVTPS2PDZ128rm

llvm-svn: 286059

7 years ago[AVX-512] Add avx512vl command line to the fpext test and add -show-mc-encoding to...
Craig Topper [Sun, 6 Nov 2016 04:12:49 +0000 (04:12 +0000)]
[AVX-512] Add avx512vl command line to the fpext test and add -show-mc-encoding to show where we aren't using EVEX instructions.

llvm-svn: 286058

7 years ago[AVX-512] Lower AVX cvtpd2ps intrinsic to ISD::FP_ROUND so it can use EVEX instructio...
Craig Topper [Sun, 6 Nov 2016 04:12:46 +0000 (04:12 +0000)]
[AVX-512] Lower AVX cvtpd2ps intrinsic to ISD::FP_ROUND so it can use EVEX instruction when available.

llvm-svn: 286057

7 years ago[AVX-512] Lower SSE/AVX cvtdq2ps intrinsics directly to ISD::SINT_TO_FP so they can...
Craig Topper [Sun, 6 Nov 2016 04:12:42 +0000 (04:12 +0000)]
[AVX-512] Lower SSE/AVX cvtdq2ps intrinsics directly to ISD::SINT_TO_FP so they can use EVEX instructions when available.

llvm-svn: 286056

7 years ago[AVX-512] Add -show-mc-encoding to legacy vector intrinsic tests so we can see when...
Craig Topper [Sun, 6 Nov 2016 02:03:58 +0000 (02:03 +0000)]
[AVX-512] Add -show-mc-encoding to legacy vector intrinsic tests so we can see when VEX or EVEX encoded instructions are being emitted. Make sure the tests all have an avx2 command line and an skx command line.

llvm-svn: 286055

7 years agoFix build breakage.
Rui Ueyama [Sat, 5 Nov 2016 23:14:54 +0000 (23:14 +0000)]
Fix build breakage.

llvm-svn: 286054

7 years agoRewrite CommonInputSection as a synthetic input section.
Rui Ueyama [Sat, 5 Nov 2016 23:05:47 +0000 (23:05 +0000)]
Rewrite CommonInputSection as a synthetic input section.

A CommonInputSection is a section containing all common symbols.
That was an input section but was abstracted in a different way
than the synthetic input sections because it was written before
the synthetic input section was invented.

This patch rewrites CommonInputSection as a synthetic input section
so that it behaves better with other sections.

llvm-svn: 286053

7 years ago[ELF][MIPS] N32 ABI support
Simon Atanasyan [Sat, 5 Nov 2016 22:58:01 +0000 (22:58 +0000)]
[ELF][MIPS] N32 ABI support

In short the patch introduces support for linking object file conform
MIPS N32 ABI [1]. This ABI is similar to N64 ABI but uses 32-bit
pointer size.

The most non-trivial requirement of this ABI is one more relocation
packing format. N64 ABI puts multiple relocation type into the single
relocation record. The N32 ABI uses series of successive relocations
with the same offset for this purpose. In this patch, new function
`mergeMipsN32RelTypes` handle this case and "convert" N32 relocation to
the N64 relocation so the rest of the code keep unchanged.

For now, linker does not support series of relocations applied to sections
without SHF_ALLOC bit. Probably later I will add the support or insert
some sort of assert into the `relocateNonAlloc` routine to catch this
case.

[1] ftp://www.linux-mips.org/pub/linux/mips/doc/ABI/MIPS-N32-ABI-Handbook.pdf

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

llvm-svn: 286052

7 years agoCreate a vector containing all input sections.
Rui Ueyama [Sat, 5 Nov 2016 22:37:59 +0000 (22:37 +0000)]
Create a vector containing all input sections.

Previously, we do this piece of code to iterate over all input sections.

  for (elf::ObjectFile<ELFT> *F : Symtab.getObjectFiles())
    for (InputSectionBase<ELFT> *S : F->getSections())

It turned out that this mechanisms doesn't work well with synthetic
input sections because synthetic input sections don't belong to any
input file.

This patch defines a vector that contains all input sections including
synthetic ones.

llvm-svn: 286051

7 years agoIslNodeBuilder: Ensure newly generated memory accesses are well-defined
Tobias Grosser [Sat, 5 Nov 2016 21:46:01 +0000 (21:46 +0000)]
IslNodeBuilder: Ensure newly generated memory accesses are well-defined

Add some additional asserts that ensure newly code-generated memory accesses
are defined on all domain and schedule domain instances.

llvm-svn: 286050

7 years ago[Hexagon] Relocate pattern-related bits to proper places
Krzysztof Parzyszek [Sat, 5 Nov 2016 21:44:50 +0000 (21:44 +0000)]
[Hexagon] Relocate pattern-related bits to proper places

llvm-svn: 286049

7 years ago[Hexagon] Round 1 of selection pattern simplifications
Krzysztof Parzyszek [Sat, 5 Nov 2016 21:02:54 +0000 (21:02 +0000)]
[Hexagon] Round 1 of selection pattern simplifications

Consistently use register class pat frags instead of spelling out
the type and class each time.

llvm-svn: 286048

7 years agoScopInfo: Ensure copy statement memory accesses are correct
Tobias Grosser [Sat, 5 Nov 2016 21:02:43 +0000 (21:02 +0000)]
ScopInfo: Ensure copy statement memory accesses are correct

Add asserts that verify that the memory accesses of a new copy statement
are defined for all domain instances the copy statement is defined for.

llvm-svn: 286047

7 years agotest commit
Boris Ulasevich [Sat, 5 Nov 2016 20:25:18 +0000 (20:25 +0000)]
test commit

llvm-svn: 286046

7 years ago[X86][SSE] Reuse zeroable element mask in lowerVectorShuffleAsBlend. NFCI
Simon Pilgrim [Sat, 5 Nov 2016 18:31:57 +0000 (18:31 +0000)]
[X86][SSE] Reuse zeroable element mask in lowerVectorShuffleAsBlend. NFCI

Don't regenerate a zeroable element mask with computeZeroableShuffleElements when its already available.

llvm-svn: 286045

7 years ago[X86][SSE] Reuse zeroable element mask in lowerVectorShuffleAsZeroOrAnyExtend. NFCI
Simon Pilgrim [Sat, 5 Nov 2016 18:22:13 +0000 (18:22 +0000)]
[X86][SSE] Reuse zeroable element mask in lowerVectorShuffleAsZeroOrAnyExtend. NFCI

Don't regenerate a zeroable element mask with computeZeroableShuffleElements when its already available.

llvm-svn: 286044

7 years ago[X86][SSE] Reuse zeroable element mask in SSE4A EXTRQ/INSERTQ vector shuffle lowering...
Simon Pilgrim [Sat, 5 Nov 2016 18:05:13 +0000 (18:05 +0000)]
[X86][SSE] Reuse zeroable element mask in SSE4A EXTRQ/INSERTQ vector shuffle lowering. NFCI

Don't regenerate a zeroable element mask with computeZeroableShuffleElements when its already available.

llvm-svn: 286043

7 years ago[X86][SSE] Reuse zeroable element mask in PSHUFB vector shuffle lowering. NFCI
Simon Pilgrim [Sat, 5 Nov 2016 17:53:27 +0000 (17:53 +0000)]
[X86][SSE] Reuse zeroable element mask in PSHUFB vector shuffle lowering. NFCI

Don't regenerate a zeroable element mask with computeZeroableShuffleElements when its already available.

llvm-svn: 286042

7 years agoclang-format: Better support for CUDA's triple brackets.
Daniel Jasper [Sat, 5 Nov 2016 17:43:16 +0000 (17:43 +0000)]
clang-format: Better support for CUDA's triple brackets.

Before:
  aaaaaaaaaaaaaaa<
      aaaaaaaaaaaaaaaaaaa,
      aaaaaaaaaaaaaa><<<aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa>>>();

After:
  aaaaaaaaaaaaaaa<aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa>
      <<<aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa>>>();

llvm-svn: 286041

7 years ago[X86][SSE] Reuse zeroable element mask in lowerVectorShuffleAsInsertPS. NFCI
Simon Pilgrim [Sat, 5 Nov 2016 17:27:48 +0000 (17:27 +0000)]
[X86][SSE] Reuse zeroable element mask in lowerVectorShuffleAsInsertPS. NFCI

Don't regenerate a zeroable element mask with computeZeroableShuffleElements when its already available.

llvm-svn: 286040

7 years ago[X86][SSE] Reuse zeroable element mask in lowerVectorShuffleAsBitMask. NFCI
Simon Pilgrim [Sat, 5 Nov 2016 17:12:19 +0000 (17:12 +0000)]
[X86][SSE] Reuse zeroable element mask in lowerVectorShuffleAsBitMask. NFCI

Don't regenerate a zeroable element mask with computeZeroableShuffleElements when its already available.

llvm-svn: 286039

7 years ago[LoopStrengthReduce] Don't use a DenseSet<int64_t> when we might add any valid int64_...
Justin Lebar [Sat, 5 Nov 2016 16:47:25 +0000 (16:47 +0000)]
[LoopStrengthReduce] Don't use a DenseSet<int64_t> when we might add any valid int64_t to the set.

Summary:
SmallSetVector uses DenseSet, but that means we need to reserve some
values for the empty and tombstone keys.

It seems to me we should have a general way to let us store full-range
ints inside of DenseSets, and furthermore that we probably shouldn't
silently let you add ints into DenseSets without explicitly promising
that they're in range.  But that's a battle for another day; for now,
just fix this code, since we currently do something Very Bad when
compiling ffmpeg.

Fixes PR30914.

Reviewers: jeremyhu

Subscribers: llvm-commits, mzolotukhin

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

llvm-svn: 286038

7 years ago[X86][SSE] Reuse zeroable element mask instead of regenerating it. NFCI
Simon Pilgrim [Sat, 5 Nov 2016 16:40:20 +0000 (16:40 +0000)]
[X86][SSE] Reuse zeroable element mask instead of regenerating it. NFCI

We are repeatedly calling computeZeroableShuffleElements in many shuffle lowering calls for the same shuffle mask/inputs.

This is a first step towards reusing the zeroable result, initially just for lowerVectorShuffleAsShift calls.

llvm-svn: 286037

7 years ago[Hexagon] Split all selection patterns into a separate file
Krzysztof Parzyszek [Sat, 5 Nov 2016 15:01:38 +0000 (15:01 +0000)]
[Hexagon] Split all selection patterns into a separate file

This is just the basic separation, without any cleanup. Further changes
will follow.

llvm-svn: 286036

7 years agomake-core.sh: add FreeBSD support
Ed Maste [Sat, 5 Nov 2016 14:45:13 +0000 (14:45 +0000)]
make-core.sh: add FreeBSD support

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

llvm-svn: 286035

7 years agoStrip trailing whitespace. NFCI.
Simon Pilgrim [Sat, 5 Nov 2016 14:43:04 +0000 (14:43 +0000)]
Strip trailing whitespace. NFCI.

llvm-svn: 286034

7 years ago[AVX-512] Use an equality compare instead of StringRef::startswith in a few places...
Craig Topper [Sat, 5 Nov 2016 05:35:23 +0000 (05:35 +0000)]
[AVX-512] Use an equality compare instead of StringRef::startswith in a few places in auto upgrade that were looking for the complete intrinsic name anyway.

llvm-svn: 286033

7 years agoCorrect mprotect page boundries to round up end page. Fixes PR30905.
Alina Sbirlea [Sat, 5 Nov 2016 04:22:15 +0000 (04:22 +0000)]
Correct mprotect page boundries to round up end page. Fixes PR30905.

Summary:
Update the boundries for mprotect.
Patch by Andrew Adams. Fixes PR30905.

Reviewers: loladiro, andrew.w.kaylor, chandlerc

Subscribers: abadams, llvm-commits

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

llvm-svn: 286032

7 years ago[X86] Remove broken support for autoupgrading llvm.x86.fma4.* intrinsics to llvm...
Craig Topper [Sat, 5 Nov 2016 04:00:31 +0000 (04:00 +0000)]
[X86] Remove broken support for autoupgrading llvm.x86.fma4.* intrinsics to llvm.x86.fma.*.

It currently fires an assert if you even try. Looking back, I don't think it ever worked because it only changed the name of the function object, but not the intrinsic ID stored in it. Given that, I think it can be removed since no one has noticed or complained in the past 4 years.

llvm-svn: 286031

7 years agoFix some Clang-tidy modernize-use-default and Include What You Use warnings; other...
Eugene Zelenko [Sat, 5 Nov 2016 01:00:56 +0000 (01:00 +0000)]
Fix some Clang-tidy modernize-use-default and Include What You Use warnings; other minor fixes.

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

llvm-svn: 286030

7 years agoUpgrade in-tree google benchmark to v1.1
Eric Fiselier [Sat, 5 Nov 2016 00:30:27 +0000 (00:30 +0000)]
Upgrade in-tree google benchmark to v1.1

llvm-svn: 286029

7 years agoFix buildbot.
Rui Ueyama [Fri, 4 Nov 2016 23:26:29 +0000 (23:26 +0000)]
Fix buildbot.

llvm-svn: 286028

7 years agoAppend a (uint32_t)pad into arm_thread_state64_t. Implicit pad isn't appended on...
NAKAMURA Takumi [Fri, 4 Nov 2016 23:22:19 +0000 (23:22 +0000)]
Append a (uint32_t)pad into arm_thread_state64_t. Implicit pad isn't appended on i686.

llvm-svn: 286027

7 years ago[ExecutionEngine] Document the insane ownership contract for
Lang Hames [Fri, 4 Nov 2016 22:29:34 +0000 (22:29 +0000)]
[ExecutionEngine] Document the insane ownership contract for
ExecutionEngine::removeModule.

llvm-svn: 286026

7 years agoDon't gc .interp section.
Rui Ueyama [Fri, 4 Nov 2016 22:25:39 +0000 (22:25 +0000)]
Don't gc .interp section.

This change fixes a bug that was introduced by r285851.
r285851 converted .interp section as an output section to an input
section. But I forgot to make it a "Live" section, so if -gc-section
is given, it was garbage collected.

llvm-svn: 286025

7 years agocmake: When using LLVM_DISTRIBUTION_COMPONENTS, adjust LLVMExports accordingly
Justin Bogner [Fri, 4 Nov 2016 21:55:23 +0000 (21:55 +0000)]
cmake: When using LLVM_DISTRIBUTION_COMPONENTS, adjust LLVMExports accordingly

This Makes sure we only export targets that we're distributing, since
cmake will fail to import the file otherwise due to missing targets.

llvm-svn: 286024

7 years ago[ClangTidy - performance-unnecessary-value-param] Only add "const" when current param...
Felix Berger [Fri, 4 Nov 2016 20:51:31 +0000 (20:51 +0000)]
[ClangTidy - performance-unnecessary-value-param] Only add "const" when current parameter is not already const qualified

Reviewers: alexfh, sbenza, aaron.ballman

Subscribers: cfe-commits

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

llvm-svn: 286010

7 years ago[Hexagon] Account for <def,read-undef> when validating moves for predication
Krzysztof Parzyszek [Fri, 4 Nov 2016 20:41:03 +0000 (20:41 +0000)]
[Hexagon] Account for <def,read-undef> when validating moves for predication

llvm-svn: 286009

7 years ago[clang-tidy] Ignore incomplete types when determining whether they are expensive...
Felix Berger [Fri, 4 Nov 2016 20:29:22 +0000 (20:29 +0000)]
[clang-tidy] Ignore incomplete types when determining whether they are expensive to copy

Summary: IsExpensiveToCopy can return false positives for incomplete types, so ignore them.

All existing ClangTidy tests that depend on this function still pass as the types are complete.

Reviewers: alexfh, aaron.ballman

Subscribers: cfe-commits

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

llvm-svn: 286008

7 years ago[libcxx] [test] Replace _LIBCPP_STD_VER with TEST_STD_VER.
Stephan T. Lavavej [Fri, 4 Nov 2016 20:26:59 +0000 (20:26 +0000)]
[libcxx] [test] Replace _LIBCPP_STD_VER with TEST_STD_VER.

This replaces every occurrence of _LIBCPP_STD_VER in the tests with
TEST_STD_VER. Additionally, for every affected
file, #include "test_macros.h" is being added explicitly if it wasn't
already there.

https://reviews.llvm.org/D26294

llvm-svn: 286007

7 years agoFix 24560: assembler does not share constant pool for same constants
Weiming Zhao [Fri, 4 Nov 2016 19:17:32 +0000 (19:17 +0000)]
Fix 24560:  assembler does not share constant pool for same constants

Summary: This patch returns the same label if the CP entry with the same value has been created.

Reviewers: eli.friedman, rengolin, jmolloy

Subscribers: majnemer, jmolloy, llvm-commits

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

llvm-svn: 286006

7 years agollvm/test/Transforms/DCE/calls-errno.ll: Suppress checking @pow(+0,-1).
NAKAMURA Takumi [Fri, 4 Nov 2016 18:50:45 +0000 (18:50 +0000)]
llvm/test/Transforms/DCE/calls-errno.ll: Suppress checking @pow(+0,-1).

It depends on host's pow(3), and mingw's pow doesn't raise any errors, just returns +INF.

llvm-svn: 286005

7 years agoRevert r285968: Always use parallel_for_each because it falls back to std::for_each.
Rui Ueyama [Fri, 4 Nov 2016 18:22:36 +0000 (18:22 +0000)]
Revert r285968: Always use parallel_for_each because it falls back to std::for_each.

It turned ou that we actually want to call std::for_each even if
threading is supported. Unless --thread is given, LLD shouldn't use
more than one threads.

llvm-svn: 286004

7 years agoPreliminary plumbing work to make 'parray' able to take offset and stride options
Enrico Granata [Fri, 4 Nov 2016 18:15:39 +0000 (18:15 +0000)]
Preliminary plumbing work to make 'parray' able to take offset and stride options

llvm-svn: 286003

7 years ago[docs] Add initial Global ISel documentation.
Ahmed Bougacha [Fri, 4 Nov 2016 17:57:34 +0000 (17:57 +0000)]
[docs] Add initial Global ISel documentation.

This reflects the current state of Global ISel.  As progress is
made, we'll document our design decisions in it.
Comments very welcome!

llvm-svn: 286002

7 years agoFix -Wcast-qual warnings.
Rui Ueyama [Fri, 4 Nov 2016 17:41:29 +0000 (17:41 +0000)]
Fix -Wcast-qual warnings.

llvm-svn: 286001

7 years agoFix some Clang-tidy modernize-use-default and Include What You Use warnings; other...
Eugene Zelenko [Fri, 4 Nov 2016 17:39:46 +0000 (17:39 +0000)]
Fix some Clang-tidy modernize-use-default and Include What You Use warnings; other minor fixes.

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

llvm-svn: 286000

7 years ago[clang-tidy] Fixed readability-else-after-return for cascade statements
Malcolm Parsons [Fri, 4 Nov 2016 16:32:14 +0000 (16:32 +0000)]
[clang-tidy] Fixed readability-else-after-return for cascade statements

Summary:
Fix generated by this check changed program semantics
in the case where 'if' was a part (direct child) of other statement.

Fixes PR30652.

Patch by PaweÅ‚ Å»ukowski.

Reviewers: malcolm.parsons, alexfh, djasper

Subscribers: mgehre, omtcyfz, cfe-commits

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

llvm-svn: 285999

7 years ago[X86] Broadcast from memory intructions aren't unfoldable
Zvi Rackover [Fri, 4 Nov 2016 15:15:19 +0000 (15:15 +0000)]
[X86] Broadcast from memory intructions aren't unfoldable

Broadcast from memory instructions should be treated as moves. They can't be unfolded.

Fixes pr30693.

llvm-svn: 285998

7 years agoAdd bugpoint-reduced reproducer for pr30693
Zvi Rackover [Fri, 4 Nov 2016 14:53:22 +0000 (14:53 +0000)]
Add bugpoint-reduced reproducer for pr30693

llvm-svn: 285997

7 years agoAdd a few const qualifiers.
Rafael Espindola [Fri, 4 Nov 2016 13:20:45 +0000 (13:20 +0000)]
Add a few const qualifiers.

llvm-svn: 285996

7 years agoRevert "AMDGPU: Add VI i16 support"
Tom Stellard [Fri, 4 Nov 2016 13:06:34 +0000 (13:06 +0000)]
Revert "AMDGPU: Add VI i16 support"

This reverts commit r285939 and r285948.  These broke some conformance tests.

llvm-svn: 285995

7 years ago[test] Test that static_assert is properly visited in liblcang
Olivier Goffart [Fri, 4 Nov 2016 12:04:16 +0000 (12:04 +0000)]
[test] Test that static_assert is properly visited in liblcang

llvm-svn: 285994

7 years agoUpdate isl to isl-0.17.1-243-g24c0339
Tobias Grosser [Fri, 4 Nov 2016 11:56:48 +0000 (11:56 +0000)]
Update isl to isl-0.17.1-243-g24c0339

This introduces big-endian support in imath and resolves
http://llvm.org/PR24632.

llvm-svn: 285993