Simon Pilgrim [Mon, 29 Apr 2019 18:52:19 +0000 (18:52 +0000)]
[InstCombine] visitFCmpInst - appease copy+paste pattern warning. NFCI.
PVS Studio's copy+paste recognizer was seeing this as a typo, technically Op0/Op1 in a fcmp should always be the same type, but we might as well avoid the issue.
Reported in https://www.viva64.com/en/b/0629/
llvm-svn: 359482
Daniel Sanders [Mon, 29 Apr 2019 18:45:59 +0000 (18:45 +0000)]
[globalisel] Improve Legalizer debug output
* LegalizeAction should be printed by name rather than number
* Newly created instructions are incomplete at the point the observer first sees
them. They are therefore recorded in a small vector and printed just before
the legalizer moves on to another instruction. By this point, the instruction
must be complete.
llvm-svn: 359481
Don Hinton [Mon, 29 Apr 2019 18:34:18 +0000 (18:34 +0000)]
[CommandLine] Don't allow unlimitted dashes for options. Part 1 or 5
Summary:
Prior to this patch, the CommandLine parser would strip an
unlimitted number of dashes from options. This patch limits it to
two.
Reviewers: rnk
Reviewed By: rnk
Subscribers: hiraditya, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D61229
llvm-svn: 359480
Simon Pilgrim [Mon, 29 Apr 2019 18:32:06 +0000 (18:32 +0000)]
[X86] scaleShuffleMask - avoid potential signed overflow warning.
Use size_t assignment to prevent a bad explicit type conversion warning.
Given the typical size of shuffle masks this was never going to happen, but this at least stops the warning.
Reported in https://www.viva64.com/en/b/0629/
llvm-svn: 359479
Simon Pilgrim [Mon, 29 Apr 2019 18:25:04 +0000 (18:25 +0000)]
[TextAPI] Fix Symbol::dump which was failing to append the SymbolKind string.
Reported in https://www.viva64.com/en/b/0629/
llvm-svn: 359478
Simon Pilgrim [Mon, 29 Apr 2019 18:24:30 +0000 (18:24 +0000)]
[llvm-mca][x86] Fix MMX PMOVMSKB test
This is defined as part of SSE1, XMM PMOVMSKB doesn't appear until SSE2
llvm-svn: 359477
Bjorn Pettersson [Mon, 29 Apr 2019 17:50:10 +0000 (17:50 +0000)]
[DAG] Refactor DAGCombiner::ReassociateOps
Summary:
Extract the logic for doing reassociations
from DAGCombiner::reassociateOps into a helper
function DAGCombiner::reassociateOpsCommutative,
and use that helper to trigger reassociation
on the original operand order, or the commuted
operand order.
Codegen is not identical since the operand order will
be different when doing the reassociations for the
commuted case. That causes some unfortunate churn in
some test cases. Apart from that this should be NFC.
Reviewers: spatel, craig.topper, tstellar
Reviewed By: spatel
Subscribers: dmgreen, dschuff, jvesely, nhaehnle, javed.absar, sbc100, jgravelle-google, hiraditya, aheejin, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D61199
llvm-svn: 359476
Thomas Preud'homme [Mon, 29 Apr 2019 17:46:26 +0000 (17:46 +0000)]
FileCheck [3/12]: Stricter parsing of @LINE expressions
Summary:
This patch is part of a patch series to add support for FileCheck
numeric expressions. This specific patch gives earlier and better
diagnostics for the @LINE expressions.
Rather than detect parsing errors at matching time, this commit adds
enhance parsing to detect issues with @LINE expressions at parse time
and diagnose them more accurately.
Copyright:
- Linaro (changes up to diff 183612 of revision D55940)
- GraphCore (changes in later versions of revision D55940 and
in new revision created off D55940)
Reviewers: jhenderson, chandlerc, jdenny, probinson, grimar, arichardson, rnk
Subscribers: hiraditya, llvm-commits, probinson, dblaikie, grimar, arichardson, tra, rnk, kristina, hfinkel, rogfer01, JonChesterfield
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D60383
llvm-svn: 359475
Simon Pilgrim [Mon, 29 Apr 2019 17:41:27 +0000 (17:41 +0000)]
[TableGen] Fix null pointer dereferencing.
Reported in https://www.viva64.com/en/b/0629/
llvm-svn: 359474
Simon Pilgrim [Mon, 29 Apr 2019 17:38:18 +0000 (17:38 +0000)]
Avoid "checking a pointer after dereferencing" warning. NFCI.
Reported in https://www.viva64.com/en/b/0629/
llvm-svn: 359473
Simon Pilgrim [Mon, 29 Apr 2019 17:34:26 +0000 (17:34 +0000)]
Move if() to newline to stop ambiguity over whether it should be else if. NFCI.
Reported in https://www.viva64.com/en/b/0629/
llvm-svn: 359472
Adrian Prantl [Mon, 29 Apr 2019 17:28:38 +0000 (17:28 +0000)]
Fix a stack-smasher in PlatformMacOSX::GetSDKDirectory()
GetSDKVersion expects the number of version fields not their byte size
and will happily overwrite later contents of the stack.
Differential Revision: https://reviews.llvm.org/D61218
llvm-svn: 359471
Kadir Cetinkaya [Mon, 29 Apr 2019 17:25:58 +0000 (17:25 +0000)]
[clangd] Fix serialization logic for Origin and Flags.
llvm-svn: 359470
Simon Pilgrim [Mon, 29 Apr 2019 17:04:14 +0000 (17:04 +0000)]
Fix operator precedence warning. NFCI.
Reported in https://www.viva64.com/en/b/0629/
llvm-svn: 359469
Yitzhak Mandelbaum [Mon, 29 Apr 2019 16:57:40 +0000 (16:57 +0000)]
[LibTooling] Fix unneeded use of unique_ptr where shared_ptr is expected.
Summary: This fixes a few places in the Stencil implementation where a unique_ptr is created at a callsite that expects shared_ptr. Since the former implicitly converts to the latter, the code compiles and runs correctly as is. But, there's no reason to involve unique_ptr -- the current code was leftover from a previous version in which unique_ptr was the expected type.
Reviewers: sbenza
Subscribers: cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D61005
llvm-svn: 359468
Simon Pilgrim [Mon, 29 Apr 2019 16:45:35 +0000 (16:45 +0000)]
Remove superfluous break from switch statement. NFCI.
Reported in https://www.viva64.com/en/b/0629/
llvm-svn: 359467
Julian Lettner [Mon, 29 Apr 2019 16:39:18 +0000 (16:39 +0000)]
[Sanitizer] Cleanup {ASAN, MSAN}_INTERCEPT_FUNC[_VER] macro
Note that this change is not strictly NFC since we add the
`(&(name) != &WRAP(name)` part to the conditional for the `_VER` variant
of the macro.
Reviewers: vitalybuka
Differential Revision: https://reviews.llvm.org/D61204
llvm-svn: 359466
Jonas Devlieghere [Mon, 29 Apr 2019 16:29:10 +0000 (16:29 +0000)]
[Docs] Generate the python reference without building all of LLDB
As discussed on the mailing list, we should be able to generate the
Python reference without building all of LLDB. To make that possible I
create a dummy python package, which is then parsed by epydoc. The
latter will complain that it couldn't import lldb, but that doesn't
matter as far as generation of the docs is concerned.
Differential revision: https://reviews.llvm.org/D61216
llvm-svn: 359465
Quentin Colombet [Mon, 29 Apr 2019 16:14:03 +0000 (16:14 +0000)]
[llvm-extract] Expose the group extraction feature of the BlockExtractor
This patch extends the `-bb` option to be able to use the group
extraction feature from the BlockExtractor.
In particular, `-bb=func:bb` is modified to support a list of basic
blocks per function: `-bb=func:bb1[;bb2...]` that will be extracted
together if at all possible (region must be single entry.)
Differential Revision: https://reviews.llvm.org/D60973
llvm-svn: 359464
Quentin Colombet [Mon, 29 Apr 2019 16:14:02 +0000 (16:14 +0000)]
[BlockExtractor] Expose a constructor for the group extraction
NFC
Differential Revision: https://reviews.llvm.org/D60971
llvm-svn: 359463
Quentin Colombet [Mon, 29 Apr 2019 16:14:00 +0000 (16:14 +0000)]
[BlockExtractor] Change the basic block separator from ',' to ';'
This change aims at making the file format be compatible with the
way LLVM handles command line options.
Differential Revision: https://reviews.llvm.org/D60970
llvm-svn: 359462
Kevin P. Neal [Mon, 29 Apr 2019 16:06:04 +0000 (16:06 +0000)]
Add AVX support to this test.
Requested by Craig Topper and Andrew Kaylor as part of D55897.
llvm-svn: 359461
Simon Pilgrim [Mon, 29 Apr 2019 16:03:35 +0000 (16:03 +0000)]
[X86] Remove duplicate string comparison
Fix typo introduced in rL332824 where we simplified the extact string matches for "avx512.mask.permvar.sf.256" and "avx512.mask.permvar.si.256" to a string startswith test for "avx512.mask.permvar."
llvm-svn: 359460
Alexey Bataev [Mon, 29 Apr 2019 15:51:36 +0000 (15:51 +0000)]
[OPENMP]Fix PR41617: crash on template instantiation.
Fixed the crash on the template instantiation when trying to check the
data locality in the current instantiation scope.
llvm-svn: 359459
Marshall Clow [Mon, 29 Apr 2019 15:38:07 +0000 (15:38 +0000)]
Add tests specifically for LWG2164. We already did this; but now we have tests. NFC
llvm-svn: 359458
Cullen Rhodes [Mon, 29 Apr 2019 15:27:27 +0000 (15:27 +0000)]
[AArch64][SVE] Asm: add aliases for unpredicated bitwise logical instructions
This patch adds aliases for element sizes .B/.H/.S to the
AND/ORR/EOR/BIC bitwise logical instructions. The assembler now accepts
these instructions with all element sizes up to 64-bit (.D). The
preferred disassembly is .D.
llvm-svn: 359457
Pavel Labath [Mon, 29 Apr 2019 15:16:26 +0000 (15:16 +0000)]
Remove XFAIL: windows from x86-64-gp-write.test
The typo fix in r359451 was enough to get it passing there.
llvm-svn: 359456
Sam McCall [Mon, 29 Apr 2019 14:36:26 +0000 (14:36 +0000)]
[clangd] Add separate unit tests for CanonicalIncludes. NFC
llvm-svn: 359455
Simon Pilgrim [Mon, 29 Apr 2019 14:26:27 +0000 (14:26 +0000)]
[X86][SSE] Add scalar horizontal add/sub tests for non-0/1 element extractions
llvm-svn: 359454
Ivan Donchevskii [Mon, 29 Apr 2019 14:13:11 +0000 (14:13 +0000)]
[libclang] Add missing export for clang_Cursor_isAnonymousRecordDecl
Follow up for D61232 to fix build.
llvm-svn: 359453
Pavel Labath [Mon, 29 Apr 2019 14:12:05 +0000 (14:12 +0000)]
@skipIfLinux another batch of flaky lldb-mi tests
llvm-svn: 359452
Pavel Labath [Mon, 29 Apr 2019 14:04:41 +0000 (14:04 +0000)]
Fix a typo in x86-64-gp-write.test
The test was building the wrong inferior, causing failures.
llvm-svn: 359451
Pavel Labath [Mon, 29 Apr 2019 14:00:58 +0000 (14:00 +0000)]
Remove obsoleted NativePDB tests
Their functionality overlaps with the newly introduced
PostfixExpressionTests (r359288). Tests, which still exercise some
pdb-related functionality (register name resolution) have been kept.
llvm-svn: 359450
Pavel Labath [Mon, 29 Apr 2019 13:54:12 +0000 (13:54 +0000)]
Editline: Fix an msan error
Summary:
libedit implementation of el_get(EL_GETTC) had a bug, where it was
consuming vararg arguments until reaching the first null pointer (and
not just two, as documented). This was causing (at least) errors to be
reported when running the tests under msan.
The issue has since been fixed in libedit, but this adds patch adds a
trivial workaround, so that we operate correctly with the libedit
versions which are already out there.
Reviewers: christos, krytarowski, davide
Subscribers: lldb-commits
Differential Revision: https://reviews.llvm.org/D61191
llvm-svn: 359449
Ivan Donchevskii [Mon, 29 Apr 2019 13:44:07 +0000 (13:44 +0000)]
[libclang] Restore old clang_Cursor_isAnonymous behaviour
D54996 Changed the behaviour of clang_Cursor_isAnonymous, but there is no alternative available to get the old behaviour in some cases, which is essential for determining if a record is syntactically accessible, e.g.
struct {
int x;
int y;
} foo;
struct {
struct {
int x;
int y;
};
} bar;
void fun(struct { int x; int y; } *param);
The only 'anonymous' struct here is the one nested in bar, since there is
no way to reference the struct itself, only the fields within. Though the
anonymity applies to the instance itself, not the type.
To avoid confusion, I have added a new function called clang_Cursor_isAnonymousRecordDecl
which has the old behaviour of clang_Cursor_isAnonymous (and updated the doc
for the latter as well, which was seemingly forgotten).
Patch by Jorn Vernee.
Differential Revision: https://reviews.llvm.org/D61232
llvm-svn: 359448
Thomas Preud'homme [Mon, 29 Apr 2019 13:32:36 +0000 (13:32 +0000)]
FileCheck [2/12]: Stricter parsing of -D option
Summary:
This patch is part of a patch series to add support for FileCheck
numeric expressions. This specific patch gives earlier and better
diagnostics for the -D option.
Prior to this change, parsing of -D option was very loose: it assumed
that there is an equal sign (which to be fair is now checked by the
FileCheck executable) and that the part on the left of the equal sign
was a valid variable name. This commit adds logic to ensure that this
is the case and gives diagnostic when it is not, making it clear that
the issue came from a command-line option error. This is achieved by
sharing the variable parsing code into a new function ParseVariable.
Copyright:
- Linaro (changes up to diff 183612 of revision D55940)
- GraphCore (changes in later versions of revision D55940 and
in new revision created off D55940)
Reviewers: jhenderson, chandlerc, jdenny, probinson, grimar, arichardson, rnk
Subscribers: hiraditya, llvm-commits, probinson, dblaikie, grimar, arichardson, tra, rnk, kristina, hfinkel, rogfer01, JonChesterfield
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D60382
llvm-svn: 359447
Yevgeny Rouban [Mon, 29 Apr 2019 13:29:55 +0000 (13:29 +0000)]
[LoopSimplifyCFG] Suppress expensive DomTree verification
This patch makes verification level lower for builds with
inexpensive checks.
Differential Revision: https://reviews.llvm.org/D61055
llvm-svn: 359446
George Rimar [Mon, 29 Apr 2019 12:25:01 +0000 (12:25 +0000)]
[yaml2obj] - Simplify and reduce the code. NFC.
This inlines 2 single line static methods
and simplifies the code.
It is also possible to remove the `Is64Bit`
variable since it is used only once,
but I am not sure it will be better for readability.
llvm-svn: 359445
George Rimar [Mon, 29 Apr 2019 12:05:53 +0000 (12:05 +0000)]
[yaml2obj] - Replace a loop with write_zeros(). NFCI.
This looks better.
llvm-svn: 359444
George Rimar [Mon, 29 Apr 2019 11:54:10 +0000 (11:54 +0000)]
[yaml2obj] - Cleanup and simplify the code. NFCI.
The current code has the following problems:
`initSymtabSectionHeader` and `initStrtabSectionHeader` method
names saying us they are going to initialize the section headers.
Though for a few cases sh_flags field is initialized outside of them.
It does not look clean. This patch moves initialization of the
sh_flags inside these methods.
Also, it removes an excessive variable, what together with the above
change hopefully makes the code a bit more readable.
llvm-svn: 359443
Sam McCall [Mon, 29 Apr 2019 11:47:52 +0000 (11:47 +0000)]
[clangd] Fix unittests CMake rules
llvm-svn: 359442
Michal Gorny [Mon, 29 Apr 2019 11:38:28 +0000 (11:38 +0000)]
[lldb] [lit] Introduce tests for writing x86 general-purpose registers
Introduce two initial tests for 'register write' command. The tests
first clobber x86 general purpose registers, then call int3 to let lldb
write to them, then print the new values. FileCheck takes care of
verifying whether correct values were written.
Differential Revision: https://reviews.llvm.org/D61221
llvm-svn: 359441
Michal Gorny [Mon, 29 Apr 2019 11:38:17 +0000 (11:38 +0000)]
[lldb] [test] Remove duplicate YMM/ZMM dotest tests
llvm-svn: 359440
Michal Gorny [Mon, 29 Apr 2019 11:38:10 +0000 (11:38 +0000)]
[lldb] [lit] Add tests for reading ZMM registers (AVX512)
Differential Revision: https://reviews.llvm.org/D61212
llvm-svn: 359439
Michal Gorny [Mon, 29 Apr 2019 11:37:58 +0000 (11:37 +0000)]
[lldb] [lit] Introduce tests for reading x86 general purpose registers
Introduce tests for reading the eight x86 general purpose registers,
i.e. RAX/RBX/RCX/RDX/RBP/RSP/RSI/RDI and their shorter counterparts.
The test comes in separate 32-bit and 64-bit variant, targeting
appropriate processors.
While technically the 32-bit test could run on amd64, it would be
redundant to the 64-bit version, so just run one of them on each arch.
Differential Revision: https://reviews.llvm.org/D61210
llvm-svn: 359438
Simon Pilgrim [Mon, 29 Apr 2019 11:30:47 +0000 (11:30 +0000)]
[X86][SSE] Moved haddps test from phaddsub.ll to haddsub.ll (D61245)
Also merged duplicate PR39921 + PR39936 tests
llvm-svn: 359437
Pavel Labath [Mon, 29 Apr 2019 10:55:22 +0000 (10:55 +0000)]
DWARFExpression: Fix implementation of DW_OP_pick
Summary:
The DWARF spec states that the DWARF stack arguments are numbered from
the top. Our implementation of DW_OP_pick was counting them from the
bottom.
This bug probably wasn't noticed because nobody (except my upcoming
postfix-to-DWARF converter) uses DW_OP_pick, but I've cross-checked with
gdb to confirm that counting from the top is the expected behavior.
This patch fixes the implementation to match the spec and gdb behavior
and adds a test.
Reviewers: jasonmolenda, clayborg
Subscribers: mgorny, aprantl, lldb-commits
Differential Revision: https://reviews.llvm.org/D61182
llvm-svn: 359436
Simon Pilgrim [Mon, 29 Apr 2019 10:36:20 +0000 (10:36 +0000)]
[InstCombine][X86] Add PACKSS tests for truncation of sign-extended comparisons
llvm-svn: 359435
Sam McCall [Mon, 29 Apr 2019 10:35:56 +0000 (10:35 +0000)]
[clangd] Fix windows buildbot, remove stray file after r359424. NFC
llvm-svn: 359434
Diogo N. Sampaio [Mon, 29 Apr 2019 10:28:07 +0000 (10:28 +0000)]
[ARM] Add bitcast/extract_subvec. of fp16 vectors
Summary:
This patch adds some basic operations for fp16
vectors, such as bitcast from fp16 to i16,
required to perform extract_subvector (also added
here) and extract_element.
Reviewers: SjoerdMeijer, DavidSpickett, t.p.northover, ostannard
Reviewed By: ostannard
Subscribers: javed.absar, kristof.beyls, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D60618
llvm-svn: 359433
Kadir Cetinkaya [Mon, 29 Apr 2019 10:25:44 +0000 (10:25 +0000)]
[clangd] Surface diagnostics from headers inside main file
Reviewers: ioeric, ilya-biryukov
Subscribers: MaskRay, jkorous, arphaman, jdoerfert, cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D59302
llvm-svn: 359432
Diogo N. Sampaio [Mon, 29 Apr 2019 10:10:37 +0000 (10:10 +0000)]
[ARM] Add v4f16 and v8f16 types to the CallingConv
Summary:
The Procedure Call Standard for the Arm Architecture
states that float16x4_t and float16x8_t behave just
as uint16x4_t and uint16x8_t for argument passing.
This patch adds the fp16 vectors to the
ARMCallingConv.td file.
Reviewers: miyuki, ostannard
Reviewed By: ostannard
Subscribers: ostannard, javed.absar, kristof.beyls, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D60720
llvm-svn: 359431
Russell Gallop [Mon, 29 Apr 2019 10:10:17 +0000 (10:10 +0000)]
vs integration: Use llvm-lib for librarian
This uses llvm-lib.exe for the librarian instead of Visual Studio
provided lib.exe. Without this it is not possible to create static
libraries with -flto using the plugin.
Original patch by Steven Noonan
This fixes: PR41147
Differential Revision: https://reviews.llvm.org/D61193
llvm-svn: 359430
Hans Wennborg [Mon, 29 Apr 2019 09:58:48 +0000 (09:58 +0000)]
gn: Fix check-clang build after r359179
llvm-svn: 359429
Fangrui Song [Mon, 29 Apr 2019 09:36:54 +0000 (09:36 +0000)]
[clangd] Delete config.clangd_xpc_support from test/ to unbreak check-llvm-tools
D61187 didn't delete config.clangd_xpc_support from test/
CLANGD_BUILD_XPC is defined in clangd/CMakeLists.txt and not available in test/lit.site.cfg.py.in
llvm-svn: 359428
David Chisnall [Mon, 29 Apr 2019 09:24:51 +0000 (09:24 +0000)]
Try to use /proc on FreeBSD for getExecutablePath
Currently, clang's libTooling passes this function a fake argv0, which
means that no libTooling tools can find the standard headers on FreeBSD.
With this change, these will now work on any FreeBSD systems that have
procfs mounted. This isn't the right fix for the libTooling issue, but
it does bring the FreeBSD implementation of getExecutablePath closer to
the Linux and macOS implementations.
llvm-svn: 359427
Jeremy Morse [Mon, 29 Apr 2019 09:13:16 +0000 (09:13 +0000)]
[DebugInfo] Terminate more location-list ranges at the end of blocks
This patch fixes PR40795, where constant-valued variable locations can
"leak" into blocks placed at higher addresses. The root of this is that
DbgEntityHistoryCalculator terminates all register variable locations at
the end of each block, but not constant-value variable locations.
Fixing this requires constant-valued DBG_VALUE instructions to be
broadcast into all blocks where the variable location remains valid, as
documented in the LiveDebugValues section of SourceLevelDebugging.rst,
and correct termination in DbgEntityHistoryCalculator.
Differential Revision: https://reviews.llvm.org/D59431
llvm-svn: 359426
Fangrui Song [Mon, 29 Apr 2019 08:55:10 +0000 (08:55 +0000)]
[DWARF] Fix dump of local/foreign TU lists in .debug_names
Differential Revision: https://reviews.llvm.org/D61241
llvm-svn: 359425
Sam McCall [Mon, 29 Apr 2019 08:44:01 +0000 (08:44 +0000)]
[clangd] Move clangd tests to clangd directory. check-clangd is no longer part of check-clang-tools.
Summary:
Motivation:
- this layout is a pain to work with
- without a common root, it's painful to express things like "disable clangd" (D61122)
- CMake/lit configs are a maintenance hazard, and the more the one-off hacks
for various tools are entangled, the more we see apathy and non-ownership.
This attempts to use the bare-minimum configuration needed (while still
supporting the difficult cases: windows, standalone clang build, dynamic libs).
In particular the lit.cfg.py and lit.site.cfg.py.in are merged into lit.cfg.in.
The logic in these files is now minimal.
(Much of clang-tools-extra's lit configs can probably be cleaned up by reusing
lit.llvm.llvm_config.use_clang(), and every llvm project does its own version of
LDPATH mangling. I haven't attempted to fix any of those).
Docs are still in clang-tools-extra/docs, I don't have any plans to touch those.
Reviewers: gribozavr
Subscribers: mgorny, javed.absar, MaskRay, jkorous, arphaman, kadircet, jfb, cfe-commits, ilya-biryukov, thakis
Tags: #clang
Differential Revision: https://reviews.llvm.org/D61187
llvm-svn: 359424
Petr Hosek [Mon, 29 Apr 2019 08:38:43 +0000 (08:38 +0000)]
[builtins] Use __APPLE__ instead of __MACH__ in check
The latter doesn't seem to be working for all targets. This addresses
the issue introduced in r359413.
llvm-svn: 359423
Fangrui Song [Mon, 29 Apr 2019 08:15:13 +0000 (08:15 +0000)]
[DWARF] Delete a redundant check in getFileNameByIndex()
llvm-svn: 359422
Petr Hosek [Mon, 29 Apr 2019 07:45:15 +0000 (07:45 +0000)]
[builtins] Fix the missing assembly on Darwin
This was introduced in r359413.
llvm-svn: 359421
Aleksandr Urakov [Mon, 29 Apr 2019 07:29:25 +0000 (07:29 +0000)]
[Windows] Dump more information about access violation exception
Summary:
Dump more information about "access violation" and "in page error" exceptions to
description. Description now contains data about read/write violation type and
actual address as described at
https://docs.microsoft.com/en-us/windows/desktop/api/winnt/ns-winnt-_exception_record
Reviewers: asmith, stella.stamenova
Reviewed By: stella.stamenova
Subscribers: teemperor, amccarth, abidh, lldb-commits, aleksandr.urakov
Tags: #lldb
Differential Revision: https://reviews.llvm.org/D60519
llvm-svn: 359420
Petr Hosek [Mon, 29 Apr 2019 06:30:50 +0000 (06:30 +0000)]
[builtins] Fix the typo in the preprocessor check
This was introduced in r359413.
llvm-svn: 359419
Craig Topper [Mon, 29 Apr 2019 06:13:41 +0000 (06:13 +0000)]
[X86] Remove some intel syntax aliases on (v)cvtpd2(u)dq, (v)cvtpd2ps, (v)cvt(u)qq2ps. Add 'x' and'y' suffix aliases to masked version of the same in att syntax.
The 128/256 bit version of these instructions require an 'x' or 'y' suffix to
disambiguate the memory form in att syntax.
We were allowing the same suffix in intel syntax, but it appears gas does not
do that.
gas does allow the 'x' and 'y' suffix on register and broadcast forms even
though its not needed. We were allowing it on unmasked register form, but not on
masked versions or on masked or unmasked broadcast form.
While there fix some test coverage holes so they can be extended with the 'x'
and 'y' suffix tests.
llvm-svn: 359418
Fangrui Song [Mon, 29 Apr 2019 06:03:59 +0000 (06:03 +0000)]
[llvm-nm] -print-size => --print-size
llvm-svn: 359417
Fangrui Song [Mon, 29 Apr 2019 05:38:22 +0000 (05:38 +0000)]
[llvm-nm] Simplify and fix a buffer overflow
* char SymbolAddrStr[18] can't hold "%" PRIo64 which may need 22 characters.
* Use range-based for
* Delete unnecessary typedef
* format(...).print(Str, sizeof(Str)) + outs() << Str => outs() << format(...)
* Use cascading outs() << .. << ..
* Use iterator_range(Container &&c)
* (A & B) == B => A & B if B is a power of 2
* replace null sentinel in constants with makeArrayRef
llvm-svn: 359416
Eric Fiselier [Mon, 29 Apr 2019 04:47:57 +0000 (04:47 +0000)]
Remove XFail for new GCC. They fixed it
llvm-svn: 359415
Nico Weber [Mon, 29 Apr 2019 00:51:41 +0000 (00:51 +0000)]
llvm-cvtres: Attempt to make llvm-cvtres/duplicate.test work on big-endian systems
llvm-svn: 359414
Petr Hosek [Mon, 29 Apr 2019 00:46:23 +0000 (00:46 +0000)]
[builtins] Use aliases for function redirects
Symbol aliases are supported by all platforms that compiler-rt builtins
target, and we can use these instead of function redirects to avoid the
extra indirection.
This is part of the cleanup proposed in "[RFC] compiler-rt builtins
cleanup and refactoring".
Differential Revision: https://reviews.llvm.org/D60931
llvm-svn: 359413
Nico Weber [Mon, 29 Apr 2019 00:42:05 +0000 (00:42 +0000)]
Add some lld-link 9.0 release notes
llvm-svn: 359412
Petr Hosek [Sun, 28 Apr 2019 22:47:49 +0000 (22:47 +0000)]
[builtins] Use single line C++/C99 comment style
Use the uniform single line C++/99 style for code comments.
This is part of the cleanup proposed in "[RFC] compiler-rt builtins
cleanup and refactoring".
Differential Revision: https://reviews.llvm.org/D60352
llvm-svn: 359411
Petr Hosek [Sun, 28 Apr 2019 21:53:32 +0000 (21:53 +0000)]
[builtins] Reformat builtins with clang-format
Update formatting to use the LLVM style.
This is part of the cleanup proposed in "[RFC] compiler-rt builtins
cleanup and refactoring".
Differential Revision: https://reviews.llvm.org/D60351
llvm-svn: 359410
Simon Pilgrim [Sun, 28 Apr 2019 21:04:47 +0000 (21:04 +0000)]
[X86] Add PR39921 HADD pairwise reduction test and AVX2 test coverage
llvm-svn: 359409
Simon Pilgrim [Sun, 28 Apr 2019 20:04:08 +0000 (20:04 +0000)]
[X86][AVX] Add fast-hops target for add/fadd reduction tests
llvm-svn: 359408
Simon Pilgrim [Sun, 28 Apr 2019 20:03:11 +0000 (20:03 +0000)]
[X86] Add PR39936 HADD Tests
llvm-svn: 359407
Simon Pilgrim [Sun, 28 Apr 2019 19:12:58 +0000 (19:12 +0000)]
[X86][SSE] combineExtractVectorElt - add early-out to return zero/undef for out-of-range extraction indices.
llvm-svn: 359406
Eric Fiselier [Sun, 28 Apr 2019 17:00:46 +0000 (17:00 +0000)]
Fix permission error while running bots
llvm-svn: 359405
Eric Fiselier [Sun, 28 Apr 2019 16:42:49 +0000 (16:42 +0000)]
attempt to unbreak build bots
llvm-svn: 359404
Eric Fiselier [Sun, 28 Apr 2019 15:54:50 +0000 (15:54 +0000)]
Attempt to switch to auto-scaling bots
llvm-svn: 359403
Nikita Popov [Sun, 28 Apr 2019 15:40:56 +0000 (15:40 +0000)]
[ConstantRange] Add makeExactNoWrapRegion()
I got confused on the terminology, and the change in D60598 was not
correct. I was thinking of "exact" in terms of the result being
non-approximate. However, the relevant distinction here is whether
the result is
* Largest range such that:
Forall Y in Other: Forall X in Result: X BinOp Y does not wrap.
(makeGuaranteedNoWrapRegion)
* Smallest range such that:
Forall Y in Other: Forall X not in Result: X BinOp Y wraps.
(A hypothetical makeAllowedNoWrapRegion)
* Both. (makeExactNoWrapRegion)
I'm adding a separate makeExactNoWrapRegion method accepting a
single APInt (same as makeExactICmpRegion) and using it in the
places where the guarantee is relevant.
Differential Revision: https://reviews.llvm.org/D60960
llvm-svn: 359402
Simon Pilgrim [Sun, 28 Apr 2019 15:04:30 +0000 (15:04 +0000)]
[X86][AVX] Enabled AVX512F tests and add PR40815 test case
llvm-svn: 359401
Simon Pilgrim [Sun, 28 Apr 2019 14:31:01 +0000 (14:31 +0000)]
[X86][AVX] Combine non-lane crossing binary shuffles using X86ISD::VPERMV3
Some of the combines might be further improved if we lower more shuffles with X86ISD::VPERMV3 directly, instead of waiting to combine the results.
llvm-svn: 359400
Sanjay Patel [Sun, 28 Apr 2019 13:19:29 +0000 (13:19 +0000)]
[SelectionDAG] include FP min/max variants as binary operators
The x86 test diffs don't look great because of extra move ops,
but FP min/max should clearly be included in the list.
llvm-svn: 359399
Sanjay Patel [Sun, 28 Apr 2019 12:23:43 +0000 (12:23 +0000)]
[DAGCombiner] try repeated fdiv divisor transform before building estimate
This was originally part of D61028, but it's an independent diff.
If we try the repeated divisor reciprocal transform before producing an estimate sequence,
then we have an opportunity to use scalar fdiv. On x86, the trade-off is 1 divss vs. 5
vector FP ops in the default estimate sequence. On recent chips (Skylake, Ryzen), the
full-precision division is only 3 cycle throughput, so that's probably the better perf
default option and avoids problems from x86's inaccurate estimates.
The last 2 tests show that users still have the option to override the defaults by using
the function attributes for reciprocal estimates, but those patterns are potentially made
faster by converting the vector ops (including ymm ops) to scalar math.
Differential Revision: https://reviews.llvm.org/D61149
llvm-svn: 359398
Andrea Di Biagio [Sun, 28 Apr 2019 10:54:45 +0000 (10:54 +0000)]
[MCA] Fix typo in AVX2 gather tests. NFC
llvm-svn: 359397
Simon Pilgrim [Sun, 28 Apr 2019 10:46:17 +0000 (10:46 +0000)]
[X86][SSE] Optimize llvm.experimental.vector.reduce.xor.vXi1 parity reduction (PR38840)
An xor reduction of a bool vector can be optimized to a parity check of the MOVMSK/BITCAST'd integer - if the population count is odd return 1, else return 0.
Differential Revision: https://reviews.llvm.org/D61230
llvm-svn: 359396
Simon Pilgrim [Sun, 28 Apr 2019 10:02:34 +0000 (10:02 +0000)]
[X86][AVX] Add AVX512DQ coverage for masked memory ops tests (PR34584)
llvm-svn: 359395
Dan Liew [Sun, 28 Apr 2019 09:44:53 +0000 (09:44 +0000)]
[CMake] Don't modify `FUZZER_SUPPORTED_ARCH` is place.
On a Darwin host we were modifying the `FUZZER_SUPPORTED_ARCH` in place
which would strip out non-x86 architectures. This unhelpful if we
want to use `FUZZER_SUPPORTED_ARCH` later.
To fix this we introduce `FUZZER_TEST_ARCH` which is similar to what we
have for for the other sanitizers. For non-Darwin host platforms
`FUZZER_TEST_ARCH` is the same as `FUZZER_SUPPORTED_ARCH` but for Darwin
host platforms we use `darwin_filter_host_archs(...)` as the previous
code did.
llvm-svn: 359394
Qiu Chaofan [Sun, 28 Apr 2019 06:27:33 +0000 (06:27 +0000)]
[PowerPC][Clang] Add tests for PowerPC MMX intrinsics
Add the rest of test cases covering functions defined in mmintrin.h on PowerPC.
Reviewed By: Jinsong Ji
llvm-svn: 359393
Craig Topper [Sun, 28 Apr 2019 06:25:33 +0000 (06:25 +0000)]
[X86] Remove (V)MOV64toSDrr/m and (V)MOVDI2SSrr/m. Use 128-bit result MOVD/MOVQ and COPY_TO_REGCLASS instead
Summary:
The register form of these instructions are CodeGenOnly instructions that cover
GR32->FR32 and GR64->FR64 bitcasts. There is a similar set of instructions for
the opposite bitcast. Due to the patterns using bitcasts these instructions get
marked as "bitcast" machine instructions as well. The peephole pass is able to
look through these as well as other copies to try to avoid register bank copies.
Because FR32/FR64/VR128 are all coalescable to each other we can end up in a
situation where a GR32->FR32->VR128->FR64->GR64 sequence can be reduced to
GR32->GR64 which the copyPhysReg code can't handle.
To prevent this, this patch removes one set of the 'bitcast' instructions. So
now we can only go GR32->VR128->FR32 or GR64->VR128->FR64. The instruction that
converts from GR32/GR64->VR128 has no special significance to the peephole pass
and won't be looked through.
I guess the other option would be to add support to copyPhysReg to just promote
the GR32->GR64 to a GR64->GR64 copy. The upper bits were basically undefined
anyway. But removing the CodeGenOnly instruction in favor of one that won't be
optimized seemed safer.
I deleted the peephole test because it couldn't be made to work with the bitcast
instructions removed.
The load version of the instructions were unnecessary as the pattern that selects
them contains a bitcasted load which should never happen.
Fixes PR41619.
Reviewers: RKSimon, spatel
Reviewed By: RKSimon
Subscribers: hiraditya, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D61223
llvm-svn: 359392
Simon Pilgrim [Sat, 27 Apr 2019 20:44:08 +0000 (20:44 +0000)]
Revert rL359389: [X86][SSE] Add support for <64 x i1> bool reduction
Minor generalization of the existing <32 x i1> pre-AVX2 split code.
........
Causing irregular buildbot failures.
llvm-svn: 359391
Simon Pilgrim [Sat, 27 Apr 2019 20:20:02 +0000 (20:20 +0000)]
[X86][AVX] Add additional SSE/AVX expandload and compressstore targets
llvm-svn: 359390
Simon Pilgrim [Sat, 27 Apr 2019 20:04:44 +0000 (20:04 +0000)]
[X86][SSE] Add support for <64 x i1> bool reduction
Minor generalization of the existing <32 x i1> pre-AVX2 split code.
llvm-svn: 359389
Simon Pilgrim [Sat, 27 Apr 2019 19:57:34 +0000 (19:57 +0000)]
[X86][AVX] Cleanup and add additional expandload and compressstore tests
sort order by types and add vXi32/vXi16/vXi8 test coverage
llvm-svn: 359388
Raphael Isemann [Sat, 27 Apr 2019 18:15:35 +0000 (18:15 +0000)]
Fix UNPREDICTABLE check in EmulateInstructionARM::EmulateADDRegShift
Summary:
As reported in LLVM bug 41487, the check in this function is wrong and should be
the same as the described check in the comment (which is correctly copied from the
ARM ISA reference).
Reviewers: #lldb, davide, JDevlieghere
Reviewed By: #lldb, davide, JDevlieghere
Subscribers: davide, javed.absar, kristof.beyls, lldb-commits
Tags: #lldb
Differential Revision: https://reviews.llvm.org/D60654
llvm-svn: 359387
Simon Pilgrim [Sat, 27 Apr 2019 17:32:46 +0000 (17:32 +0000)]
[X86][AVX512] Improve vector bool reductions
As predicate masks are legal on AVX512 targets, we avoid MOVMSK in these cases, but we can just bitcast the bool vector to the integer equivalent directly - avoiding expansion of the reduction to a shuffle pattern.
llvm-svn: 359386
Simon Pilgrim [Sat, 27 Apr 2019 16:49:54 +0000 (16:49 +0000)]
[X86] Add vector boolean reduction tests (PR38840)
AND/OR/XOR tests for the @llvm.experimental.vector.reduce intrinsics
AND/OR are pretty good (pre-AVX512), XOR (not so common but used for parity reduction) is still pretty bad.
llvm-svn: 359385
Lang Hames [Sat, 27 Apr 2019 16:13:53 +0000 (16:13 +0000)]
[lli] Fix a typo in a cl::opt description.
Patch by Wasiher. Thanks Wasiher!
Differential Revision: https://reviews.llvm.org/D61135
llvm-svn: 359384
Fangrui Song [Sat, 27 Apr 2019 16:12:14 +0000 (16:12 +0000)]
[llvm-nm][llvm-readelf] Avoid single-dash -long-option in tests
llvm-svn: 359383