platform/upstream/llvm.git
3 years ago[X86] Enable constexpr on BSWAP intrinsics (PR31446)
Simon Pilgrim [Fri, 21 Aug 2020 09:53:17 +0000 (10:53 +0100)]
[X86] Enable constexpr on BSWAP intrinsics (PR31446)

This enables constexpr BSWAP intrinsics defined in ia32intrin.h

3 years ago[DSE,MemorySSA] Handle atomicrmw/cmpxchg conservatively.
Florian Hahn [Fri, 21 Aug 2020 09:18:32 +0000 (10:18 +0100)]
[DSE,MemorySSA] Handle atomicrmw/cmpxchg conservatively.

This adds conservative handling of AtomicRMW/AtomicCmpXChg to
isDSEBarrier, similar to atomic loads and stores.

3 years ago[NFC] Port InstCount pass to new pass manager
Roman Lebedev [Fri, 17 Jul 2020 11:30:51 +0000 (14:30 +0300)]
[NFC] Port InstCount pass to new pass manager

3 years ago[SelectionDAG] Better legalization for FSHL and FSHR
Jay Foad [Tue, 31 Mar 2020 16:24:07 +0000 (17:24 +0100)]
[SelectionDAG] Better legalization for FSHL and FSHR

In SelectionDAGBuilder always translate the fshl and fshr intrinsics to
FSHL and FSHR (or ROTL and ROTR) instead of lowering them to shifts and
ORs. Improve the legalization of FSHL and FSHR to avoid code quality
regressions.

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

3 years ago[X86] Enable constexpr on POPCNT intrinsics (PR31446)
Simon Pilgrim [Fri, 21 Aug 2020 09:19:41 +0000 (10:19 +0100)]
[X86] Enable constexpr on POPCNT intrinsics (PR31446)

Followup to D86229, this enables constexpr on the alternative (which fallback to generic code) POPCNT intrinsics defined in ia32intrin.h

3 years ago[DSE,MemorySSA] Regenerate check lines for atomic.ll tests.
Florian Hahn [Fri, 21 Aug 2020 08:50:01 +0000 (09:50 +0100)]
[DSE,MemorySSA] Regenerate check lines for atomic.ll tests.

3 years ago[AMDGPU] Apply llvm-prefer-register-over-unsigned from clang-tidy
Jay Foad [Fri, 21 Aug 2020 09:01:01 +0000 (10:01 +0100)]
[AMDGPU] Apply llvm-prefer-register-over-unsigned from clang-tidy

3 years ago[Attributor][NFC] run update_test_checks with --check-attributes.
sstefan1 [Fri, 21 Aug 2020 09:11:47 +0000 (11:11 +0200)]
[Attributor][NFC] run update_test_checks with --check-attributes.

3 years ago[NewPM][PassInstrumentation] Add PreservedAnalyses parameter to AfterPass* callbacks
Yevgeny Rouban [Fri, 21 Aug 2020 08:52:26 +0000 (15:52 +0700)]
[NewPM][PassInstrumentation] Add PreservedAnalyses parameter to AfterPass* callbacks

Both AfterPass and AfterPassInvalidated pass instrumentation
callbacks get additional parameter of type PreservedAnalyses.
This patch was created by @fedor.sergeev. I have just slightly
changed it.

Reviewers: fedor.sergeev

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

3 years ago[X86] ia32intrin.h - pull out common attributes into defines. NFCI.
Simon Pilgrim [Fri, 21 Aug 2020 09:02:37 +0000 (10:02 +0100)]
[X86] ia32intrin.h - pull out common attributes into defines. NFCI.

Matches what we do in most other x86 headers

3 years ago[SimplifyCFG] Cost required selects
Sam Parker [Fri, 21 Aug 2020 08:27:21 +0000 (09:27 +0100)]
[SimplifyCFG] Cost required selects

Before we speculatively execute a basic block, query the cost of
inserting the necessary select instructions against the phi folding
threshold. For non-trivial insertions, a more accurate decision can
probably be made during machine if-conversion. With minsize we query
the CodeSize cost, otherwise we use SizeAndLatency.

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

3 years ago[lldb] Tab completion for process load/unload
Gongyu Deng [Fri, 21 Aug 2020 07:57:18 +0000 (09:57 +0200)]
[lldb] Tab completion for process load/unload

1. Complete `process load` with the common disk file completion, so there is not test provided for it;
2. Complete `process unload` with the tokens of valid loaded images.

Thanks for Raphael's help on the test for `process unload`.

Reviewed By: teemperor

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

3 years ago[llvm-readobj] - Change how we create DynRegionInfo objects. NFCI.
Georgii Rymar [Thu, 20 Aug 2020 15:40:52 +0000 (18:40 +0300)]
[llvm-readobj] - Change how we create DynRegionInfo objects. NFCI.

Currently we have `checkDRI` and two `createDRIFrom` methods which
are used to create `DynRegionInfo` objects.

And we have an issue: constructions like:
`ObjF->getELFFile()->base() + P->p_offset`
that are used in `createDRIFrom` functions might overflow.

I had to revert `D85519` which triggered such UBSan failure.

This NFC, simplifies and generalizes how we create `DynRegionInfo` objects.
It will allow us to introduce more/better validation checks in a single place.
It also will allow to change `createDRI` to return `Expected<>` so
that we will be able to stop using the `reportError`, which
is used inside currently, and have a warning instead.

Differential revision: https://reviews.llvm.org/D86297

3 years ago[DSE,MemorySSA] Split off partial tracking from isOverwite.
Florian Hahn [Fri, 21 Aug 2020 08:13:59 +0000 (09:13 +0100)]
[DSE,MemorySSA] Split off partial tracking from isOverwite.

When traversing memory uses to look for aliasing reads/writes, we only
care about complete overwrites. This patch splits off the partial
overwrite tracking from isOverwrite This avoids some unnecessary work
when checking for read/write clobbers with MemorySSA-DSE.
isOverwrite, which skips the partial overwrite tracking.

This gives a relatively small improvement
http://llvm-compile-time-tracker.com/compare.php?from=ef2a2f77f87553a0a4a39f518eb9ac86b756bda6&to=658f3905dd96d3415f3782adc712c79fa59a4665&stat=instructions

