Commit Graph

331179 Commits

Author SHA1 Message Date
Simon Pilgrim 03cde3a7cc [X86] Regenerate known-signbits-vector.ll tests.
Use X86 instead of X32 and add a common CHECK prefix
2019-11-04 15:12:01 +00:00
Sven van Haastregt 6c5827975c [OpenCL] Fix FileCheck pattern
For this test, FileCheck is not run with the CHECK prefix; it seems
COMMON was intended here.
2019-11-04 15:08:53 +00:00
David Green 91b0cad813 [ARM] Use isFMAFasterThanFMulAndFAdd for MVE
The Arm backend will usually return false for isFMAFasterThanFMulAndFAdd,
where both the fused VFMA.f32 and a non-fused VMLA.f32 are usually
available for scalar code. For MVE we don't have the non-fused version
though. It makes more sense for isFMAFasterThanFMulAndFAdd to return
true, allowing us to simplify some of the existing ISel patterns.

The tests here are that non of the existing tests failed, and so we are
still selecting VFMA and VFMS. The one test that changed shows we can
now select from fast math flags, as opposed to just relying on the
isFMADLegalForFAddFSub option.

Differential Revision: https://reviews.llvm.org/D69115
2019-11-04 15:05:41 +00:00
Sanjay Patel b556ce3992 [IR] adjust assert when replacing undef elements in vector constant
As noted in follow-up to:
rGa1e8ad4f2fa7

It's not safe to assume that an element of the constant is always
non-null. It's definitely not an expected case for the current
instcombine user, but that may not hold if this function is
eventually called from arbitrary places.
2019-11-04 10:05:24 -05:00
Michael Liao d142ec6fef Fix compilation warning. NFC. 2019-11-04 10:01:50 -05:00
Ulrich Weigand d4a7855b68 [SystemZ] Fix typo
Typo in comment.  NFC.
2019-11-04 16:01:14 +01:00
Nico Weber 4168a2e9de gn build: (manually) merge 51b4b17eb
Also reverts r353980 since that duplicated the GenAsmMatcher target for
AArch64. Instead use visiblity.
2019-11-04 09:51:41 -05:00
Nico Weber 9cd13deb29 gn build: run "gn format" 2019-11-04 09:50:16 -05:00
Nico Weber a3915ca9f9 gn build: add deps, see discussion on D69130 2019-11-04 09:22:12 -05:00
Benjamin Kramer d3ec06d219 Revert "[LV] Apply sink-after & interleave-groups as VPlan transformations (NFC)"
This reverts commit 2be17087f8. Fails ASAN.
2019-11-04 15:04:42 +01:00
David Green 1c616a9266 [ARM] More MVE shuffle tests for sequences that can be converted to VMOVS. NFC. 2019-11-04 13:38:32 +00:00
David Green 6bae5d16a2 [ARM] Add vrev32 NEON fp16 patterns
Fill in the gaps for vrev32.16 f16 patterns, extending the existing i16
patterns.

Differential Revision: https://reviews.llvm.org/D69508
2019-11-04 13:37:01 +00:00
Sanjay Patel 659bd73d13 [InstSimplify] use FMF to improve fcmp+select fold
This is part of a series of patches needed to solve PR39535:
https://bugs.llvm.org/show_bug.cgi?id=39535
2019-11-04 08:29:56 -05:00
Sanjay Patel ad87f244b4 [InstSimplify] add more tests for fcmp+select; NFC
The easy code fix won't catch non-canonical mismatched
constant patterns, so adding extra coverage for those in
case we decide that's important (but seems unlikely).
2019-11-04 08:23:08 -05:00
Sven van Haastregt 82888b78d4 [OpenCL] Fix address space for const method call from nonconst (PR43145)
Patch by Anastasia Stulova and Sven van Haastregt.

Differential Revision: https://reviews.llvm.org/D68781
2019-11-04 13:12:17 +00:00
Ulrich Weigand 22f9429149 [SystemZ] Add GHC calling convention
This is a special calling convention to be used by the GHC compiler.

