NAKAMURA Takumi [Tue, 4 Jul 2017 12:12:37 +0000 (12:12 +0000)]
llvm/ExecutionEngine/Orc/ObjectTransformLayer.h: Add <memory> to appease libstdc++'s std::shared_ptr.
llvm-svn: 307069
NAKAMURA Takumi [Tue, 4 Jul 2017 12:12:14 +0000 (12:12 +0000)]
ClangdServer.cpp: Suppress a warning. [-Wunused-lambda-capture]
llvm-svn: 307068
Joey Gouly [Tue, 4 Jul 2017 11:50:23 +0000 (11:50 +0000)]
[OpenCL] Rename err_opencl_enqueue_kernel_expected_type
Rename err_opencl_enqueue_kernel_expected_type so that other builtins
can use the same diagnostic.
https://reviews.llvm.org/D34948
llvm-svn: 307067
Gadi Haber [Tue, 4 Jul 2017 07:18:03 +0000 (07:18 +0000)]
NFC commit.
Converting the Codegen test "extractelement-legalization-store-ordering.ll" to be "update_llc_test_checks" friendly.
The changes to the test are needed for an upcoming scheduling patch.
Reviewers: zvi, RKSimon
Differential Revision: https://reviews.llvm.org/D34935
llvm-svn: 307066
Craig Topper [Tue, 4 Jul 2017 06:50:48 +0000 (06:50 +0000)]
[InstCombine] Add TODOs for a couple things that should maybe be in InstSimplify instead. NFC
llvm-svn: 307065
Craig Topper [Tue, 4 Jul 2017 06:50:44 +0000 (06:50 +0000)]
[InstCombine] Add test cases demonstrating creation of extra bswap instrinsic calls when when optimizing bswap and bitwise ops when the bswaps have additional uses. NFC
I assume bswap intrinsics are somewhat costly so we should be making sure we are getting rid of them not creating more.
llvm-svn: 307064
Alexander Shaposhnikov [Tue, 4 Jul 2017 06:16:53 +0000 (06:16 +0000)]
[tablegen] Avoid creating a temporary vector in getInstructionCase
Record::getValues returns ArrayRef which has a cast operator
to std::vector, as a result a temporary vector is created
if the type of the variable is const std::vector&
that is suboptimal in this case.
Differential revision: https://reviews.llvm.org/D34969
Test plan: make check-all
llvm-svn: 307063
Craig Topper [Tue, 4 Jul 2017 05:46:11 +0000 (05:46 +0000)]
[X86] Add comment string for broadcast loads from the constant pool.
Summary:
When broadcasting from the constant pool its useful to print out the final vector similar to what we do for normal moves from the constant pool.
I changed only a couple tests that were broadcast focused. One of them had been previously hand tweaked after running the script so that it could check the constant pool declaration. But I think this patch makes that unnecessary now since we can check the comment instead.
Reviewers: spatel, RKSimon, zvi
Reviewed By: spatel
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D34923
llvm-svn: 307062
Alexander Shaposhnikov [Tue, 4 Jul 2017 05:37:37 +0000 (05:37 +0000)]
[llvm] Revert "[tablegen] Avoid creating a temporary vector in getInstructionCase"
Revert rL307059 because of the incorrect commit message & patch,
will recommit later.
llvm-svn: 307061
Craig Topper [Tue, 4 Jul 2017 05:33:19 +0000 (05:33 +0000)]
[X86] Add RDRAND feature to GLM CPU
Summary: I believe this should be supported on GLM since RDSEED is.
Reviewers: m_zuckerman, zvi, RKSimon
Reviewed By: RKSimon
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D34828
llvm-svn: 307060
Alexander Shaposhnikov [Tue, 4 Jul 2017 05:11:30 +0000 (05:11 +0000)]
[tablegen] Avoid creating a temporary vector in getInstructionCase
Record::getValues returns ArrayRef which has a cast operator
to std::vector, as a result a temporary vector is created
if the type of the variable is const std::vector&
that was suboptimal in this case.
Differential revision: https://reviews.llvm.org/D34969
Test plan: make check-all
llvm-svn: 307059
Lang Hames [Tue, 4 Jul 2017 04:42:30 +0000 (04:42 +0000)]
[Orc] Remove the memory manager argument to addModule, and de-templatize the
symbol resolver argument.
De-templatizing the symbol resolver is part of the ongoing simplification of
ORC layer API.
Removing the memory management argument (and delegating construction of memory
managers for RTDyldObjectLinkingLayer to a functor passed in to the constructor)
allows us to build JITs whose base object layers need not be compatible with
RTDyldObjectLinkingLayer's memory mangement scheme. For example, a 'remote
object layer' that sends fully relocatable objects directly to the remote does
not need a memory management scheme at all (that will be handled by the remote).
llvm-svn: 307058
Dylan McKay [Tue, 4 Jul 2017 04:40:06 +0000 (04:40 +0000)]
[AVR] Fix bug which caused assertion errors for some FRMIDX instructions
Previously, if a basic block ended with a FRMIDX instruction, we would
end up doing something like this.
*std::next(MBB.end())
Which would hit an error:
"Assertion `!NodePtr->isKnownSentinel()' failed."
llvm-svn: 307057
Dylan McKay [Tue, 4 Jul 2017 02:52:43 +0000 (02:52 +0000)]
[AVR] Add a missing clobber declaration to LPMW
llvm-svn: 307056
Nirav Dave [Tue, 4 Jul 2017 02:20:17 +0000 (02:20 +0000)]
[DAG] Fixed predicate for determining when two frame indices
addresses are comparable. NFCI.
llvm-svn: 307055
NAKAMURA Takumi [Tue, 4 Jul 2017 02:14:18 +0000 (02:14 +0000)]
Revert r307026, "[AMDGPU] Switch scalarize global loads ON by default"
It broke a testcase.
Failing Tests (1):
LLVM :: CodeGen/AMDGPU/alignbit-pat.ll
llvm-svn: 307054
Anton Yartsev [Tue, 4 Jul 2017 01:08:55 +0000 (01:08 +0000)]
[legalize-types] Clean up softening machinery.
The patch makes SoftenFloatResult/Operand logic just the same as all other legalization routines have: SoftenFloatResult() now fills the SoftenFloats map and SoftenFloatOperand() perform all needed replacements. This prevents softening mashinery from leaving stale entries in SoftenFloats map (that resulted in errors during the legalize type checking) and clarifies softening. The patch replaces https://reviews.llvm.org/D29265.
Differential Revision: https://reviews.llvm.org/D31946
llvm-svn: 307053
Shoaib Meenai [Tue, 4 Jul 2017 01:02:19 +0000 (01:02 +0000)]
[CodeGen] Check key function for typeinfo import
If the imported class does not have a key function, we should emit its
typeinfo locally instead of attempting to import it.
llvm-svn: 307052
Eli Friedman [Tue, 4 Jul 2017 00:52:24 +0000 (00:52 +0000)]
[Sema] Make BreakContinueFinder handle nested loops.
We don't care about break or continue statements that aren't
associated with the current loop, so make sure the visitor
doesn't find them.
Fixes https://bugs.llvm.org/show_bug.cgi?id=32648 .
Differential Revision: https://reviews.llvm.org/D34568
llvm-svn: 307051
Simon Pilgrim [Mon, 3 Jul 2017 20:58:16 +0000 (20:58 +0000)]
[X86][SSE4A] Add support for combining from EXTRQI/INSERTQI shuffles
llvm-svn: 307048
Zvi Rackover [Mon, 3 Jul 2017 18:42:47 +0000 (18:42 +0000)]
MathExtras UnitTest: Assert that isPowerOf2(0) is false. NFC.
Summary:
This is a follow-up on D34077. Elena observed that the
correctness of the code relies on isPowerOf2(0) returning false.
Adding a test to cover this corner-case.
Reviewers: delena, davide, craig.topper
Reviewed By: davide
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D34939
llvm-svn: 307046
Roman Lebedev [Mon, 3 Jul 2017 17:59:22 +0000 (17:59 +0000)]
[clang] Implement -Wcast-qual for C++
Summary:
This way, the behavior of that warning flag
more closely resembles that of GCC.
Do note that there is at least one false-negative (see FIXME in tests).
Fixes PR4802.
Testing:
```
ninja check-clang-sema check-clang-semacxx
```
Reviewers: dblaikie, majnemer, rnk
Reviewed By: dblaikie, rnk
Subscribers: mclow.lists, cfe-commits, alexfh, rnk
Differential Revision: https://reviews.llvm.org/D33102
llvm-svn: 307045
Rafael Espindola [Mon, 3 Jul 2017 17:32:09 +0000 (17:32 +0000)]
fix msvc build
llvm-svn: 307044
Rafael Espindola [Mon, 3 Jul 2017 16:54:39 +0000 (16:54 +0000)]
Move clearOutputSections earlier.
Now removeUnusedSyntheticSections operates entirely on the linker
script.
llvm-svn: 307043
Simon Pilgrim [Mon, 3 Jul 2017 16:53:11 +0000 (16:53 +0000)]
[X86][SSE4A] Add SSE4A shuffle tests on pre-SSSE3 hardware
llvm-svn: 307042
Rafael Espindola [Mon, 3 Jul 2017 16:49:17 +0000 (16:49 +0000)]
Add a test for a recent regression.
llvm-svn: 307041
Jonas Devlieghere [Mon, 3 Jul 2017 16:46:46 +0000 (16:46 +0000)]
[clang-tidy] Resolve cppcoreguidelines-pro-type-member-init false positive
Summary: https://bugs.llvm.org/show_bug.cgi?id=33557
Reviewers: Eugene.Zelenko, alexfh, aaron.ballman, hokein
Reviewed By: aaron.ballman, hokein
Subscribers: cfe-commits, nemanjai, xazax.hun, kbarton
Tags: #clang-tools-extra
Differential Revision: https://reviews.llvm.org/D34932
llvm-svn: 307040
George Rimar [Mon, 3 Jul 2017 16:05:51 +0000 (16:05 +0000)]
[ELF] - Simplify allocateHeaders(). NFC.
* Return type changed to void, because it was unused.
* std::find_if -> llvm::find_if
llvm-svn: 307039
Simon Pilgrim [Mon, 3 Jul 2017 15:55:54 +0000 (15:55 +0000)]
[X86][SSE4A] Test SSE4A shuffle combining on SSE42 capable target as well
llvm-svn: 307038
Petr Hosek [Mon, 3 Jul 2017 15:49:25 +0000 (15:49 +0000)]
[ELF] Remove unused synthetic sections from script commands
Script commands are processed before unused synthetic sections are
removed. Therefore, if a linker script matches one of these sections
it'll get emitted as an empty output section because the logic for
removing unused synthetic sections ignores script commands which
could have already matched and captured one of these sections. This
patch fixes that by also removing the unused synthetic sections from
the script commands.
Differential Revision: https://reviews.llvm.org/D34800
llvm-svn: 307037
Zvi Rackover [Mon, 3 Jul 2017 15:47:40 +0000 (15:47 +0000)]
DAGCombine: Combine BUILD_VECTOR to TRUNCATE
Summary:
Add a combine for creating a truncate to replace a build_vector composed of extracts with
indices that form a stride-2^N series.
Example:
v8i32 V = ...
v4i32 build_vector((extract_elt V, 0), (extract_elt V, 2), (extract_elt V, 4), (extract_elt V, 6))
-->
v4i32 truncate (bitcast V to v4i64)
Related discussion in llvm-dev about canonicalizing shuffles to
truncates in LLVM IR:
http://lists.llvm.org/pipermail/llvm-dev/2017-January/108936.html.
Reviewers: spatel, RKSimon, efriedma, igorb, craig.topper, wolfgangp, delena
Reviewed By: delena
Subscribers: guyblank, delena, javed.absar, llvm-commits
Differential Revision: https://reviews.llvm.org/D34077
llvm-svn: 307036
Florian Hahn [Mon, 3 Jul 2017 15:32:00 +0000 (15:32 +0000)]
[LoopInterchange] Add more debug messages to currentLimitations().
Summary: This makes it easier to find out which limitation prevented this pass from doing its work.
Reviewers: karthikthecool, mzolotukhin, efriedma, mcrosier
Reviewed By: mcrosier
Subscribers: mcrosier, llvm-commits
Differential Revision: https://reviews.llvm.org/D34940
llvm-svn: 307035
Martin Probst [Mon, 3 Jul 2017 15:31:28 +0000 (15:31 +0000)]
Revert "clang-format: [JS] space between pseudo keywords and template literals."
This reverts commit
71d3b5cd916106005ef23467e3f6c7fbca7bc499.
llvm-svn: 307034
Sanjay Patel [Mon, 3 Jul 2017 15:27:19 +0000 (15:27 +0000)]
[x86] auto-generate complete checks for tests; NFC
These all used 'CHECK-NOT' which isn't necessary if we have complete checks.
There were also over-specifications in the RUN params such as CPU model.
llvm-svn: 307033
George Rimar [Mon, 3 Jul 2017 15:24:50 +0000 (15:24 +0000)]
[ELF] - Remove use of precomipled binary for invalid-relocation-x64.test
Since yaml2obj is now able to parse integer values as relocation types,
there is no need to keep hex edited elf object for this test,
we can produce it on fly, just like this patch do.
Differential revision: https://reviews.llvm.org/D34893
llvm-svn: 307032
Ilya Biryukov [Mon, 3 Jul 2017 15:16:27 +0000 (15:16 +0000)]
Fixed argument parsing in docker scripts.
llvm-svn: 307031
Ravitheja Addepally [Mon, 3 Jul 2017 15:07:36 +0000 (15:07 +0000)]
Fixing warnings for unused variables and copy ellision
Summary:
The std::move was preventing copy ellision when compiled with
clang, the patch fixes the warning along with rearranging code
to remove unused variables warnings on Linux machines with
older perf_event interface.
Reviewers: labath, ted
Reviewed By: labath
Differential Revision: https://reviews.llvm.org/D34946
llvm-svn: 307030
Krasimir Georgiev [Mon, 3 Jul 2017 15:05:14 +0000 (15:05 +0000)]
[clang-format] Support text proto messages
Summary: This patch adds support for textual protocol buffer messages.
Reviewers: djasper
Reviewed By: djasper
Subscribers: cfe-commits, klimek, mgorny
Differential Revision: https://reviews.llvm.org/D34441
llvm-svn: 307029
Sanjay Patel [Mon, 3 Jul 2017 15:04:05 +0000 (15:04 +0000)]
[x86] auto-generate complete checks for tests; NFC
These all used 'CHECK-NOT' which isn't necessary if we have complete checks.
There were also several over-specifications in the RUN params such as CPU model or OS requirement
llvm-svn: 307028
Simon Pilgrim [Mon, 3 Jul 2017 15:01:07 +0000 (15:01 +0000)]
[X86][SSE4A] Add tests showing missed opportunities to combine EXTRQI/INSERTQI shuffles
llvm-svn: 307027
Alexander Timofeev [Mon, 3 Jul 2017 14:54:11 +0000 (14:54 +0000)]
[AMDGPU] Switch scalarize global loads ON by default
Differential revision: https://reviews.llvm.org/D34407
llvm-svn: 307026
Ilya Biryukov [Mon, 3 Jul 2017 14:46:03 +0000 (14:46 +0000)]
[clangd] Add -ffreestanding on VFS tests.
Summary:
They don't provide proper gcc installations and may fail on implicit
<stdc-predef.h> include.
Reviewers: klimek, krasimir, bkramer
Reviewed By: krasimir
Subscribers: klimek, cfe-commits
Tags: #clang-tools-extra
Differential Revision: https://reviews.llvm.org/D34936
llvm-svn: 307025
Sanjay Patel [Mon, 3 Jul 2017 14:29:45 +0000 (14:29 +0000)]
[x86] auto-generate complete checks for tests; NFC
These all used 'CHECK-NOT' which isn't necessary if we have complete checks.
llvm-svn: 307024
Martin Probst [Mon, 3 Jul 2017 14:29:13 +0000 (14:29 +0000)]
clang-format: [JS] space between pseudo keywords and template literals.
Summary:
Before:
yield`foo`;
After:
yield `foo`;
Reviewers: djasper
Subscribers: klimek
Differential Revision: https://reviews.llvm.org/D34938
llvm-svn: 307023
Sanjay Patel [Mon, 3 Jul 2017 14:07:40 +0000 (14:07 +0000)]
[InstCombine] move and improve tests for cmp-intrinsic; NFC
llvm-svn: 307022
Benjamin Kramer [Mon, 3 Jul 2017 12:23:10 +0000 (12:23 +0000)]
Revert "[GVN] Recommit the patch "Add phi-translate support in scalarpre"."
This reverts commit r306313. This breaks selfhost at -O3 and PR33652.
Let me know if you need additional information on reproducing the issue.
llvm-svn: 307021
Andrey Churbanov [Mon, 3 Jul 2017 11:24:08 +0000 (11:24 +0000)]
OpenMP RTL cleanup: eliminated warnings with -Wcast-qual.
Changes are: replaced C-style casts with cons_cast and reinterpret_cast;
type of several counters changed to signed; type of parameters of 32-bit and
64-bit AND and OR intrinsics changes to unsigned; changed files formatted
using clang-format version 3.8.1.
Differential Revision: https://reviews.llvm.org/D34759
llvm-svn: 307020
Igor Breger [Mon, 3 Jul 2017 11:06:54 +0000 (11:06 +0000)]
[GlobalISel][X86] fix %ptr(p0) = G_CONSTANT selection.
llvm-svn: 307019
Pavel Labath [Mon, 3 Jul 2017 11:01:49 +0000 (11:01 +0000)]
Fix typo/unbreak windows build broken by r307009
llvm-svn: 307018
Alex Lorenz [Mon, 3 Jul 2017 10:34:46 +0000 (10:34 +0000)]
[index] Remove 'implicit' role for message sends in implicit ObjC
property references
rdar://
32375673
llvm-svn: 307016
Alex Lorenz [Mon, 3 Jul 2017 10:12:24 +0000 (10:12 +0000)]
Add a fixit for -Wobjc-protocol-property-synthesis
rdar://
32132756
Differential Revision: https://reviews.llvm.org/D34886
llvm-svn: 307014
Andrew Ng [Mon, 3 Jul 2017 10:11:25 +0000 (10:11 +0000)]
[LLD][LinkerScript] Allow non-alloc sections to be assigned to segments.
This patch makes changes to allow sections without the SHF_ALLOC bit to be
assigned to segments in a linker script.
The assignment of output sections to segments is performed in
LinkerScript::createPhdrs. Previously, this function would bail as soon as it
encountered an output section which did not have the SHF_ALLOC bit set, thus
preventing any output section without SHF_ALLOC from being assigned to a
segment.
This restriction has now been removed from LinkerScript::createPhdrs and instead
a check for SHF_ALLOC has been added to LinkerScript::adjustSectionsAfterSorting
to not propagate program headers to sections without SHF_ALLOC which matches the
behaviour of bfd linker scripts.
Differential Revision: https://reviews.llvm.org/D34204
llvm-svn: 307013
Pavel Labath [Mon, 3 Jul 2017 09:25:55 +0000 (09:25 +0000)]
Use llvm::sys::RetryAfterSignal instead of a manual while errno!=EINTR loop
Reviewers: zturner, eugene, krytarowski
Subscribers: emaste, mgorny, lldb-commits
Differential Revision: https://reviews.llvm.org/D33831
llvm-svn: 307009
Hiroshi Inoue [Mon, 3 Jul 2017 08:49:44 +0000 (08:49 +0000)]
fix trivial typos in comments; NFC
llvm-svn: 307007
Hiroshi Inoue [Mon, 3 Jul 2017 06:44:05 +0000 (06:44 +0000)]
fix trivial typos in comments; NFC
llvm-svn: 307005
Hiroshi Inoue [Mon, 3 Jul 2017 06:32:59 +0000 (06:32 +0000)]
fix trivial typos in comments; NFC
llvm-svn: 307004
Craig Topper [Mon, 3 Jul 2017 05:54:16 +0000 (05:54 +0000)]
[InstCombine] Add a TODO for a probable missing single use check. NFC
Will try to fix it soon, but in case I forget.
llvm-svn: 307003
Craig Topper [Mon, 3 Jul 2017 05:54:15 +0000 (05:54 +0000)]
[InstCombine] Support BITWISE_OP( BSWAP(x), CONSTANT ) -> BSWAP( BITWISE_OP(x, BSWAP(CONSTANT) ) ) for splat vectors.
llvm-svn: 307002
Craig Topper [Mon, 3 Jul 2017 05:54:14 +0000 (05:54 +0000)]
[InstCombine] Add test cases for BITWISE_OP( BSWAP(x), CONSTANT ) -> BSWAP( BITWISE_OP(x, BSWAP(CONSTANT) ) ) with splat vectors. NFC
llvm-svn: 307001
Craig Topper [Mon, 3 Jul 2017 05:54:13 +0000 (05:54 +0000)]
[InstCombine] Remove support for BITWISE_OP(CONSTANT, BSWAP(x)) -> BSWAP(OP(BSWAP(CONSTANT), x)).
Constants were already canonicalized to the right hand side before we got here.
llvm-svn: 307000
Craig Topper [Mon, 3 Jul 2017 05:54:13 +0000 (05:54 +0000)]
[InstCombine] Support BITWISE_OP(BSWAP(A),BSWAP(B))->BSWAP(BITWISE_OP(A, B)) for vectors.
llvm-svn: 306999
Craig Topper [Mon, 3 Jul 2017 05:54:12 +0000 (05:54 +0000)]
[InstCombine] Add test cases showing missed opportunity to fold BITWISE_OP(BSWAP(A),BSWAP(B))->BSWAP(BITWISE_OP(A, B)) for vectors. NFC
llvm-svn: 306998
Craig Topper [Mon, 3 Jul 2017 05:54:11 +0000 (05:54 +0000)]
[InstCombine] Remove an if that should have been guaranteed by the caller. Replace with an assert. NFC
llvm-svn: 306997
Rui Ueyama [Mon, 3 Jul 2017 03:26:07 +0000 (03:26 +0000)]
Revert r306813: "[ELF] - Resolve references properly when using .symver directive"
This reverts commit r306813 because it broke linking of the
FreeBSD base system.
llvm-svn: 306996
Matt Arsenault [Sun, 2 Jul 2017 23:21:48 +0000 (23:21 +0000)]
AMDGPU: Add operand target flags serialization
llvm-svn: 306995
Simon Pilgrim [Sun, 2 Jul 2017 19:52:20 +0000 (19:52 +0000)]
[X86][AVX512] Test AVX512VPOPCNTDQ CTPOP with/without AVX512BW
llvm-svn: 306991
Simon Pilgrim [Sun, 2 Jul 2017 19:32:37 +0000 (19:32 +0000)]
[X86][AVX512VPOPCNTDQ] Improve support for v16i8/v8i16/v16i16/ CTPOP
Zero extend to v16i32/v8i64, use VPOPCNTDQ instructions and truncate back.
llvm-svn: 306990
Simon Pilgrim [Sun, 2 Jul 2017 18:51:48 +0000 (18:51 +0000)]
[X86][AVX512] Cleanup tzcnt tests triples and attributes
Avoid use of specific -mcpu
llvm-svn: 306989
Simon Pilgrim [Sun, 2 Jul 2017 18:35:22 +0000 (18:35 +0000)]
[X86][AVX512] Cleanup popcnt tests triples and attributes
Avoid use of specific -mcpu
llvm-svn: 306988
Craig Topper [Sun, 2 Jul 2017 17:08:44 +0000 (17:08 +0000)]
[IR] Remove unnecessary operator new from ConstantDataArray and ConstantDataVector. They inherit an identical version from ConstantData. NFC
llvm-svn: 306987
Simon Pilgrim [Sun, 2 Jul 2017 16:31:16 +0000 (16:31 +0000)]
[InstCombine] Use m_BitReverse pattern match helper. NFCI.
llvm-svn: 306986
Sanjay Patel [Sun, 2 Jul 2017 16:05:11 +0000 (16:05 +0000)]
[InstCombine] fix crash when folding cmp+bswap vector
We assumed the constant was a scalar when creating the replacement operand.
Also, improve tests for this fold and move the tests for this fold to their own file.
I'll move the related and missing tests to this file as a follow-up.
llvm-svn: 306985
Sanjay Patel [Sun, 2 Jul 2017 15:24:08 +0000 (15:24 +0000)]
[x86] auto-generate complete checks for tests; NFC
These all used 'CHECK-NOT' which isn't necessary if we have complete checks.
llvm-svn: 306984
Sanjay Patel [Sun, 2 Jul 2017 15:16:17 +0000 (15:16 +0000)]
[x86] remove unnecessary RUN for test after auto-generating checks; NFC
llvm-svn: 306983
Sanjay Patel [Sun, 2 Jul 2017 15:15:18 +0000 (15:15 +0000)]
[x86] update test to use FileCheck and auto-generate checks; NFC
llvm-svn: 306982
Sanjay Patel [Sun, 2 Jul 2017 14:50:35 +0000 (14:50 +0000)]
[x86] auto-generate complete checks for tests; NFC
These all used 'CHECK-NOT' which isn't necessary if we have complete checks.
llvm-svn: 306981
Sanjay Patel [Sun, 2 Jul 2017 14:34:50 +0000 (14:34 +0000)]
[InstCombine] look through bswap/bitreverse for equality comparisons
I noticed this missed bswap optimization in the CGP memcmp() expansion,
and then I saw that we don't have the fold in InstCombine.
Differential Revision: https://reviews.llvm.org/D34763
llvm-svn: 306980
NAKAMURA Takumi [Sun, 2 Jul 2017 14:25:27 +0000 (14:25 +0000)]
llvm/test/Transforms/LoopVectorize/X86/slm-no-vectorize.ll: -debug is available in +Asserts.
llvm-svn: 306979
Simon Pilgrim [Sun, 2 Jul 2017 14:16:25 +0000 (14:16 +0000)]
[X86][SSE] Attempt to combine 64-bit and 32-bit shuffles to unary shuffles before bit shifts
We are combining shuffles to bit shifts before unary permutes, which means we can't fold loads plus the destination register is destructive
llvm-svn: 306978
Simon Pilgrim [Sun, 2 Jul 2017 13:19:10 +0000 (13:19 +0000)]
[X86][SSE] Attempt to combine 64-bit and 16-bit shuffles to unary shuffles before bit shifts
We are combining shuffles to bit shifts before unary permutes, which means we can't fold loads plus the destination register is destructive
The 32-bit shuffles are a bit tricky and will be dealt with in a later patch
llvm-svn: 306977
Simon Pilgrim [Sun, 2 Jul 2017 12:56:10 +0000 (12:56 +0000)]
[X86][SSE] Add test showing missed opportunity to combine to pshuflw
We are combining shuffles to bit shifts before unary permutes, which means we can't fold loads plus the destination register is destructive
llvm-svn: 306976
Hiroshi Inoue [Sun, 2 Jul 2017 12:44:27 +0000 (12:44 +0000)]
fix trivial typos in documents; NFC
llvm-svn: 306975
Mohammed Agabaria [Sun, 2 Jul 2017 12:16:15 +0000 (12:16 +0000)]
[X86][CM] update add\sub costs of vectors of 64 in X86\SLM arch
this patch updates the cost of addq\subq (add\subtract of vectors of 64bits)
based on the performance numbers of SLM arch.
Differential Revision: https://reviews.llvm.org/D33983
llvm-svn: 306974
Gadi Haber [Sun, 2 Jul 2017 12:01:33 +0000 (12:01 +0000)]
[X86] Rerun "update_llc_test_checks" tool on CodeGen tests. NFC.
This is NFC after rerunning the "update_llc_test_checks.py" tool on the CodeGen X86 tests in order to submit a patch.
Minor differences due to added "End of Function" lines.
Reviewers: zvi
Differential Revision: https://reviews.llvm.org/D34933
llvm-svn: 306973
Igor Breger [Sun, 2 Jul 2017 08:58:29 +0000 (08:58 +0000)]
[GlobalISel][X86] Support G_GLOBAL_VALUE operation.
Summary: Support G_GLOBAL_VALUE operation. For now most of the PIC configurations not implemented yet.
Reviewers: zvi, guyblank
Reviewed By: guyblank
Subscribers: rovka, kristof.beyls, llvm-commits
Differential Revision: https://reviews.llvm.org/D34738
Conflicts:
test/CodeGen/X86/GlobalISel/regbankselect-X86_64.mir
llvm-svn: 306972
Igor Breger [Sun, 2 Jul 2017 08:15:49 +0000 (08:15 +0000)]
[GlobalISel][X86] Support vector type G_UNMERGE_VALUES selection.
Summary:
Support vector type G_UNMERGE_VALUES selection.
For now G_UNMERGE_VALUES marked as legal for any type, so nothing to do in legalizer.
Reviewers: t.p.northover, qcolombet, zvi, guyblank
Reviewed By: guyblank
Subscribers: rovka, kristof.beyls, guyblank, llvm-commits
Differential Revision: https://reviews.llvm.org/D33665
llvm-svn: 306971
Hiroshi Inoue [Sun, 2 Jul 2017 06:12:49 +0000 (06:12 +0000)]
fix trivial typos in comments; NFC
llvm-svn: 306969
Hiroshi Inoue [Sun, 2 Jul 2017 03:24:54 +0000 (03:24 +0000)]
fix trivial typos; NFC
suport -> support
llvm-svn: 306968
Craig Topper [Sun, 2 Jul 2017 01:15:51 +0000 (01:15 +0000)]
[InstCombine] Fold (a | b) ^ (~a | ~b) --> ~(a ^ b) and (a & b) ^ (~a & ~b) --> ~(a ^ b)
Summary:
I came across this while thinking about what would happen if one of the operands in this xor pattern was itself a inverted (A & ~B) ^ (~A & B)-> (A^B).
The patterns here assume that the (~a | ~b) will be demorganed to ~(a & b) first. Though I wonder if there's a multiple use case that would prevent the demorgan.
Reviewers: spatel
Reviewed By: spatel
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D34870
llvm-svn: 306967
Davide Italiano [Sun, 2 Jul 2017 00:07:18 +0000 (00:07 +0000)]
[CodeExtractor] Remove unneded and commented out debugging stmts.
llvm-svn: 306966
Joerg Sonnenberger [Sat, 1 Jul 2017 21:36:21 +0000 (21:36 +0000)]
Add an option group for deprecated warnings. Add the removed
-fslp-vectorize-aggressive and -fno-slp-vectorize-aggressive flags back
under this group and test for the warning. Document the future removal
in the ReleaseNotes.
Differential Revision: https://reviews.llvm.org/D34926
llvm-svn: 306965
Vassil Vassilev [Sat, 1 Jul 2017 20:44:49 +0000 (20:44 +0000)]
[modules] Teach clang how to merge typedef over anonymous structs in C mode.
In C mode clang fails to merge the textually included definition with the one imported from a module. The C lookup rules fail to find the imported definition because its linkage is internal in non C++ mode.
This patch reinstates some of the ODR merging rules for typedefs of anonymous tags for languages other than C++.
Patch by Raphael Isemann and me (D34510).
llvm-svn: 306964
Martin Storsjo [Sat, 1 Jul 2017 20:29:27 +0000 (20:29 +0000)]
[COFF] Add initial support for linking ARM64 binaries
A plain empty entry point function that returns 0 seems to produce
a binary that loads and runs fine in wine.
Differential Revision: https://reviews.llvm.org/D34833
llvm-svn: 306963
Yuka Takahashi [Sat, 1 Jul 2017 18:32:55 +0000 (18:32 +0000)]
[Bash-autocompletion] Add support for older bash version.
Summary:
OS X seems to use older bash version which doesn't suport
_init_completion and compopt, so add support for this.
Reviewers: ruiu, v.g.vassilev, teemperor
Subscribers: cfe-commits
Differential Revision: https://reviews.llvm.org/D34924
llvm-svn: 306962
Simon Pilgrim [Sat, 1 Jul 2017 16:42:16 +0000 (16:42 +0000)]
[X86][RDSEED] Split off i64 intrinsic tests and test i16/i32 on 32-bit target as well.
llvm-svn: 306961
Simon Pilgrim [Sat, 1 Jul 2017 16:41:12 +0000 (16:41 +0000)]
[X86][RDRAND] Split off i64 intrinsic tests and test i16/i32 on 32-bit target as well.
llvm-svn: 306960
Simon Pilgrim [Sat, 1 Jul 2017 16:34:29 +0000 (16:34 +0000)]
[X86] Removed reference to update_test_checks.py
llvm-svn: 306959
Simon Pilgrim [Sat, 1 Jul 2017 16:32:02 +0000 (16:32 +0000)]
[X86][AVX] Remove duplicate autogeneration note
llvm-svn: 306958
Yuka Takahashi [Sat, 1 Jul 2017 16:30:02 +0000 (16:30 +0000)]
[Bash-completion] Fixed a bug that ~ doesn't expanded to $HOME
Summary: `~/build/bin/clang -f[tab]` was executed without ~ expanded to $HOME, so changed this by expanding ~ to path using eval.
Differential Revision: https://reviews.llvm.org/D34925
llvm-svn: 306957
Jonas Hahnfeld [Sat, 1 Jul 2017 10:40:50 +0000 (10:40 +0000)]
[OpenMP] Fix mapping of scalars for combined directives
Combined directives like 'target parallel' have two captured statements.
Sema has to check the right one from the right direction.
Previously, Sema::IsOpenMPCapturedByRef would return false for mapped
scalars on combined directives. This results in a wrong signature of
the outlined function which triggers an assertion:
void llvm::CallInst::init(llvm::FunctionType *, llvm::Value *, ArrayRef<llvm::Value *>, ArrayRef<OperandBundleDef>, const llvm::Twine &): Assertion `(i >= FTy->getNumParams() || FTy->getParamType(i) == Args[i]->getType()) && "Calling a function with a bad signature!"' failed.
Fixes PR30975 (and PR31985). New function was taken from clang-ykt.
Differential Revision: https://reviews.llvm.org/D34888
llvm-svn: 306956