This is part of the patches to bring down compile-time to the level
referenced in
http://lists.llvm.org/pipermail/llvm-dev/2020-August/144417.html

Reviewed By: asbirlea

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

3 years ago[SyntaxTree] Add support for `this`
Eduardo Caldas [Thu, 20 Aug 2020 15:47:48 +0000 (15:47 +0000)]
[SyntaxTree] Add support for `this`

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

3 years ago[ARM][CostModel] Select instruction costs.
Sam Parker [Tue, 18 Aug 2020 11:52:58 +0000 (12:52 +0100)]
[ARM][CostModel] Select instruction costs.

Modify the ARM getCmpSelInstrCost implementation for the code size
costs of selects. Now consider the legalization cost and increase
the cost of i1 because those values wouldn't live in a general purpose
register. We also make selects +1 more expensive to account for the IT
instruction.

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

3 years ago[ARM][LV] Add a preferPredicatedReductionSelect target hook
David Green [Fri, 21 Aug 2020 07:48:12 +0000 (08:48 +0100)]
[ARM][LV] Add a preferPredicatedReductionSelect target hook

As part of D84741, this adds a target hook for the
preferPredicatedReductionSelect option and makes use
of it under MVE, allowing us to tail predicate most
reduction loops.

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

3 years ago[PowerPC] Add readflm/setflm intrinsics to Clang
Qiu Chaofan [Fri, 21 Aug 2020 07:12:19 +0000 (15:12 +0800)]
[PowerPC] Add readflm/setflm intrinsics to Clang

Commit dbcfbffc adds ppc.readflm and ppc.setflm intrinsics to read or
write FPSCR register. This patch adds them to Clang.

Reviewed By: steven.zhang

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

3 years ago[X86] Correct the implementation of the testFeature macro in getIntelProcessorTypeAnd...
Craig Topper [Fri, 21 Aug 2020 06:45:34 +0000 (23:45 -0700)]
[X86] Correct the implementation of the testFeature macro in getIntelProcessorTypeAndSubtype to do a proper bit test.

Instead of ANDing with a one hot mask representing the bit to
be tested, we were ANDing with just the bit number. This tests
multiple bits none of them the correct one.

This caused skylake-avx512, cascadelake and cooperlake to all
be misdetected. Based on experiments with the Intel SDE, it seems
that all of these CPUs are being detected as being cooperlake.
This is bad since its the newest CPU of the 3.

3 years agoAllow multiple calls to InitLLVM() (NFC)
Mehdi Amini [Fri, 21 Aug 2020 04:25:57 +0000 (04:25 +0000)]
Allow multiple calls to InitLLVM() (NFC)

In e99dee82b0, the "out_of_memory_new_handler" was changed to be
explicitly initialized instead of relying on a global static
constructor.
However before this change, install_out_of_memory_new_handler could be
called multiple times while it asserts right now.
We can be more tolerant to calling multiple time InitLLVM without
reintroducing a global constructor for this handler.

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

3 years ago[lldb] Fix a new -Wdocumetnation issues (NFC)
Jonas Devlieghere [Fri, 21 Aug 2020 05:59:13 +0000 (22:59 -0700)]
[lldb] Fix a new -Wdocumetnation issues (NFC)

3 years ago[lldb] Remove redundant call to FindBacktrace (NFC)
Jonas Devlieghere [Fri, 21 Aug 2020 05:40:48 +0000 (22:40 -0700)]
[lldb] Remove redundant call to FindBacktrace (NFC)

We're not using any of the Backtrace_* CMake variables set by
FindBacktrace in LLDB.

3 years ago[lldb] Simplify CMake logic with LLVM's append_if function
Jonas Devlieghere [Fri, 21 Aug 2020 05:32:31 +0000 (22:32 -0700)]
[lldb] Simplify CMake logic with LLVM's append_if function

Use the append_if CMake function from HandleLLVMOptions. Since we
include this file in LLDBStandalone it should work in both for in-tree
and out-of-tree builds.

3 years ago[Polly] Update isl to isl-0.22.1-416-g61d6dc75.
Michael Kruse [Fri, 21 Aug 2020 05:17:29 +0000 (00:17 -0500)]
[Polly] Update isl to isl-0.22.1-416-g61d6dc75.

This fixes llvm.org/PR47104

3 years agoRefactor Reduction Tree Pass
Mauricio Sifontes [Fri, 21 Aug 2020 04:59:23 +0000 (04:59 +0000)]
Refactor Reduction Tree Pass

Refactor the way the reduction tree pass works in the MLIR Reduce tool by introducing a set of utilities that facilitate the implementation of new Reducer classes to be used in the passes.

This will allow for the fast implementation of general transformations to operate on all mlir modules as well as custom transformations for different dialects.

These utilities allow for the implementation of Reducer classes by simply defining a method that indexes the operations/blocks/regions to be transformed and a method to perform the deletion or transfomration based on the indexes.

Create the transformSpace class member in the ReductionNode class to keep track of the indexes that have already been transformed or deleted at a current level.

Delete the FunctionReducer class and replace it with the OpReducer class to reflect this new API while performing the same transformation and allowing the instantiation of a reduction pass for different types of operations at the module's highest hierarchichal level.

Modify the SinglePath Traversal method to reflect the use of the new API.

Reviewed: jpienaar

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

3 years agoRevert "[DWARFYAML] Add support for referencing different abbrev tables."
Xing GUO [Fri, 21 Aug 2020 04:14:58 +0000 (12:14 +0800)]
Revert "[DWARFYAML] Add support for referencing different abbrev tables."

This reverts commit f7ff0ace96db9164dcde232c36cab6519ea4fce8.

This change is causing build failure.

http://lab.llvm.org:8011/builders/clang-cmake-armv7-global-isel/builds/10400

3 years ago[ADT] Allow IsSizeLessThanThresholdT for incomplete types. NFC
Yevgeny Rouban [Fri, 21 Aug 2020 03:45:11 +0000 (10:45 +0700)]
[ADT] Allow IsSizeLessThanThresholdT for incomplete types. NFC

If the type T is incomplete then sizeof(T) results in C++ compilation error at line:
  static constexpr bool value = sizeof(T) <= (2 * sizeof(void *));

This patch allows incomplete types in parameters of function. Example:
  using SomeFunc = void(SomeIncompleteType &);
  llvm::unique_function<SomeFuncType> SomeFunc;

