147240 Commits

Author SHA1 Message Date
Reid Kleckner
19db443310 [codeview] Fix buggy BeginIndexMapSize assertion
This assert is just trying to test that processing each record adds
exactly one entry to the index map. The assert logic was wrong when the
first record in the type stream was a field list.

I've simplified the code by moving the LF_FIELDLIST-specific logic into
the callback for that record type.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@299035 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-29 22:51:22 +00:00
Sanjay Patel
b476db57df [CodeGen] clean up and add tests for scalar and-of-setcc; NFC
https://bugs.llvm.org/show_bug.cgi?id=32401


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@299034 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-29 21:58:52 +00:00
Davide Italiano
ad6daf4031 [X86IselLowering] Remove extraneous semicolon. NFCI.
Unbreaks the build with GCC -Werror.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@299030 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-29 21:34:58 +00:00
Davide Italiano
64abec8d56 [DAGCombiner] Remove else after return. NFCI.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@299022 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-29 19:39:46 +00:00
Adrian McCarthy
b92b951964 Re-land: "Make NativeExeSymbol a concrete subclass of NativeRawSymbol [PDB]"
This should work on all platforms now that r299006 has landed.  Tested locally
on Windows and Linux.

This moves exe symbol-specific method implementations out of NativeRawSymbol
into a concrete subclass. Also adds implementations for hasCTypes and
hasPrivateSymbols and a simple test to ensure the native reader can access the
summary information for the executable from the PDB.

Original Differential Revision: https://reviews.llvm.org/D31059

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@299019 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-29 19:27:08 +00:00
Rafael Espindola
72b6f29aab Add ifunc support to ModuleSymbolTable.
Do that by creating a global_values, which is similar to
global_objects, but also iterates over aliases and ifuncs.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@299018 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-29 19:26:26 +00:00
Matthew Simpson
946702101b [InstCombine] Correct the check for vector GEPs
Some of the GEP combines (e.g., descaling) can't handle vector GEPs. We have an
existing check that attempts to bail out if given a vector GEP. However, the
check only tests the GEP's pointer operand. A GEP results in a vector of
pointers if at least one of its operands is vector-typed (e.g., its pointer
operand could be a scalar, but its index could be a vector). We should just
check the type of the GEP itself. This should fix PR32414.

Reference: https://bugs.llvm.org/show_bug.cgi?id=32414
Differential Revision: https://reviews.llvm.org/D31470

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@299017 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-29 18:23:08 +00:00
Sanjay Patel
37cb59fa3b [DAGCombiner] unify type checks and add asserts; NFCI
We had a mix of type checks and usage that wasn't very clear.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@299013 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-29 18:08:01 +00:00
Adrian McCarthy
ebe3d55fad llvm-pdbdump: If we don't change the color, don't reset the color.
The -output-color option was successful at suppressing color changes, but
was still allowing color resets.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@299006 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-29 17:11:27 +00:00
Simon Pilgrim
d7f209a331 [X86] Tidied up comment - we don't custom lower add/sub i64 on i686 anymore. NFCI.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@299004 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-29 15:41:58 +00:00
Sanjay Patel
aa3cce33cc [DAGCombiner] reduce code duplication by rearranging checks; NFCI
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@299002 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-29 15:37:33 +00:00
Daniel Sanders
5ae7dc8862 [tablegen][globalisel] Convert the SelectionDAG importer to a tree walking approach. NFC
Summary:
But don't actually inspect the tree any deeper than we already do. This
change is NFC but the next one will enable full traversal of the
source/destination patterns.

Depends on D30535

Reviewers: t.p.northover, qcolombet, aditya_nandakumar, rovka, ab