Author: Stefan Schulze Frielinghaus
Differential Revision: https://reviews.llvm.org/D69024
2019-11-04 13:45:51 +01:00
Sanjay Patel 499c90afe9 [InstSimplify] add more tests for fcmp+select; NFC
The addition of FMF for select allows more folding for these
kinds of patterns.
2019-11-04 07:38:11 -05:00
James Henderson ef85f47595 [llvm-readobj] Change errors to warnings for symbol section name dumping
Also only print each such warning once.

LLVM-style output will now print "<?>" for sections it cannot identify,
e.g. because the section index is invalid. GNU output continues to print
the raw index. In both cases where the st_shndx value is SHN_XINDEX and
the index cannot be looked up in the SHT_SYMTAB_SHNDX section (e.g.
because it is missing), the symbol is printed like other symbols with
st_shndx >= SHN_LORESERVE.

Reviewed by: grimar, MaskRay

Differential Revision: https://reviews.llvm.org/D69671
2019-11-04 12:04:04 +00:00
Simon Pilgrim 31ed36d044 [X86] SimplifyDemandedVectorElts - attempt to recombine target shuffle using DemandedElts mask (REAPPLIED)
If we don't demand all elements, then attempt to combine to a simpler shuffle.

At the moment we can only do this if Depth == 0 as combineX86ShufflesRecursively uses Depth to track whether the shuffle has really changed or not - we'll need to change this before we can properly start merging combineX86ShufflesRecursively into SimplifyDemandedVectorElts (see D66004).

This reapplies rL368307 (reverted at rL369167) after the fix for the infinite loop reported at PR43024 was applied at rG3f087e38a2e7b87a5adaaac1c1b61e51220e7ff3
2019-11-04 11:37:57 +00:00
Diogo Sampaio 3169f0129a [FIX] Removed duplicated v4f16 and v8f16 declarations
Reviewers: RKSimon, ostannard

Reviewed By: RKSimon

Subscribers: hiraditya, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D69795
2019-11-04 11:33:21 +00:00
Luís Marques 51b4b17eb7 [RISCV] Implement the TargetLowering::getRegisterByName hook
Summary: The hook should work for any RISC-V register. Non-allocatable registers
do not need to be reserved, for the remaining the hook will only succeed
if you pass clang the -ffixed-xX flag. This builds upon D67185, which
currently only allows reserving GPRs.

Reviewers: asb, lenary

Reviewed By: lenary

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D69130
2019-11-04 11:23:54 +00:00
David Spickett 91167e22ec [hwasan] Remove lazy thread-initialisation
This was an experiment made possible by a non-standard feature of the
Android dynamic loader.

It required introducing a flag to tell the compiler which ABI was being
targeted.
This flag is no longer needed, since the generated code now works for
both ABI's.

We leave that flag untouched for backwards compatibility. This also
means that if we need to distinguish between targeted ABI's again
we can do that without disturbing any existing workflows.

We leave a comment in the source code and mention in the help text to
explain this for any confused person reading the code in the future.

Patch by Matthew Malcomson

Differential Revision: https://reviews.llvm.org/D69574
2019-11-04 10:58:46 +00:00
Raphael Isemann bc728d5842 [lldb][NFC] Remove Ocaml from TypeSystem::LLVMCastKind
Ocaml support was removed.
2019-11-04 11:14:29 +01:00
Raphael Isemann 25b486ac4f [lldb][NFC] Remove unused ExpressionParser::Parse
Summary:
This function is only used internally by ClangExpressionParser. By putting it in the ExpressionParser class all languages
that implement ExpressionParser::Parse have to share the same signature (which forces us in downstream to add
swift-specific arguments to ExpressionParser::Parse which then propagate to ClangExpressionParser and so on).

Reviewers: davide

Subscribers: JDevlieghere, lldb-commits

Tags: #upstreaming_lldb_s_downstream_patches, #lldb

Differential Revision: https://reviews.llvm.org/D69710
2019-11-04 11:12:27 +01:00
Jonas Paulsson 580310ff0c [SystemZ] Improve handling of huge PC relative immediate offsets.
Demand that an immediate offset to a PC relative address fits in 32 bits, or
else load it into a register and perform a separate add.