Reviewers: DaniilSuchkov, vvereschaka

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

3 years ago[DWARFYAML] Add support for referencing different abbrev tables.
Xing GUO [Fri, 21 Aug 2020 02:33:58 +0000 (10:33 +0800)]
[DWARFYAML] Add support for referencing different abbrev tables.

This patch adds support for referencing different abbrev tables. We use
'ID' to distinguish abbrev tables and use 'AbbrevTableID' to explicitly
assign an abbrev table to compilation units.

The syntax is:
```
debug_abbrev:
  - ID: 0
    Table:
      ...
  - ID: 1
    Table:
      ...
debug_info:
  - ...
    AbbrevTableID: 1 ## Reference the second abbrev table.
  - ...
    AbbrevTableID: 0 ## Reference the first abbrev table.
```

Reviewed By: jhenderson

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

3 years ago[DWARFYAML] Add support for emitting multiple abbrev tables.
Xing GUO [Thu, 20 Aug 2020 02:33:51 +0000 (10:33 +0800)]
[DWARFYAML] Add support for emitting multiple abbrev tables.

This patch adds support for emitting multiple abbrev tables. Currently,
compilation units will always reference the first abbrev table.

Reviewed By: jhenderson, labath

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

3 years ago[cmake] Don't use ld.lld when targeting Darwin
Shoaib Meenai [Fri, 21 Aug 2020 02:50:09 +0000 (19:50 -0700)]
[cmake] Don't use ld.lld when targeting Darwin

ld.lld is an ELF linker. We can switch to the new LLD for Mach-O port
when it's more complete, but for now, assume the user will have set
CMAKE_LINKER correctly themselves when targeting Darwin.

3 years ago[DWARFYAML] Add support for emitting multiple abbrev tables.
Xing GUO [Fri, 21 Aug 2020 02:11:33 +0000 (10:11 +0800)]
[DWARFYAML] Add support for emitting multiple abbrev tables.

This patch adds support for emitting multiple abbrev tables. Currently,
compilation units will always reference the first abbrev table.

Reviewed By: jhenderson, labath

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

3 years ago[amdgpu] Add codegen support for HIP dynamic shared memory.
Michael Liao [Wed, 24 Jun 2020 16:13:10 +0000 (12:13 -0400)]
[amdgpu] Add codegen support for HIP dynamic shared memory.

Summary:
- HIP uses an unsized extern array `extern __shared__ T s[]` to declare
  the dynamic shared memory, which size is not known at the
  compile time.

Reviewers: arsenm, yaxunl, kpyzhov, b-sumner

Subscribers: kzhuravl, jvesely, wdng, nhaehnle, dstuttard, tpr, t-tye, hiraditya, kerbowa, llvm-commits

Tags: #llvm

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

3 years ago[runtimes] Allow LLVM_BUILTIN_TARGETS to include Darwin
Shoaib Meenai [Thu, 20 Aug 2020 19:18:15 +0000 (12:18 -0700)]
[runtimes] Allow LLVM_BUILTIN_TARGETS to include Darwin

We have two ways of using the runtimes build setup to build the
builtins. You can either have an empty LLVM_BUILTIN_TARGETS (or have it
include the "default" target), in which case builtin_default_target is
called to set up the default target, or you can have actual triples in
LLVM_BUILTIN_TARGETS, in which case builtin_register_target is called
for each triple. builtin_default_target lets you build the builtins for
Darwin (assuming your default triple is Darwin); builtin_register_target
does not.

I don't understand the reason for this distinction. The Darwin builtins
build is special in that a single CMake configure handles building the
builtins for multiple platforms (e.g. macOS, iPhoneSimulator, and iOS)
and architectures (e.g. arm64, armv7, and x86_64). Consequently, if you
specify multiple Darwin triples in LLVM_BUILTIN_TARGETS, expecting each
configure to only build for that particular triple, it won't work.
However, if you specify a *single* x86_64-apple-darwin triple in
LLVM_BUILTIN_TARGETS, that single configure will build the builtins for
all Darwin targets, exactly the same way that the default target would.
The only difference between the configuration for the default target and
the x86_64-apple-darwin triple is that the latter runs the configuration
with `-DCOMPILER_RT_DEFAULT_TARGET_ONLY=ON`, but that makes no
difference for Apple targets (none of the CMake codepaths which have
different behavior based on that variable are run for Apple targets).

I tested this by running two builtins builds on my Mac, one with the
default target and one with the x86_64-apple-darwin19.5.0 target (which
is the default target triple for my clang). The only relevant
CMakeCache.txt difference was the following, and as discussed above, it
has no effect on the actual build for Apple targets:

```
-//Default triple for which compiler-rt runtimes will be built.
-COMPILER_RT_DEFAULT_TARGET_TRIPLE:STRING=x86_64-apple-darwin19.5.0
+//No help, variable specified on the command line.
+COMPILER_RT_DEFAULT_TARGET_ONLY:UNINITIALIZED=ON
```

Furthermore, when I add the `-D` flag to compiler-rt's libtool
invocations, the libraries produced by the two builds are *identical*.

If anything, I would expect builtin_register_target to complain if you
tried specifying a triple for a particular Apple platform triple (e.g.
macosx), since that's the scenario in which it won't work as you want.
The generic darwin triple should be fine though, as best as I can tell.
I'm happy to add the error for specific Apple platform triples, either
in this diff or in a follow-up.

Reviewed By: phosek

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

3 years ago[clang]: Remove assertion which checks explicit declaration
Gousemoodhin Nadaf [Fri, 21 Aug 2020 01:07:46 +0000 (18:07 -0700)]
[clang]:  Remove assertion which checks explicit declaration

explicit keyword is declared outside of class is invalid, invalid explicit declaration is handled inside DiagnoseFunctionSpecifiers() function. To avoid compiler crash in case of invalid explicit declaration, remove assertion.

Reviewed By: rsmith

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

3 years ago[PowerPC] Fix a typo for InstAlias of mfsprg
Kang Zhang [Fri, 21 Aug 2020 01:10:52 +0000 (01:10 +0000)]
[PowerPC] Fix a typo for InstAlias of mfsprg

D77531 has a type for mfsprg, it should be mtsprg. This patch is to fix
this typo.