Subscribers: igorb, dberris, llvm-commits, kristof.beyls

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@299001 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-29 15:37:18 +00:00
Simon Pilgrim
2c2eb599d3 Spelling mistakes in comments. NFCI.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@299000 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-29 15:27:24 +00:00
Sven van Haastregt
cc54be812c [MachineVerifier] Drop a spurious const
As of r298987 the argument is a value that we std::move, so it
shouldn't be const anymore.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@298999 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-29 15:25:06 +00:00
Filipe Cabecinhas
65afd8323d Cleanup in preparation for D30703. NFCI
Make the enumerators follow the coding convention and start with OW_...

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@298996 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-29 14:42:27 +00:00
Rafael Espindola
31e9ec9aa5 Fix GettingStarted.rst statement.
Patch by Wei-Ren Chen!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@298995 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-29 14:27:38 +00:00
Rafael Espindola
814c8a1f89 Remove unused argument.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@298994 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-29 14:20:38 +00:00
Simon Pilgrim
d0ea014431 [X86][AVX2] Prevent unary interleaving patterns from calling lowerVectorShuffleAsSplitOrBlend (PR32453)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@298993 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-29 13:00:00 +00:00
Simon Pilgrim
70a5705cf0 [AMDGPU] Tidy up computeKnownBitsForTargetNode/ComputeNumSignBitsForTargetNode arguments. NFCI.
Based on comment in D31249.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@298991 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-29 12:09:25 +00:00
Simon Pilgrim
c4c4b3ba30 [X86][MMX] Added generic sitofp test to compare against existing cvtdq2ps test.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@298989 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-29 10:47:18 +00:00
Simon Pilgrim
7c4741f2ec [X86] Removed old comment. NFCI.
No longer makes sense as the previous opcode mnemonic it was referring to is long gone.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@298988 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-29 10:44:51 +00:00
Sven van Haastregt
64532cd1e1 [MachineVerifier] Avoid reference to nullptr
Instantiation of the MachineVerifierPass through
PassInfo::getNormalCtor would yield a segfault since the default
constructor of the MachineVerifierPass takes a reference to nullptr.

Patch by Simone Pellegrini.

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



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@298987 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-29 09:08:25 +00:00
Eric Christopher
d94614ff32 Move the x86 cpu feature rtm from Haswell to Skylake matching clang commit r298956.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@298986 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-29 07:40:44 +00:00
Craig Topper
31932b16fc [AVX-512] Remove explicit KMOVWrk from isel patterns. COPY_TO_REGCLASS to GR32 is enough.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@298985 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-29 07:31:56 +00:00
Craig Topper
8d23f77d88 [AVX-512] Remove explicit KMOVWrk/KMOVWKr instructions from patterns where we can just use COPY_TO_REGCLASS instead.
This will result in a KMOVW or KMOVD being emitted during register allocation. And in at least some cases this might allow the register coalescer to remove the copy all together.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@298984 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-29 06:55:28 +00:00
Dean Michael Berris
f5e37626b9 [XRay] Update FDR log reader to be aware of buffer sizes per thread.
Summary:
It is problematic for this reader that it expects to read data from
several threads, but the header or message format does not define
framing. Since the buffers are reused, we can't rely on skipping
zeroed out data as a synchronization method either.

There is an argument that this is not version compatible with the format
the reader expected previously. I argue that since the writer wrote garbage
past the end of buffer record, there is no currently working reader to
compromise.

The corresponding writer change is posted to D31384.

Reviewers: dberris, pelikan

Reviewed By: dberris

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@298983 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-29 06:10:12 +00:00
Dean Michael Berris
8985450e52 [XRay][tools] Handle "no subcommand" case for llvm-xray
Summary:
Currently the llvm-xray commandline tool fails to handle the case for
when no subcommand is provided in a graceful manner. This fixes that to
print the help message explaining the subcommands and the available
options.

Reviewers: pcc, pelikan

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@298975 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-29 04:55:45 +00:00
Adam Nemet
fdcdb2a046 [SDAG] Remove -enable-fmf-dag
This is no longer needed as spotted by Sanjay in
https://reviews.llvm.org/D31165.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@298963 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-28 23:46:14 +00:00
Adam Nemet
672fd12613 [SDAG] Handle VectorReduction in SDNodeFlags::intersectWith
Spotted by Sanjay in https://reviews.llvm.org/D31165

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@298962 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-28 23:46:12 +00:00
Adam Nemet
22fddd859b [SDAG] Add AllowContract to SNodeFlags
Properly propagate the FMF from the LLVM IR to this flag.

This is toward moving fp-contraction=fast from an LLVM TargetOption to a
FastMathFlag in order to fix PR25721.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@298961 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-28 23:46:08 +00:00
Peter Collingbourne
14ecedfe4c More accurate header inclusions. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@298960 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-28 23:35:34 +00:00
Craig Topper
24afa43c4b [AVX-512] Add test case that was supposed to go with r298957.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@298959 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-28 23:29:35 +00:00
Craig Topper
b032c49e1a [AVX-512] Punt on fast-isel of truncates to i1 when AVX512 is enabled.
We should be masking the value and emitting a register copy like we do in non-fast isel. Instead we were just updating the value map and emitting nothing.

After r298928 we started seeing cases where we would create a copy from GR8 to GR32 because the source register in a VK1 to GR32 copy was replaced by the GR8 going into a truncate.

