Commit Graph

288224 Commits

Author SHA1 Message Date
Sander de Smalen eb1053f9d3 [AArch64][SVE] Asm: Support for contiguous, first-faulting LDFF1 (scalar+scalar) load instructions.
Reviewers: fhahn, rengolin, samparker, SjoerdMeijer, t.p.northover, echristo, evandro, javed.absar

Reviewed By: rengolin

Subscribers: tschuett, kristof.beyls, llvm-commits

Differential Revision: https://reviews.llvm.org/D45946

llvm-svn: 330697
2018-04-24 08:59:08 +00:00
Martin Storsjo 6afcd64eb6 [GCC] Match a GCC version with a patch suffix without a third version component
Previously it would only accept a string as a GCC version if it had
either two components and no suffix, or three components with an
optional suffix.

Debian and ubuntu provided mingw compilers have lib/gcc/target entries
like "5.3-posix" and "5.3-win32". This doesn't try to make any specific
preference between them (other than lexical sorting of the suffix).

Differential Revision: https://reviews.llvm.org/D45505

llvm-svn: 330696
2018-04-24 08:50:11 +00:00
Martin Storsjo f2124605cb [test] Fix a typo in a test directory name. NFC.
llvm-svn: 330695
2018-04-24 08:49:57 +00:00
Roman Lebedev e931b02616 Link to AggressiveInstCombine in a few places. Unbreaks build for me.
/usr/local/bin/ld.lld: error: undefined symbol: llvm::createAggressiveInstCombinerPass()
>>> referenced by cc1_main.cpp
>>>               tools/clang/tools/driver/CMakeFiles/clang.dir/cc1_main.cpp.o:(_GLOBAL__sub_I_cc1_main.cpp)

And so on

The bot coverage is clearly missing.

llvm-svn: 330694
2018-04-24 08:40:44 +00:00
Roman Lebedev 68e0daedcf Link to AggressiveInstCombine in a few places. Unbreaks build for me.
/usr/local/bin/ld.lld: error: undefined symbol: llvm::createAggressiveInstCombinerPass()
>>> referenced by cc1_main.cpp
>>>               tools/clang/tools/driver/CMakeFiles/clang.dir/cc1_main.cpp.o:(_GLOBAL__sub_I_cc1_main.cpp)

And so on

The bot coverage is clearly missing.

llvm-svn: 330693
2018-04-24 08:40:37 +00:00
Erik Verbruggen c068e9094a [libclang] Only mark CXCursors for explicit attributes with a type
All attributes have a source range associated with it. However, implicit
attributes are added by the compiler, and not added because the user
wrote something in the input. So no token type should be set to
CXCursor_*Attr.

The problem was visible when a class gets marked by e.g.
MSInheritanceAttr, which has the full CXXRecordDecl's range as its
own range. The effect of marking that range as CXCursor_UnexposedAttr
was that all cursors for the record decl, including all child decls,
would become CXCursor_UnexposedAttr.

llvm-svn: 330692
2018-04-24 08:39:46 +00:00
Pavel Labath 60b7132a7c [Support/Path] Add more tests and improve failure messages of existing ones
Summary:
I am preparing a patch to the path function. While working on it, I
noticed that some of the areas are lacking test coverage (e.g. filename
and parent_path functions), so I add more tests to guard against
regressions there.

I have also found the failure messages hard to understand, so I rewrote
some existing test to give more actionable messages when they fail:
- for tests which run over multiple inputs, I use SCOPED_TRACE, to show
  which of the inputs caused the actual failure.
- for comparisons of vectors, I use gmock's container matchers, which
  will print out the full container contents (and the elements that
  differ) when they fail to match.

Reviewers: zturner, espindola

Subscribers: llvm-commits

Differential Revision: https://reviews.llvm.org/D45941

llvm-svn: 330691
2018-04-24 08:29:20 +00:00
Benjamin Kramer bb156b52cf [AST] Another attempt at fixing the ARM bots.
llvm-svn: 330690
2018-04-24 08:18:32 +00:00
Benjamin Kramer 2fdf81fb2c [AST] Use a bit of trickery to make test pass on platforms where wchar_t is unsigned.
llvm-svn: 330689
2018-04-24 07:53:10 +00:00
Xin Tong adb5bfe75b [LVI] Fix typo. NFC
llvm-svn: 330688
2018-04-24 07:38:07 +00:00
Dan Liew dfd5a90a99 [LibFuzzer] Tweak `MutationDispatcher::Mutate_CopyPart` mutation.
It doesn't make sense to non-deterministically choose between
`CopyPart(..)` and `InsertPart(..)` when it is known that
`InsertPart(..)` will fail.