Verify in the assembler that such immediate offsets fit the bitwidth.

Even though the final address of a Load Address Relative Long may fit in 32
bits even with a >32 bit offset (depending on where the symbol lives relative
to PC), the GNU toolchain demands the offset by itself to be in range. This
patch adapts the same behavior for llvm.

Review: Ulrich Weigand
https://reviews.llvm.org/D69749
2019-11-04 10:38:18 +01:00
Gil Rapaport 2be17087f8 [LV] Apply sink-after & interleave-groups as VPlan transformations (NFC)
The sink-after and interleave-group vectorization decisions were so far applied to
VPlan during initial VPlan construction, which complicates VPlan construction – also because of
their inter-dependence. This patch refactors buildVPlanWithRecipes() to construct a simpler
initial VPlan and later apply both these vectorization decisions, in order, as VPlan-to-VPlan
transformations.

Differential Revision: https://reviews.llvm.org/D68577
2019-11-04 10:37:39 +02:00
Raphael Isemann 848007cfbc [lldb][NFC] Make test/python_api/module_section test smaller
Summary:
I don't see why this test needs to compile this rather complicated file for just testing module sections. This just removes all this code with a simple
"Hello world!" program which should be faster to compile

Reviewers: labath, davide, JDevlieghere

Reviewed By: JDevlieghere

Subscribers: jfb, lldb-commits

Tags: #lldb

