platform/upstream/llvm.git
3 years ago[SelectionDAG][RISCV] Don't unroll 0/1-type bool VSELECTs
Fraser Cormack [Wed, 26 May 2021 09:54:35 +0000 (10:54 +0100)]
[SelectionDAG][RISCV] Don't unroll 0/1-type bool VSELECTs

This patch extends the cases in which the legalizer is able to express
VSELECT in terms of XOR/AND/OR. When dealing with a VSELECT between
boolean vector types, the mask itself is an all-ones or all-ones value
of the operand type, so a 0/1 boolean type behaves identically to a 0/-1
type.

This greatly helps RISC-V which relies on expansion for these nodes. It
also allows scalable-vector bool VSELECTs to use the default expansion,
where before it would crash in SelectionDAG::UnrollVectorOp.

Reviewed By: craig.topper

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

3 years ago[AMDGPU][GlobalISel] Allow amdgpu_gfx calling conv
Sebastian Neubauer [Wed, 26 May 2021 16:50:19 +0000 (18:50 +0200)]
[AMDGPU][GlobalISel] Allow amdgpu_gfx calling conv

Calling functions from shaders already works with the SelectionDAG.

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

3 years ago[mlir] Support dialect-wide canonicalization pattern registration
Matthias Springer [Thu, 27 May 2021 08:26:45 +0000 (17:26 +0900)]
[mlir] Support dialect-wide canonicalization pattern registration

* Add `hasCanonicalizer` option to Dialect.
* Initialize canonicalizer with dialect-wide canonicalization patterns.
* Add test case to TestDialect.

Dialect-wide canonicalization patterns are useful if a canonicalization pattern does not conceptually associate with any single operation, i.e., it should not be registered as part of an operation's `getCanonicalizationPatterns` function. E.g., this is the case for canonicalization patterns that match an op interface.

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

3 years ago[NFCI][LoopDeletion] Do not call complex analysis for known non-zero BTC
Max Kazantsev [Thu, 27 May 2021 08:18:30 +0000 (15:18 +0700)]
[NFCI][LoopDeletion] Do not call complex analysis for known non-zero BTC

3 years ago[NFC] Reuse existing variables instead of re-requesting successors
Max Kazantsev [Thu, 27 May 2021 08:01:20 +0000 (15:01 +0700)]
[NFC] Reuse existing variables instead of re-requesting successors

3 years ago[GlobalISel] Implement splitting of G_SHUFFLE_VECTOR.
Amara Emerson [Thu, 20 May 2021 04:35:05 +0000 (21:35 -0700)]
[GlobalISel] Implement splitting of G_SHUFFLE_VECTOR.

Thhis is a port from the DAG legalization. We're still missing some of the
canonicalizations of shuffles but it's a start.

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

3 years ago[mlir] Add TestLinalgDistribution.cpp to cmake build.
Alexander Belyaev [Thu, 27 May 2021 06:59:05 +0000 (08:59 +0200)]
[mlir] Add TestLinalgDistribution.cpp to cmake build.

3 years ago[docs] llvm-objdump: Mention -M no-aliases is supported on AArch64
Fangrui Song [Thu, 27 May 2021 06:57:32 +0000 (23:57 -0700)]
[docs] llvm-objdump: Mention -M no-aliases is supported on AArch64

3 years ago[mlir] Add a pass to distribute linalg::TiledLoopOp.
Alexander Belyaev [Wed, 26 May 2021 18:22:49 +0000 (20:22 +0200)]
[mlir] Add a pass to distribute linalg::TiledLoopOp.

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

3 years ago[NFCI] Lazily evaluate SCEVs of PHIs
Max Kazantsev [Thu, 27 May 2021 06:20:57 +0000 (13:20 +0700)]
[NFCI] Lazily evaluate SCEVs of PHIs

Eager evaluation has cost of compile time. Only query them if they are
required for proving predicates.

3 years ago[NFC] Formatting fix
Max Kazantsev [Thu, 27 May 2021 05:50:54 +0000 (12:50 +0700)]
[NFC] Formatting fix

3 years ago[NFCI][LoopDeletion] Only query SCEV about loop successor if another successor is...
Max Kazantsev [Thu, 27 May 2021 04:47:30 +0000 (11:47 +0700)]
[NFCI][LoopDeletion] Only query SCEV about loop successor if another successor is also in loop

3 years ago[llvm-objdump] Print the DEBUG type under `--section-headers`.
Esme-Yi [Thu, 27 May 2021 04:53:14 +0000 (04:53 +0000)]
[llvm-objdump] Print the DEBUG type under `--section-headers`.

Summary: Under the option --section-headers, we can only
print the section types of TEXT, DATA, and BSS for now.
This patch adds the DEBUG type.

Reviewed By: jhenderson, Higuoxing

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

3 years ago[gn build] Port 857fa7b7b187
LLVM GN Syncbot [Thu, 27 May 2021 04:42:56 +0000 (04:42 +0000)]
[gn build] Port 857fa7b7b187

3 years ago[gn build] Port 0dc7fd1bc167
LLVM GN Syncbot [Thu, 27 May 2021 04:42:55 +0000 (04:42 +0000)]
[gn build] Port 0dc7fd1bc167

3 years ago[libcxx][iterator] adds `std::ranges::prev`
Christopher Di Bella [Sun, 16 May 2021 01:39:22 +0000 (01:39 +0000)]
[libcxx][iterator] adds `std::ranges::prev`

Implements part of P0896 'The One Ranges Proposal'.
Implements [range.iter.op.prev].

Depends on D102563.

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

3 years ago[libcxx][iterator] adds `std::ranges::next`
Christopher Di Bella [Sat, 8 May 2021 05:02:43 +0000 (05:02 +0000)]
[libcxx][iterator] adds `std::ranges::next`

Implements part of P0896 'The One Ranges Proposal'.
Implements [range.iter.op.next].

Depends on D101922.

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

3 years agoFix non-global-value-max-name-size not considered by LLParser
Hasyimi Bahrudin [Thu, 27 May 2021 04:01:20 +0000 (04:01 +0000)]
Fix non-global-value-max-name-size not considered by LLParser

`non-global-value-max-name-size` is used by `Value` to cap the length of local value name. However, this flag is not considered by `LLParser`, which leads to unexpected `use of undefined value error`. The fix is to move the responsibility of capping the length to `ValueSymbolTable`.