This upstream's a change from JFS solver's fork of LibFuzzer.

Differential Revision: https://reviews.llvm.org/D45693

llvm-svn: 330687
2018-04-24 06:31:09 +00:00
Alexander Shaposhnikov 3326e785b2 [llvm-objcopy] Adjust the code for the old versions of msvc
Follow-up for r330685.

llvm-svn: 330686
2018-04-24 06:23:22 +00:00
Alexander Shaposhnikov d6884795d0 Recommit "[llvm-objcopy] Switch over to using TableGen for parsing arguments"
Add explicit dependency on ObjcopyTableGen 
and rerun the tests on Windows. 
I will double-check the build bots 
and revert this commit if necessary.

llvm-svn: 330685
2018-04-24 05:43:32 +00:00
Max Kazantsev 7790d6cbff [NFC] Use FileCheck in test
llvm-svn: 330684
2018-04-24 04:42:37 +00:00
Max Kazantsev 30dee7874d [NFC] Use forgetTopmostLoop instead of logic duplication
llvm-svn: 330683
2018-04-24 04:33:04 +00:00
Craig Topper 19b85103a3 [X86] Add a BSWAP16 instruction using the 32-bit encoding plus a 0x66 prefix.
This encoding is recognized by the CPU, but the behavior is undefined. This makes the disassembler handle it correctly so we don't print bswapl with a 16-bit register.

llvm-svn: 330682
2018-04-24 04:28:02 +00:00
Craig Topper ce281a41b5 [X86] Remove '#ifdef __x86_64__' around mask_set1_epi64 intrinsics.
The unmasked versions already didn't have this restrction. I don't think gcc or icc limit these to 64-bit mode so we shouldn't either.

llvm-svn: 330681
2018-04-24 03:36:08 +00:00
Chandler Carruth 0ace148ca6 [PM/LoopUnswitch] Remove another over-aggressive assert.
This code path can very clearly be called in a context where we have
baselined all the cloned blocks to a particular loop and are trying to
handle nested subloops. There is no harm in this, so just relax the
assert. I've added a test case that will make sure we actually exercise
this code path.

llvm-svn: 330680
2018-04-24 03:27:00 +00:00
David Blaikie 60dc462b04 Fixup Polly for an LLVM header file change.
llvm-svn: 330679
2018-04-24 02:23:41 +00:00
Eric Christopher b9733d0f7c Remove unused function HexagonEarlyIfConversion::replacePhiEdges. NFC.
llvm-svn: 330678
2018-04-24 02:10:59 +00:00
Max Kazantsev 5a0a40b8cb [NFC] Add clarification comment
llvm-svn: 330677
2018-04-24 02:08:05 +00:00
Eric Christopher 24004d65a5 Reflow formatting after previous NFC commit.
llvm-svn: 330676
2018-04-24 01:57:03 +00:00
Eric Christopher 29ff50454c Change if-conditionals to else-if as they should all be mutually exclusive.
No functional change intended.

llvm-svn: 330675
2018-04-24 01:57:02 +00:00
Nico Weber 5225b9eeed Make add_clang_tool() formatting a bit more consistent.
llvm-svn: 330674
2018-04-24 01:30:44 +00:00
Nico Weber 1c2c321b47 Mostly revert r330672.
The test is apparently needed e.g. for check-cfi on Windows where we get
  'C:/b/slave/sanitizer-windows/build/./bin/clang.exe': command not found
without it.  Try to fix the problem that was fixed by r330672 by also checking
for isabs() instead.

llvm-svn: 330673
2018-04-24 01:24:42 +00:00
Nico Weber a425db5a1e Remove code that's almost always dead, and harmful if not.
lit's util.which() would check if the passed-in path existed directly,
and if so return it as-is.  This is never the case when running llvm's, clang's,
or lld's tests normally.  But when running `./llvm-lit path/to/clang/test`
with a cwd of llvm-build/bin, this if would detect that clang exists at path
'clang' and return 'clang' as the discovered clang binary -- and then lit would
use the " clang " -> "*** Do not use 'clang' in tests, use '%clang'. ***"
substitution to replace that with a broken test.  By removing this early
return, lit ends up with the usual absolute path and everything works even
in this uncommon case.

