Commit Graph

384015 Commits

Author SHA1 Message Date
Alexander Belyaev 883912abe6 Revert "[mlir] Introduce CloneOp and adapt test cases in BufferDeallocation."
This reverts commit 06b03800f3.
Until some kind of support for region args is added.
2021-03-29 12:47:59 +02:00
Raphael Isemann 69e7b74578 [lldb][NFC] Add a test case for Objective-C properties with conflicting names
This is an LLDB test for the ASTImporter crash that got fixed in D99077.
The test is using Clang modules for the properties as it seems the conflicting
names are not actually correctly handled when generating debug information
(only the first property is emitted and the second one is ignored in the current
clang ToT).
2021-03-29 12:33:07 +02:00
Oliver Stannard 07e46367ba Revert "Reapply "OpaquePtr: Turn inalloca into a type attribute""
Reverting because test 'Bindings/Go/go.test' is failing on most
buildbots.

This reverts commit fc9df30991.
2021-03-29 11:32:22 +01:00
Simon Pilgrim b5da813fe9 [X86][F16C] Add F16C -O0 test coverage
Ensure the duplicate conversions noticed in D48614 have gone
2021-03-29 11:31:20 +01:00
Simon Pilgrim 4e087989c6 [X86] Regenerate tests to add missing @PLT 2021-03-29 11:31:19 +01:00
Simon Pilgrim 805148eaf2 [X86][SSE] combineHorizOpWithShuffle - consistently use getTargetShuffleInputs to decode shuffles
Minor cleanup before I start trying to merge the unary/binary shuffle combining paths.
2021-03-29 11:31:19 +01:00
Nashe Mncube 19601a4c6c [SVE][Analysis]Instruction costs for ops on scalable-vec
The following operations have no associated cost for them
when applied to scalable vectors, and as a consequence
can trigger a crash when a call is made to
AArch64TTIImpl::getCastInstrCost():
- fptrunc
- trunc
- fpext
- fpto(u,s)i

This patch adds costs for these operations and
relevant regression tests.

Differential Revision: https://reviews.llvm.org/D98934
2021-03-29 11:15:50 +01:00
Stefan Gränitz 66a8247eb6 [Orc][tests] Moving one MCJIT test over to Orc to make sure the PowerPC fix worked
The PowerPC fix landed in d9069dd9b5. This is in preparation for D98931.
2021-03-29 11:53:03 +02:00
Jingu Kang cfe87d4edd [NFC][LoopUnswitch] Move hasPartialIVCondition to LoopUtils
Differential revision: https://reviews.llvm.org/D99490
2021-03-29 10:29:45 +01:00
Petar Avramovic b082e6f88a [AMDGPU] Extend gfx10 test coverage. NFC.
Differential Revision: https://reviews.llvm.org/D99267
2021-03-29 11:13:55 +02:00
Raphael Isemann 3c95bdf9fa [lldb] Don't search for system specific strings in assert.test
Commit 6bc1e69de2 changed the search string
to also check for the generated strings that surround the plain assert:

    Assertion `false && "lldb-test assert"' failed
                                         ^^^^^^^^^

This causes the test to fail on setups where the generated assert message
looks different. E.g., on macOS the generated message looks like this:

    Assertion failed: (false && "lldb_assert failed"), function lldb_assert

This reverts the old behaviour of just checking for the actual string we
have inside LLDB.
2021-03-29 10:46:14 +02:00
Julian Gross 06b03800f3 [mlir] Introduce CloneOp and adapt test cases in BufferDeallocation.
Add a new clone operation to the memref dialect. This operation implicitly
copies data from a source buffer to a new buffer. In contrast to the linalg.copy
operation, this operation does not accept a target buffer as an argument.
Instead, this operation performs a conceptual allocation which does not need to
be performed manually.

Furthermore, this operation resolves the dependency from the linalg-dialect
in the BufferDeallocation pass. In addition, we also extended the canonicalization
patterns to fold clone operations. The copy removal pass has been removed.

Differential Revision: https://reviews.llvm.org/D99172
2021-03-29 10:19:10 +02:00
David Green 3a68c6d26c [ARM] Extend MVE lane interleaving to handle other non-instruction leaves
This extends the recent MVE lane interleaving passto handle other
non-instruction leaves, for which a new shuffle is added. This helps
especially for constants and potentially for arguments.

Differential Revision: https://reviews.llvm.org/D97289
2021-03-29 09:05:45 +01:00
KareemErgawy-TomTom c52a5f2aa7 MLIR][STD] Fold trunci (sexti).
This patch folds the following pattern:

```
%arg0 = ...
%0 = sexti %arg0 : i1 to i8
%1 = trunci %0 : i8 to i1
```

into just `%arg0`.

Reviewed By: mehdi_amini

Differential Revision: https://reviews.llvm.org/D99464
2021-03-29 08:34:08 +02:00
Jan Kratochvil 6bc1e69de2 [lldb] Fix Error/assert.test regression with symbols
LLDB on Linux built with symbols is showing this error.
Without symbols it still PASSes:
  lldb-test: .../lldb/source/Utility/LLDBAssert.cpp:29: void lldb_private::lldb_assert(bool, const char *, const char *, const char *, unsigned int): Assertion `false && "lldb_assert failed"' failed.