The test is the one provided by [[ https://bugs.llvm.org/show_bug.cgi?id=45899 | Mikael in the bug report ]].

Reviewed By: mehdi_amini

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

3 years ago[Fuchsia][CMake] Add missing include path.
Haowei Wu [Thu, 27 May 2021 00:45:03 +0000 (17:45 -0700)]
[Fuchsia][CMake] Add missing include path.

This patch adds include path for missing header files from "sync".
This patch also fixes the build failures caused by scudo.

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

3 years ago[RS4GC] Introduce intrinsics to get base ptr and offset
Yevgeny Rouban [Thu, 27 May 2021 02:01:55 +0000 (09:01 +0700)]
[RS4GC] Introduce intrinsics to get base ptr and offset

There can be a need for some optimizations to get (base, offset)
for any GC pointer. The base can be calculated by generating
needed instructions as it is done by the
RewriteStatepointsForGC::findBasePointer() function. The offset
can be calculated in the same way. Though to not expose the base
calculation and to make the offset calculation as simple as
ptrtoint(derived_ptr) - ptrtoint(base_ptr), which is illegal
outside RS4GC, this patch introduces 2 intrinsics:

 @llvm.experimental.gc.get.pointer.base(%derived_ptr)
 @llvm.experimental.gc.get.pointer.offset(%derived_ptr)

These intrinsics are inlined by RS4GC along with generation of
statepoint sequences.

With these new intrinsics the GC parseable lowering for atomic
memcpy intrinsics (6ec2c5e402a724ba99bce82a9cac7a3006d660f4)
could be implemented as a separate pass.

Reviewed By: reames
Differential Revision: https://reviews.llvm.org/D100445

3 years agoThe compiler is crashing when compiling a coroutine intrinsic without
Zahira Ammarguellat [Thu, 20 May 2021 19:37:26 +0000 (12:37 -0700)]
The compiler is crashing when compiling a coroutine intrinsic without
the use of the option fcoroutines-ts. This is a patch to fix this.

Fix for https://bugs.llvm.org/show_bug.cgi?id=50406

3 years agoFix unit test after 324af79dbc6066
Jessica Paquette [Thu, 27 May 2021 00:49:04 +0000 (17:49 -0700)]
Fix unit test after 324af79dbc6066

Needed to add in an extra parameter to calls to `libcall`.

3 years ago[ORC-RT] Add endianness support to the ORC runtime.
Lang Hames [Wed, 26 May 2021 21:00:41 +0000 (14:00 -0700)]
[ORC-RT] Add endianness support to the ORC runtime.

endian.h is a cut-down version of llvm/Support/SwapByteOrder.h. It will be used
in upcoming serialization utilities for the ORC runtime.

3 years ago[GlobalISel] Don't emit lost debug location remarks when legalizing tail calls
Jessica Paquette [Tue, 25 May 2021 23:54:20 +0000 (16:54 -0700)]
[GlobalISel] Don't emit lost debug location remarks when legalizing tail calls

There were a bunch of lost debug location remarks that show up when legalizing
tail calls on AArch64.

This would happen because we drop the return in the block where we emit the
tail call. So, we end up dropping the debug location, which makes the
LostDebugLocObserver report a missing debug location.

Although it's *true* that we lose these debug locations, this isn't
a particularly useful remark. We expect to drop these debug locations when
emitting tail calls. Suppressing remarks in this case is preferable, since the
amount of noise could hide actual debug location related bugs.

To do this, I just plumbed the LostDebugLocObserver through the relevant
LegalizerHelper functions. This is the only case I can think of where we need
the LostDebugLocObserver in the LegalizerHelper. So, rather than storing it
in the LegalizerHelper proper and mucking around with the constructors, I
figured it'd be cleanest to take the simplest path for now.

This clears up ~20 noisy lost debug location remarks on CTMark in AArch64 at
-Os.

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

3 years agoEmit correct location lists with basic block sections.
Sriraman Tallam [Thu, 27 May 2021 00:12:31 +0000 (17:12 -0700)]
Emit correct location lists with basic block sections.

This patch addresses multiple things:

1) It ensures that const_value is emitted when possible with basic block
sections.
2) It emits location lists such that the labels are always within the
section boundary.
3) It fixes a bug when the parameter is first used in a non-entry block
which is in a different section from the entry block.

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

3 years ago[AArch64][GlobalISel] Legalize non-power-of-2 vector elements for G_STORE.
Amara Emerson [Wed, 26 May 2021 23:32:42 +0000 (16:32 -0700)]
[AArch64][GlobalISel] Legalize non-power-of-2 vector elements for G_STORE.

The rules were already there, it just needed re-ordering so the odd case didn't
bail out too early.

3 years agoRevert "[scudo] Build scudo_standalone on Android and Fuchsia."
Mitch Phillips [Wed, 26 May 2021 23:51:43 +0000 (16:51 -0700)]
Revert "[scudo] Build scudo_standalone on Android and Fuchsia."

This reverts commit 2fe987e6bacea8884a397041c13a38e8ba97c2d6.

Broke the Android buildbots. Turns out a couple more tweaks are
necessary to turn them back on.

3 years ago[MLIR] Add support for empty IVs to affine.parallel
Frank Laub [Fri, 21 May 2021 01:52:53 +0000 (01:52 +0000)]
[MLIR] Add support for empty IVs to affine.parallel

Allow support for specifying empty IVs in an `affine.parallel`.

For example:

```
affine.parallel () = () to () {
  affine.yield
}
```

Reviewed By: bondhugula, jbruestle

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

3 years ago[Hexagon] Restore handling of expanding shuffles
Krzysztof Parzyszek [Sat, 22 May 2021 18:36:41 +0000 (13:36 -0500)]
[Hexagon] Restore handling of expanding shuffles

Fixed bugs, added testcases.  The byte-unpack is actually recognized by
the DAG combiner, but the halfword-unpack it not.

3 years ago[tests] Add some basic coverage of multiple exit unrolling
Philip Reames [Wed, 26 May 2021 22:51:16 +0000 (15:51 -0700)]
[tests] Add some basic coverage of multiple exit unrolling