llvm-svn: 330672
2018-04-24 01:05:04 +00:00
David Blaikie d2a57220ac Fix build break due to content moving from Scalar.h to InstCombine.h in LLVM
llvm-svn: 330671
2018-04-24 00:59:22 +00:00
David Blaikie ce84e44a4b Fix build breaks in examples due to moving stuff from Scalar.h to InstCombine.h
llvm-svn: 330670
2018-04-24 00:58:57 +00:00
David Blaikie a27771b62f InstCombine: Fix layering by not including Scalar.h in InstCombine
(notionally Scalar.h is part of libLLVMScalarOpts, so it shouldn't be
included by InstCombine which doesn't/shouldn't need to depend on
ScalarOpts)

llvm-svn: 330669
2018-04-24 00:48:59 +00:00
Craig Topper 1bcb258ba3 [AggressiveInstCombine] Add aggressive inst combiner to the LLVM C API.
I just tried to copy what was done for regular InstCombine. Hopefully I didn't miss anything.

llvm-svn: 330668
2018-04-24 00:39:29 +00:00
George Burgess IV 8e807bf3fa Reland r301880(!): "[InstSimplify] Handle selects of GEPs with 0 offset"
I was reminded today that this patch got reverted in r301885. I can no
longer reproduce the failure that caused the revert locally (...almost
one year later), and the patch applied pretty cleanly, so I guess we'll
see if the bots still get angry about it.