With symbols it FAILs:
  lldb-test: .../lldb/tools/lldb-test/lldb-test.cpp:1086: int opts::assert::lldb_assert(lldb_private::Debugger &): Assertion `false && "lldb-test assert"' failed.

Differential Revision: https://reviews.llvm.org/D99462
2021-03-29 08:16:43 +02:00
Jianzhou Zhao aaab444179 [dfsan] Ignore dfsan origin wrappers when instrumenting code 2021-03-29 00:15:26 +00:00
Lang Hames 666df2e2cb [ORC][C-bindings] Fix some ORC C bindings function names and signatures.
LLVMOrcDisposeObjectLayer and LLVMOrcExecutionSessionGetJITDylibByName did not
have matching signatures between the C-API header and binding implementations.
Fixes http://llvm.org/PR49745.

Patch by Mats Larsen. Thanks Mats!

Reviewed by: lhames

Differential Revision: https://reviews.llvm.org/D99478
2021-03-28 16:30:47 -07:00
Craig Topper 5a79909a14 [RISCV] Add a RV64 mulhsu test case. NFC 2021-03-28 15:54:44 -07:00
David Green 6c88ffeda3 [ARM] Fix the Changed value in the MVE lane interleaving pass. 2021-03-28 23:47:53 +01:00
Fangrui Song 2a28d1d3b7 [Driver] Linux.cpp: move resource directory before /usr/local/include for non-musl
This follows GCC and simplifies code. /usr/local/include and TOOL_INCLUDE_DIR
should not conflict with the resource directory include so users should not
observe any difference.
2021-03-28 12:44:21 -07:00
Nikita Popov ce066da81c [BasicAA] Make sure types match in constant offset heuristic
This can only happen if offset types that are larger than the
pointer size are involved. The previous implementation did not
assert in this case because it initialized the APInts to the
width of one of the variables -- though I strongly suspect it
did not compute correct results in this case.

Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=32621
reported by fhahn.
2021-03-28 21:38:09 +02:00
Craig Topper 36b5d09b07 [X86] Add phase ordering test for the problem D99427 is trying to solve. NFC 2021-03-28 12:14:30 -07:00
Craig Topper 69bdf35dc7 [X86] Optimize vXi8 MULHS on targets where we can't sign_extend to the next register size.
For these cases we need to extract the upper or lower elements,
multiply them using 16-bit multiplies and repack them.

Previously we used punpcklbw/punpckhbw+psraw or pmovsxbw+pshudfd to
extract and sign extend so we could use pmullw to compute the 16-bit
product and then shift down the high bits.

We can avoid the need to sign extend if we unpack the bytes into
the high byte of each word and fill the lower byte with 0 using
pxor. This puts the sign bit of each byte into the sign bit of
each word. Since the LHS and RHS have 8 trailing zeros, the full
32-bit product of those 16-bit values will have 16 trailing zeros.
This means the 16-bit product of the original bytes is in the upper
16 bits which we can calculate using pmulhw.

Reviewed By: RKSimon

Differential Revision: https://reviews.llvm.org/D98587
2021-03-28 11:41:29 -07:00
Craig Topper 0248e24071 [X86][update_llc_test_checks] Use a less greedy regular expression for replacing constant pool labels in tests.
While working on D97208 I noticed that these greedy regular
expressions prevent tests from failing when (%rip) appears after
a constant pool label when it didn't before.

Reviewed By: RKSimon, pengfei

Differential Revision: https://reviews.llvm.org/D99460
2021-03-28 11:39:46 -07:00
LLVM GN Syncbot 1e9746d229 [gn build] Port 7b6f760fcd 2021-03-28 18:35:33 +00:00
David Green 7b6f760fcd [ARM] MVE vector lane interleaving
MVE does not have a single sext/zext or trunc instruction that takes the
bottom half of a vector and extends to a full width, like NEON has with
MOVL. Instead it is expected that this happens through top/bottom
instructions. So the MVE equivalent VMOVLT/B instructions take either
the even or odd elements of the input and extend them to the larger
type, producing a vector with half the number of elements each of double
the bitwidth. As there is no simple instruction for a normal extend, we
often have to expand sext/zext/trunc into a series of lane moves (or
stack loads/stores, which we do not do yet).

This pass takes vector code that starts at truncs, looks for
interconnected blobs of operations that end with sext/zext and
transforms them by adding shuffles so that the lanes are interleaved and
the MVE VMOVL/VMOVN instructions can be used. This is done pre-ISel so
that it can work across basic blocks.

This initial version of the pass just handles a limited set of
instructions, not handling constants or splats or FP, which can all come
as extensions to this base.

Differential Revision: https://reviews.llvm.org/D95804
2021-03-28 19:34:58 +01:00
Fangrui Song 53c98d85a8 [Driver] Suppress libstdc++/libc++ path with -nostdinc
This follows GCC. Having libstdc++/libc++ include paths is not useful
anyway because libstdc++/libc++ header files cannot find features.h.

While here, suppress -stdlib++-isystem with -nostdlibinc.
2021-03-28 11:30:27 -07:00
Craig Topper 3fb40ce167 [X86] Don't define vpclmulqdq or vaes intrinsics in the headers unless avx512fintrin.h has been included.
The intrinsics won't compile unless avx512fintrin.h has declared
the 512 bit types.
2021-03-28 11:26:30 -07:00
Craig Topper 7b35932b51 [RISCV] Add test case for mulhsu.
We don't yet use mulhsu, but we should.
2021-03-28 11:03:39 -07:00
Matt Arsenault fc9df30991 Reapply "OpaquePtr: Turn inalloca into a type attribute"
This reverts commit 20d5c42e0e.
2021-03-28 13:35:21 -04:00
Sanjay Patel 01ae6e5ead [InstCombine] sink min/max intrinsics with common op after select
This is another step towards parity with cmp+select min/max idioms.

See D98152.
2021-03-28 13:13:04 -04:00
Sanjay Patel 4f349739ef [InstCombine] add tests for select of min/max intrinsics; NFC 2021-03-28 13:13:04 -04:00
Nico Weber 20d5c42e0e Revert "OpaquePtr: Turn inalloca into a type attribute"
This reverts commit 4fefed6563.
Broke check-clang everywhere.
2021-03-28 13:02:52 -04:00
Zakk Chen 821547cabb [RISCV][Clang] Update new overloading rules for RVV intrinsics.
RVV intrinsics has new overloading rule, please see
82aac7dad4

Changed:
1. Rename `generic` to `overloaded` because the new rule is not using C11 generic.
2. Change HasGeneric to HasNoMaskedOverloaded because all masked operations
   support overloading api.
3. Add more overloaded tests due to overloading rule changed.

Differential Revision: https://reviews.llvm.org/D99189
2021-03-28 09:04:35 -07:00
Stefan Gränitz 7b9df09e20 [Orc][examples] Add missing dependency to OrcShared in LLJITWithRemoteDebugging 2021-03-28 17:48:28 +02:00
Stefan Gränitz 258f055ed9 [Orc][examples] Add LLJITWithRemoteDebugging example 2021-03-28 17:25:09 +02:00
Matt Arsenault 2f779e79d5 AArch64/GlobalISel: Remove IR section from test 2021-03-28 11:12:59 -04:00
Matt Arsenault 4fefed6563 OpaquePtr: Turn inalloca into a type attribute
I think byval/sret and the others are close to being able to rip out
the code to support the missing type case. A lot of this code is
shared with inalloca, so catch this up to the others so that can
happen.
2021-03-28 11:12:23 -04:00
Björn Schäpers c5243c63cd [clang-format] Fix aligning with linebreaks
Breaking a string literal or a function calls arguments with
AlignConsecutiveDeclarations or AlignConsecutiveAssignments did misalign
the continued line. E.g.:

void foo() {
  int myVar = 5;
  double x  = 3.14;
  auto str  = "Hello"
            "World";
}

or

void foo() {
  int    myVar = 5;
  double x = 3.14;
  auto   str = "Hello"
             "World";
}

Differential Revision: https://reviews.llvm.org/D98214
2021-03-28 16:26:27 +02:00
Florian Hahn 8c6c357897
[LV] Mark a few more cost-model members as const (NFC). 2021-03-28 14:59:48 +01:00
Aaron Ballman 581b429f7d Update the documentation for recent changes to statement attributes.
Adds more information about automated diagnostic reporting for statement
attributes and adds a bit more documentation about statement attributes
in general.
2021-03-28 09:54:36 -04:00
Nikita Popov 3df3f3df45 [BasicAA] Handle gep with unknown sizes earlier (NFCI)
If the sizes of both memory locations are unknown, we can only
perform a check on the underlying objects. There's no point in
going through GEP decomposition in this case.
2021-03-28 15:48:49 +02:00
Florian Hahn eb3d9f2eb6
[SelDag] Add isIntOrFPConstant helper function.
This patch adds a new isIntOrFPConstant  helper function to check if a
SDValue is a integer of FP constant. This pattern is used in various
places.

There also are places that incorrectly just check for integer constants,
e.g. D99384, so hopefully this helper will help people avoid that issue.

Reviewed By: RKSimon

Differential Revision: https://reviews.llvm.org/D99428
2021-03-28 12:48:58 +01:00
Stephen Kelly ea2225a10b [clang-tidy] Simplify readability checks to not need ignoring* matchers
Differential Revision: https://reviews.llvm.org/D98296
2021-03-28 11:25:41 +01:00
Fangrui Song 8e2f5f95b5 [Driver] Simplify mips multilib path and fix comments. NFC 2021-03-28 00:30:38 -07:00
Jonas Devlieghere 7f76c70d85 [lldb] Fix capitalization in CMake status message
s/LLDB Tests/LLDB tests/
2021-03-27 21:39:39 -07:00
Hsiangkai Wang bc82e9bf25 [RISCV] Add vfabs.v pseudo instruction.
Differential Revision: https://reviews.llvm.org/D99454
2021-03-28 10:24:05 +08:00
Vaivaswatha Nagaraj 11f59c5457 [OCaml][Test] Fix and enable debuginfo.ml test
`get_or_create_type_array` was used on a non-type MDNode.
Add interface for `get_or_create_array` and use that instead.

Differential Revision: https://reviews.llvm.org/D99450
2021-03-28 06:25:39 +05:30
Fangrui Song dcaa0293c1 [test] Add UNSUPPORTED: system-windows to linux-ld.c
We should have a test verifying / \ for Windows but have such a long
test specifically for Linux cross compilation suffer from Windows \
is too troublesome.
2021-03-27 16:46:30 -07:00
Craig Topper dced4649af [X86] Regenerate a bunch of tests to pick up @PLT
I'm prepping another patch to the same tests and this just adds
noise to my diff.
2021-03-27 16:41:35 -07:00