3 years ago[scudo] Build scudo_standalone on Android and Fuchsia.
Mitch Phillips [Wed, 26 May 2021 22:29:26 +0000 (15:29 -0700)]
[scudo] Build scudo_standalone on Android and Fuchsia.

This should be fine now, and is necessary for D102543.

Reviewed By: cryptoad

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

3 years ago[mlir] Add n-D vector lowering to LLVM for cast ops
harsh-nod [Wed, 26 May 2021 22:18:32 +0000 (15:18 -0700)]
[mlir] Add n-D vector lowering to LLVM for cast ops

The casting ops (sitofp, uitofp, fptosi, fptoui) lowering currently does
not handle n-D vectors. This patch fixes that.

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

3 years agoRevert "Refactor mutation strategies into a standalone library"
Matt Morehouse [Wed, 26 May 2021 22:14:37 +0000 (15:14 -0700)]
Revert "Refactor mutation strategies into a standalone library"

This reverts commit c4a41cd77c15c2905ac74beeec09f8343a65a549 due to
buildbot failure.

3 years ago[mlir][python] Provide "all passes" registration module in Python
Aart Bik [Wed, 26 May 2021 19:44:33 +0000 (12:44 -0700)]
[mlir][python] Provide "all passes" registration module in Python

Currently, passes are registered on a per-dialect basis, which
provides the smallest footprint obviously. But for prototyping
and experimentation, a convenience "all passes" module is provided,
which registers all known MLIR passes in one run.

Usage in Python:

import mlir.all_passes_registration

Reviewed By: mehdi_amini

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

3 years ago[lldb] Fix gnu_libstdcpp's update methods
Walter Erquinigo [Wed, 26 May 2021 21:30:48 +0000 (14:30 -0700)]
[lldb] Fix gnu_libstdcpp's update methods

The variable.rst documentation says:

```
If it returns a value, and that value is True, LLDB will be allowed to cache the children and the children count it previously obtained, and will not return to the provider class to ask.  If nothing, None, or anything other than True is returned, LLDB will discard the cached information and ask. Regardless, whenever necessary LLDB will call update.
```

However, several update methods in gnu_libstdcpp.py were returning True,
which made lldb unaware of any changes in the corresponding objects.
This problem was visible by lldb-vscode in the following way:

- If a breakpoint is hit and there's a vector with the contents {1, 2},
  it'll be displayed correctly.
- Then the user steps and the next stop contains the vector modified.
  The program changed it to {1, 2, 3}
- frame var then displays {1, 2} incorrectly, due to the caching caused
by the update method

It's worth mentioning that none of libcxx.py'd update methods return True. Same for LibCxxVector.cpp, which returns false.

Added a very simple test that fails without this fix.

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

3 years ago[libFuzzer] Add missing FuzzerBuiltinsMsvc.h include.
Matt Morehouse [Wed, 26 May 2021 21:38:27 +0000 (14:38 -0700)]
[libFuzzer] Add missing FuzzerBuiltinsMsvc.h include.

Should fix the Windows build.

3 years ago[libcxx][nfc] Fix the ASAN bots: update expected.pass.cpp.
zoecarver [Wed, 26 May 2021 19:00:03 +0000 (12:00 -0700)]
[libcxx][nfc] Fix the ASAN bots: update expected.pass.cpp.

Ensures that `get_return_object`'s return type is the same as the return type for the function calling `co_return`. Otherwise, we try to construct an object, then free it, then return it.

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

3 years ago[flang][docs] Initial documentation for the Fortran LLVM Test Suite.
naromero77 [Wed, 26 May 2021 20:54:16 +0000 (15:54 -0500)]
[flang][docs] Initial documentation for the Fortran LLVM Test Suite.

Describes how to run the Fortran LLVM Test Suite, specifically the external SPEC CPU 2017 Fortran tests.

Reviewed By: rovka

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

3 years ago[AArch64] Support llvm-mc/llvm-objdump -M no-aliases
Fangrui Song [Wed, 26 May 2021 20:35:31 +0000 (13:35 -0700)]
[AArch64] Support llvm-mc/llvm-objdump -M no-aliases

This enables the no-aliases forms of many instructions.

Depends on D103004

Reviewed By: tmatheson

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

3 years ago[libcxx][docs] Take mutex for common_iterator, common_view, and empty_view.
zoecarver [Wed, 26 May 2021 20:28:32 +0000 (13:28 -0700)]
[libcxx][docs] Take mutex for common_iterator, common_view, and empty_view.

3 years agoRefactor mutation strategies into a standalone library
Aaron Green [Tue, 25 May 2021 19:04:12 +0000 (12:04 -0700)]
Refactor mutation strategies into a standalone library

This change introduces libMutagen/libclang_rt.mutagen.a as a subset of libFuzzer/libclang_rt.fuzzer.a. This library contains only the fuzzing strategies used by libFuzzer to produce new test inputs from provided inputs, dictionaries, and SanitizerCoverage feedback.

Most of this change is simply moving sections of code to one side or the other of the library boundary. The only meaningful new code is:

* The Mutagen.h interface and its implementation in Mutagen.cpp.
* The following methods in MutagenDispatcher.cpp:
  * UseCmp
  * UseMemmem
  * SetCustomMutator
  * SetCustomCrossOver
  * LateInitialize (similar to the MutationDispatcher's original constructor)
  * Mutate_AddWordFromTORC (uses callbacks instead of accessing TPC directly)
  * StartMutationSequence
  * MutationSequence
  * DictionaryEntrySequence
  * RecommendDictionary
  * RecommendDictionaryEntry
* FuzzerMutate.cpp (which now justs sets callbacks and handles printing)
* MutagenUnittest.cpp (which adds tests of Mutagen.h)

A note on performance: This change was tested with a 100 passes of test/fuzzer/LargeTest.cpp with 1000 runs per pass, both with and without the change. The running time distribution was qualitatively similar both with and without the change, and the average difference was within 30 microseconds (2.240 ms/run vs 2.212 ms/run, respectively). Both times were much higher than observed with the fully optimized system clang (~0.38 ms/run), most likely due to the combination of CMake "dev mode" settings (e.g. CMAKE_BUILD_TYPE="Debug", LLVM_ENABLE_LTO=OFF, etc.). The difference between the two versions built similarly seems to be "in the noise" and suggests no meaningful performance degradation.

Reviewed By: morehouse

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

3 years ago[llvm-readobj] Optimize printing stack sizes to linear time.
Rahman Lavaee [Wed, 26 May 2021 20:12:36 +0000 (13:12 -0700)]
[llvm-readobj] Optimize printing stack sizes to linear time.

Currently, each function name lookup is a linear iteration over all symbols defined in the object file which makes the total running time quadratic.

This patch optimizes the function name lookup by populating an **address to index** map upon the first function name lookup which is used to lookup each function name in O(1).

**impact**: For the clang binary built with `-fstack-size-section`, this improves the running time of `llvm-readobj --stack-size` from 7 minutes to 0.25 seconds.

Reviewed By: jhenderson

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

3 years ago[RISCV] Use X0 as destination of inserted vsetvli when possible.
Craig Topper [Wed, 26 May 2021 18:51:32 +0000 (11:51 -0700)]
[RISCV] Use X0 as destination of inserted vsetvli when possible.

We aren't going to connect the result to anything so we might
as well avoid allocating a register.

Reviewed By: frasercrmck, HsiangKai

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

3 years ago[RISCV][NFC] Fix some whitespace nits in MC test RUN lines
Jessica Clarke [Wed, 26 May 2021 20:03:18 +0000 (21:03 +0100)]
[RISCV][NFC] Fix some whitespace nits in MC test RUN lines

3 years agoUpdate documentation for InlineModel features.
Jacob Hegna [Wed, 26 May 2021 19:13:21 +0000 (12:13 -0700)]
Update documentation for InlineModel features.

Reviewed By: mtrofin

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

3 years ago[libc++] Add a job testing on GCC 11
Louis Dionne [Tue, 25 May 2021 21:35:35 +0000 (17:35 -0400)]
[libc++] Add a job testing on GCC 11

I'm adding the job as a soft-fail for now, but once all the tests have
been fixed to work on it, we'll switch over from GCC 10 to GCC 11 and
remove the soft-fail.

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

3 years ago[pstl] Workaround more errors in the test suite
Louis Dionne [Wed, 26 May 2021 19:44:52 +0000 (15:44 -0400)]
[pstl] Workaround more errors in the test suite

3 years ago[CostModel][AArch64] Add floating point arithmetic tests. NFC.
Sjoerd Meijer [Wed, 26 May 2021 19:15:29 +0000 (20:15 +0100)]
[CostModel][AArch64] Add floating point arithmetic tests. NFC.

3 years ago[DebugInstrRef][1/3] Track PHI values through register allocation
Jeremy Morse [Wed, 26 May 2021 18:53:33 +0000 (19:53 +0100)]
[DebugInstrRef][1/3] Track PHI values through register allocation

This patch introduces "DBG_PHI" instructions, a marker of where a PHI
instruction used to be, before PHI elimination. Under the instruction
referencing model, we want to know where every value in the function is
defined -- and a PHI, even if implicit, is such a place.

Just like instruction numbers, we can use this to identify a value to be
used as a variable value, but we don't need to know what instruction
defines that value, for example:

bb1:
   DBG_PHI $rax, 1
   [... more insts ... ]
bb2:
   DBG_INSTR_REF 1, 0, !1234, !DIExpression()

This specifies that on entry to bb1, whatever value is in $rax is known
as value number one -- and the later DBG_INSTR_REF marks the position
where variable !1234 should take on value number one.

PHI locations are stored in MachineFunction for the duration of the
regalloc phase in the DebugPHIPositions map. The map is populated by
PHIElimination, and then flushed back into the instruction stream by
virtregrewriter. A small amount of maintenence is needed in
LiveDebugVariables to account for registers being split, but only for
individual positions, not for entire ranges of blocks.

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

3 years ago[pstl] Fix -Wundef errors in the test suite
Louis Dionne [Wed, 26 May 2021 19:24:31 +0000 (15:24 -0400)]
[pstl] Fix -Wundef errors in the test suite

3 years ago[libomptarget][nfc][amdgpu] Factor out setting upper bounds
Jon Chesterfield [Wed, 26 May 2021 18:57:48 +0000 (19:57 +0100)]
[libomptarget][nfc][amdgpu] Factor out setting upper bounds

Refactor suggested in D103037 to help avoid similar copy-paste errors.
Change is mechanical. Some parts of this would be more robust with unsigned.

Reviewed By: dhruvachak

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

3 years ago[NFC][Codegen][X86] Add a few more interleaved load/store patterns w/ i16 element...
Roman Lebedev [Wed, 26 May 2021 13:55:06 +0000 (16:55 +0300)]
[NFC][Codegen][X86] Add a few more interleaved load/store patterns w/ i16 element type

Matching the costmodel coverage.
We want them both because they simplify coming up with the patterns
to check their cost, and to track their codegen.

Tests for loads can be fully autogenerated: https://godbolt.org/z/o1fncqo9n
For stores, however, i have done that semi-manually: https://godbolt.org/z/KPzTnvsh1

3 years ago[NFC][X86][Costmodel] Add some more interleaved load/store test with i16 element...
Roman Lebedev [Wed, 26 May 2021 12:45:10 +0000 (15:45 +0300)]
[NFC][X86][Costmodel] Add some more interleaved load/store test with i16 element type

Not sure if even larger interleaving factors are needed,
but these are what i have seen being queried in the wild.

3 years ago[SCEV] Compute trip multiple for multiple exit loops
Philip Reames [Wed, 26 May 2021 18:51:17 +0000 (11:51 -0700)]
[SCEV] Compute trip multiple for multiple exit loops

This patch implements getSmallConstantTripMultiple(L) correctly for multiple exit loops. The previous implementation was both imprecise, and violated the specified behavior of the method. This was fine in practice, because it turns out the function was both dead in real code, and not tested for the multiple exit case.

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

3 years ago[WebAssembly] Add TargetInstrInfo::getCalleeOperand
Heejin Ahn [Fri, 21 May 2021 19:12:44 +0000 (12:12 -0700)]
[WebAssembly] Add TargetInstrInfo::getCalleeOperand

DwarfDebug unconditionally assumes for all call instructions the 0th
operand is the callee operand, which seems to be true for other targets,
but not for WebAssembly. This adds `TargetInstrInfo::getCallOperand`
method whose default implementation returns `getOperand(0)` and makes
WebAssembly overrides it to use its own utility method to get the callee
operand.

This also fixes an existing bug in `WebAssembly::getCalleeOp`, which was
uncovered by this CL.

Reviewed By: dschuff, djtodoro

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

3 years ago[SimplifyCFG] Use make_early_inc_range() while deleting instructions
Heejin Ahn [Wed, 26 May 2021 15:46:03 +0000 (08:46 -0700)]
[SimplifyCFG] Use make_early_inc_range() while deleting instructions

We are deleting `phi` nodes within the for loop, so this makes sure we
increment the iterator before we delete the instruction pointed by the
iterator.

This started to break in
https://github.com/llvm/llvm-project/commit/a0be08164622bf938855ff5d19dd8e9d0c96b9b3.

Reviewed By: dschuff, lebedev.ri

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

3 years ago[AMDGPU] Fix kernel LDS lowering for constants
Stanislav Mekhanoshin [Wed, 26 May 2021 18:02:23 +0000 (11:02 -0700)]
[AMDGPU] Fix kernel LDS lowering for constants

There is a trivial but severe bug in the recent code collecting
LDS globals used by kernel. It aborts scan on the first constant
without scanning further uses. That leads to LDS overallocation
with multiple kernels in certain cases.

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

3 years ago[AMDGPU][MC][GFX90A] Corrected DS_GWS opcodes
Dmitry Preobrazhensky [Wed, 26 May 2021 18:30:15 +0000 (21:30 +0300)]
[AMDGPU][MC][GFX90A] Corrected DS_GWS opcodes

Corrected DS_GWS opcodes to use even aligned registers.

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

3 years ago[libomptarget][nfc][amdgpu] Refactor uses of KernelInfoTable
Jon Chesterfield [Wed, 26 May 2021 18:25:24 +0000 (19:25 +0100)]
[libomptarget][nfc][amdgpu] Refactor uses of KernelInfoTable

Suggested in D103059. Use a single lookup instead of two, more const, less mutation.

Reviewed By: dhruvachak

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

3 years ago[SCEV] Generalize getSmallConstantTripCount(L) for multiple exit loops
Philip Reames [Wed, 26 May 2021 18:16:11 +0000 (11:16 -0700)]
[SCEV] Generalize getSmallConstantTripCount(L) for multiple exit loops

This came up in review for another patch, see https://reviews.llvm.org/D102982#2782407 for full context.

I've reviewed the callers to make sure they can handle multiple exit loops w/non-zero returns.  There's two cases in target cost models where results might change (Hexagon and PowerPC), but the results looked legal and reasonable.  If a target maintainer wishes to back out the effect of the costing change, they should explicitly check for multiple exit loops and handle them as desired.

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

3 years ago[mlir] Make StripDebugInfo strip out block arguments locs
thomasraoux [Wed, 26 May 2021 17:28:45 +0000 (10:28 -0700)]
[mlir] Make StripDebugInfo strip out block arguments locs

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

3 years agoRevert "[Scudo] Make -fsanitize=scudo use standalone. Migrate tests."
Mitch Phillips [Wed, 26 May 2021 17:50:26 +0000 (10:50 -0700)]
Revert "[Scudo] Make -fsanitize=scudo use standalone. Migrate tests."

This reverts commit 6911114d8cbed06a8a809c34ae07f4e3e89ab252.

Broke the QEMU sanitizer bots due to a missing header dependency. This
actually needs to be fixed on the bot-side, but for now reverting this
patch until I can fix up the bot.

3 years ago[llvm-mc] Add -M to replace -riscv-no-aliases and -riscv-arch-reg-names
Fangrui Song [Wed, 26 May 2021 17:43:32 +0000 (10:43 -0700)]
[llvm-mc] Add -M to replace -riscv-no-aliases and -riscv-arch-reg-names

In objdump, many targets support `-M no-aliases`.  Instead of having a
`-*-no-aliases` for each target when LLVM adds the support, it makes more sense
to introduce objdump style `-M`.

-riscv-arch-reg-names is removed. -riscv-no-aliases has too many uses and thus is retained for now.

Reviewed By: luismarques

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

3 years ago[SCEV] Add a utility for converting from "exit count" to "trip count"
Philip Reames [Wed, 26 May 2021 17:40:25 +0000 (10:40 -0700)]
[SCEV] Add a utility for converting from "exit count" to "trip count"

(Mostly as a logical place to put a comment since this is a reoccuring confusion.)

3 years ago[RISCV] Optimize SEW=64 shifts by splat on RV32.
Craig Topper [Wed, 26 May 2021 17:23:30 +0000 (10:23 -0700)]
[RISCV] Optimize SEW=64 shifts by splat on RV32.

SEW=64 shifts only uses the log2(64) bits of shift amount. If we're
splatting a 64 bit value in 2 parts, we can avoid splatting the
upper bits and just let the low bits be sign extended. They won't
be read anyway.

For the purposes of SelectionDAG semantics of the generic ISD opcodes,
if hi was non-zero or bit 31 of the low is 1, the shift was already
undefined so it should be ok to replace high with sign extend of low.

In order do be able to find the split i64 value before it becomes
a stack operation, I added a new ISD opcode that will be expanded
to the stack spill in PreprocessISelDAG. This new node is conceptually
similar to BuildPairF64, but I expanded earlier so that we could
go through regular isel to get the right VLSE opcode for the LMUL.
BuildPairF64 is expanded in a CustomInserter.

Reviewed By: frasercrmck

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

3 years ago[SCEV] Extract out a helper for computing trip multiples
Philip Reames [Wed, 26 May 2021 17:08:53 +0000 (10:08 -0700)]
[SCEV] Extract out a helper for computing trip multiples

3 years ago[Scudo] Make -fsanitize=scudo use standalone. Migrate tests.
Mitch Phillips [Wed, 26 May 2021 17:03:10 +0000 (10:03 -0700)]
[Scudo] Make -fsanitize=scudo use standalone. Migrate tests.

This patch moves -fsanitize=scudo to link the standalone scudo library,
rather than the original compiler-rt based library. This is one of the
major remaining roadblocks to deleting the compiler-rt based scudo,
which should not be used any more. The standalone Scudo is better in
pretty much every way and is much more suitable for production usage.

As well as patching the litmus tests for checking that the
scudo_standalone lib is linked instead of the scudo lib, this patch also
ports all the scudo lit tests to run under scudo standalone.

This patch also adds a feature to scudo standalone that was under test
in the original scudo - that arguments passed to an aligned operator new
were checked that the alignment was a power of two.

Some lit tests could not be migrated, due to the following issues:
 1. Features that aren't supported in scudo standalone, like the rss
 limit.
 2. Different quarantine implementation where the test needs some more
 thought.
 3. Small bugs in scudo standalone that should probably be fixed, like
 the Secondary allocator having a full page on the LHS of an allocation
 that only contains the chunk header, so underflows by <= a page aren't
 caught.
 4. Slight differences in behaviour that's technically correct, like
 'realloc(malloc(1), 0)' returns nullptr in standalone, but a real
 pointer in old scudo.
 5. Some tests that might be migratable, but not easily.

Tests that are obviously not applicable to scudo standalone (like
testing that no sanitizer symbols made it into the DSO) have been
deleted.

After this patch, the remaining work is:
 1. Update the Scudo documentation. The flags have changed, etc.
 2. Delete the old version of scudo.
 3. Patch up the tests in lit-unmigrated, or fix Scudo standalone.

Reviewed By: cryptoad, vitalybuka

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

3 years ago[RISCV] Remove --riscv-no-aliases from RVV tests
Jessica Clarke [Wed, 26 May 2021 16:59:10 +0000 (17:59 +0100)]
[RISCV] Remove --riscv-no-aliases from RVV tests

This serves no useful purpose other than to clutter things up. Diff
summary as the real diff is extremely unwieldy:

   24844 -; CHECK-NEXT:    jalr zero, 0(ra)
   24844 +; CHECK-NEXT:    ret
       8 -; CHECK-NEXT:    vl4re8.v v28, (a0)
       8 +; CHECK-NEXT:    vl4r.v v28, (a0)
      64 -; CHECK-NEXT:    vl8re8.v v24, (a0)
      64 +; CHECK-NEXT:    vl8r.v v24, (a0)
     392 -; RUN:   --riscv-no-aliases < %s | FileCheck %s
     392 +; RUN:   < %s | FileCheck %s
       1 -; RUN:   -verify-machineinstrs --riscv-no-aliases < %s \
       1 +; RUN:   -verify-machineinstrs < %s \

As discussed in D103004.

3 years ago[RISCV] Don't propagate VL/VTYPE across inline assembly in the Insert VSETVLI pass.
Craig Topper [Wed, 26 May 2021 16:31:01 +0000 (09:31 -0700)]
[RISCV] Don't propagate VL/VTYPE across inline assembly in the Insert VSETVLI pass.

It's conceivable someone could put a vsetvli in inline assembly
so its safer to consider them as barriers. The alternative would
be to trust that the user marks VL and VTYPE registers as clobbers
of the inline assembly if they do that, but hat seems error prone.

I'm assuming inline assembly in vector code is going to be rare.

Reviewed By: frasercrmck, HsiangKai

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

3 years ago[scudo] Get rid of initLinkerInitialized
Kostya Kortchinsky [Tue, 25 May 2021 22:00:58 +0000 (15:00 -0700)]
[scudo] Get rid of initLinkerInitialized

Now that everything is forcibly linker initialized, it feels like a
good time to get rid of the `init`/`initLinkerInitialized` split.

This allows to get rid of various `memset` construct in `init` that
gcc complains about (this fixes a Fuchsia open issue).

I added various `DCHECK`s to ensure that we would get a zero-inited
object when entering `init`, which required ensuring that
`unmapTestOnly` leaves the object in a good state (tests are currently
the only location where an allocator can be "de-initialized").

Running the tests with `--gtest_repeat=` showed no issue.

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

3 years ago[SLP]Fix vectorization of insertelements with multiple uses.
Alexey Bataev [Wed, 26 May 2021 13:18:34 +0000 (06:18 -0700)]
[SLP]Fix vectorization of insertelements with multiple uses.

SLP vectorizer should not consider in sertelements with multiple uses as
a part of high level build vector, it must be considered as
a terminating insertelement in the vector build, otherwise it may
produce incorrect code.

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

3 years ago[DebugInfo] Limit the number of values that may be referenced by a dbg.value
Stephen Tozer [Wed, 26 May 2021 14:27:57 +0000 (15:27 +0100)]
[DebugInfo] Limit the number of values that may be referenced by a dbg.value

Following the addition of salvaging dbg.values using DIArgLists to
reference multiple values, a case has been found where excessively large
DIArgLists are produced as a result of this salvaging, resulting in
large enough performance costs to effectively freeze the compiler.

This patch introduces an upper bound of 16 to the number of values that
may be salvaged into a dbg.value, to limit the impact of these extreme
cases to performance.

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

3 years ago[lldb] add LLDB_SKIP_DSYM option
Richard Howell [Wed, 26 May 2021 16:32:57 +0000 (09:32 -0700)]
[lldb] add LLDB_SKIP_DSYM option

Add an option to skip generating a dSYM when installing the LLDB framework on Darwin.

Reviewed By: smeenai

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

3 years ago[libunwind] Inform ASan that resumption is noreturn
Shoaib Meenai [Mon, 24 May 2021 03:41:57 +0000 (20:41 -0700)]
[libunwind] Inform ASan that resumption is noreturn

If you're building libunwind instrumented with ASan, `_Unwind_RaiseException`
will poison the stack and then transfer control in a manner which isn't
understood by ASan, so the stack will remain poisoned. This can cause
false positives, e.g. if you call an uninstrumented function (so it
doesn't re-poison the stack) after catching an exception. Add a call to
`__asan_handle_no_return` inside `__unw_resume` to get ASan to unpoison
the stack and avoid this.

`__unw_resume` seems like the appropriate place to make this call, since
it's used for resumption by all unwind implementations except SJLJ. SJLJ
uses `__builtin_longjmp` to handle resumption, which is already
recognized as noreturn (and therefore ASan adds the `__asan_handle_no_return`
call itself), so it doesn't need any special handling.

PR32434 is somewhat similar (in particular needing a component built
without ASan to trigger the bug), and rG781ef03e1012, the fix for that
bug, adds an interceptor for `_Unwind_RaiseException`. This interceptor
won't always be triggered though, e.g. if you statically link the
unwinder into libc++abi in a way that prevents interposing the unwinder
functions (e.g. marking the symbols as hidden, using `--exclude-libs`,
or using `-Bsymbolic`). rG53335d6d86d5 makes `__cxa_throw` call
`__asan_handle_no_return` explicitly, to similarly avoid relying on
interception.

Reviewed By: #libunwind, compnerd

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

3 years ago[lldb] Remove cache in get_demangled_name_without_arguments
Raphael Isemann [Wed, 26 May 2021 15:52:51 +0000 (17:52 +0200)]
[lldb] Remove cache in get_demangled_name_without_arguments

This function has a single-value caching based on function local static variables.

This causes two problems:

* There is no synchronization, so this function randomly returns the demangled
  name of other functions that are demangled at the same time.
* The 1-element cache is not very effective (the cache rate is around 0% when
  running the LLDB test suite that calls this function around 30k times).

I would propose just removing it.

To prevent anyone else the git archeology: the static result variables were
originally added as this returned a ConstString reference, but that has since
been changed so that this returns by value.

Reviewed By: #lldb, JDevlieghere, shafik

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

3 years ago[RISCV] Enable cross basic block aware vsetvli insertion
Craig Topper [Tue, 25 May 2021 23:28:34 +0000 (16:28 -0700)]
[RISCV] Enable cross basic block aware vsetvli insertion

This patch extends D102737 to allow VL/VTYPE changes to be taken
into account before adding an explicit vsetvli.

We do this by using a data flow analysis to propagate VL/VTYPE
information from predecessors until we've determined a value for
every value in the function.

We use this information to determine if a vsetvli needs to be
inserted before the first vector instruction the block.

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

3 years ago[AMDGPU][NFC] Remove non-existing function header
Sebastian Neubauer [Wed, 26 May 2021 16:20:33 +0000 (18:20 +0200)]
[AMDGPU][NFC] Remove non-existing function header

3 years ago[libomptarget][nfc][amdgpu] Remove atmi_status_t type
Jon Chesterfield [Wed, 26 May 2021 16:02:19 +0000 (17:02 +0100)]
[libomptarget][nfc][amdgpu] Remove atmi_status_t type

ATMI_STATUS_UNKNOWN was unused, deleted references to it.
Replaced ATMI_STATUS_{SUCCESS,ERROR} with HSA_STATUS_{SUCCESS,ERROR}
Replaced atmi_status_t with hsa_status_t

Otherwise no change. In particular, conversions between atmi_status_t and
hsa_status_t will now be conversions between hsa_status_t and itself.

Reviewed By: pdhaliwal

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

3 years ago[gn build] Port de9df3f5b952
LLVM GN Syncbot [Wed, 26 May 2021 15:57:01 +0000 (15:57 +0000)]
[gn build] Port de9df3f5b952

3 years ago[libc++][format] Adds availability macros for std::format.
Mark de Wever [Tue, 18 May 2021 18:00:22 +0000 (20:00 +0200)]
[libc++][format] Adds availability macros for std::format.

This prevents std::format to be available until there's an ABI stable
version. (This only impacts the Apple platform.)

Depends on D102703

Reviewed By: ldionne, #libc

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

3 years ago[mlir] Add `distributionTypes` to LinalgTilingOptions.
Alexander Belyaev [Wed, 26 May 2021 12:36:35 +0000 (14:36 +0200)]
[mlir] Add `distributionTypes` to LinalgTilingOptions.

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

3 years ago[libc++][NFC] Move basic_format_parse_context to its own header.
Mark de Wever [Sun, 25 Apr 2021 16:23:42 +0000 (18:23 +0200)]
[libc++][NFC] Move basic_format_parse_context to its own header.

This is a preparation to split the format header in smaller parts for the
upcoming patches.

Depends on D101723

Reviewed By: #libc, ldionne

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

3 years ago[gn build] Port 16342e39947b
LLVM GN Syncbot [Wed, 26 May 2021 15:45:57 +0000 (15:45 +0000)]
[gn build] Port 16342e39947b

3 years ago[libc++][NFC] Move format_error to its own header.
Mark de Wever [Sun, 25 Apr 2021 15:58:03 +0000 (17:58 +0200)]
[libc++][NFC] Move format_error to its own header.

Reviewed By: #libc, ldionne

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

3 years ago[mlir][openacc] Translate UpdateOp to LLVM IR
Valentin Clement [Wed, 26 May 2021 15:38:49 +0000 (11:38 -0400)]
[mlir][openacc] Translate UpdateOp to LLVM IR

Add translation to LLVM IR for the UpdateOp with host and device operands.
Translation is done with call using the runtime. This is done in a similar way as
D101504 and D102381.

Reviewed By: ftynse

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

3 years ago[unroll] Use value domain for symbolic execution based cost model
Philip Reames [Wed, 26 May 2021 15:40:01 +0000 (08:40 -0700)]
[unroll] Use value domain for symbolic execution based cost model

The current full unroll cost model does a symbolic evaluation of the loop up to a fixed limit. That symbolic evaluation currently simplifies to constants, but we can generalize to arbitrary Values using the InstructionSimplify infrastructure at very low cost.

By itself, this enables some simplifications, but it's mainly useful when combined with the branch simplification over in D102928.

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

3 years ago[libc++] Fix concepts tests with GCC
Louis Dionne [Wed, 26 May 2021 15:21:33 +0000 (11:21 -0400)]
[libc++] Fix concepts tests with GCC

3 years ago[SystemZ] Support i128 inline asm operands.
Jonas Paulsson [Mon, 19 Apr 2021 19:31:01 +0000 (21:31 +0200)]
[SystemZ] Support i128 inline asm operands.

Support virtual, physical and tied i128 register operands in inline assembly.

i128 is on SystemZ not really supported and is not a legal type and generally
such a value will be split into two i64 parts. There are however some
instructions that require a pair of two GPR64 registers contained in the GR128
bit reg class, which is untyped.

For inline assmebly operands, it proved to be very cumbersome to first follow
the general behavior of splitting an i128 operand into two parts and then
later rebuild the INLINEASM MI to have one GR128 register. Instead, some
minor common code changes were made to SelectionDAGBUilder to only create one
GR128 register part to begin with. In particular:

- getNumRegisters() now has an optional parameter "RegisterVT" which is
  passed by AddInlineAsmOperands() and GetRegistersForValue().

- The bitcasting in GetRegistersForValue is not performed if RegVT is
  Untyped.

- The RC for a tied use in AddInlineAsmOperands() is now computed either from
  the tied def (virtual register), or by getMinimalPhysRegClass() (physical
  register).

- InstrEmitter.cpp:EmitCopyFromReg() has been fixed so that the register
  class (DstRC) can also be computed for an illegal type.

In the SystemZ backend getNumRegisters(), splitValueIntoRegisterParts() and
joinRegisterPartsIntoValue() have been implemented to handle i128 operands.

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

Review: Ulrich Weigand

3 years ago[clangd] New ParsingCallback for semantics changes
Kadir Cetinkaya [Wed, 19 May 2021 11:45:44 +0000 (13:45 +0200)]
[clangd] New ParsingCallback for semantics changes

Previously notification of the Server about semantic happened strictly
before notification of the AST thread.
Hence a racy Server could make a request (like semantic tokens) after
the notification, with the assumption that it'll be served fresh
content. But it wasn't true if AST thread wasn't notified about the
change yet.

This change reverses the order of those notifications to prevent racy
interactions.

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

3 years ago[MCA] Add a test for PR50483. NFC
Andrea Di Biagio [Wed, 26 May 2021 14:38:45 +0000 (15:38 +0100)]
[MCA] Add a test for PR50483. NFC

3 years ago[SystemZ][z/OS] Enable the AllowAtInName attribute for the HLASM dialect
Anirudh Prasad [Wed, 26 May 2021 14:49:39 +0000 (10:49 -0400)]
[SystemZ][z/OS] Enable the AllowAtInName attribute for the HLASM dialect

- Currently, LLVM supports symbols of the name "token1@token2".
- "token2" is used to identify whether an appropriate symbol reference can be used for the symbol.
- Now, if the symbol reference couldn't be found, the AsmParser usually emits an error, unless the backend is configured to accept the "@" in a symbol name
- Thus, this patch aims to do that. It sets the `AllowAtInName` attribute in the SystemZ backend for the HLASM dialect.
- Setting this attribute ensures that, if a particular symbol reference is found, it uses that. If it doesn't, and there exists an "@" in the symbol name, it will use that instead of explicitly erroring out.

Reviewed By: uweigand

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

3 years ago[AMDGPU] Fix function pointer argument bug in AMDGPU Propagate Attributes pass.
jweightma [Wed, 26 May 2021 14:33:33 +0000 (16:33 +0200)]
[AMDGPU] Fix function pointer argument bug in AMDGPU Propagate Attributes pass.

This patch fixes a bug in the AMDGPU Propagate Attributes pass where a call
instruction with a function pointer argument is identified as a user of the
passed function, and illegally replaces the called function of the
instruction with the function argument.

For example, given functions f and g with appropriate types, the following
illegal transformation could occur without this fix:
call void @f(void ()* @g)
-->
call void @g(void ()* @g.1)

The solution introduced in this patch is to prevent the cloning and
substitution if the instruction's called function and the function which
might be cloned do not match.

Reviewed By: arsenm, madhur13490

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

3 years ago[SystemZ][z/OS] Validate symbol names for z/OS for printing without quotes
Anirudh Prasad [Wed, 26 May 2021 14:36:50 +0000 (10:36 -0400)]
[SystemZ][z/OS] Validate symbol names for z/OS for printing without quotes

- Currently, before printing a label in MCSymbol.cpp (MCSymbol::print), the current code "validates" the label that is to be printed.
- If it fails the validation step, then it prints the label within double quotes.
- However, the validation is provided as a virtual function in MCAsmInfo.h (i.e. isAcceptableChar() function). So we can override this for the AD_HLASM dialect in SystemZMCAsmInfo.cpp.

Reviewed By: uweigand

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

3 years ago[clang-cl] Add driver support for /std:c++20 and bump /std:c++latest (PR50465)
Hans Wennborg [Wed, 26 May 2021 09:30:03 +0000 (11:30 +0200)]
[clang-cl] Add driver support for /std:c++20 and bump /std:c++latest (PR50465)

VS 2019 16.11 (just released in Preview) is adding support for the
/std:c++20 option and bumping /std:c++latest to "post-c++20". This
updates clang-cl to match.

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

3 years ago[X86][AMX] Fix a bug on tile config.
Luo, Yuanke [Wed, 26 May 2021 09:41:49 +0000 (17:41 +0800)]
[X86][AMX] Fix a bug on tile config.

The previous code detect if a MBB is bottom block to determine if it is
a backedge of a loop. We should check latch block instead of bottom
block and we should check the header and the bottom block are in the
same loop.

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

3 years ago[CostModel][AArch64] Add tests for bitreverse. NFC.
Sjoerd Meijer [Wed, 26 May 2021 13:33:40 +0000 (14:33 +0100)]
[CostModel][AArch64] Add tests for bitreverse. NFC.

3 years ago[ARM] Extra test for reverted WLS memset. NFC
David Green [Wed, 26 May 2021 13:54:36 +0000 (14:54 +0100)]
[ARM] Extra test for reverted WLS memset. NFC

3 years ago[X86][SSE] Regenerate some tests to expose the rip relative vector/broadcast loads
Simon Pilgrim [Wed, 26 May 2021 13:50:47 +0000 (14:50 +0100)]
[X86][SSE] Regenerate some tests to expose the rip relative vector/broadcast loads

3 years ago[MCA][InOrderIssueStage] Fix LastWriteBackCycle computation.
Andrea Di Biagio [Wed, 26 May 2021 12:58:49 +0000 (13:58 +0100)]
[MCA][InOrderIssueStage] Fix LastWriteBackCycle computation.

Conservatively use the instruction latency to compute the last write-back cycle.
Before this patch, the last write cycle computation was incorrect for store
instructions that didn't declare any register writes.

3 years ago[SLP][NFC]Add a test for multiple uses of insertelement instruction,
Alexey Bataev [Wed, 26 May 2021 13:14:59 +0000 (06:14 -0700)]
[SLP][NFC]Add a test for multiple uses of insertelement instruction,
NFC.