Craig Topper [Fri, 6 Jul 2018 03:42:09 +0000 (03:42 +0000)]
[X86] Remove all of the avx512 masked packed fma intrinsics. Use llvm.fma or unmasked 512-bit intrinsics with rounding mode.
This upgrades all of the intrinsics to use fneg instructions to convert fma into fmsub/fnmsub/fnmadd/fmsubadd. And uses a select instruction for masking.
This matches how clang uses the intrinsics these days.
llvm-svn: 336409
Craig Topper [Fri, 6 Jul 2018 03:42:06 +0000 (03:42 +0000)]
[X86] Cleanup some of the avx512 masked fma tests to prepare for removing and autoupgrading.
-Split cases that call 2 intrinsics in the same case.
-Remove testing mask3 and maskz intrinsics with an all ones mask. These won't be interesting after the upgrade.
-Restore test cases for some intrinsics that are marked for deletion, but haven't been deleted yet.
llvm-svn: 336408
Zachary Turner [Fri, 6 Jul 2018 02:59:25 +0000 (02:59 +0000)]
[llvm-pdbutil] Dump more info about globals.
We add an option to dump the entire global / public symbol record
stream. Previously we would dump globals or publics, but not both.
And when we did dump them, we would always dump them in the order
they were referenced by the corresponding hash streams, not in
the order they were serialized in. This patch adds a lower level
mode that just dumps the whole stream in serialization order.
Additionally, when dumping global-extras, we now dump the hash
bitmap as well as the record offset instead of dumping all zeros
for the offsets.
llvm-svn: 336407
Stefan Pintilie [Fri, 6 Jul 2018 02:47:02 +0000 (02:47 +0000)]
[Power9] Add __float128 library call for frem
Power 9 does not have a hardware instruction for frem but we can call fmodf128.
Differential Revision: https://reviews.llvm.org/D48552
llvm-svn: 336406
Zachary Turner [Fri, 6 Jul 2018 02:33:58 +0000 (02:33 +0000)]
[PDB] Sort globals symbols by name in GSI hash buckets.
It seems like the debugger first computes a symbol's bucket,
and then does a binary search of entries in the bucket using the
symbol's name in order to find it. If the bucket entries are not
in sorted order, this obviously won't work. After this patch a
couple of simple test cases show that we generate an exactly
identical GSI hash stream, which is very nice.
llvm-svn: 336405
Easwaran Raman [Fri, 6 Jul 2018 00:31:33 +0000 (00:31 +0000)]
[x86]Add a test case to show missed vfnmadd generation.
llvm-svn: 336404
Jim Ingham [Fri, 6 Jul 2018 00:16:21 +0000 (00:16 +0000)]
Remove a bunch more references to _LIBCPP_INLINE_VISIBILITY
and adjust the tests that needed it to set their breakpoints more robustly.
<rdar://problem/
41867390>
llvm-svn: 336403
Dave Lee [Fri, 6 Jul 2018 00:13:21 +0000 (00:13 +0000)]
Revert "objdump: Support newer ObjC image info flags"
This reverts commit
8c4cc472e7a67bd3b2b20cc4cf32d31af29bc7e9.
llvm-svn: 336402
Mandeep Singh Grang [Thu, 5 Jul 2018 23:41:17 +0000 (23:41 +0000)]
[OpenEmbedded] Add OpenEmbedded vendor
Summary: The lib paths are not correctly picked up for OpenEmbedded sysroots
(like arm-oe-linux-gnueabi). I fix this in a follow-up clang patch. But in
order to add the correct libs I need to detect if the vendor is oe. For this
reason, it is first necessary to teach llvm to detect oe vendor, which is what
this patch does.
Reviewers: chandlerc, compnerd, rengolin, javed.absar
Reviewed By: compnerd
Subscribers: kristof.beyls, dexonsmith, llvm-commits
Differential Revision: https://reviews.llvm.org/D48861
llvm-svn: 336401
Maksim Panchenko [Thu, 5 Jul 2018 23:32:42 +0000 (23:32 +0000)]
[X86][Disassembler] Fix LOCK prefix disassembler support
Summary:
If LOCK prefix is not the first prefix in an instruction, LLVM
disassembler silently drops the prefix.
The fix is to select a proper instruction with a builtin LOCK prefix if
one exists.
Reviewers: craig.topper
Reviewed By: craig.topper
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D49001
llvm-svn: 336400
Dave Lee [Thu, 5 Jul 2018 23:32:15 +0000 (23:32 +0000)]
objdump: Support newer ObjC image info flags
Summary:
Add support for two additional ObjC image info flags: `IS_SIMULATED` and
`HAS_CATEGORY_CLASS_PROPERTIES`.
`IS_SIMULATED` indicates a Mach-O binary built for iOS simulator.
`HAS_CATEGORY_CLASS_PROPERTIES` indicates a Mach-O binary built by a compiler
that supports class properties in categories.
Reviewers: enderby, compnerd
Reviewed By: compnerd
Subscribers: keith, llvm-commits
Differential Revision: https://reviews.llvm.org/D48568
llvm-svn: 336399
Jim Ingham [Thu, 5 Jul 2018 23:23:06 +0000 (23:23 +0000)]
Address a few post facto review comments from Adrian.
Thanks, Adrian!
llvm-svn: 336398
Jim Ingham [Thu, 5 Jul 2018 23:11:27 +0000 (23:11 +0000)]
Don't muck with _LIBCPP_INLINE_VISIBILITY just to get predictable line table entries.
This test was trying to stop at a variety of std::vector calls. It looks like the test
was failing because various inlined std functions left no line table entries for the line that
invoked the inlined function. The author worked around that by undefining _LIBCPP_INLINE_VISIBILITY.
That's an internal libcxx macro, we really shouldn't be playing around with it. Better to just force
ourselves to stop where we want using some other non-inlineable statement. printf seems a good candidate...
<rdar://problem/
41867390>
llvm-svn: 336397
Alex Lorenz [Thu, 5 Jul 2018 22:51:11 +0000 (22:51 +0000)]
[Sema] -Wformat-pedantic only for NSInteger/NSUInteger %tu/%td on Darwin
The '%tu'/'%td' as formatting specifiers have been used to print out the
NSInteger/NSUInteger values for a long time. Typically their ABI matches, but that's
not the case on watchOS. The ABI difference boils down to the following:
- Regular 32-bit darwin targets (like armv7) use 'ptrdiff_t' of type 'int',
which matches 'NSInteger'.
- WatchOS arm target (armv7k) uses 'ptrdiff_t' of type 'long', which doesn't
match 'NSInteger' of type 'int'.
Because of this ABI difference these specifiers trigger -Wformat warnings only
for watchOS builds, which is really inconvenient for cross-platform code.
This patch avoids this -Wformat warning for '%tu'/'%td' and NS[U]Integer only,
and instead uses the new -Wformat-pedantic warning that JF introduced in
https://reviews.llvm.org/D47290. This is acceptable because Darwin guarantees that,
despite the watchOS ABI differences, sizeof(ptrdiff_t) == sizeof(NS[U]Integer),
and alignof(ptrdiff_t) == alignof(NS[U]Integer) so the warning is therefore noisy
for pedantic reasons.
I'll update public documentation to ensure that this behaviour is properly
communicated.
rdar://
41739204
Differential Revision: https://reviews.llvm.org/D48852
llvm-svn: 336396
Alex Langford [Thu, 5 Jul 2018 22:16:15 +0000 (22:16 +0000)]
[CMake] Simplify a few framework build rules
llvm-svn: 336395
Michael Zolotukhin [Thu, 5 Jul 2018 22:10:31 +0000 (22:10 +0000)]
Revert r332168: "Reapply "[PR16756] Use SSAUpdaterBulk in JumpThreading.""
There were a couple of issues reported (PR38047, PR37929) - I'll reland
the patch when I figure out and fix the rootcause.
llvm-svn: 336393
Heejin Ahn [Thu, 5 Jul 2018 21:27:09 +0000 (21:27 +0000)]
[WebAssembly] Add missing _S opcodes of atomic stores to InstPrinter
Summary: This was missing in D48839 (rL336145).
Reviewers: aardappel
Subscribers: dschuff, sbc100, jgravelle-google, sunfish, llvm-commits
Differential Revision: https://reviews.llvm.org/D48992
llvm-svn: 336390
Heejin Ahn [Thu, 5 Jul 2018 21:23:15 +0000 (21:23 +0000)]
[ORC] Add BitReader/BitWriter to target_link_libraries
Summary:
CompileOnDemandLayer.cpp uses function in these libraries, and builds
with `-DSHARED_LIB=ON` fail without this.
Reviewers: lhames
Subscribers: mgorny, llvm-commits
Differential Revision: https://reviews.llvm.org/D48995
llvm-svn: 336389
Craig Topper [Thu, 5 Jul 2018 20:38:31 +0000 (20:38 +0000)]
[X86] Use shufflevector instead of a select with a constant mask for fmaddsub/fmsubadd IR emission.
Shufflevector is easier to generate and matches what the backend pattern matches without relying on constant selects being turned into shuffles.
While I was there I also made the IR regular expressions a little stricter to ensure operand order on the shuffle.
llvm-svn: 336388
Sander de Smalen [Thu, 5 Jul 2018 20:21:21 +0000 (20:21 +0000)]
This is a recommit of r336322, previously reverted in r336324 due to
a deficiency in TableGen that has been addressed in r336334.
[AArch64][SVE] Asm: Support for predicated FP rounding instructions.
This patch also adds instructions for predicated FP square-root and
reciprocal exponent.
The added instructions are:
- FRINTI Round to integral value (current FPCR rounding mode)
- FRINTX Round to integral value (current FPCR rounding mode, signalling inexact)
- FRINTA Round to integral value (to nearest, with ties away from zero)
- FRINTN Round to integral value (to nearest, with ties to even)
- FRINTZ Round to integral value (toward zero)
- FRINTM Round to integral value (toward minus Infinity)
- FRINTP Round to integral value (toward plus Infinity)
- FSQRT Floating-point square root
- FRECPX Floating-point reciprocal exponent
llvm-svn: 336387
Marc-Andre Laperle [Thu, 5 Jul 2018 19:35:01 +0000 (19:35 +0000)]
[clangd] Implementation of textDocument/documentSymbol
Summary:
An AST-based approach is used to retrieve the document symbols rather than an
in-memory index query. The index is not an ideal fit to achieve this because of
the file-centric query being done here whereas the index is suited for
project-wide queries. Document symbols also includes more symbols and need to
keep the order as seen in the file.
Signed-off-by: Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
Subscribers: tomgr, ilya-biryukov, ioeric, MaskRay, jkorous, cfe-commits
Differential Revision: https://reviews.llvm.org/D47846
llvm-svn: 336386
Lang Hames [Thu, 5 Jul 2018 19:01:27 +0000 (19:01 +0000)]
[ORC] In CompileOnDemandLayer2, clone modules on to different contexts by
writing them to a buffer and re-loading them.
Also introduces a multithreaded variant of SimpleCompiler
(MultiThreadedSimpleCompiler) for compiling IR concurrently on multiple
threads.
These changes are required to JIT IR on multiple threads correctly.
No test case yet. I will be looking at how to modify LLI / LLJIT to test
multithreaded JIT support soon.
llvm-svn: 336385
Diogo N. Sampaio [Thu, 5 Jul 2018 18:49:32 +0000 (18:49 +0000)]
Testing commit permision
llvm-svn: 336384
Craig Topper [Thu, 5 Jul 2018 18:43:58 +0000 (18:43 +0000)]
[X86] Remove the last of the 'x86.fma.' intrinsics and autoupgrade them to 'llvm.fma'. Add upgrade tests for all.
Still need to remove the AVX512 masked versions.
llvm-svn: 336383
Louis Dionne [Thu, 5 Jul 2018 18:41:50 +0000 (18:41 +0000)]
Revert "[libc++] Replace uses of _LIBCPP_ALWAYS_INLINE by _LIBCPP_INLINE_VISIBILITY"
This reverts commit r336369. The commit had two problems:
1. __pbump was marked as _LIBCPP_EXTERN_TEMPLATE_INLINE_VISIBILITY instead of
_LIBCPP_INLINE_VISIBILITY, which lead to two symbols being added in the
dylib and the check-cxx-abilist failing.
2. The LLDB tests started failing because they undefine
`_LIBCPP_INLINE_VISIBILITY`. I need to figure out why they do that and
fix the tests before we can go forward with this change.
llvm-svn: 336382
Marshall Clow [Thu, 5 Jul 2018 17:44:12 +0000 (17:44 +0000)]
Fix HTML blunder
llvm-svn: 336381
Erich Keane [Thu, 5 Jul 2018 17:23:15 +0000 (17:23 +0000)]
Add PCH tests for R336379
I seemingly forgot the tests for this commit, added here.
llvm-svn: 336380
Erich Keane [Thu, 5 Jul 2018 17:22:13 +0000 (17:22 +0000)]
[clang-cl, PCH] Implement support for MS-style PCH through headers
Implement support for MS-style PCH through headers.
This enables support for /Yc and /Yu where the through header is either
on the command line or included in the source. It replaces the current
support the requires the header also be specified with /FI.
This change adds a -cc1 option -pch-through-header that is used to either
start or stop compilation during PCH create or use.
When creating a PCH, the compilation ends after compilation of the through
header.
When using a PCH, tokens are skipped until after the through header is seen.
Patch By: mikerice
Differential Revision: https://reviews.llvm.org/D46652
llvm-svn: 336379
Rui Ueyama [Thu, 5 Jul 2018 17:14:33 +0000 (17:14 +0000)]
Remove redundnat call of makeArrayRef(). NFC.
llvm-svn: 336378
Raphael Isemann [Thu, 5 Jul 2018 17:12:11 +0000 (17:12 +0000)]
Fixed redefinition warnings with LLVM_ENABLE_MODULES
Summary:
It seems we both have the HAVE_LIBCOMPRESSION define in the config header
and in the source files definitions of some files. This causes that the
Config.h header emits the following warning when we compile the Host module:
```
In file included from <module-includes>:21:
In file included from /Users/teemperor/llvm/llvm/tools/lldb/include/lldb/Host/MainLoop.h:13:
tools/lldb/include/lldb/Host/Config.h:33:9: warning: 'HAVE_LIBCOMPRESSION' macro redefined [-Wmacro-redefined]
^
<command line>:1:9: note: previous definition is here
^
```
It's not really clear why the define is in both places (the commit message
just says it fixes some unspecified bug), but we can easily work around this
by just guarding our define in Config.h.
Reviewers: aprantl
Reviewed By: aprantl
Subscribers: mgorny, lldb-commits
Differential Revision: https://reviews.llvm.org/D48977
llvm-svn: 336377
Craig Topper [Thu, 5 Jul 2018 17:10:17 +0000 (17:10 +0000)]
[X86] Add SHUF128 to target shuffle decoding.
Differential Revision: https://reviews.llvm.org/D48954
llvm-svn: 336376
Matt Arsenault [Thu, 5 Jul 2018 17:05:36 +0000 (17:05 +0000)]
Fix asserts in AMDGCN fmed3 folding by handling more cases of NaN
Better NaN handling for AMDGCN fmed3.
All operands are checked for NaN now. The checks
were moved before the canonicalization to provide
a better mapping from fclamp. Changed the behaviour
of fmed3(x,y,NaN) to return max(x,y) instead of
min(x,y) in light of this. Updated tests as a result
and added some new cases to cover the fix.
Patch by Alan Baker
llvm-svn: 336375
Matt Arsenault [Thu, 5 Jul 2018 17:01:29 +0000 (17:01 +0000)]
AMDGPU: Don't use spir_kernel in a test
Also use verify-machineinstrs.
llvm-svn: 336374
Matt Arsenault [Thu, 5 Jul 2018 17:01:20 +0000 (17:01 +0000)]
AMDGPU/GlobalISel: Implement custom kernel arg lowering
Avoid using allocateKernArg / AssignFn. We do not want any
of the type splitting properties of normal calling convention
lowering.
For now at least this exists alongside the IR argument lowering
pass. This is necessary to handle struct padding correctly while
some arguments are still skipped by the IR argument lowering
pass.
llvm-svn: 336373
Rui Ueyama [Thu, 5 Jul 2018 16:58:42 +0000 (16:58 +0000)]
Simplify PPC64::calcEFlags().
In this file we only have to handle the v2 ABI, so what we need to do
is to just make sure that all object files have v2 or unspecified version
number.
Differential Revision: https://reviews.llvm.org/D48112
llvm-svn: 336372
Simon Pilgrim [Thu, 5 Jul 2018 16:56:28 +0000 (16:56 +0000)]
[CostModel][X86] Add UDIV/UREM by pow2 costs
Normally InstCombine would have simplified these to SRL/AND instructions but we may still see these during SLP vectorization etc.
llvm-svn: 336371
Paul Semel [Thu, 5 Jul 2018 16:49:46 +0000 (16:49 +0000)]
[llvm-objdump] Removed archive-headers-disas test
This test is failing because of the disas part.
For the moment, I will juste remove it. I will add it again tomorrow
with a proper fix.
llvm-svn: 336370
Louis Dionne [Thu, 5 Jul 2018 16:49:38 +0000 (16:49 +0000)]
[libc++] Replace uses of _LIBCPP_ALWAYS_INLINE by _LIBCPP_INLINE_VISIBILITY
Summary:
We never actually mean to always inline a function -- all the uses of
the macro I could find are actually attempts to control the visibility
of symbols. This is better described by _LIBCPP_INLINE_VISIBILITY, which
is actually always defined the same.
This change is orthogonal to the decision of what we're actually going
to do with _LIBCPP_INLINE_VISIBILITY -- it just simplifies things by
having one canonical way of doing things.
Reviewers: EricWF
Subscribers: christof, llvm-commits, dexonsmith, erikvanderpoel, mclow.lists
Differential Revision: https://reviews.llvm.org/D48892
llvm-svn: 336369
Louis Dionne [Thu, 5 Jul 2018 16:16:03 +0000 (16:16 +0000)]
[NFC] Add <initializer_list> to the synopsis of <utility>
Summary:
It is part of the synopsis in the Standard and <utility> does include it,
but it was left out of the synopsis comment.
Reviewers: EricWF, mclow.lists
Subscribers: christof, llvm-commits
Differential Revision: https://reviews.llvm.org/D48611
llvm-svn: 336368
Andrea Di Biagio [Thu, 5 Jul 2018 16:13:49 +0000 (16:13 +0000)]
[llvm-mca] Fix RegisterFile debug prints. NFC
llvm-svn: 336367
Rui Ueyama [Thu, 5 Jul 2018 16:03:20 +0000 (16:03 +0000)]
Make a test more robust.
Reported by Chris Jackson.
llvm-svn: 336366
Marco Castelluccio [Thu, 5 Jul 2018 15:52:59 +0000 (15:52 +0000)]
Make __gcov_flush flush counters for all shared libraries
Summary:
This will make the behavior of __gcov_flush match the GCC behavior.
I would like to rename __gcov_flush to __llvm_gcov_flush (in case of programs linking to libraries built with different compilers), but I guess we can't for compatibility reasons.
Reviewers: davidxl
Reviewed By: davidxl
Subscribers: samsonov, vitalybuka, pcc, kcc, junbuml, glider, fhahn, eugenis, dvyukov, davidxl, srhines, chh, llvm-commits, #sanitizers
Differential Revision: https://reviews.llvm.org/D48538
llvm-svn: 336365
Erich Keane [Thu, 5 Jul 2018 15:52:58 +0000 (15:52 +0000)]
Fix __builtin_*_overflow when out-param isn't constexpr
As brought up on cfe-commits[1], r334650 causes the dependency of the
out parameter to the __builtin_*_overflow functions to be ignored. The result
was a usage that was otherwise constexpr (both operands to the operation were
constexpr) would be evaluated, but the out parameter wouldn't be modified, so
it would still be 'undef'.
This patch correctly handles the return value of handleAssignment to ensure that
this value is properly considered/evaluated.
[1] http://lists.llvm.org/pipermail/cfe-commits/Week-of-Mon-
20180702/233667.html
llvm-svn: 336364
Paul Semel [Thu, 5 Jul 2018 15:24:11 +0000 (15:24 +0000)]
[llvm-objcopy] Fix timezone dependant tests
llvm-svn: 336363
Tobias Grosser [Thu, 5 Jul 2018 15:23:28 +0000 (15:23 +0000)]
[ScopInfo] Move foldSizeConstantsToRight() to isl++
Summary: This patch updates the isl interface used in `foldSizeConstantsToRight()` to the new C++ interface.
Reviewers: chelini, grosser, philip.pfaffe, Meinersbur
Reviewed By: grosser
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D48965
llvm-svn: 336362
Lei Huang [Thu, 5 Jul 2018 15:21:37 +0000 (15:21 +0000)]
[Power9] Add lib calls for float128 operations with no equivalent PPC instructions
Map the following instructions to the proper float128 lib calls:
pow[i], exp[2], log[2|10], sin, cos, fmin, fmax
Differential Revision: https://reviews.llvm.org/D48544
llvm-svn: 336361
Simon Pilgrim [Thu, 5 Jul 2018 15:15:47 +0000 (15:15 +0000)]
[X86][SSE] Add srem x, (1 << c) combine tests
Now that D45806 has landed we can start trying to avoid scalarizing srem by constant - these tests demonstrate some example cases.
llvm-svn: 336360
George Rimar [Thu, 5 Jul 2018 15:01:44 +0000 (15:01 +0000)]
[ELF] - Add test case for checking PT_INTERP behavior.
When PT_INTERP is specified in PHDRS command, it should be created.
(if other conditions met)
We had no test for the folowing line:
https://github.com/llvm-mirror/lld/blob/master/ELF/LinkerScript.cpp#L1108
And for this header itself.
Patch fixes that.
llvm-svn: 336359
Simon Marchi [Thu, 5 Jul 2018 14:53:17 +0000 (14:53 +0000)]
[clang-move] ClangMoveTests: Remove dots in output paths
Summary:
Following D48903 ([VirtualFileSystem] InMemoryFileSystem::status: Return
a Status with the requested name), the paths output by clang-move in the
FileToReplacements map may contain leading "./". For example, where we
would get "foo.h", we'll now get "./foo.h". This breaks the tests,
because we are doing exact string lookups in the FileToFileID and
Results maps (they contain "foo.h", but we search for "./foo.h").
To mitigate this, try to normalize a little bit the paths output by
clang-move to remove that leading "./".
This patch should be safe to merge before D48903, remove_dots will just
be a no-op.
Reviewers: ilya-biryukov, hokein
Reviewed By: hokein
Subscribers: ioeric, cfe-commits
Differential Revision: https://reviews.llvm.org/D48951
llvm-svn: 336358
Paul Semel [Thu, 5 Jul 2018 14:43:29 +0000 (14:43 +0000)]
[llvm-objdump] Add --archive-headers (-a) option
llvm-svn: 336357
George Rimar [Thu, 5 Jul 2018 14:27:36 +0000 (14:27 +0000)]
[ELF] - Eliminate dead "if". NFC.
We call switchTo() from assignAddresses() for switching to Aether,
and from assignOffsets().
First calls assignOffsets() one by one for each output section.
(https://github.com/llvm-mirror/lld/blob/master/ELF/LinkerScript.cpp#L1045)
That I believe means the condition removed in this patch is dead.
llvm-svn: 336356
Gabor Buella [Thu, 5 Jul 2018 14:26:56 +0000 (14:26 +0000)]
[X86] Fix some vector cmp builtins - TRUE/FALSE predicates
This patch removes on optimization used with the TRUE/FALSE
predicates, as was suggested in https://reviews.llvm.org/D45616
for r335339.
The optimization was buggy, since r335339 used it also
for *_mask builtins, without actually applying the mask -- the
mask argument was just ignored.
Reviewers: craig.topper, uriel.k, RKSimon, andrew.w.kaylor, spatel, scanon, efriedma
Reviewed By: spatel
Differential Revision: https://reviews.llvm.org/D48715
llvm-svn: 336355
George Rimar [Thu, 5 Jul 2018 14:09:47 +0000 (14:09 +0000)]
[ELF] - Convert excessive dyn_cast -> cast. NFC.
Currently, there are only OutputSection and SymbolAssignment
commands possible at the first level under SECTIONS tag.
Hence, dyn_cast was excessive.
llvm-svn: 336354
George Rimar [Thu, 5 Jul 2018 14:01:54 +0000 (14:01 +0000)]
[ELF] - Test we are able to assign version to symbols that are not "_Z*"
This is to test the following line of the code:
https://github.com/llvm-mirror/lld/blob/master/ELF/SymbolTable.cpp#L681
If symbol does not start from _Z prefix and we have extern "C++",
we do not call demangler and use its name as is.
llvm-svn: 336353
Clement Courbet [Thu, 5 Jul 2018 13:54:51 +0000 (13:54 +0000)]
[llvm-exegesis] Add uop computation for more X87 instruction classes.
Summary:
This allows measuring comparisons (UCOM_FpIr32,UCOM_Fpr32,...),
conditional moves (CMOVBE_Fp32,...)
Reviewers: gchatelet
Subscribers: tschuett, llvm-commits
Differential Revision: https://reviews.llvm.org/D48713
llvm-svn: 336352
Simon Pilgrim [Thu, 5 Jul 2018 13:51:35 +0000 (13:51 +0000)]
Fix comment typo. NFCI.
llvm-svn: 336351
Michael Kruse [Thu, 5 Jul 2018 13:44:50 +0000 (13:44 +0000)]
[CodeGen] Fix potential null pointer dereference. NFC.
ScalarEvolution::getSCEV dereferences its argument, s.t. passing nullptr
leads to undefined behaviour.
Check for nullptr before calling it instead of checking its argument
afterwards.
llvm-svn: 336350
George Rimar [Thu, 5 Jul 2018 13:39:39 +0000 (13:39 +0000)]
[ELF] - Check we do not assign version to undefined symbol when using extern C++.
This tests the following 'continue' line in getDemangledSyms():
https://github.com/llvm-mirror/lld/blob/master/ELF/SymbolTable.cpp#L677
llvm-svn: 336349
Sanjay Patel [Thu, 5 Jul 2018 13:16:46 +0000 (13:16 +0000)]
[AArch64, PowerPC, x86] add tests for signbit bit hacks; NFC
llvm-svn: 336348
Vladimir Stefanovic [Thu, 5 Jul 2018 13:10:23 +0000 (13:10 +0000)]
[mips] Add '-mcrc', '-mno-crc' options to enable/disable CRC ASE
'-mcrc' is shared with ARM.
'-mno-crc' is Mips-only (ARM uses '-mnocrc').
Differential revision: https://reviews.llvm.org/D48169
llvm-svn: 336347
Gabor Buella [Thu, 5 Jul 2018 12:57:47 +0000 (12:57 +0000)]
[X86] NFC - add more test cases for vector cmp intrinsics
Add test cases with each predicate using the following
intrinsics:
_mm_cmp_pd
_mm_cmp_ps
_mm256_cmp_pd
_mm256_cmp_ps
_mm_cmp_pd_mask
_mm_cmp_ps_mask
_mm256_cmp_pd_mask
_mm256_cmp_ps_mask
_mm512_cmp_pd_mask
_mm512_cmp_ps_mask
_mm_mask_cmp_pd_mask
_mm_mask_cmp_ps_mask
_mm256_mask_cmp_pd_mask
_mm256_mask_cmp_ps_mask
_mm512_mask_cmp_pd_mask
_mm512_mask_cmp_ps_mask
Some of these are marked with FIXME, as there is bug in lowering
e.g. _mm512_mask_cmp_ps_mask.
llvm-svn: 336346
George Rimar [Thu, 5 Jul 2018 12:48:29 +0000 (12:48 +0000)]
[ELF] - Add test to check we don't crash when tracing reserved symbol.
This is to test the following line of code:
https://github.com/llvm-mirror/lld/blob/master/ELF/SymbolTable.cpp#L601
Without that line linker would crash.
llvm-svn: 336345
Simon Pilgrim [Thu, 5 Jul 2018 12:30:44 +0000 (12:30 +0000)]
[SLPVectorizer] Begin abstracting InstructionsState alternate matching away from opcodes. NFCI.
This is an early step towards matching Instructions by attributes other than the opcode. This will be necessary for cast/call alternates which share the same opcode but have different types/intrinsicIDs etc. - which we could vectorize as long as we split them using the alternate mechanism.
Differential Revision: https://reviews.llvm.org/D48945
llvm-svn: 336344
Clement Courbet [Thu, 5 Jul 2018 12:26:12 +0000 (12:26 +0000)]
[llvm-exegesis][NFC]clang-format
llvm-svn: 336343
George Rimar [Thu, 5 Jul 2018 12:23:37 +0000 (12:23 +0000)]
[ELF] - Test LLD creates empty .imports file.
This covers the following code line with a test:
https://github.com/llvm-mirror/lld/blob/master/ELF/LTO.cpp#L213
After that, coverage of LTO.cpp is 100%.
llvm-svn: 336342
Yvan Roux [Thu, 5 Jul 2018 12:19:03 +0000 (12:19 +0000)]
Revert "[CMake] Run libFuzzer tests with check-all."
Revert due to AArch64 bots breakage, upstream PR raised to track the
issue: https://bugs.llvm.org/show_bug.cgi?id=38034
llvm-svn: 336341
George Rimar [Thu, 5 Jul 2018 12:12:30 +0000 (12:12 +0000)]
[ELF] - Add test to check we produce an error if unable to write an empty index file.
Test case ensures lld generates an error if unable to
write an empty index file for lazy object file that is not added to link.
This covers the following line with a test:
https://github.com/llvm-mirror/lld/blob/master/ELF/LTO.cpp#L206
llvm-svn: 336340
Ryan Taylor [Thu, 5 Jul 2018 12:02:07 +0000 (12:02 +0000)]
[AMDGPU] Add VALU to V_INTERP Instructions
Wait states are not properly being inserted after buffer_store for v_interp instructions.
Add VALU to V_INTERP instructions so that the GCNHazardRecognizer can
check and insert the appropriate wait states when needed.
Differential Revision: https://reviews.llvm.org/D48772
Change-Id: Id540c9b074fc69b5c1de6b182276aa089c74aa64
llvm-svn: 336339
George Rimar [Thu, 5 Jul 2018 11:58:04 +0000 (11:58 +0000)]
[ELF] - Remove dead code. NFC.
I think code is dead, because the only way to see
Path as empty seems would be if replaceThinLTOSuffix()
replaced some prefix with empty prefix (making the result
Path empty).
But it is impossible to pass the empty prefix,
we would file in driver:
https://github.com/llvm-mirror/lld/blob/master/ELF/Driver.cpp#L669
llvm-svn: 336338
Chandler Carruth [Thu, 5 Jul 2018 11:56:34 +0000 (11:56 +0000)]
[ADT] Switch to indirect even the trivial case through an object pointer
that has required alignment. This avoids issues that keep coming up with
function pointers being less aligned.
I'm pretty annoyed that we can't take advantage of function alignment
even on platforms where they *are* aligned, but build modes and other
things make taking advantage of it somewhere between hard and
impossible. The best case scenario would still embed various build modes
into the ABI causing really hard to debug issues if you compiled one
object file differently from another. =/
This should at least bring the bots back that were having trouble with
this.
llvm-svn: 336337
Krasimir Georgiev [Thu, 5 Jul 2018 11:30:15 +0000 (11:30 +0000)]
Partially revert r336268 in address-offsets.ll
Summary: There the typos are intentional, explicitly introduced to disable these cases in r280285.
Reviewers: bkramer
Reviewed By: bkramer
Subscribers: dschuff, sbc100, jgravelle-google, aheejin, llvm-commits
Differential Revision: https://reviews.llvm.org/D48962
llvm-svn: 336336
George Rimar [Thu, 5 Jul 2018 10:44:17 +0000 (10:44 +0000)]
[ELF] - Advance position in a memory region when change the Dot.
This is https://bugs.llvm.org//show_bug.cgi?id=37836
Previously LLD could assign to Dot or set the address
for the section with address expression but did not advance
the position in a memory region.
Patch fixes the issue.
llvm-svn: 336335
Sander de Smalen [Thu, 5 Jul 2018 10:39:15 +0000 (10:39 +0000)]
[TableGen] Increase the number of supported decoder fix-ups.
The vast number of added instructions for SVE causes TableGen to fail with an assertion:
Assertion `Delta < 65536U && "disassembler decoding table too large!"'
This patch increases the number of supported decoder fix-ups.
Reviewers: dmgreen, stoklund, petpav01
Reviewed By: dmgreen
Differential Revision: https://reviews.llvm.org/D48937
llvm-svn: 336334
Simon Pilgrim [Thu, 5 Jul 2018 09:54:53 +0000 (09:54 +0000)]
[X86][SSE] Add extra v16i16 shl x,c -> pmullw test
We want to compare shifts with repeated vs non-repeated v8i16 shuffle masks (for PBLENDW ymm)
llvm-svn: 336333
Gabor Marton [Thu, 5 Jul 2018 09:51:13 +0000 (09:51 +0000)]
[ASTImporter] Fix import of objects with anonymous types
Summary:
Currently, anonymous types are merged into the same redecl chain even if they
are structurally inequivalent. This results that global objects are not
imported, if there are at least two global objects with different anonymous
types. This patch provides a fix.
Reviewers: a.sidorin, balazske, r.stahl
Subscribers: rnkovacs, dkrupp, cfe-commits
Differential Revision: https://reviews.llvm.org/D48773
llvm-svn: 336332
Simon Pilgrim [Thu, 5 Jul 2018 09:48:01 +0000 (09:48 +0000)]
Try to fix -Wimplicit-fallthrough warning. NFCI.
llvm-svn: 336331
Kirill Bobyrev [Thu, 5 Jul 2018 09:37:26 +0000 (09:37 +0000)]
[NFS] Wipe trailing whitespaces
This patch is a preparation for another one containing meaningful
changes. This patch simply removes trailing whitespaces in few files
affected by the upcoming patch and reformats
llvm-svn: 336330
Simon Pilgrim [Thu, 5 Jul 2018 09:35:12 +0000 (09:35 +0000)]
Fix -Wunused-variable warning. NFCI.
llvm-svn: 336329
Aleksandar Beserminji [Thu, 5 Jul 2018 09:27:05 +0000 (09:27 +0000)]
[mips] Fix atomic operations at O0, v3
Similar to PR/25526, fast-regalloc introduces spills at the end of basic
blocks. When this occurs in between an ll and sc, the stores can cause the
atomic sequence to fail.
This patch fixes the issue by introducing more pseudos to represent atomic
operations and moving their lowering to after the expansion of postRA
pseudos.
This version addresses issues with the initial implementation and covers
all atomic operations.
This resolves PR/32020.
Thanks to James Cowgill for reporting the issue!
Patch By: Simon Dardis
Differential Revision: https://reviews.llvm.org/D31287
llvm-svn: 336328
Joachim Protze [Thu, 5 Jul 2018 09:14:06 +0000 (09:14 +0000)]
Dropped non-supoorted "--no-as-needed" flag from OMPT tests for macOS
The flag "--no-as-needed" is not recognized by the linker on macOS making the following tests fail:
ompt/loadtool/tool_available/tool_available.c
ompt/loadtool/tool_not_available/tool_not_available.c
This patch removes this flag for macOS and adds it only for Linux and Windows.
I tested it on Ubuntu 16.04 and macOS HighSierra, with Clang/LLVM 6.0.1 and OpenMP trunk.
This solution was also discussed in the OpenMP-dev mailing list.
Patch provided by Simone Atzeni
Differential Revision: https://reviews.llvm.org/D48888
llvm-svn: 336327
Joachim Protze [Thu, 5 Jul 2018 09:14:01 +0000 (09:14 +0000)]
[OMPT] Add synchronization to threads_nested.c testcase
The testcase potentially fails when a thread is reused.
The added synchronization makes sure this does not happen.
Patch provided by Simon Convent
Differential Revision: https://reviews.llvm.org/D48932
llvm-svn: 336326
Ivan A. Kosarev [Thu, 5 Jul 2018 08:59:49 +0000 (08:59 +0000)]
[NEON] Fix combining of vldx_dup intrinsics with updating of base addresses
Resolves:
Unsupported ARM Neon intrinsics in Target-specific DAG combine
function for VLDDUP
https://bugs.llvm.org/show_bug.cgi?id=38031
Related diff: D48439
Differential Revision: https://reviews.llvm.org/D48920
llvm-svn: 336325
Sander de Smalen [Thu, 5 Jul 2018 08:52:03 +0000 (08:52 +0000)]
Reverting r336322 for now, as it causes an assert failure
in TableGen, for which there is already a patch in Phabricator
(D48937) that needs to be committed first.
llvm-svn: 336324
Mikael Holmen [Thu, 5 Jul 2018 08:42:16 +0000 (08:42 +0000)]
Partial revert of "NFC - Various typo fixes in tests"
This partially reverts r336268 since it causes buildbot failures.
Added FIXME at the places where the CHECKs are misspelled.
llvm-svn: 336323
Sander de Smalen [Thu, 5 Jul 2018 08:38:30 +0000 (08:38 +0000)]
[AArch64][SVE] Asm: Support for predicated FP rounding instructions.
This patch also adds instructions for predicated FP square-root and
reciprocal exponent.
The added instructions are:
- FRINTI Round to integral value (current FPCR rounding mode)
- FRINTX Round to integral value (current FPCR rounding mode, signalling inexact)
- FRINTA Round to integral value (to nearest, with ties away from zero)
- FRINTN Round to integral value (to nearest, with ties to even)
- FRINTZ Round to integral value (toward zero)
- FRINTM Round to integral value (toward minus Infinity)
- FRINTP Round to integral value (toward plus Infinity)
- FSQRT Floating-point square root
- FRECPX Floating-point reciprocal exponent
llvm-svn: 336322
Eric Liu [Thu, 5 Jul 2018 08:29:33 +0000 (08:29 +0000)]
[clangd] Log sema completion context kind and query scopes. NFC
Reviewers: sammccall
Subscribers: ilya-biryukov, MaskRay, jkorous, cfe-commits
Differential Revision: https://reviews.llvm.org/D48724
llvm-svn: 336321
Sam McCall [Thu, 5 Jul 2018 08:26:53 +0000 (08:26 +0000)]
Revert "[clangd] FileDistance: temporarily disable in CodeComplete, it's behaving badly"
The bad behavior seems to have been fixed by r336242 after all.
I thought it was persisting, but that was a different bug fixed by D48940
llvm-svn: 336320
Sjoerd Meijer [Thu, 5 Jul 2018 08:21:40 +0000 (08:21 +0000)]
[ARM] ParallelDSP: only support i16 loads for now
We were miscompiling i8 loads, so reject them as unsupported narrow operations
for now.
Differential Revision: https://reviews.llvm.org/D48944
llvm-svn: 336319
Eric Liu [Thu, 5 Jul 2018 08:14:04 +0000 (08:14 +0000)]
[clangd] Treat class constructor as in the same scope as the class in ranking.
Reviewers: sammccall
Subscribers: ilya-biryukov, MaskRay, jkorous, cfe-commits
Differential Revision: https://reviews.llvm.org/D48933
llvm-svn: 336318
Sander de Smalen [Thu, 5 Jul 2018 07:54:10 +0000 (07:54 +0000)]
[AArch64][SVE] Asm: Support for signed/unsigned MIN/MAX/ABD
This patch implements the following varieties:
- Unpredicated signed max, e.g. smax z0.h, z1.h, #-128
- Unpredicated signed min, e.g. smin z0.h, z1.h, #-128
- Unpredicated unsigned max, e.g. umax z0.h, z1.h, #255
- Unpredicated unsigned min, e.g. umin z0.h, z1.h, #255
- Predicated signed max, e.g. smax z0.h, p0/m, z0.h, z1.h
- Predicated signed min, e.g. smin z0.h, p0/m, z0.h, z1.h
- Predicated signed abd, e.g. sabd z0.h, p0/m, z0.h, z1.h
- Predicated unsigned max, e.g. umax z0.h, p0/m, z0.h, z1.h
- Predicated unsigned min, e.g. umin z0.h, p0/m, z0.h, z1.h
- Predicated unsigned abd, e.g. uabd z0.h, p0/m, z0.h, z1.h
llvm-svn: 336317
Lei Huang [Thu, 5 Jul 2018 07:46:01 +0000 (07:46 +0000)]
[Power9] Optimize codgen for conversions of int to float128
Optimize code sequences for integer conversion to fp128 when the integer is a result of:
* float->int
* float->long
* double->int
* double->long
Differential Revision: https://reviews.llvm.org/D48429
llvm-svn: 336316
Craig Topper [Thu, 5 Jul 2018 06:52:55 +0000 (06:52 +0000)]
[X86] Remove X86 specific scalar FMA intrinsics and upgrade to tart independent FMA and extractelement/insertelement.
llvm-svn: 336315
Lei Huang [Thu, 5 Jul 2018 06:51:38 +0000 (06:51 +0000)]
[Power9][NFC] add back-end tests for passing homogeneous fp128 aggregates by value
Tests to verify that we are passing fp128 via VSX registers as per ABI.
These are related to clang commit rL336308.
Differential Revision: https://reviews.llvm.org/D48310
llvm-svn: 336314
Lei Huang [Thu, 5 Jul 2018 06:29:28 +0000 (06:29 +0000)]
[Power9] Add tests for passing float128 in VSX reg for non-homogenous aggregates
Add missing testcase for rL336310
llvm-svn: 336313
Serge Pavlov [Thu, 5 Jul 2018 06:24:29 +0000 (06:24 +0000)]
[demangler] Avoid alignment warning
The alignment specified by a constant for the field
`BumpPointerAllocator::InitialBuffer` exceeded the alignment
guaranteed by `malloc` and `new` on Windows. This change set
the alignment value to that of `long double`, which is defined
by the used platform.
It fixes https://bugs.llvm.org/show_bug.cgi?id=37944.
Differential Revision: https://reviews.llvm.org/D48889
llvm-svn: 336312
Serge Pavlov [Thu, 5 Jul 2018 06:22:39 +0000 (06:22 +0000)]
[demangler] Avoid alignment warning
The alignment specified by a constant for the field
`BumpPointerAllocator::InitialBuffer` exceeded the alignment
guaranteed by `malloc` and `new` on Windows. This change set
the alignment value to that of `long double`, which is defined
by the used platform.
It fixes https://bugs.llvm.org/show_bug.cgi?id=37944.
Differential Revision: https://reviews.llvm.org/D48889
llvm-svn: 336311
Lei Huang [Thu, 5 Jul 2018 06:21:37 +0000 (06:21 +0000)]
[Power9] Ensure float128 in non-homogenous aggregates are passed via VSX reg
Non-homogenous aggregates are passed in consecutive GPRs, in GPRs and in memory,
or in memory. This patch ensures that float128 members of non-homogenous
aggregates are passed via VSX registers.
This is done via custom lowering a bitcast of a build_pari(i64,i64) to float128
to a new PPCISD node, BUILD_FP128.
Differential Revision: https://reviews.llvm.org/D48308
llvm-svn: 336310
Sam McCall [Thu, 5 Jul 2018 06:20:41 +0000 (06:20 +0000)]
[clangd] Track origins of symbols (various indexes, Sema).
Summary: Surface it in the completion items C++ API, and when a flag is set.
Reviewers: ioeric
Subscribers: ilya-biryukov, MaskRay, jkorous, cfe-commits
Differential Revision: https://reviews.llvm.org/D48938
llvm-svn: 336309
Lei Huang [Thu, 5 Jul 2018 04:32:01 +0000 (04:32 +0000)]
[Power9] Update fp128 as a valid homogenous aggregate base type
Update clang to treat fp128 as a valid base type for homogeneous aggregate
passing and returning.
Differential Revision: https://reviews.llvm.org/D48044
llvm-svn: 336308
Lei Huang [Thu, 5 Jul 2018 04:18:37 +0000 (04:18 +0000)]
[Power9]Legalize and emit code for quad-precision convert from single-precision
Legalize and emit code for quad-precision floating point operation conversion of
single-precision value to quad-precision.
Differential Revision: https://reviews.llvm.org/D47569
llvm-svn: 336307