The original breakage was InstSimplify complaining (in "assertion
failed" form) about getting passed some crazy IR when running `ninja
check-sanitizer`. I'm unable to find traces of what, exactly, said crazy
IR was. I suppose we'll find out pretty soon if that's still the case.
:)

Original commit:

  Author: gbiv
  Date: Mon May  1 18:12:08 2017
  New Revision: 301880

  URL: http://llvm.org/viewvc/llvm-project?rev=301880&view=rev
  Log:
  [InstSimplify] Handle selects of GEPs with 0 offset

  In particular (since it wouldn't fit nicely in the summary):
  (select (icmp eq V 0) P (getelementptr P V)) -> (getelementptr P V)

  Differential Revision: https://reviews.llvm.org/D31435

llvm-svn: 330667
2018-04-24 00:25:01 +00:00
Alex Shlyapnikov cf30f6425a [HWASan] Use dynamic shadow memory on Android only.
There're issues with IFUNC support on other platforms.

Differential Revision: https://reviews.llvm.org/D45847

llvm-svn: 330666
2018-04-24 00:17:02 +00:00
Alex Shlyapnikov 909fb12f0c [HWASan] Use dynamic shadow memory on Android only (LLVM)
There're issues with IFUNC support on other platforms.

DIfferential Revision: https://reviews.llvm.org/D45840

llvm-svn: 330665
2018-04-24 00:16:54 +00:00
Craig Topper ab7578460b [AggressiveInstCombine] Add createAggressiveInstCombinerPass to LinkAllPasses.h.
llvm-svn: 330664
2018-04-24 00:11:04 +00:00
Craig Topper d4eb2073b7 [AggressiveInstCombine] Add library initializer routine for AggressiveInstCombine library. Use it in bugpoint and llvm-opt-fuzzer to match regular InstCombine.
This should make aggressive instcombine usable with these tools.

llvm-svn: 330663
2018-04-24 00:05:21 +00:00
Simon Pilgrim e5e4bf02d6 [X86] Remove unnecessary vector memory folded InstRW overrides.
We have test coverage for these with resources-sse*/avx*

llvm-svn: 330662
2018-04-23 22:45:04 +00:00
Robert Widmann 21fc15d553 [LLVM-C] DIBuilder Bindings For Variable Expressions
Summary: Add DIBuilder bindings for (global) variable expressions, variable value expressions, and debug value intrinsic insertion.

Reviewers: harlanhaskins, deadalnix, whitequark

Reviewed By: whitequark

Subscribers: llvm-commits

Differential Revision: https://reviews.llvm.org/D45979

llvm-svn: 330661
2018-04-23 22:31:49 +00:00
Roman Tereshin 3c6ea7e28c [GlobalISel][Legalizer] Look thro copies while combining G_UNMERGE's
As we're becoming stricter w/ respect to not allowing vregs having LLTs
and regclasses assigned both mid-globalisel pipeline, the number of
extra copies grows, some of which separate G_UNMERGE's from their
corresponding G_MERGE's, becoming a performance concern.

It's worth mentioning that we're already looking through copies while
combining legalization artifacts for every kind of artifact but
G_UNMERGE.

Reviewed By: aditya_nandakumar

Reviewers: ab, t.p.northover, volkan, javed.absar

Subscribers: rovka, kristof.beyls, llvm-commits

Differential Revision: https://reviews.llvm.org/D45644

llvm-svn: 330660
2018-04-23 22:28:36 +00:00
Simon Pilgrim eb6090941c [X86] Remove unnecessary BMI2 InstRW overrides.
We have test coverage for these with resources-bmi2.s

llvm-svn: 330659
2018-04-23 22:19:55 +00:00
Craig Topper e78c713b9b [X86] Move the 32-bit versions of rdfsbase/rdgsbase/wrfsbase/wrgsbase to BuiltinsX86_64.def.
The 32-bit refers to their input/output type, but the instructions are only available in 64-bit mode.

llvm-svn: 330658
2018-04-23 22:18:36 +00:00
Craig Topper 9d39e04409 [X86] Move __builtin_ia32_movnti64 andd __builtin_ia32_rdrand64_step to BuiltinsX86_64.def to make them unavailable in 32-bit mode.
llvm-svn: 330657
2018-04-23 22:18:34 +00:00
Benjamin Kramer 33b7092601 [AST] strcmp/memcmp always compares unsigned chars.
This makes it return the right result in a couple of edge cases. The
wide versions always do the comparison on the underlying wchar_t type.

llvm-svn: 330656
2018-04-23 22:04:34 +00:00
Tim Shen 403c667b4b Re-commit r330627 "[libcxx] implement <experimental/simd> declarations based on P0214R7."
There are 3 changes:
* Renamed genertor.pass.cpp to generator.pass.cpp
* Removed nothing_to_do.pass.cpp
* Mark GCC 4.9 as UNSUPPORTED for the test files that have negative
  narrowing conversion SFINAE test (see GCC PR63723).

llvm-svn: 330655
2018-04-23 21:54:06 +00:00
Craig Topper 42da9cb091 [Docs] Regenerate command line documentation.
llvm-svn: 330654
2018-04-23 21:41:06 +00:00
Florian Hahn 7441818560 [LoopInterchange] Do not change LI for BBs in child loops.
If a loop with child loops becomes our new inner loop after
interchanging, we only need to update LoopInfo for the blocks defined in
the old outer loop. BBs in child loops will stay there.

Reviewers: efriedma, karthikthecool, mcrosier

Reviewed By: efriedma

Differential Revision: https://reviews.llvm.org/D45970

llvm-svn: 330653
2018-04-23 21:38:19 +00:00
Matt Morehouse f66221c6ec [libFuzzer] Add feature to not use AFL's deferred forkserver.
A small but substantial minority of libFuzzer-based fuzzers run code that
does not play well with fork in global constructors or LLVMFuzzerInitialize.
This patch allows these fuzzers to use afl_driver by allowing them to
opt-out of using AFL's deferred forkserver which deferres calling fork until
after this code.

Patch By: metzman

Differential Revision: https://reviews.llvm.org/D45744

llvm-svn: 330652
2018-04-23 21:36:21 +00:00
Roman Lebedev 6ed0fad999 [Sema] Add -Wno-self-assign-overloaded
Summary:
It seems there isn't much enthusiasm for `-wtest` D45685.

This is more conservative version, which i had in the very first
revision of D44883, but that 'erroneously' got removed because of the review.

**Based on some [irc] discussions, it must really be documented that
we want all the new diagnostics to have their own flags, to ease
rollouts, transitions, etc.**

Please do note that i'm only adding `-Wno-self-assign-overloaded`,
but not `-Wno-self-assign-field-overloaded`, because i'm honestly
not aware of any false-positives from the `-field` variant,
but i can just as easily add it if wanted.
https://reviews.llvm.org/D44883#1068561

Reviewers: dblaikie, aaron.ballman, thakis, rjmccall, rsmith

Reviewed By: dblaikie

Subscribers: Quuxplusone, chandlerc, cfe-commits

Differential Revision: https://reviews.llvm.org/D45766

llvm-svn: 330651
2018-04-23 21:35:21 +00:00
Martin Liska d6af13e737 Change kAllocatorSpace for powerpc64.
Fixes issue: https://github.com/google/sanitizers/issues/933

Differential Revision: https://reviews.llvm.org/D45950

llvm-svn: 330650
2018-04-23 21:13:40 +00:00
Jan Vesely e7d567ee0d log10: Use sw implementation from amd builtins
Add missing table.
Fixes log10d CTS on carrizo.
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
Acked-by: Aaron Watry <awatry@gmail.com>
Tested-by: Aaron Watry <awatry@gmail.com>

llvm-svn: 330649
2018-04-23 21:10:42 +00:00
Simon Pilgrim ed09ebb48d [X86] Remove unnecessary WriteLEA InstRW overrides.
llvm-svn: 330648
2018-04-23 21:04:23 +00:00