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
Lei Huang [Thu, 5 Jul 2018 04:10:15 +0000 (04:10 +0000)]
[Power9] Implement float128 parameter passing and return values
This patch enable parameter passing and return by value for float128 types.
Passing aggregate/union which contain float128 members will be submitted in
subsequent patches.
Differential Revision: https://reviews.llvm.org/D47552
llvm-svn: 336306
Craig Topper [Thu, 5 Jul 2018 03:01:29 +0000 (03:01 +0000)]
[X86] Remove some isel patterns for X86ISD::SELECTS that specifically looked for the v1i1 mask to have come from a scalar_to_vector from GR8.
We have patterns for SELECTS that top at v1i1 and we have a pattern for (v1i1 (scalar_to_vector GR8)). The patterns being removed here do the same thing as the two other patterns combined so there is no need for them.
llvm-svn: 336305
Craig Topper [Thu, 5 Jul 2018 02:52:56 +0000 (02:52 +0000)]
[X86] Add support for combining FMSUB/FNMADD/FNMSUB ISD nodes with an fneg input.
Previously we could only negate the FMADD opcodes. This used to be mostly ok when we lowered FMA intrinsics during lowering. But with the move to llvm.fma from target specific intrinsics, we can combine (fneg (fma)) to (fmsub) earlier. So if we start with (fneg (fma (fneg))) we would get stuck at (fmsub (fneg)).
This patch fixes that so we can also combine things like (fmsub (fneg)).
llvm-svn: 336304
Craig Topper [Thu, 5 Jul 2018 02:52:54 +0000 (02:52 +0000)]
[X86] Remove some of the packed FMA3 intrinsics since we no longer use them in clang.
There's a regression in here due to inability to combine fneg inputs of X86ISD::FMSUB/FNMSUB/FNMADD nodes.
More removals to come, but I wanted to stop and fix the regression that showed up in this first.
llvm-svn: 336303
Aaron Ballman [Thu, 5 Jul 2018 01:35:49 +0000 (01:35 +0000)]
Adding some documentation changes that were missed in r336301.
llvm-svn: 336302
Aaron Ballman [Thu, 5 Jul 2018 01:16:31 +0000 (01:16 +0000)]
Add the cert-msc51-cpp and cert-msc32-c checks.
These checks flag use of random number generators with poor seeds that would possibly lead to degraded random number generation.
Patch by Borsik Gábor
llvm-svn: 336301
Fangrui Song [Thu, 5 Jul 2018 00:33:03 +0000 (00:33 +0000)]
[Index] Remove unused index::IndexDataConsumer::_anchor()
It was supposed to serve as a key function, but it was invalid as it was not the first out-of-line non-pure virtual function.
llvm-svn: 336300
Lei Huang [Wed, 4 Jul 2018 21:59:16 +0000 (21:59 +0000)]
[Power9]Legalize and emit code for round & convert quad-precision values
Legalize and emit code for round & convert float128 to double precision and
single precision.
Differential Revision: https://reviews.llvm.org/D46997
llvm-svn: 336299
Aaron Ballman [Wed, 4 Jul 2018 21:22:28 +0000 (21:22 +0000)]
Silence an MSVC C4189 warning about a local variable being initialized but not used; NFC.
llvm-svn: 336298
Eric Fiselier [Wed, 4 Jul 2018 20:16:05 +0000 (20:16 +0000)]
Remove old workaround that is no longer needed
llvm-svn: 336297
Vladimir Stefanovic [Wed, 4 Jul 2018 19:26:31 +0000 (19:26 +0000)]
[mips] Warn when crc, ginv, virt flags are used with too old revision
CRC and GINV ASE require revision 6, Virtualization requires revision 5.
Print a warning when revision is older than required.
Differential Revision: https://reviews.llvm.org/D48843
llvm-svn: 336296
Stefan Pintilie [Wed, 4 Jul 2018 18:54:25 +0000 (18:54 +0000)]
[PowerPC] Replace the Post RA List Scheduler with the Machine Scheduler
We want to run the Machine Scheduler instead of the List Scheduler after RA.
Checked with a performance run on a Power 9 machine with SPEC 2006 and while
some benchmarks improved and others degraded the geomean was slightly improved
with the Machine Scheduler.
Differential Revision: https://reviews.llvm.org/D45265
llvm-svn: 336295
Jakub Kuderski [Wed, 4 Jul 2018 18:37:15 +0000 (18:37 +0000)]
[Dominators] Add DomTreeUpdater constructor from DT* and PDT*
Summary:
Previously, if a function accepts an optional DT pointer,
```
void Foo (.., DominatorTree * DT = nullptr) {
...
if(DT)
DomTreeUpdater(*DT, ...).insertEdge(A, B);
if(DT){
DomTreeUpdater DTU(*DT, ...);
... // Construct the update vector and applyUpdates
}
...
if(DT){
DomTreeUpdater DTU(*DT, ...);
... // Construct the update vector and applyUpdates
}
}
```
After this patch, it can be simplified as
```
void Foo (.., DominatorTree * DT = nullptr) {
DomTreeUpdater DTU(DT, ...);
...
DTU.insertEdge(A, B);
if(DT){
... // Construct the update vector and applyUpdates
}
...
if(DT){
... // Construct the update vector and applyUpdates
}
}
```
Patch by Chijun Sima <simachijun@gmail.com>.
Reviewers: kuhar, brzycki, dmgreen
Reviewed By: kuhar
Author: NutshellySima
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D48923
llvm-svn: 336294
Sanjay Patel [Wed, 4 Jul 2018 17:44:04 +0000 (17:44 +0000)]
[InstCombine] allow narrowing of min/max/abs
We have bailout hacks based on min/max in various places in instcombine
that shouldn't be necessary. The affected test was added for:
D48930
...which is a consequence of the improvement in:
D48584 (https://reviews.llvm.org/rL336172)
I'm assuming the visitTrunc bailout in this patch was added specifically
to avoid a change from SimplifyDemandedBits, so I'm just moving that
below the EvaluateInDifferentType optimization. A narrow min/max is still
a min/max.
llvm-svn: 336293
Roman Lebedev [Wed, 4 Jul 2018 17:32:44 +0000 (17:32 +0000)]
[X86][BtVer2][MCA][NFC] Add CMPEQ dependency-breaking one-idioms tests
Summary: As per `Agner's Microarchitecture doc
(21.8 AMD Bobcat and Jaguar pipeline - Dependency-breaking instructions)`,
these, like zero-idioms, are dependency-breaking,
although they produce ones and still consume resources.
FIXME: as discussed in D48877, llvm-mca handling is broken for these.
Reviewers: andreadb
Reviewed By: andreadb
Subscribers: gbedwell, RKSimon, llvm-commits
Differential Revision: https://reviews.llvm.org/D48876
llvm-svn: 336292
Simon Pilgrim [Wed, 4 Jul 2018 17:24:05 +0000 (17:24 +0000)]
Fix some irregular whitespace/indentation. NFCI.
llvm-svn: 336291
Jonas Devlieghere [Wed, 4 Jul 2018 17:14:52 +0000 (17:14 +0000)]
[lit] Don't require semicolon separator
This patch removes the requirement for a semicolon as a separator when
passing arguments to lit. It relies on the shlex module that is part of
Python to do simple lexical analysis, similar to what happens in a Unix
shell.
llvm-svn: 336290
Sanjay Patel [Wed, 4 Jul 2018 16:56:35 +0000 (16:56 +0000)]
[InstCombine] add value names to test; NFC
That makes it easier to mix and match lines into other tests.
llvm-svn: 336289
Siddharth Bhat [Wed, 4 Jul 2018 16:51:27 +0000 (16:51 +0000)]
[PPCGCodeGen] Change printf to outs() to prevent garbled output. [NFC]
Summary:
It appears that llvm uses unbuffered C++ streams. So, we should not
mix C and C++ stream operations, because that will give us mixed
up output.
Reviewers: efriedma, jdoerfert, Meinersbur, gareevroman, sebpop, zinob, huihuiz, pollydev, grosser, singam-sanjay, philip.pfaffe
Reviewed By: philip.pfaffe
Subscribers: nemanjai, kbarton
Differential Revision: https://reviews.llvm.org/D40126
llvm-svn: 336288
Dave Lee [Wed, 4 Jul 2018 16:11:43 +0000 (16:11 +0000)]
Fix and simplify lldb.command decorator
Summary:
This change fixes one issue with `lldb.command`, and also reduces the implementation.
The fix: a command function's docstring was not shown when running `help <command_name>`. This is because the docstring attached the source function is not propagated to the decorated function (`f.__call__`). By returning the original function, the docstring will be properly displayed by `help`.
Also with this change, the command name is assumed to be the function's name, but can still be explicitly defined as previously.
Additionally, the implementation was updated to:
* Remove inner class
* Remove use of `inspect` module
* Remove `*args` and `**kwargs`
Reviewers: clayborg
Reviewed By: clayborg
Subscribers: keith, xiaobai, lldb-commits
Differential Revision: https://reviews.llvm.org/D48658
llvm-svn: 336287
Volodymyr Turanskyy [Wed, 4 Jul 2018 16:11:15 +0000 (16:11 +0000)]
[ARM] [Assembler] Support negative immediates: cover few missing cases
Support for negative immediates was implemented in
https://reviews.llvm.org/rL298380, however few instruction options were missing.
This change adds negative immediates support and respective tests
for the following:
ADD
ADDS
ADDS.W
AND.W
ANDS
BIC.W
BICS
BICS.W
SUB
SUBS
SUBS.W
Differential Revision: https://reviews.llvm.org/D48649
llvm-svn: 336286
Yvan Roux [Wed, 4 Jul 2018 15:37:08 +0000 (15:37 +0000)]
[MachineOutliner] Fix typo in getOutliningCandidateInfo function name
getOutlininingCandidateInfo -> getOutliningCandidateInfo
Differential Revision: https://reviews.llvm.org/D48867
llvm-svn: 336285
Paul Semel [Wed, 4 Jul 2018 15:25:03 +0000 (15:25 +0000)]
[llvm-objdump] Add --file-headers (-f) option
llvm-svn: 336284
Alexander Kornienko [Wed, 4 Jul 2018 15:19:49 +0000 (15:19 +0000)]
[clang-tidy] Fix http://llvm.org/PR38055
llvm-svn: 336283
George Rimar [Wed, 4 Jul 2018 15:05:21 +0000 (15:05 +0000)]
[ELF] - Simplify. NFC.
Currently, there are only OutputSection and SymbolAssignment
commands possible at the first level under SECTIONS tag.
So, shouldSkip() contained dead "return true".
Patch simplifies the code.
llvm-svn: 336282
Tobias Grosser [Wed, 4 Jul 2018 14:53:36 +0000 (14:53 +0000)]
ScopInfo: simplify equivalence classes before storing them [NFCI]
This change has no impact on upstream Polly directly, but reduces output
noise for some internal isl versions we are testing. In general, storing
simpler and more canonical output is a good idea. Hence, it seems useful
to upstream this change.
llvm-svn: 336281
George Rimar [Wed, 4 Jul 2018 14:47:19 +0000 (14:47 +0000)]
[ELF] - Extend edata-etext.s test case.
We did not have a test that would test that
_etext address is equal to etext, _end == end and _edata == edata.
Because of that, the following line was never
executed when running our tests:
https://github.com/llvm-mirror/lld/blob/master/ELF/Writer.cpp#L928
Patch fixes that.
llvm-svn: 336280
Jonas Devlieghere [Wed, 4 Jul 2018 14:38:21 +0000 (14:38 +0000)]
[CMake] Remove redundant path component
Fixes spurious path component introduced in r336278. The variable is
cached so might require you to re-run CMake.
llvm-svn: 336279
Jonas Devlieghere [Wed, 4 Jul 2018 14:34:32 +0000 (14:34 +0000)]
[CMake] Use LLVM_RUNTIME_OUTPUT_INTDIR for LLDB exectuable
Apparently there's a difference between using LLVM_RUNTIME_OUTPUT_INTDIR
and LLVM_BINARY_DIR. The former will point to the current binary
directory (i.e. that where lldb is built) while the former will always
point to LLVM's. This was causing trouble for the swift build but should
be a transparent for upstream lldb.
llvm-svn: 336278
Simon Pilgrim [Wed, 4 Jul 2018 14:20:58 +0000 (14:20 +0000)]
[X86][SSE] Add v16i16 shl x,c -> pmullw test
llvm-svn: 336277
Andrew Ng [Wed, 4 Jul 2018 14:17:10 +0000 (14:17 +0000)]
[ThinLTO] Update ThinLTO cache file atimes when on Windows
ThinLTO cache file access times are used for expiration based pruning
and since Vista, file access times are not updated by Windows by
default:
https://blogs.technet.microsoft.com/filecab/2006/11/07/disabling-last-access-time-in-windows-vista-to-improve-ntfs-performance
This means on Windows, cache files are currently being pruned from
creation time. This change manually updates cache files that are
accessed by ThinLTO, when on Windows.
Patch by Owen Reynolds.
Differential Revision: https://reviews.llvm.org/D47266
llvm-svn: 336276
Rafael Stahl [Wed, 4 Jul 2018 14:12:58 +0000 (14:12 +0000)]
[analyzer][ctu] fix unsortable diagnostics
Summary: In the provided test case the PathDiagnostic compare function was not able to find a difference.
Reviewers: xazax.hun, NoQ, dcoughlin, george.karpenkov
Reviewed By: george.karpenkov
Subscribers: a_sidorin, szepet, rnkovacs, a.sidorin, mikhail.ramalho, cfe-commits
Differential Revision: https://reviews.llvm.org/D48474
llvm-svn: 336275
Sander de Smalen [Wed, 4 Jul 2018 14:05:33 +0000 (14:05 +0000)]
[AArch64][SVE] Asm: Support for reversed subtract (SUBR) instruction.
This patch adds both a vector and an immediate form, e.g.
- Vector form:
subr z0.h, p0/m, z0.h, z1.h
subtract active elements of z0 from z1, and store the result in z0.
- Immediate form:
subr z0.h, z0.h, #255
subtract elements of z0, and store the result in z0.
llvm-svn: 336274
George Rimar [Wed, 4 Jul 2018 14:04:59 +0000 (14:04 +0000)]
[ELF] - Cover handling of DW_AT_external with test.
The following check was uncovered with tests:
https://github.com/llvm-mirror/lld/blob/master/ELF/InputFiles.cpp#L159
Patch adds test to cover it.
llvm-svn: 336273
Jonas Devlieghere [Wed, 4 Jul 2018 13:59:25 +0000 (13:59 +0000)]
[CMake] Move some variables around
This improves consistency by creating a CMake variable for the dsymutil
path. The motivation is that for Swift, the dsymutil binary and the lldb
binary live in different directories and we need an option to configure
this from the build script.
llvm-svn: 336272
Simon Pilgrim [Wed, 4 Jul 2018 13:58:13 +0000 (13:58 +0000)]
[X86][SSE] Add SSE2 target to some shift tests
Show the difference in behaviour cf SSE41 (no PMULLD, PBLENDW etc.)
Raised by D48936
llvm-svn: 336271
George Rimar [Wed, 4 Jul 2018 13:36:45 +0000 (13:36 +0000)]
[ELF] - LTO: add test for createEmptyIndex.
We have a following comment for createEmptyIndex caller code:
// If LazyObjFile has not been added to link, emit empty index files.
// This is needed because this is what GNU gold plugin does and we have a
// distributed build system that depends on that behavior.
Though createEmptyIndex() itself
(https://github.com/llvm-mirror/lld/blob/master/ELF/LTO.cpp#L202)
is never called in our test cases.
Patch adds a test.
llvm-svn: 336270
Rafael Stahl [Wed, 4 Jul 2018 13:34:05 +0000 (13:34 +0000)]
[ASTImporter] import macro source locations
Summary: Implement full import of macro expansion info with spelling and expansion locations.
Reviewers: a.sidorin, klimek, martong, balazske, xazax.hun
Reviewed By: martong
Subscribers: thakis, xazax.hun, balazske, rnkovacs, cfe-commits
Differential Revision: https://reviews.llvm.org/D47698
llvm-svn: 336269
Gabor Buella [Wed, 4 Jul 2018 13:28:39 +0000 (13:28 +0000)]
NFC - Various typo fixes in tests
llvm-svn: 336268
Sander de Smalen [Wed, 4 Jul 2018 12:58:46 +0000 (12:58 +0000)]
[AArch64][SVE] Asm: Support for instructions to set/read FFR.
Includes instructions to read the First-Faulting Register (FFR):
- RDFFR (unpredicated)
rdffr p0.b
- RDFFR (predicated)
rdffr p0.b, p0/z
- RDFFRS (predicated, sets condition flags)
rdffr p0.b, p0/z
Includes instructions to set/write the FFR:
- SETFFR (no arguments, sets the FFR to all true)
setffr
- WRFFR (unpredicated)
wrffr p0.b
llvm-svn: 336267
Clement Courbet [Wed, 4 Jul 2018 12:31:00 +0000 (12:31 +0000)]
[llvm-exegesis] Remove dead comment.
llvm-svn: 336266