Differential Revision: https://reviews.llvm.org/D69705
2019-11-04 09:25:01 +01:00
Raphael Isemann df12a75a19 [lldb] Also disable de-registration of EHFrames in IRExecutionUnit
Summary:
We disabled registration by providing an empty `registerEHFrames`, so we should also provide an empty `deregisterEHFrames`
in case that function relies on `registerEHFrames` being called before. Currently `deregisterEHFrames` is a no-op anyway
as it just iterates over the (empty( list of registered EHFrames and then clear the empty list.

Reviewers: davide, JDevlieghere

Reviewed By: JDevlieghere

Subscribers: JDevlieghere, lldb-commits

Tags: #upstreaming_lldb_s_downstream_patches, #lldb

Differential Revision: https://reviews.llvm.org/D69713
2019-11-04 09:23:37 +01:00
Raphael Isemann ae10661a81 [lldb] Provide a getter for m_materializer_up in LLVMUserExpression instead of relying on it being accessible.
Summary:
Motivated by Swift using the materializer in a few places which requires us to add this getter ourselves.
We also need a setter, but let's keep this minimal to unblock the downstream reverts in Swift.

Reviewers: davide

Reviewed By: davide

Subscribers: abidh, JDevlieghere, lldb-commits

Tags: #upstreaming_lldb_s_downstream_patches, #lldb

Differential Revision: https://reviews.llvm.org/D69714
2019-11-04 09:05:24 +01:00
Raphael Isemann 80bf88d8bc [lldb] Add trailing dots to comments in Value.cpp
Reviewers: JDevlieghere

Reviewed By: JDevlieghere

Subscribers: JDevlieghere, lldb-commits

Tags: #upstreaming_lldb_s_downstream_patches, #lldb

Differential Revision: https://reviews.llvm.org/D69717
2019-11-04 08:35:56 +01:00
Pengfei Wang 8d7ccb3744 Set the floating point status register as reserved
Summary:
This patch sets the FPSW (X87 floating-point status register) as a reserved
physical register and fix the test failure caused by [[ https://reviews.llvm.org/D68854| D68854 ]].

Before this patch, some tests will fail because it implicit uses FPSW without
define it. Setting the FPSW as a reserved physical register will skip liveness
analysis because it is always live.

Reviewers: pengfei, craig.topper

Reviewed By: craig.topper

Subscribers: craig.topper, hiraditya, llvm-commits

Patch by LiuChen.

Differential Revision: https://reviews.llvm.org/D69784
2019-11-03 23:14:34 -08:00
Duncan P. N. Exon Smith 31e14f41a2 clang/Modules: Sink CompilerInstance::KnownModules into ModuleMap
Avoid use-after-frees when FrontendAction::BeginSourceFile is called
twice on the same CompilerInstance by sinking
CompilerInstance::KnownModules into ModuleMap.  On the way, rename the
map to CachedModuleLoads.  I considered (but rejected) merging this with
ModuleMap::Modules, since that only has top-level modules and this map
includes submodules.

This is an alternative to https://reviews.llvm.org/D58497.  Thanks to
nemanjai for the detailed analysis of the problem!
2019-11-03 19:57:33 -08:00
Kamil Rytarowski 858b15cb9c [compiler-rt] [msan] Correct the __libc_thr_keycreate prototype
Fixes build with GCC8.
2019-11-04 01:10:59 +01:00
Kamil Rytarowski e345bc6e65 [compiler-rt] [msan] Support POSIX iconv(3) on NetBSD 9.99.17+
Fixes build of test.
2019-11-04 01:08:53 +01:00
Simon Atanasyan 52efd67369 [mips] Move test case for Octeon instructions to cnmips sub-folder. NFC 2019-11-04 00:42:31 +03:00
Simon Atanasyan cf954e54f7 [mips] Add disassembler tests for `octeon` CPU. NFC 2019-11-04 00:42:31 +03:00
Simon Atanasyan 5257a95426 [mips] Add disassembler tests for `sigrie` instruction. NFC 2019-11-04 00:42:31 +03:00
Simon Pilgrim 3f087e38a2 [X86][SSE] combineX86ShufflesRecursively - at Depth==0, only resolve KnownZero if it removes an input.
This stops infinite loops where KnownUndef elements are converted to Zeroable, resulting in KnownZero elements which are then simplified (via SimplifyDemandedElts etc.) back to KnownUndef elements........

Prep fix for PR43024 which will allow rL368307 to be re-applied.
2019-11-03 21:10:47 +00:00
Dávid Bolvanský 3fbd1c00b0 [SIMachineScheduler] Fixed ''then' statement is equivalent to the 'else' statement.' warning. NFCI. 2019-11-03 20:40:53 +01:00
Dávid Bolvanský c3d6f0ddee [SILoadStoreOptimizer] Fixed typo. NFCI. 2019-11-03 20:38:29 +01:00
Dávid Bolvanský 058b5028de Reland '[InstructionCombining] Fixed null check after dereferencing warning. NFCI.' 2019-11-03 20:34:54 +01:00
Dávid Bolvanský 5b37c018d5 Revert "[InstructionCombining] Fixed null check after dereferencing warning. NFCI."
This reverts commit 8308187fd9. This exposed a bug.
2019-11-03 20:31:05 +01:00
Dávid Bolvanský decd8c4844 [SCEV] Fixed 'Uninitialized variable 'ContainsAddRec' used.' warning. NFCI. 2019-11-03 20:29:49 +01:00
Dávid Bolvanský 717965ae57 [MemorySSA] Fixed null check after dereferencing warning. NFCI. 2019-11-03 20:27:40 +01:00
Dávid Bolvanský d825ed24d2 Revert "[InstructionCompares] Fixed null check after dereferencing warning. NFCI."
This reverts commit b8685cf304.
2019-11-03 20:24:01 +01:00
Dávid Bolvanský b8685cf304 [InstructionCompares] Fixed null check after dereferencing warning. NFCI. 2019-11-03 20:13:45 +01:00
Dávid Bolvanský 8308187fd9 [InstructionCombining] Fixed null check after dereferencing warning. NFCI. 2019-11-03 20:10:46 +01:00
Dávid Bolvanský 8262a5b701 [CHR] Fixed null check after dereferencing warning. NFCI. 2019-11-03 20:06:38 +01:00
Dávid Bolvanský 914128ab12 [LoopUnrollRuntime] Fixed null check after dereferencing warning. NFCI. 2019-11-03 20:05:18 +01:00
Dávid Bolvanský 60cb193a40 [LoopUnrollAndJam] Fixed null check after dereferencing warning. NFCI. 2019-11-03 20:02:54 +01:00