OSDN Git Service
Benjamin Kramer [Tue, 23 Oct 2018 15:43:36 +0000 (15:43 +0000)]
[LegalizeDAG] Remove unused variable
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@345040
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Tue, 23 Oct 2018 15:37:19 +0000 (15:37 +0000)]
[LegalizeDAG] Share Vector/Scalar CTTZ Expansion
As suggested on D53258, this patch demonstrates sharing common CTTZ expansion code between VectorLegalizer and SelectionDAGLegalize by putting it in TargetLowering.
I intend to move CTLZ and (scalar) CTPOP over as well and then update D53258 accordingly.
Differential Revision: https://reviews.llvm.org/D53474
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@345039
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Tue, 23 Oct 2018 15:13:09 +0000 (15:13 +0000)]
[SLPVectorizer] Add basic support for mul/and/or/xor horizontal reductions
Expand arithmetic reduction to include mul/and/or/xor instructions.
This patch just fixes the SLPVectorizer - the effective reduction costs for AVX1+ are still poor (see rL344846) and will need to be improved before SLP sees this as a valid transform - but we can already see the effect on SSE2 tests.
This partially helps PR37731, but doesn't fix it all as it still falls over on the extraction/reduction order for some reason.
Differential Revision: https://reviews.llvm.org/D53473
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@345037
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Tue, 23 Oct 2018 15:05:12 +0000 (15:05 +0000)]
[InstCombine] use 'match' to handle vectors and simplify code
This is another step towards completely removing the fake
binop queries for not/neg/fneg.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@345036
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Tue, 23 Oct 2018 14:43:31 +0000 (14:43 +0000)]
[InstCombine] swap select profile metadata when swapping select ops
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@345034
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Tue, 23 Oct 2018 14:37:29 +0000 (14:37 +0000)]
[InstCombine] add/move tests for select with inverted condition; NFC
The transform is broken in 2 ways - it doesn't correct metadata (or even drop it),
and it doesn't work with vectors with undef elements.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@345033
91177308-0d34-0410-b5e6-
96231b3b80d8
Aleksandr Urakov [Tue, 23 Oct 2018 14:27:45 +0000 (14:27 +0000)]
Revert "[MachinePipeliner] Split MachinePipeliner code into header and cpp files"
This reverts commit
40760b733d9eef841c897338af5e9d81b12551bf.
It seems that the commit is a cuse of the build failure.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@345032
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Tue, 23 Oct 2018 14:07:39 +0000 (14:07 +0000)]
[SLSR] use 'match' to simplify code; NFC
This pass could probably be modified slightly to allow
vector splat transforms for practically no cost, but
it only works on scalars for now. So the use of the
newer 'match' API should make no functional difference.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@345030
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Tue, 23 Oct 2018 13:39:40 +0000 (13:39 +0000)]
[SLSR] auto-generate full test assertions; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@345028
91177308-0d34-0410-b5e6-
96231b3b80d8
Roman Lebedev [Tue, 23 Oct 2018 13:19:31 +0000 (13:19 +0000)]
Experimental re-land of [X86][BMI1] X86DAGToDAGISel: select BEXTR from x << (32 - y) >> (32 - y) pattern
This initially landed in rL345014, but was reverted in rL345017
due to sanitizer-x86_64-linux-fast buildbot failure in
check-lld (ELF/relocatable-versioned.s) test.
While i'm not yet quite sure what is the problem, one obvious
thing here is that extra truncation roundtrip.
Maybe that's it? If not, will re-revert.
Differential Revision: https://reviews.llvm.org/D53521
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@345027
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Tue, 23 Oct 2018 13:14:54 +0000 (13:14 +0000)]
Add BROADCAST shuffle cost tests.
Part of a lot of cleanup necessary before PR39368.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@345025
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Tue, 23 Oct 2018 13:00:22 +0000 (13:00 +0000)]
Add BROADCAST shuffle cost tests.
Part of a lot of cleanup necessary before PR39368.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@345023
91177308-0d34-0410-b5e6-
96231b3b80d8
Dorit Nuzman [Tue, 23 Oct 2018 11:51:55 +0000 (11:51 +0000)]
Leftover bits from https://reviews.llvm.org/D53420 that were accidentally left
out of revision 344883
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@345021
91177308-0d34-0410-b5e6-
96231b3b80d8
Greg Bedwell [Tue, 23 Oct 2018 11:34:04 +0000 (11:34 +0000)]
[lit] Only return a found bash executable on Windows if it can understand Windows paths
Some versions of bash.exe, for example WSL's version expect paths in the form
/mnt/c/path/to/dir rather than c:\\path\\to\\dir so will cause failures
for any tests that require an external shell if used by lit. If we're on
Windows and looking for an external shell, check that the found version
of bash is able to parse a native path before returning that version.
This patch also partially reverts the behaviour of r228221 by
restoring the warning if bash cannot be found. This shouldn't pollute
the lit stderr anymore as we're now using internal shell by default on
Windows. If someone is explicitly specifying to use an external shell, it's
probably worth alerting them to the fact that bash could not be found.
Differential Revision: https://reviews.llvm.org/D52831
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@345019
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Tue, 23 Oct 2018 11:33:38 +0000 (11:33 +0000)]
[X86][SSE] Update raw mask shuffle decoders to handle UNDEF mask elts
Matches the approach taken in the constant pool shuffle decoders, and uses an UndefElts mask instead of uint64_t(-1) raw mask values, which doesn't work safely for i32/i64 shuffle mask sizes (as the -1 value is legal).
This allows us to remove the constant pool shuffle decoders from most of the getTargetShuffleMask variable shuffle cases (X86ISD::VPERMV3 will be handled in a future commit).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@345018
91177308-0d34-0410-b5e6-
96231b3b80d8
Roman Lebedev [Tue, 23 Oct 2018 10:34:57 +0000 (10:34 +0000)]
Revert "[X86][BMI1] X86DAGToDAGISel: select BEXTR from x << (32 - y) >> (32 - y) pattern"
*Seems* to be breaking sanitizer-x86_64-linux-fast buildbot,
the ELF/relocatable-versioned.s test:
==17758==MemorySanitizer CHECK failed: /b/sanitizer-x86_64-linux-fast/build/llvm/projects/compiler-rt/lib/sanitizer_common/sanitizer_allocator.cc:191 "((kBlockMagic)) == ((((u64*)addr)[0]))" (0x6a6cb03abcebc041, 0x0)
#0 0x59716b in MsanCheckFailed(char const*, int, char const*, unsigned long long, unsigned long long) /b/sanitizer-x86_64-linux-fast/build/llvm/projects/compiler-rt/lib/msan/msan.cc:393
#1 0x586635 in __sanitizer::CheckFailed(char const*, int, char const*, unsigned long long, unsigned long long) /b/sanitizer-x86_64-linux-fast/build/llvm/projects/compiler-rt/lib/sanitizer_common/sanitizer_termination.cc:79
#2 0x57d5ff in __sanitizer::InternalFree(void*, __sanitizer::SizeClassAllocatorLocalCache<__sanitizer::SizeClassAllocator32<__sanitizer::AP32> >*) /b/sanitizer-x86_64-linux-fast/build/llvm/projects/compiler-rt/lib/sanitizer_common/sanitizer_allocator.cc:191
#3 0x7fc21b24193f (/lib/x86_64-linux-gnu/libc.so.6+0x3593f)
#4 0x7fc21b241999 in exit (/lib/x86_64-linux-gnu/libc.so.6+0x35999)
#5 0x7fc21b22c2e7 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x202e7)
#6 0x57c039 in _start (/b/sanitizer-x86_64-linux-fast/build/llvm_build_msan/bin/lld+0x57c039)
This reverts commit r345014.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@345017
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Tue, 23 Oct 2018 09:42:10 +0000 (09:42 +0000)]
[TTI] Add generic cost handling of SK_Reverse shuffles
These can be treated as a general permute.
This required a fix for missing reverse patterns on ARM
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@345015
91177308-0d34-0410-b5e6-
96231b3b80d8
Roman Lebedev [Tue, 23 Oct 2018 09:08:44 +0000 (09:08 +0000)]
[X86][BMI1] X86DAGToDAGISel: select BEXTR from x << (32 - y) >> (32 - y) pattern
Summary:
Continuation of D52348.
We also get the `c) x & (-1 >> (32 - y))` pattern here, because of the D48768.
I will add extra-uses into those tests and follow-up with a patch to handle those patterns too.
Reviewers: RKSimon, craig.topper
Reviewed By: craig.topper
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D53521
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@345014
91177308-0d34-0410-b5e6-
96231b3b80d8
Aleksandr Urakov [Tue, 23 Oct 2018 08:15:00 +0000 (08:15 +0000)]
Fix non-Windows build for D53324
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@345011
91177308-0d34-0410-b5e6-
96231b3b80d8
Aleksandr Urakov [Tue, 23 Oct 2018 08:14:53 +0000 (08:14 +0000)]
Revert "Revert "[PDB] Extend IPDBSession's interface to retrieve frame data""
This reverts commit
466ce67d6ec444962e5cc0136243c16a453190c0.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@345010
91177308-0d34-0410-b5e6-
96231b3b80d8
Lama Saba [Tue, 23 Oct 2018 07:58:41 +0000 (07:58 +0000)]
[MachinePipeliner] Split MachinePipeliner code into header and cpp files
Split MachinePipeliner code into header and cpp files to allow inheritance from SwingSchedulerDAG
Differential Revision: https://reviews.llvm.org/D53477
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@345008
91177308-0d34-0410-b5e6-
96231b3b80d8
Sylvestre Ledru [Tue, 23 Oct 2018 07:13:47 +0000 (07:13 +0000)]
Add support for GNU Hurd in Path.inc and other places
Summary: Patch by Svante Signell & myself
Reviewers: rnk, JDevlieghere, efriedma
Reviewed By: efriedma
Subscribers: efriedma, JDevlieghere, krytarowski, llvm-commits, kristina
Differential Revision: https://reviews.llvm.org/D53409
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@345007
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Tue, 23 Oct 2018 04:18:08 +0000 (04:18 +0000)]
[X86] Regenerate test checks to show fma comments. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@344999
91177308-0d34-0410-b5e6-
96231b3b80d8
Lang Hames [Tue, 23 Oct 2018 01:36:33 +0000 (01:36 +0000)]
[RuntimeDyld][COFF] Skip non-loaded sections when calculating ImageBase.
Non-loaded sections (whose unused load-address defaults to zero) should not
be taken into account when calculating ImageBase, or ImageBase will be
incorrectly set to 0.
Patch by Andrew Scheidecker. Thanks Andrew!
https://reviews.llvm.org/D51343
+ // The Sections list may contain sections that weren't loaded for
+ // whatever reason: they may be debug sections, and ProcessAllSections
+ // is false, or they may be sections that contain 0 bytes. If the
+ // section isn't loaded, the load address will be 0, and it should not
+ // be included in the ImageBase calculation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@344995
91177308-0d34-0410-b5e6-
96231b3b80d8
Lang Hames [Tue, 23 Oct 2018 01:36:32 +0000 (01:36 +0000)]
[ORC] Show JITDylib search order in JITDylib::dump.
This can be helpful in debugging search-order related failures.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@344994
91177308-0d34-0410-b5e6-
96231b3b80d8
Lang Hames [Tue, 23 Oct 2018 01:36:31 +0000 (01:36 +0000)]
[ORC] Dump flags for JITDylib symbol table entries.
This can help when debugging flag-specific symbol table issues.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@344993
91177308-0d34-0410-b5e6-
96231b3b80d8
Kostya Serebryany [Tue, 23 Oct 2018 00:50:40 +0000 (00:50 +0000)]
[hwasan] add stack frame descriptions.
Summary:
At compile-time, create an array of {PC,HumanReadableStackFrameDescription}
for every function that has an instrumented frame, and pass this array
to the run-time at the module-init time.
Similar to how we handle pc-table in SanitizerCoverage.
The run-time is dummy, will add the actual logic in later commits.
Reviewers: morehouse, eugenis
Reviewed By: eugenis
Subscribers: srhines, llvm-commits, kubamracek
Differential Revision: https://reviews.llvm.org/D53227
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@344985
91177308-0d34-0410-b5e6-
96231b3b80d8
Jonas Devlieghere [Tue, 23 Oct 2018 00:32:22 +0000 (00:32 +0000)]
[dsymutil] Improve error reporting when we cannot create output file.
Before this patch we were returning an empty string in case we couldn't
create the output file. Now we return an expected string so we can
return and print the proper issue. We now return errors instead of bools
and defer printing to the call site.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@344983
91177308-0d34-0410-b5e6-
96231b3b80d8
Heejin Ahn [Tue, 23 Oct 2018 00:28:14 +0000 (00:28 +0000)]
[WebAssembly] Fix assembly printing of br_table
Summary: In `br_table's stack version asm string, \t was missing.
Reviewers: aardappel
Subscribers: dschuff, sbc100, jgravelle-google, sunfish, llvm-commits
Differential Revision: https://reviews.llvm.org/D53516
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@344981
91177308-0d34-0410-b5e6-
96231b3b80d8
Wouter van Oortmerssen [Tue, 23 Oct 2018 00:12:49 +0000 (00:12 +0000)]
[WebAssembly] Added test for inline assembly roundtrip.
Summary:
Due to previous work to make WebAssembly MC by default stack-only
inline assembly now "just works" (previously it didn't since it had
no way to know types of registers), so no further work required.
So far we only have tests (in inline-asm.ll) which test with
non-existing instructions, so this adds a test that roundtrips
both the inline assembly and its surrounding code thru the assembler.
Reviewers: dschuff, sunfish
Subscribers: sbc100, jgravelle-google, eraman, aheejin, llvm-commits
Differential Revision: https://reviews.llvm.org/D52914
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@344977
91177308-0d34-0410-b5e6-
96231b3b80d8
Saleem Abdulrasool [Mon, 22 Oct 2018 23:34:24 +0000 (23:34 +0000)]
X86: fix a comment copy-paste issue (NFC)
The comment was copy-pasted but not updated. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@344973
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Mon, 22 Oct 2018 23:14:55 +0000 (23:14 +0000)]
[X86] Remove unused entries from the X86ProcFamily enum. Add a note to discourage creation of new enum entries.
As we've learned multiple times, a coarse grained enum like this is not scalable and we should be migrating away from it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@344972
91177308-0d34-0410-b5e6-
96231b3b80d8
Leonard Chan [Mon, 22 Oct 2018 23:08:40 +0000 (23:08 +0000)]
[Intrinsic] Unigned Saturation Addition Intrinsic
Add an intrinsic that takes 2 integers and perform unsigned saturation
addition on them.
This is a part of implementing fixed point arithmetic in clang where some of
the more complex operations will be implemented as intrinsics.
Differential Revision: https://reviews.llvm.org/D53340
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@344971
91177308-0d34-0410-b5e6-
96231b3b80d8
Matthias Braun [Mon, 22 Oct 2018 22:52:23 +0000 (22:52 +0000)]
X86: Do not optimize branches with undef eflags inputs
analyzeBranch()/insertBranch() etc. do not properly deal with an undef
flag on the eflags input and used to produce invalid MIR. I don't see
this ever affecting real world inputs (I don't think it is possible to
produce undef flags with llvm IR), so I simply changed the code to bail
out in this case.
rdar://
42122367
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@344970
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Mon, 22 Oct 2018 22:50:27 +0000 (22:50 +0000)]
[Reassociate] remove bogus tests; NFC
I was trying to provide test coverage for D53533
with rL344964, but these don't do it...and I don't
think they add any value, so deleting.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@344969
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Mon, 22 Oct 2018 22:29:09 +0000 (22:29 +0000)]
[MC] Shrink MCAsmParser by grouping bools, add const, NFC
I was considering adding another boolean here. I standardized on bools
since they allow default member initializers in the class definition.
This makes ShowParsedOperands protected instead of private, but that's
probably fine.
Reduce the SmallVector size while we're at it, since the common case is
that there is never a pending error.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@344967
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Mon, 22 Oct 2018 22:26:00 +0000 (22:26 +0000)]
[ARM] Regenerate reverse shuffle costs
Came about while cleaning up general shuffle costs for PR39368
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@344966
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Mon, 22 Oct 2018 22:14:05 +0000 (22:14 +0000)]
Recommit r344877 "[X86] Stop promoting integer loads to vXi64"
I've included a fix to DAGCombiner::ForwardStoreValueToDirectLoad that I believe will prevent the previous miscompile.
Original commit message:
Theoretically this was done to simplify the amount of isel patterns that were needed. But it also meant a substantial number of our isel patterns have to match an explicit bitcast. By making the vXi32/vXi16/vXi8 types legal for loads, DAG combiner should be able to change the load type to rem
I had to add some additional plain load instruction patterns and a few other special cases, but overall the isel table has reduced in size by ~12000 bytes. So it looks like this promotion was hurting us more than helping.
I still have one crash in vector-trunc.ll that I'm hoping @RKSimon can help with. It seems to relate to using getTargetConstantFromNode on a load that was shrunk due to an extract_subvector combine after the constant pool entry was created. So we end up decoding more mask elements than the lo
I'm hoping this patch will simplify the number of patterns needed to remove the and/or/xor promotion.
Reviewers: RKSimon, spatel
Reviewed By: RKSimon
Subscribers: llvm-commits, RKSimon
Differential Revision: https://reviews.llvm.org/D53306
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@344965
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Mon, 22 Oct 2018 22:04:13 +0000 (22:04 +0000)]
[Reassociate] add vector tests with undef elements; NFC
Also, regenerate checks for these files. We should do better
on the vector tests by using the PatternMatch API instead of
BinaryOperator::isNot/isNeg.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@344964
91177308-0d34-0410-b5e6-
96231b3b80d8
Thomas Lively [Mon, 22 Oct 2018 21:55:26 +0000 (21:55 +0000)]
[WebAssembly][NFC] Remove WebAssemblyStackifier TableGen backend
Summary:
Replace its functionality with a TableGen InstrInfo relational
instruction mapping. Although arguably more complex than the TableGen
backend, the relational mapping is a smaller maintenance burden than a
TableGen backend.
Reviewers: aardappel, aheejin, dschuff
Subscribers: mgorny, sbc100, jgravelle-google, sunfish, llvm-commits
Differential Revision: https://reviews.llvm.org/D53307
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@344962
91177308-0d34-0410-b5e6-
96231b3b80d8
Vedant Kumar [Mon, 22 Oct 2018 21:44:21 +0000 (21:44 +0000)]
[DWARF] Use a function-local offset for AT_call_return_pc
Logs provided by @stella.stamenova indicate that on Linux, lldb adds a
spurious slide offset to the return PC it loads from AT_call_return_pc
attributes (see the list thread: "[PATCH] D50478: Add support for
artificial tail call frames").
This patch side-steps the issue by getting rid of the load address
calculation in lldb's CallEdge::GetReturnPCAddress.
The idea is to have the DWARF writer emit function-local offsets to the
instruction after a call. I.e. return-pc = label-after-call-insn -
function-entry. LLDB can simply add this offset to the base address of a
function to get the return PC.
Differential Revision: https://reviews.llvm.org/D53469
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@344960
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Mon, 22 Oct 2018 21:37:02 +0000 (21:37 +0000)]
[Reassociate] add 'using namespace' to reduce bloat; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@344959
91177308-0d34-0410-b5e6-
96231b3b80d8
Lang Hames [Mon, 22 Oct 2018 21:17:56 +0000 (21:17 +0000)]
[ORC] Guard access to the MemMgrs vector in RTDyldObjectLinkingLayer.
Otherwise we can end up with a data-race when linking concurrently.
This should fix an intermittent failure in the multiple-compile-threads-basic.ll
testcase.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@344956
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Mon, 22 Oct 2018 21:11:15 +0000 (21:11 +0000)]
[x86] add test for PR25498 and complete checks; NFC
Might as well test the actual codegen instead of just the absence of crashing.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@344955
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Northover [Mon, 22 Oct 2018 20:38:13 +0000 (20:38 +0000)]
X86: add alias for pushfw/popfw in Intel mode
A while ago we changed pushf and popf in Intel mode to generate pushfq
and popfq. Unfortunately that left us with no way to get the 16-bit
encoding in Intel mode so this patch adds pushfw and popfw as aliases
there.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@344949
91177308-0d34-0410-b5e6-
96231b3b80d8
Justin Bogner [Mon, 22 Oct 2018 19:51:31 +0000 (19:51 +0000)]
Reapply "[MachineCopyPropagation] Reimplement CopyTracker in terms of register units"
Recommits r342942, which was reverted in r343189, with a fix for an
issue where we would propagate unsafely if we defined only the upper
part of a register.
Original message:
Change the copy tracker to keep a single map of register units
instead of 3 maps of registers. This gives a very significant
compile time performance improvement to the pass. I measured a
30-40% decrease in time spent in MCP on x86 and AArch64 and much
more significant improvements on out of tree targets with more
registers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@344942
91177308-0d34-0410-b5e6-
96231b3b80d8
Teresa Johnson [Mon, 22 Oct 2018 19:06:42 +0000 (19:06 +0000)]
[hot-cold-split] Add opt remark on success
Summary: Emit optimization remark on successful hot cold split.
Reviewers: sebpop, hiraditya
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D53512
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@344938
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Mon, 22 Oct 2018 19:01:25 +0000 (19:01 +0000)]
Revert rL344931 from llvm/trunk: [X86][SSE] getTargetShuffleMaskIndices - allow opt-in support for whole undef shuffle mask elements
We can't safely assume that certain RawMask entries are UNDEF as most variable shuffles ignore non-index bits - PSHUFB only works on i8 elts so it'd be safe to use but I'm intending to come up with an alternative approach that works for all.
........
Enable this for PSHUFB constant mask decoding and remove the ConstantPool DecodePSHUFBMask
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@344937
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Mon, 22 Oct 2018 18:58:32 +0000 (18:58 +0000)]
Revert rL344933 from llvm/trunk: [X86][SSE] Tidyup DecodeVPERMILPMask shuffle mask decoding
We can't safely assume that certain RawMask entries are UNDEF as most variable shuffles ignore non-index bits.
........
Add support for UNDEF raw mask elements and remove the ConstantPool DecodeVPERMILPMask usage in X86ISelLowering.cpp
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@344936
91177308-0d34-0410-b5e6-
96231b3b80d8
Aaron Ballman [Mon, 22 Oct 2018 18:51:29 +0000 (18:51 +0000)]
Revert r344930 as it broke some of the bots on Windows.
http://lab.llvm.org:8011/builders/clang-x64-windows-msvc/builds/739
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@344935
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Mon, 22 Oct 2018 18:35:13 +0000 (18:35 +0000)]
[X86][SSE] Tidyup DecodeVPERMILPMask shuffle mask decoding
Add support for UNDEF raw mask elements and remove the ConstantPool DecodeVPERMILPMask usage in X86ISelLowering.cpp
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@344933
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Mon, 22 Oct 2018 18:09:02 +0000 (18:09 +0000)]
[X86][SSE] getTargetShuffleMaskIndices - allow opt-in support for whole undef shuffle mask elements
Enable this for PSHUFB constant mask decoding and remove the ConstantPool DecodePSHUFBMask
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@344931
91177308-0d34-0410-b5e6-
96231b3b80d8
Joel E. Denny [Mon, 22 Oct 2018 18:00:49 +0000 (18:00 +0000)]
[SourceMgr][FileCheck] Obey -color by extending WithColor
While this change specifically targets FileCheck, it affects any tool
using the same SourceMgr facilities.
Previously, -color was documented in FileCheck's -help output, but
-color had no effect. Now, -color obeys its documentation: it forces
colors to be used in FileCheck diagnostics even when stderr is not a
terminal.
-color is especially helpful when combined with FileCheck's -v, which
can produce a long series of diagnostics that you might wish to pipe
to a pager, such as less -R. The WithColor extensions here will also
help to clean up color usage in FileCheck's annotated dump of input,
which is proposed in D52999.
Reviewed By: JDevlieghere
Differential Revision: https://reviews.llvm.org/D53419
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@344930
91177308-0d34-0410-b5e6-
96231b3b80d8
Teresa Johnson [Mon, 22 Oct 2018 17:57:02 +0000 (17:57 +0000)]
[hot-cold-split] Add missing FileCheck invocations
Summary:
r344558 added some CHECK statements to split-cold-2.ll, but didn't add
any invocations of FileCheck. Add those here.
Reviewers: sebpop
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D53505
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@344928
91177308-0d34-0410-b5e6-
96231b3b80d8
Fangrui Song [Mon, 22 Oct 2018 17:52:31 +0000 (17:52 +0000)]
[llvm-exegesis] Fix name lookup ambiguity in MSVC after 344922
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@344927
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Mon, 22 Oct 2018 17:43:33 +0000 (17:43 +0000)]
[X86] getTargetConstantBitsFromNode - handle extraction from larger constant pool entries
First step towards removing X86ShuffleDecodeConstantPool usage from X86ISelLowering.cpp
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@344924
91177308-0d34-0410-b5e6-
96231b3b80d8
Fangrui Song [Mon, 22 Oct 2018 17:10:47 +0000 (17:10 +0000)]
[llvm-exegesis] Move namespace exegesis inside llvm::
Summary:
This allows simplifying references of llvm::foo with foo when the needs
come in the future.
Reviewers: courbet, gchatelet
Reviewed By: gchatelet
Subscribers: javed.absar, tschuett, llvm-commits
Differential Revision: https://reviews.llvm.org/D53455
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@344922
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Mon, 22 Oct 2018 16:59:24 +0000 (16:59 +0000)]
Revert r344877 "[X86] Stop promoting integer loads to vXi64"
Sam McCall reported miscompiles in some tensorflow code. Reverting while I try to figure out.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@344921
91177308-0d34-0410-b5e6-
96231b3b80d8
Vedant Kumar [Mon, 22 Oct 2018 16:50:24 +0000 (16:50 +0000)]
[test] Relax test/Other/opt-hot-cold-split.ll
On some ARM bots, 'Target Pass Configuration' does not run after 'Target
Transform Info'. Relax this pipeline test to allow that.
This is the same fix as in r328167.
Bot URL: http://lab.llvm.org:8011/builders/clang-cmake-armv7-quick/builds/4611
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@344919
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrea Di Biagio [Mon, 22 Oct 2018 16:28:07 +0000 (16:28 +0000)]
[llvm-mca] Remove a couple of using directives and a bunch of redundant namespace llvm prefixes. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@344916
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Mon, 22 Oct 2018 16:27:27 +0000 (16:27 +0000)]
DAG: Change behavior of fminnum/fmaxnum nodes
Introduce new versions that follow the IEEE semantics
to help with legalization that may need quieted inputs.
There are some regressions from inserting unnecessary
canonicalizes when these are matched from fast math
fcmp + select which should be fixed in a future commit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@344914
91177308-0d34-0410-b5e6-
96231b3b80d8
Zachary Turner [Mon, 22 Oct 2018 16:19:07 +0000 (16:19 +0000)]
Some cleanups to the native pdb plugin [NFC].
This is mostly some cleanup done in the process of implementing
some basic support for types. I tried to split up the patch a
bit to get some of the NFC portion of the patch out into a separate
commit, and this is the result of that. It moves some code around,
deletes some spurious namespace qualifications, removes some
unnecessary header includes, forward declarations, etc.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@344913
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrea Di Biagio [Mon, 22 Oct 2018 15:36:15 +0000 (15:36 +0000)]
[llvm-mca] Use llvm::ArrayRef in class SourceMgr. NFCI
Class SourceMgr now uses type ArrayRef<MCInst> to reference the
sequence of code from a "CodeRegion".
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@344911
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Mon, 22 Oct 2018 15:33:30 +0000 (15:33 +0000)]
[X86][SSE] getTargetShuffleMask - pull out repeated shuffle mask element size. NFCI.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@344910
91177308-0d34-0410-b5e6-
96231b3b80d8
Aleksandr Urakov [Mon, 22 Oct 2018 15:30:48 +0000 (15:30 +0000)]
Revert "[PDB] Extend IPDBSession's interface to retrieve frame data"
This reverts commit
b5c7e2f9a4dbb34e3667c4bb4972735eadd3247a.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@344909
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Mon, 22 Oct 2018 15:26:27 +0000 (15:26 +0000)]
[InstCombine] add tests for shuffle+insert folds; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@344908
91177308-0d34-0410-b5e6-
96231b3b80d8
Guillaume Chatelet [Mon, 22 Oct 2018 15:06:10 +0000 (15:06 +0000)]
[llvm-exegesis] Crash when assembling invalid Operand
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@344907
91177308-0d34-0410-b5e6-
96231b3b80d8
Guillaume Chatelet [Mon, 22 Oct 2018 14:55:43 +0000 (14:55 +0000)]
[llvm-exegesis] Mark x86 segment register instructions as unsupported.
Reviewers: courbet
Subscribers: tschuett, llvm-commits
Differential Revision: https://reviews.llvm.org/D53499
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@344906
91177308-0d34-0410-b5e6-
96231b3b80d8
Guillaume Chatelet [Mon, 22 Oct 2018 14:46:08 +0000 (14:46 +0000)]
[llvm-exegesis] Reject x86 instructions that use non uniform memory accesses
Reviewers: courbet
Subscribers: tschuett, llvm-commits
Differential Revision: https://reviews.llvm.org/D53438
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@344905
91177308-0d34-0410-b5e6-
96231b3b80d8
Roman Lebedev [Mon, 22 Oct 2018 14:12:44 +0000 (14:12 +0000)]
[X86] X86DAGToDAGISel: handle BZHI selection too, not just BEXTR.
Summary:
As discussed in D52304 / IRC, we now have pattern matching for
'bit extract' in two places - tablegen and `X86DAGToDAGISel`.
There are 4 patterns.
And we will have a problem with `x & (-1 >> (32 - y))` pattern.
* If the mask is one-use, then it is always unfolded into `x << (32 - y) >> (32 - y)` first.
Thus, the existing test coverage is already broken.
* If it is not one-use, then it is not unfolded, and is matched as BZHI.
* If it is not one-use, we will not match it as BEXTR. And if it is one-use, it will have been unfolded already.
So we will either not handle that pattern for BEXTR, or not have test coverage for it.
This is bad.
As discussed with @craig.topper, let's unify this matching, and do everything in `X86DAGToDAGISel`.
Then we will not have code duplication, and will have proper test coverage.
This indeed does not affect any tests, and this is great.
It means that for these two patterns, the `X86DAGToDAGISel` is identical to the tablegen version.
Please review carefully, i'm not fully sure about that intrinsic change, and introduction of the new `X86ISD` opcode.
Reviewers: craig.topper, RKSimon, spatel
Reviewed By: craig.topper
Subscribers: llvm-commits, craig.topper
Differential Revision: https://reviews.llvm.org/D53164
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@344904
91177308-0d34-0410-b5e6-
96231b3b80d8
David Greene [Mon, 22 Oct 2018 14:04:13 +0000 (14:04 +0000)]
Document bisect-skip-count
Provide an example of how to use bisect-skip count to find bugs.
Differential revision: https://reviews.llvm.org/D52314
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@344903
91177308-0d34-0410-b5e6-
96231b3b80d8
Roman Lebedev [Mon, 22 Oct 2018 13:54:17 +0000 (13:54 +0000)]
[X86][BMI1]: X86DAGToDAGISel: select BEXTR from x & ((1 << nbits) + (-1)) pattern
Summary:
Trivial continuation of D52304.
While this pattern is not canonical, we do select it in the BZHI case,
so this should not be any different.
Reviewers: RKSimon, craig.topper, spatel
Reviewed By: RKSimon
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D52348
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@344902
91177308-0d34-0410-b5e6-
96231b3b80d8
Petar Avramovic [Mon, 22 Oct 2018 13:27:50 +0000 (13:27 +0000)]
Test commit: change comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@344900
91177308-0d34-0410-b5e6-
96231b3b80d8
George Rimar [Mon, 22 Oct 2018 12:18:30 +0000 (12:18 +0000)]
[llvm-dwarfdump] - Fix win10 build bot failture.
Bot failed:
http://lab.llvm.org:8011/builders/llvm-clang-lld-x86_64-scei-ps4-windows10pro-fast/builds/20877/steps/test/logs/stdio
This was broken after the
r344895 "[llvm-dwarfdump] - Add the support of parsing .debug_loclists."
because of wrong formatting specifiers used.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@344896
91177308-0d34-0410-b5e6-
96231b3b80d8
George Rimar [Mon, 22 Oct 2018 11:30:54 +0000 (11:30 +0000)]
[llvm-dwarfdump] - Add the support of parsing .debug_loclists.
This teaches llvm-dwarfdump to dump the content of .debug_loclists sections.
It converts the DWARFDebugLocDWO class to DWARFDebugLoclists,
teaches llvm-dwarfdump about .debug_loclists section and
adds the implementation for parsing the DW_LLE_offset_pair entries.
Differential revision: https://reviews.llvm.org/D53364
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@344895
91177308-0d34-0410-b5e6-
96231b3b80d8
Nemanja Ivanovic [Mon, 22 Oct 2018 11:22:59 +0000 (11:22 +0000)]
[PowerPC][NFC] Fix bugs in r+r to r+i conversion
The D-Form VSX loads introduced in ISA 3.0 are not direct D-Form equivalent of
the corresponding X-Forms since they only target the Altivec registers.
Namely LXSSPX can load into any of the 64 VSX registers whereas LXSSP can only
load into the upper 32 VSX registers. Similarly with the remaining affected
instructions.
There is currently no way that I can see to trigger the bug, but as we add other
ways of exploiting these instructions, there may very well be instances that do.
This is an NFC patch in practical terms since the changes it introduces can not
be triggered without an MIR test.
Differential revision: https://reviews.llvm.org/D53323
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@344894
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Mon, 22 Oct 2018 10:51:34 +0000 (10:51 +0000)]
[CGProfile] Turn constant-size SmallVector into array
No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@344893
91177308-0d34-0410-b5e6-
96231b3b80d8
Aleksandr Urakov [Mon, 22 Oct 2018 07:18:08 +0000 (07:18 +0000)]
[PDB] Extend IPDBSession's interface to retrieve frame data
Summary:
This patch just extends the `IPDBSession` interface to allow retrieving
of frame data through it, and adds an implementation over DIA. It is needed
for an implementation (for now with DIA) of the conversion from FPO programs
to DWARF expressions mentioned in D53086.
Reviewers: zturner, asmith, rnk
Reviewed By: asmith
Subscribers: mgorny, aprantl, JDevlieghere, llvm-commits
Differential Revision: https://reviews.llvm.org/D53324
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@344886
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Mon, 22 Oct 2018 06:30:22 +0000 (06:30 +0000)]
[X86] Add patterns for vector and/or/xor/andn with other types than vXi64.
This makes fast isel treat all legal vector types the same way. Previously only vXi64 was in the fast-isel tables.
This unfortunately prevents matching of andn by fast-isel for these types since the requires SelectionDAG. But we already had this issue for vXi64. So at least we're consistent now.
Interestinly it looks like fast-isel can't handle instructions with constant vector arguments so the the not part of the andn patterns is selected with SelectionDAG. This explains why VPTERNLOG shows up in some of the tests.
This is a subset of D53268. As I make progress on that, I will try to reduce the number of lines in the tablegen files.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@344884
91177308-0d34-0410-b5e6-
96231b3b80d8
Dorit Nuzman [Mon, 22 Oct 2018 06:17:09 +0000 (06:17 +0000)]
[IAI,LV] Avoid creating a scalar epilogue due to gaps in interleave-groups when
optimizing for size
LV is careful to respect -Os and not to create a scalar epilog in all cases
(runtime tests, trip-counts that require a remainder loop) except for peeling
due to gaps in interleave-groups. This patch fixes that; -Os will now have us
invalidate such interleave-groups and vectorize without an epilog.
The patch also removes a related FIXME comment that is now obsolete, and was
also inaccurate:
"FIXME: return None if loop requiresScalarEpilog(<MaxVF>), or look for a smaller
MaxVF that does not require a scalar epilog."
(requiresScalarEpilog() has nothing to do with VF).
Reviewers: Ayal, hsaito, dcaballe, fhahn
Reviewed By: Ayal
Differential Revision: https://reviews.llvm.org/D53420
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@344883
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Sun, 21 Oct 2018 21:30:26 +0000 (21:30 +0000)]
[X86] Stop promoting integer loads to vXi64
Summary:
Theoretically this was done to simplify the amount of isel patterns that were needed. But it also meant a substantial number of our isel patterns have to match an explicit bitcast. By making the vXi32/vXi16/vXi8 types legal for loads, DAG combiner should be able to change the load type to remove the bitcast.
I had to add some additional plain load instruction patterns and a few other special cases, but overall the isel table has reduced in size by ~12000 bytes. So it looks like this promotion was hurting us more than helping.
I still have one crash in vector-trunc.ll that I'm hoping @RKSimon can help with. It seems to relate to using getTargetConstantFromNode on a load that was shrunk due to an extract_subvector combine after the constant pool entry was created. So we end up decoding more mask elements than the load size.
I'm hoping this patch will simplify the number of patterns needed to remove the and/or/xor promotion.
Reviewers: RKSimon, spatel
Reviewed By: RKSimon
Subscribers: llvm-commits, RKSimon
Differential Revision: https://reviews.llvm.org/D53306
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@344877
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Sun, 21 Oct 2018 21:08:37 +0000 (21:08 +0000)]
Revert r344873 "foo"
Rebase gone wrong left this in my tree.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@344875
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Sun, 21 Oct 2018 21:07:27 +0000 (21:07 +0000)]
[X86] Remove SDIVREM8_SEXT_HREG/UDIVREM8_ZEXT_HREG and their associated DAG combine and target bits support. Use a post isel peephole instead.
Summary:
These nodes exist to overcome an isel problem where we can generate a zero extend of an AH register followed by an extract subreg, and another zero extend. The first zero extend exists to avoid a partial register update copying the AH register into the low 8-bits. The second zero extend exists if the user wanted the remainder zero extended.
To make this work we had a DAG combine to morph the DIVREM opcode to a special opcode that included the extend. But then we had to add the new node to computeKnownBits and computeNumSignBits to process the extension portion.
This patch instead removes all of that and adds a late peephole to detect the two extends.
Reviewers: RKSimon, spatel
Reviewed By: RKSimon
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D53449
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@344874
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Sun, 21 Oct 2018 21:07:25 +0000 (21:07 +0000)]
foo
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@344873
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Sun, 21 Oct 2018 20:13:29 +0000 (20:13 +0000)]
[DAGCombiner] reduce insert+bitcast+extract vector ops to truncate (PR39016)
This is a late backend subset of the IR transform added with:
D52439
We can confirm that the conversion to a 'trunc' is correct by running:
$ opt -instcombine -data-layout="e"
(assuming the IR transforms are correct; change "e" to "E" for big-endian)
As discussed in PR39016:
https://bugs.llvm.org/show_bug.cgi?id=39016
...the pattern may emerge during legalization, so that's we are waiting for an
insertelement to become a scalar_to_vector in the pattern matching here.
The DAG allows for fun variations that are not possible in IR. Result types for
extracts and scalar_to_vector don't necessarily match input types, so that means
we have to be a bit more careful in the transform (see code comments).
The tests show that we don't handle cases that require a shift (as we did in the
IR version). I've left that as a potential follow-up because I'm not sure if
that's a real concern at this late stage.
Differential Revision: https://reviews.llvm.org/D53201
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@344872
91177308-0d34-0410-b5e6-
96231b3b80d8
Aditya Kumar [Sun, 21 Oct 2018 18:11:56 +0000 (18:11 +0000)]
Schedule Hot Cold Splitting pass after most optimization passes
Summary:
In the new+old pass manager, hot cold splitting was schedule too early.
Thanks to Vedant for pointing this out.
Reviewers: sebpop, vsk
Reviewed By: sebpop, vsk
Subscribers: mehdi_amini, llvm-commits
Differential Revision: https://reviews.llvm.org/D53437
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@344869
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Sun, 21 Oct 2018 17:07:50 +0000 (17:07 +0000)]
[X86][AVX] Enable lowerVectorShuffleAsLanePermuteAndPermute v16i16/v32i8 unary shuffle lowering
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@344868
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Sun, 21 Oct 2018 11:55:56 +0000 (11:55 +0000)]
[X86] Only extract constant pool shuffle mask data with zero offsets
D53306 exposes an issue where we sometimes use constant pool data from bigger vectors than the target shuffle mask. This should be safe to do, but we have to be certain that we're using the bottom most part of the vector as the shuffle mask decoders have no way to peek into subvectors with non-zero offsets.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@344867
91177308-0d34-0410-b5e6-
96231b3b80d8
Heejin Ahn [Sun, 21 Oct 2018 11:16:50 +0000 (11:16 +0000)]
[WebAssembly] Change tabs to spaces in basic-assembly.s
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@344866
91177308-0d34-0410-b5e6-
96231b3b80d8
Lang Hames [Sat, 20 Oct 2018 20:39:53 +0000 (20:39 +0000)]
[ORC] Add some more basic sanity tests for the LLJIT.
minimal.ll contains a main function that returns zero, and
single-function-call.ll contains a main function that calls a foo function that
returns zero. These minimal tests can help to rule out some trivial JIT bugs
when other tests fail.
This commit also renames hello.ll to global-ctors-and-dtors.ll, which better
reflects what it is actually testing.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@344863
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Sat, 20 Oct 2018 18:18:55 +0000 (18:18 +0000)]
[InstCombine] add test for possible shuffle fold; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@344860
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Sat, 20 Oct 2018 17:38:33 +0000 (17:38 +0000)]
[CostModel][X86] Add some initial extract/insert subvector shuffle cost tests
Just f64/i64 tests initially to demonstrate PR39368
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@344857
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Sat, 20 Oct 2018 17:15:57 +0000 (17:15 +0000)]
[InstCombine] use 'match' to simplify code; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@344855
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Sat, 20 Oct 2018 16:58:27 +0000 (16:58 +0000)]
[InstCombine] make code more flexible with lambda; NFC
I couldn't tell from svn history when these checks were added,
but it pre-dates the split of instcombine into its own directory
at rL92459.
The motivation for changing the check is partly shown by the
code in PR34724:
https://bugs.llvm.org/show_bug.cgi?id=34724
There are also existing regression tests for SLPVectorizer with
sequences of extract+insert that are likely assumed to become
shuffles by the vectorizer cost models.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@344854
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Sat, 20 Oct 2018 16:25:55 +0000 (16:25 +0000)]
[InstCombine] add explanatory comment for strange vector logic; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@344852
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Sat, 20 Oct 2018 15:17:27 +0000 (15:17 +0000)]
[SLPVectorizer][X86] Add mul/and/or/xor unrolled reduction tests
We miss arithmetic reduction for everything but Add/FAdd (I assume because that's the only cases which x86 has horizontal ops for.....)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@344849
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Sat, 20 Oct 2018 14:53:07 +0000 (14:53 +0000)]
[SLPVectorizer] regenerate test checks; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@344848
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Sat, 20 Oct 2018 14:29:59 +0000 (14:29 +0000)]
[CostModel][X86] Add integer vector reduction cost tests
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@344846
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Sat, 20 Oct 2018 13:16:31 +0000 (13:16 +0000)]
Replace setFeature macro with lambda to fix MSVC "shift count negative or too big" warnings. NFCI.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@344843
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Sat, 20 Oct 2018 09:16:49 +0000 (09:16 +0000)]
DebugInfo: Use base address specifiers more aggressively
Using a base address specifier even for a single-element range is a size
win for object files (7 words versus 8 words - more significant savings
if the debug info is compressed (since it's 3 words of uncompressable
reloc + 4 compressable words compared to 6 uncompressable reloc + 2
compressable words) - does trade off executable size increase though.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@344841
91177308-0d34-0410-b5e6-
96231b3b80d8