This fixes PR32451.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@298957 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-28 23:20:37 +00:00
Guozhi Wei
522a572e3c [PPC] In PPCBoolRetToInt change the bool value to i64 if the target is ppc64
In PPCBoolRetToInt bool value is changed to i32 type. On ppc64 it may introduce an extra zero extension for the return value. This patch changes the integer type to i64 to avoid the zero extension on ppc64.

This patch fixed PR32442.

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



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@298955 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-28 22:55:01 +00:00
Sanjay Patel
3a0175382a [DAGCombiner] reduce code duplication with local variables; NFCI
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@298954 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-28 22:45:53 +00:00
Eric Christopher
da55f9cbbf Add a similar test for tailcall optimization as in r270287 for aarch64.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@298952 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-28 22:37:43 +00:00
Peter Collingbourne
aba00eee42 LTO: Replace InputFile::Symbol::getFlags() with predicate accessors. NFC.
This makes the predicates independent of the flag representation
and makes the code a little easier to read.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@298951 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-28 22:31:35 +00:00
Sanjay Patel
bdb8cec802 [DAG] fix formatting; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@298950 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-28 22:25:25 +00:00
Sanjay Patel
8cc66a64a3 [DAGCombiner] remove redundant conditions and duplicated code; NFCI
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@298949 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-28 22:22:50 +00:00
Stanislav Mekhanoshin
e42e44c7e3 [AMDGPU] Boost unroll threshold for loops reading local memory
This is less important than increase threshold for private memory,
but still brings performance improvements in a wide range of tests.
Unrolling more for local memory serves three purposes: it allows
to combine ds operations if offset becomes static, saves registers
used for offsets in case of static offsets, and allows better lds
latency hiding.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@298948 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-28 22:13:51 +00:00
Stanislav Mekhanoshin
7a9c51436f [AMDGPU] Fix recorded region boundaries in max-occupancy scheduler
This is incorrect to record region boundaries before scheduling,
it may change after scheduling. As a result second pass may see less
instructions to schedule than it should.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@298945 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-28 21:48:54 +00:00
Sanjay Patel
f54b836e26 [DAGCombiner] rename variables in foldAndOfSetCCs for easier reading; NFCI
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@298944 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-28 21:40:41 +00:00
Simon Pilgrim
c9e0a0dbb1 [X86][MMX] Match MMX fp_to_sint conversions from XMM registers
We currently perform the various fp_to_sint XMM conversion and then transfer to the MMX register (on 32-bit via the stack).

This patch improves support for MOVDQ2Q XMM to MMX transfers and adds the XMM->MMX fp_to_sint direct conversion patterns. The SSE2 specifications are the same as for XMM->XMM and XMM->MMX rounding/exceptions/etc.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@298943 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-28 21:32:11 +00:00
Matt Arsenault
98ede9e115 Fix crashing on TargetCustom PseudoSourceValues
Default to something more reasonable if printCustom isn't implemented.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@298941 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-28 20:33:12 +00:00
Sanjay Patel
3812900a6d [DAGCombiner] clean up foldAndOfSetCCs; NFCI
1. Fix bogus comment.
2. Early exit to reduce indent.
3. Change node pointer param to what it really is: an SDLoc.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@298940 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-28 20:28:16 +00:00
Adam Nemet
5c57c1108e [IR] Add AllowContract to FastMathFlags
-ffp-contract=fast does not currently work with LTO because it's passed as a
TargetOption to the backend rather than in the IR. This adds it to
FastMathFlags.

This is toward fixing PR25721

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@298939 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-28 20:11:52 +00:00
Sanjay Patel
d707b92e85 [DAGCombiner] add helper function for and-of-setcc folds; NFC
This is just a cut and paste followed by clang-format. Clean up to follow.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@298938 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-28 19:58:46 +00:00
Mehdi Amini
e4c5b69aa3 Add support for -fno-builtin to LTO and ThinLTO to libLTO
Reviewers: tejohnson, pcc

Subscribers: Prazek, dexonsmith, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@298936 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-28 18:55:44 +00:00
Stanislav Mekhanoshin
88f7810574 [AMDGPU] Split -amdgpu-early-inline-all option
Previously it was covered by the internalization. It turns out we cannot
run internalizer in FE, it break separate compilation tests. Thus early
inliner gets its own option.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@298935 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-28 18:23:24 +00:00
Sanjay Patel
e26bd3af58 [x86] use VPMOVMSK to replace memcmp libcalls for 32-byte equality
Follow-up to:
https://reviews.llvm.org/rL298775


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@298933 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-28 17:23:49 +00:00