3 years ago[lldb] Capture and load home directory from the reproducer.
Jonas Devlieghere [Thu, 20 Aug 2020 23:19:17 +0000 (16:19 -0700)]
[lldb] Capture and load home directory from the reproducer.

When replaying the reproducer, lldb should source the .lldbinit file
that was captured by the reproducer and not the one in the current home
directory. This requires that we store the home directory as part of the
reproducer. By returning the virtual home directory during replay, we
ensure the correct virtual path gets constructed which the VFS can then
find and remap to the correct file in the reproducer root.

This patch adds a new HomeDirectoryProvider, similar to the existing
WorkingDirectoryProvider. As the home directory is not part of the VFS,
it is stored in LLDB's FileSystem instance.

3 years ago[lldb] Implement WorkingDirectoryProvider in terms of DirectoryProvider (NFC)
Jonas Devlieghere [Thu, 20 Aug 2020 23:03:45 +0000 (16:03 -0700)]
[lldb] Implement WorkingDirectoryProvider in terms of DirectoryProvider (NFC)

Add an abstract base class that can be used to create other directory
providers.

3 years agoRevert "[libFuzzer] Fix value-profile-load test."
Vitaly Buka [Fri, 21 Aug 2020 00:47:41 +0000 (17:47 -0700)]
Revert "[libFuzzer] Fix value-profile-load test."

D86247 fails on Windows.

This reverts commit 428bebaf10e177db5e42206ca8f871f0bcbef058.

3 years ago[HeaderSearch] Fix processing #import-ed headers multiple times with modules enabled.
Volodymyr Sapsai [Wed, 20 May 2020 00:29:35 +0000 (17:29 -0700)]
[HeaderSearch] Fix processing #import-ed headers multiple times with modules enabled.

HeaderSearch was marking requested HeaderFileInfo as Resolved only based on
the presence of ExternalSource. As the result, using any module was enough
to set ExternalSource and headers unknown to this module would have
HeaderFileInfo with empty fields, including `isImport = 0`, `NumIncludes = 0`.
Such HeaderFileInfo was preserved without changes regardless of how the
header was used in other modules and caused incorrect result in
`HeaderSearch::ShouldEnterIncludeFile`.

Fix by marking HeaderFileInfo as Resolved only if ExternalSource knows
about this header.

rdar://problem/62126911

Reviewed By: bruno

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

3 years ago[NFC][libFuzzer] Try to fix test on Windows
Vitaly Buka [Fri, 21 Aug 2020 00:33:51 +0000 (17:33 -0700)]
[NFC][libFuzzer] Try to fix test on Windows
Broken after D86247

3 years agoFix msan build
Vitaly Buka [Fri, 21 Aug 2020 00:25:57 +0000 (17:25 -0700)]
Fix msan build

After D85820 TERMINFO_LIB is undefined.

3 years ago[GISel] Correct the known bits of G_ANYEXT
Justin Bogner [Fri, 21 Aug 2020 00:03:18 +0000 (17:03 -0700)]
[GISel] Correct the known bits of G_ANYEXT

Known bits for G_ANYEXT was incorrectly using KnownBits::zext, causing
us to treat the high bits as zero even though they're (by definition)
unknown.

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

3 years agoImprove pretty-printing for APValues of void type.
Richard Smith [Thu, 20 Aug 2020 23:41:16 +0000 (16:41 -0700)]
Improve pretty-printing for APValues of void type.

No functionality change intended: there doesn't seem to be any way to
cause Clang to print such a value, but they can show up when dumping
APValues from a debugger.

3 years ago[Darwin][iOS] Enable test on non-macOS platforms
Julian Lettner [Thu, 20 Aug 2020 23:33:40 +0000 (16:33 -0700)]
[Darwin][iOS] Enable test on non-macOS platforms

We are now using a properly-substituted minimal deployment target
compiler flag (`%min_macos_deployment_target=10.11`).  Enable test on
iOS and watchOS plus simulators.  We are also not testing on very old
platforms anymore, so we can remove some obsolete lit infrastructure.

3 years agoFix up clangd after Clang 038edf6029bafe70b1f7165abe2b0e61ddf506b3.
Richard Smith [Thu, 20 Aug 2020 23:34:48 +0000 (16:34 -0700)]
Fix up clangd after Clang 038edf6029bafe70b1f7165abe2b0e61ddf506b3.

Now that Clang is able to constant-evaluate void-typed expressions,
disable showing hover-card values for them. It's not useful to say that
an expression cast to void has value '<no value>', even if we can
constant-evaluate it to that result!

3 years ago[compiler-rt][Darwin] Refactor minimum deployment target substitutions
Julian Lettner [Wed, 12 Aug 2020 22:02:42 +0000 (15:02 -0700)]
[compiler-rt][Darwin] Refactor minimum deployment target substitutions

* Support macOS 11+ version scheme
* Standardize substitution name `%min_deployment_target=x.y`
* Remove unneeded error cases (the input version is hard-coded)
* Specify version as tuple instead of string; no need to parse it

These changes should also facilitate a future addition of a substitution
that expands to "set deployment target to current target version"
(https://reviews.llvm.org/D70151).

Reviewed By: delcypher

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

3 years ago[ELF] Keep st_type for symbol assignment
Fangrui Song [Thu, 20 Aug 2020 23:05:27 +0000 (16:05 -0700)]
[ELF] Keep st_type for symbol assignment

PR46970: for `alias = aliasee`, the alias can be used in relocation processing
and on ARM st_type does affect Thumb interworking. It is thus desirable for the
alias to get the same st_type.

Note that the st_size field should not be inherited because some tools use
st_size=0 as a heuristic to detect aliases. Retaining st_size can thwart such
heuristics and cause aliases to be preferred over the original symbols.

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

3 years agoFix 32 bit build broken by D85990 by dropping align from filecheck pattern
JonChesterfield [Thu, 20 Aug 2020 22:50:33 +0000 (23:50 +0100)]
Fix 32 bit build broken by D85990 by dropping align from filecheck pattern

3 years agoDon't reject uses of void-returning consteval functions.
Richard Smith [Thu, 20 Aug 2020 22:34:34 +0000 (15:34 -0700)]
Don't reject uses of void-returning consteval functions.

3 years ago[MLIR] Add affine.parallel folder and normalizer
Frank Laub [Thu, 20 Aug 2020 22:19:37 +0000 (22:19 +0000)]
[MLIR] Add affine.parallel folder and normalizer

Add a folder to the affine.parallel op so that loop bounds expressions are canonicalized.

Additionally, a new AffineParallelNormalizePass is added to adjust affine.parallel ops so that the lower bound is always 0 and the upper bound always represents a range with a step size of 1.

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

3 years agoMake DWARFExpression::GetLocationExpression public
Eric Leese [Thu, 20 Aug 2020 21:13:21 +0000 (14:13 -0700)]
Make DWARFExpression::GetLocationExpression public

This method is used to get the DataExtractor when the expression is a location list.

Reviewed By: labath

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

3 years ago[lldb] Extract FileSystem initialization code into helper (NFC)
Jonas Devlieghere [Thu, 20 Aug 2020 22:07:27 +0000 (15:07 -0700)]
[lldb] Extract FileSystem initialization code into helper (NFC)

The FileSystem initialization depends on the reproducer mode. It has
been growing organically to the point where it deserves its own helper
function. This also allows for early returns to simplify the code.

3 years ago[test] Replace `yaml2obj >` with `yaml2obj -o` and remove unneeded input redirection
Fangrui Song [Thu, 20 Aug 2020 22:00:25 +0000 (15:00 -0700)]
[test] Replace `yaml2obj >` with `yaml2obj -o` and remove unneeded input redirection

3 years ago[MLIR][SPIRVToLLVM] Removed std to llvm patterns from the conversion
George Mitenkov [Thu, 20 Aug 2020 20:47:35 +0000 (23:47 +0300)]
[MLIR][SPIRVToLLVM] Removed std to llvm patterns from the conversion

Removed the Standard to LLVM conversion patterns that were previously
pulled in for testing purposes. This helps to separate the conversion
to LLVM dialect of the MLIR module with both SPIR-V and Standard
dialects in it (particularly helpful for SPIR-V cpu runner). Also,
tests were changed accordingly.

Reviewed By: mravishankar

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

3 years ago[llvm-dwarfdump] Fix a typo: witin -> within
Fangrui Song [Thu, 20 Aug 2020 21:11:08 +0000 (14:11 -0700)]
[llvm-dwarfdump] Fix a typo: witin -> within

3 years ago[lldb] Provide GetHomeDirectory wrapper in Host::FileSystem (NFC)
Jonas Devlieghere [Thu, 20 Aug 2020 18:36:32 +0000 (11:36 -0700)]
[lldb] Provide GetHomeDirectory wrapper in Host::FileSystem (NFC)

Provider a wrapper around llvm::sys::path::home_directory in the
FileSystem class. This will make it possible for the reproducers to
intercept the call in a central place.

3 years agoFix a couple of typos. NFC
Jon Roelofs [Thu, 20 Aug 2020 20:56:57 +0000 (14:56 -0600)]
Fix a couple of typos. NFC

3 years ago[X86] Enable constexpr on POPCNT intrinsics (PR31446)
Simon Pilgrim [Thu, 20 Aug 2020 20:37:51 +0000 (21:37 +0100)]
[X86] Enable constexpr on POPCNT intrinsics (PR31446)

This is a first step patch to enable constexpr support and testing to a large number of x86 intrinsics.

All I've done here is provide a DEFAULT_FN_ATTRS_CONSTEXPR variant to our existing DEFAULT_FN_ATTRS tag approach that adds constexpr on c++ builds. The clang cuda headers do something similar.

I've started with POPCNT mainly as its tiny and are wrappers to generic __builtin_* intrinsics which already act as constexpr.

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

3 years agoCodeGen: Don't drop AA metadata when splitting MachineMemOperands
Matt Arsenault [Sat, 8 Aug 2020 16:22:40 +0000 (12:22 -0400)]
CodeGen: Don't drop AA metadata when splitting MachineMemOperands

Assuming this is used to split a memory access into smaller pieces,
the new access should still have the same aliasing properties as the
original memory access. As far as I can tell, this wasn't
intentionally dropped. It may be necessary to drop this if you are
moving the operand outside of the bounds of the original object in
such a way that it may alias another IR object, but I don't think any
of the existing users are doing this. Some of the uses widen into
unused alignment padding, which I think is OK.

3 years agoAMDGPU/GlobalISel: Legalize odd sized loads with widening
Matt Arsenault [Fri, 26 Jun 2020 23:02:46 +0000 (19:02 -0400)]
AMDGPU/GlobalISel: Legalize odd sized loads with widening

Custom lower and widen odd sized loads up to the alignment. The
default set of legalization actions doesn't have a way to represent
this. This fixes naturally aligned <3 x s8> and <3 x s16> loads.

This also starts moving towards eliminating the buggy and
overcomplicated legalization rules for narrowing. All the memory size
changes should be done in the lower or custom action, not NarrowScalar
/ FewerElements. These currently have redundant and ambiguous code
with the lower action.

3 years agoallSGPRSpillsAreDead() should use actual FP/BP frame indices
vnalamot [Thu, 20 Aug 2020 14:18:11 +0000 (19:48 +0530)]
allSGPRSpillsAreDead() should use actual FP/BP frame indices

The SGPR spills happen in SILowerSGPRSpills() and allSGPRSpillsAreDead()
make sure there are no SGPR spills pending during PEI. But the FP/BP
spills happen during PEI and are exceptions.

Use actual frame indices of FP/BP in allSGPRSpillsAreDead() to
accommodate the exceptions.

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

3 years ago[PowerPC][PCRelative] Thread Local Storage Support for General Dynamic
Kamau Bridgeman [Mon, 22 Jun 2020 16:43:03 +0000 (11:43 -0500)]
[PowerPC][PCRelative] Thread Local Storage Support for General Dynamic

This patch is the initial support for the General Dynamic Thread Local
Local Storage model to produce code sequence and relocations correct
to the ABI for the model when using PC relative memory operations.

Patch by: NeHuang

Reviewed By: stefanp

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

3 years ago[TSan][Darwin] Remove unnecessary lit substitution
Julian Lettner [Fri, 14 Aug 2020 00:26:56 +0000 (17:26 -0700)]
[TSan][Darwin] Remove unnecessary lit substitution

We don't test on very old versions of Apple platforms anymore.  The
following lit substitution concerning the minimum deployment target for
ARC support can be removed.

```
%darwin_min_target_with_full_runtime_arc_support -> 10.11
```

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

3 years ago[NFCI][SVE] Move fixed length i32/i64 SDIV tests
Cameron McInally [Thu, 20 Aug 2020 19:36:15 +0000 (14:36 -0500)]
[NFCI][SVE] Move fixed length i32/i64 SDIV tests

Move fixed length SDIV tests from sve-fixed-length-int-arith.ll to sve-fixed-length-int-div.ll. The former uses CHECK lines that verify legalization decisions. That's overkill for the i8/i16 SDIV tests, since they have a tricky legalization.

3 years ago[TSan][Darwin] Enable test on non-macOS platforms
Julian Lettner [Fri, 14 Aug 2020 01:06:19 +0000 (18:06 -0700)]
[TSan][Darwin] Enable test on non-macOS platforms

After removing the unnecessary `-mmacosx-version-min=10.12` compiler
flag this test can run on all platforms.  I confirmed that this test is
green for iOS, iOS simulator, and watchOS simulator.

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

3 years ago[llvm-dwarfdump] --statistics: switch to json::OStream. NFC
Fangrui Song [Mon, 17 Aug 2020 01:26:13 +0000 (18:26 -0700)]
[llvm-dwarfdump] --statistics: switch to json::OStream. NFC

Then it is trivial to make the output indented (the second parameter of
json::OStream::OStream specifies the indentation).

Reviewed By: jhenderson, echristo

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

3 years agoTest commit
Raul Tambre [Thu, 20 Aug 2020 19:15:01 +0000 (22:15 +0300)]
Test commit

3 years ago[lldb] tab completion for breakpoint names
Gongyu Deng [Thu, 20 Aug 2020 17:10:34 +0000 (19:10 +0200)]
[lldb] tab completion for breakpoint names

1. created a common completion for breakpoint names;
2. bound the breakpoint name common completion with eArgTypeBreakpointName;
3. implemented the dedicated completion for breakpoint read -N.

Reviewed By: JDevlieghere

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

3 years ago[SVE] Lower fixed length vXi8/vXi16 SDIV to scalable
Cameron McInally [Thu, 20 Aug 2020 18:28:46 +0000 (13:28 -0500)]
[SVE] Lower fixed length vXi8/vXi16 SDIV to scalable

There are no nxv16i8/nxv8i16 SDIV instructions, so these fixed width operations must be promoted to nxv4i32.

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

3 years ago[gn build] Port 1a995a0af3c
LLVM GN Syncbot [Thu, 20 Aug 2020 18:24:44 +0000 (18:24 +0000)]
[gn build] Port 1a995a0af3c

3 years ago[RISCV] Enable MCCodeEmitter instruction predicate verifier
Jessica Clarke [Thu, 20 Aug 2020 17:36:50 +0000 (18:36 +0100)]
[RISCV] Enable MCCodeEmitter instruction predicate verifier

This ensures that we never encode an instruction which is unavailable,
such as if we explicitly insert a forbidden instruction when lowering.
This is particularly important on RISC-V given its high degree of
modularity, and will become increasingly important as new standard
extensions appear.

Reviewed By: asb, lenary

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

3 years ago[NFC][InstCombine] Tests for PHI-of-insertvalue's
Roman Lebedev [Thu, 20 Aug 2020 16:16:48 +0000 (19:16 +0300)]
[NFC][InstCombine] Tests for PHI-of-insertvalue's

Currently we don't do anything about these,
neither in InstCombine, nor in SimplifyCFG's sinking.
These happen exceedingly rarely, but i've seen them in the cases where
PHI-aware aggregate reconstruction would have fired if not for them.

3 years ago[AMDGPU] Remove uses of Register::isPhysicalRegister/isVirtualRegister
Jay Foad [Thu, 20 Aug 2020 16:46:16 +0000 (17:46 +0100)]
[AMDGPU] Remove uses of Register::isPhysicalRegister/isVirtualRegister

... in favour of the isPhysical/isVirtual methods.

3 years ago[NFC] Expose the -Oz module optimization pipeline to opt
Mircea Trofin [Wed, 19 Aug 2020 16:30:52 +0000 (09:30 -0700)]
[NFC] Expose the -Oz module optimization pipeline to opt

This exposes the module optimization pipeline as a pass that can be
applied stand-alone when using 'opt'. This helps ml inliner training
scenarios, where we start with IR captured right before inlining,
perform the inlining (-scc-oz-module-inliner) and then want to continue
and observe the final IR (where this patch comes into play). We can then
apply llc on the resulting IR to continue compilation down to native.

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

3 years ago[lldb][asan] Mark destructor as virtual to allow subclasses.
Jordan Rupprecht [Thu, 20 Aug 2020 16:15:37 +0000 (09:15 -0700)]
[lldb][asan] Mark destructor as virtual to allow subclasses.

`lldb_private::ScriptInterpreterPython::CommandDataPython` inherits from `lldb_private::BreakpointOptions::CommandData`, but the latter does not have a virtual destructor. This leads to a new-delete-type-mismatch error when running certain tests (such as `functionalities/breakpoint/breakpoint_command/TestBreakpointCommand.py`) under asan.

3 years ago[libc] Add a class called NormalFloat which represents normalized floats.
Siva Chandra Reddy [Wed, 19 Aug 2020 08:08:03 +0000 (01:08 -0700)]
[libc] Add a class called NormalFloat which represents normalized floats.

This class helps in dealing with normal and subnormal numbers uniformly.
Moreover, since this class has been designed to handle all floating
formats across platforms, it helps implement floating point functions in
a uniform manner.

The implementations of frexp and logb have been switched to use this new
class as it allows us to use just one implementation across all
different floating point formats.

Reviewed By: lntue

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

3 years ago[PeepholeOptimizer] Remove dead code
Jay Foad [Thu, 20 Aug 2020 15:47:30 +0000 (16:47 +0100)]
[PeepholeOptimizer] Remove dead code

At this point we have already ruled out all def operands, so we can't
possibly see a dead implicit def operand.

3 years ago[libc][NFC] Switch math tests to the new ULP based tolerance.
Siva Chandra Reddy [Thu, 20 Aug 2020 06:19:44 +0000 (23:19 -0700)]
[libc][NFC] Switch math tests to the new ULP based tolerance.

Reviewed By: lntue

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

3 years ago[SyntaxTree] Split tests related to Namespace
Eduardo Caldas [Tue, 18 Aug 2020 12:16:57 +0000 (12:16 +0000)]
[SyntaxTree] Split tests related to Namespace

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

3 years ago[SyntaxTree] Unify logic for generating `id-expression`
Eduardo Caldas [Thu, 20 Aug 2020 14:18:55 +0000 (14:18 +0000)]
[SyntaxTree] Unify logic for generating `id-expression`

3 years ago[SyntaxTree] Add support for `MemberExpression`
Eduardo Caldas [Wed, 19 Aug 2020 16:43:33 +0000 (16:43 +0000)]
[SyntaxTree] Add support for `MemberExpression`

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

3 years agolld docs config: Use a list key in html_sidebars
Hans Wennborg [Thu, 20 Aug 2020 14:44:14 +0000 (16:44 +0200)]
lld docs config: Use a list key in html_sidebars

Otherwise the docs-lld-html target fails to build using recent Sphinx
with the following not very helpful error message:

An error happened in rendering the page index.
Reason: TemplateNotFound()

It turns out the values in the html_sidebars dictionary always need to be lists
now. See https://github.com/sphinx-doc/sphinx/issues/6186

3 years ago[lldb/Utility] Simplify Scalar handling of float types
Pavel Labath [Mon, 17 Aug 2020 12:18:44 +0000 (14:18 +0200)]
[lldb/Utility] Simplify Scalar handling of float types

Similarly to D85836, collapse all Scalar float types to a single enum
value, and use APFloat semantics to differentiate between. This
simplifies the code, and opens to door to supporting other floating
point semantics (which would be needed for fully supporting
architectures with more interesting float types such as PPC).

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

3 years ago[index-while-building] Fix build with -DBUILD_SHARED_LIBS=True
Alex Bradbury [Thu, 20 Aug 2020 14:12:56 +0000 (15:12 +0100)]
[index-while-building] Fix build with -DBUILD_SHARED_LIBS=True

The dependencies in clang/lib/IndexSerialization/CMakeLists.txt were
incomplete, leading to link errors for a -DBUILD_SHARED_LIBS=True build.

3 years agoAdd triples to fixed-point tests which lacked them.
Bevin Hansson [Thu, 20 Aug 2020 13:34:44 +0000 (15:34 +0200)]
Add triples to fixed-point tests which lacked them.

This caused failures on clang-x390x-linux.

3 years ago[LV] Allow tail folded reduction selects to remain in the loop
David Green [Thu, 20 Aug 2020 13:31:14 +0000 (14:31 +0100)]
[LV] Allow tail folded reduction selects to remain in the loop

The normal scheme for tail folding reductions is to use:

loop:
  p = phi(0, a)
  mask = ...
  x = masked_load(..., mask)
  a = add(x, p)
s = select(mask, a, p)

This means we need to keep the register p and a alive out of the loop, plus
the mask. On a target with predicated operations we can instead generate
the phi as p = phi(0, s). This ensures the select in the loop and we can
fold select(m, add(a, b), c) to something like a vaddt c, a, b using the
m predicate. This in turn allows us to tail predicate the entire loop.

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

3 years agoRevert "[compiler-rt] Compile assembly files as ASM not C"
Raphael Isemann [Thu, 20 Aug 2020 13:23:50 +0000 (15:23 +0200)]
Revert "[compiler-rt] Compile assembly files as ASM not C"

This reverts commit d58fd4e52197d55bf42ca446c8b0ed31b5c2ec1f. This broke
compiler-rt compilation on macOS:

codesign --sign - /Users/buildslave/jenkins/workspace/lldb-cmake/lldb-build/lib/clang/12.0.99/lib/darwin/libclang_rt.tsan_ios_dynamic.dylib
ld: warning: ignoring file projects/compiler-rt/lib/tsan/CMakeFiles/clang_rt.tsan_ios_dynamic.dir/rtl/tsan_rtl_amd64.S.o, building for iOS-arm64 but attempting to link with file built for iOS Simulator-x86_64
ld: warning: ignoring file projects/compiler-rt/lib/tsan/CMakeFiles/clang_rt.tsan_ios_dynamic.dir/rtl/tsan_rtl_aarch64.S.o, building for iOS-arm64 but attempting to link with file built for iOS Simulator-x86_64
Undefined symbols for architecture arm64:
  "_wrap__setjmp", referenced from:
      substitution__setjmp in tsan_interceptors_posix.cpp.o
  "_wrap_setjmp", referenced from:
      substitution_setjmp in tsan_interceptors_posix.cpp.o
  "_wrap_sigsetjmp", referenced from:
      substitution_sigsetjmp in tsan_interceptors_posix.cpp.o
ld: symbol(s) not found for architecture arm64

3 years ago[lldb] Forcefully complete a type when adding typedefs
Pavel Labath [Wed, 19 Aug 2020 13:52:58 +0000 (15:52 +0200)]
[lldb] Forcefully complete a type when adding typedefs

This is very similar to D85968, only more elusive to since we were not
adding the typedef type to the relevant DeclContext until D86140, which
meant that the DeclContext was populated (and the relevant assertion
hit) only after importing the type into the expression ast in a
particular way.

I haven't checked whether this situation can be hit in the gmodules
case, but my money is on "yes".

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

3 years agoFix -allow-enabling-analyzer-alpha-checkers always being passed to run-clang-tidy.py
Joachim Priesner [Thu, 20 Aug 2020 13:15:29 +0000 (09:15 -0400)]
Fix -allow-enabling-analyzer-alpha-checkers always being passed to run-clang-tidy.py

The action='store_true' option of argparse.add_argument implicitly
generates a default value of False if the argument is not specified.
Thus, the allow_enabling_alpha_checkers argument of
get_tidy_invocation is never None.

3 years ago[clangd] Don't crash on `#pragma clang __debug parser_crash`
Aleksandr Platonov [Thu, 20 Aug 2020 12:50:13 +0000 (15:50 +0300)]
[clangd] Don't crash on `#pragma clang __debug parser_crash`

Currently, clangd crashes when opening a file with `#pragma clang __debug parser_crash` (e.g. clang/test/Modules/Inputs/crash.h).
This patch disables these crashes.

Reviewed By: kadircet

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

3 years ago[clangd] Remove useless stderr logging.
Adam Czachorowski [Thu, 20 Aug 2020 12:48:02 +0000 (14:48 +0200)]
[clangd] Remove useless stderr logging.

This was accidentally added in 53b9199a5cdba8a6e294e1fb183f308ec558db22

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

3 years ago[AArch64] Update a code comment incorrectly referring to zero_reg. NFC
Bjorn Pettersson [Thu, 20 Aug 2020 12:36:20 +0000 (14:36 +0200)]
[AArch64] Update a code comment incorrectly referring to zero_reg. NFC

The getSrcFromCopy helper nowadays return a MachineOperand pointer,
so talking about zero_reg was incorrect as it nowadays return
a nullptr when not finding a copy like instruction.

3 years ago[clang] When loading preamble from AST file, re-export modules in Sema.
Adam Czachorowski [Fri, 14 Aug 2020 14:37:34 +0000 (16:37 +0200)]
[clang] When loading preamble from AST file, re-export modules in Sema.

This addresses a FIXME in ASTReader.

Modules were already re-exported for Preprocessor, but not for Sema.
The result was that, with -fmodules-local-submodule-visibility, all AST
nodes belonging to a module that was loaded in a premable where not
accesible from the main part of the file and a diagnostic recommending
importing those modules would be generated.

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

3 years ago[clangd] Fix crash-bug in preamble indexing when using modules.
Adam Czachorowski [Thu, 13 Aug 2020 15:24:22 +0000 (17:24 +0200)]
[clangd] Fix crash-bug in preamble indexing when using modules.

When preamble contains #undef, indexing code finds the matching #define
and uses that during indexing. However, it would only look for local
definitions. If the macro was defined in a module, MacroInfo
would be nullptr and clangd would crash.

This change makes clangd ignore any #undef without a matching #define
inside the same TU.

The indexing of macros happens for preamble only, so then #undef must be
in the preamble, which is why we need two .h files in a test.

Note that clangd is currently not ready for module support, but this
brings us one step closer.

This was previously attempted in
4061d9e42cff621462931ac7df9666806c77a237, but had to be reverted due to
broken test. This version fixes that test-only bug by setting a custom module
cache path to avoid re-use of modules across test invocations.

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

3 years agoFix Wdocumentation unknown parameter warning. NFC.
Simon Pilgrim [Thu, 20 Aug 2020 11:41:34 +0000 (12:41 +0100)]
Fix Wdocumentation unknown parameter warning. NFC.

3 years ago[ARM] Regenerate mve-vabd.ll test. NFC
David Green [Thu, 20 Aug 2020 11:24:27 +0000 (12:24 +0100)]
[ARM] Regenerate mve-vabd.ll test. NFC

3 years ago[Attributor] Handle CallBase case in AAValueConstantRange::initialize
Shinji Okumura [Thu, 20 Aug 2020 10:52:53 +0000 (19:52 +0900)]
[Attributor] Handle CallBase case in AAValueConstantRange::initialize

Currently, although we handle `CallBase` case in updateImpl, we give up in initialize in the case.
That is problematic when we propagate a range from call site returned position to floating position.

Reviewed By: jdoerfert

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

3 years ago[APInt] Allow self-assignment with libstdc++
Vitaly Buka [Thu, 20 Aug 2020 11:12:49 +0000 (04:12 -0700)]
[APInt] Allow self-assignment with libstdc++

http://lab.llvm.org:8011/builders/llvm-clang-x86_64-expensive-checks-ubuntu/builds/8256/steps/test-check-all/logs/FAIL%3A%20LLVM%3A%3Athinlto-function-summary-paramaccess.ll

Reviewed By: RKSimon

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

3 years agoRevert "[llvm-readobj/elf] - Refine the code for broken PT_DYNAMIC segment diagnostic."
Georgii Rymar [Thu, 20 Aug 2020 11:04:30 +0000 (14:04 +0300)]
Revert "[llvm-readobj/elf] - Refine the code for broken PT_DYNAMIC segment diagnostic."

This reverts commit 455d5a8a065b4b93df11d1696dc1546c403465a5.

It broke UBSan:
http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux-bootstrap-ubsan/builds/21386/steps/check-llvm%20ubsan/logs/stdio

/b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/llvm/test/tools/llvm-readobj/ELF/malformed-pt-dynamic.test:62:10: error: WARN3: expected string not found in input
# WARN3: error: '[[FILE]]': Invalid data was encountered while parsing the file
         ^
<stdin>:2:1: note: scanning from here
/b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/llvm/tools/llvm-readobj/ELFDumper.cpp:1956:46: runtime error: addition of unsigned offset to 0x0000020c5b30 overflowed to 0x0000020c5b2f
^
<stdin>:2:1: note: with "FILE" equal to "/b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm_build_ubsan/test/tools/llvm-readobj/ELF/Output/malformed-pt-dynamic\\.test\\.tmp3"
/b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/llvm/tools/llvm-readobj/ELFDumper.cpp:1956:46: runtime error: addition of unsigned offset to 0x0000020c5b30 overflowed to 0x0000020c5b2f
^
<stdin>:2:117: note: possible intended match here
/b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/llvm/tools/llvm-readobj/ELFDumper.cpp:1956:46: runtime error: addition of unsigned offset to 0x0000020c5b30 overflowed to 0x0000020c5b2f
                                                                                                                    ^
Input file: <stdin>
Check file: /b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/llvm/test/tools/llvm-readobj/ELF/malformed-pt-dynamic.test

3 years ago[SVE] Add ISEL patterns for predicated shifts by an immediate.
Paul Walker [Fri, 14 Aug 2020 17:28:38 +0000 (18:28 +0100)]
[SVE] Add ISEL patterns for predicated shifts by an immediate.

For scalable vector shifts the prediacte is typically all active,
which gets selected to an unpredicated shift by immediate.  When
code generating for fixed length vectors the predicate is based
on the vector length and so additional patterns are required to
make use of SVE's predicated shift by immediate instructions.

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