platform/upstream/llvm.git
17 months ago[MachineOutliner] NFC: Add debug output to overlap pruning code
Jessica Paquette [Sat, 4 Feb 2023 01:38:56 +0000 (17:38 -0800)]
[MachineOutliner] NFC: Add debug output to overlap pruning code

This had no debug output. Since it was committed as NFC, it had no testcase.

The me of today was nerdsniped by the me of 6 years ago and decided that this
ought to have a testcase and some debug output.

17 months agoWalk back an overly-aggressive unXFAIL.
Adrian Prantl [Sat, 4 Feb 2023 01:22:32 +0000 (17:22 -0800)]
Walk back an overly-aggressive unXFAIL.

17 months agoSimplify looping over Operation users in SliceAnalysis (NFC)
Mehdi Amini [Sat, 4 Feb 2023 00:45:51 +0000 (16:45 -0800)]
Simplify looping over Operation users in SliceAnalysis (NFC)

17 months ago[MachineOutliner] NFC: Pull variable out from erase_if
Jessica Paquette [Sat, 4 Feb 2023 00:28:56 +0000 (16:28 -0800)]
[MachineOutliner] NFC: Pull variable out from erase_if

`Mapper.UnsignedVec.begin()` never changes throughout the call to
`erase_if`, so no need to recalculate it.

Also drop some redundant braces.

17 months ago[NFC] Remove redundant check for MBB being empty in outliner
Jessica Paquette [Sat, 4 Feb 2023 00:19:04 +0000 (16:19 -0800)]
[NFC] Remove redundant check for MBB being empty in outliner

If the size is < 2, then we just break anyway.

17 months ago[NFC] Remove unneccessary `llvm::` in MachineOutliner/SuffixTree
Jessica Paquette [Sat, 4 Feb 2023 00:17:35 +0000 (16:17 -0800)]
[NFC] Remove unneccessary `llvm::` in MachineOutliner/SuffixTree

We have `using llvm`, we don't need to say `llvm::`.

17 months ago[NFC] Use SmallVector/ArrayRef in MachineOutliner/SuffixTree for small types
Jessica Paquette [Sat, 4 Feb 2023 00:08:50 +0000 (16:08 -0800)]
[NFC] Use SmallVector/ArrayRef in MachineOutliner/SuffixTree for small types

The MachineOutliner + SuffixTree both used `std::vector` everywhere because I
didn't know any better at the time.

At least for small types, such as `unsigned` and iterators, I can't see any
particular reason to use std::vector over `SmallVector` here.

17 months agoRevert "[mlgo] Hook up the interactive runner to the mlgo-ed passes"
Mircea Trofin [Sat, 4 Feb 2023 00:34:31 +0000 (16:34 -0800)]
Revert "[mlgo] Hook up the interactive runner to the mlgo-ed passes"

This reverts commit a7354899d1a235a796b3a2ccb45f6596983c8672.

The way stdout/stderr get routed seems to work differently locally and
on the bots. Investigating.

17 months agoUnXFAIL test.
Adrian Prantl [Sat, 4 Feb 2023 00:24:42 +0000 (16:24 -0800)]
UnXFAIL test.

17 months ago[mlgo] Hook up the interactive runner to the mlgo-ed passes
Mircea Trofin [Wed, 1 Feb 2023 16:34:16 +0000 (08:34 -0800)]
[mlgo] Hook up the interactive runner to the mlgo-ed passes

This hooks up the interactive model runner to the passes that support
ml-based decisions. Because the interface to this runner is the exact
same as the one used during inference, we just reuse the exact same
setup we have for "release mode". This makes "release mode" a misnomer -
and that's something we needed to resolve sooner or later (e.g.
supporting more than one embedded model for the same problem was another
reason to drop that nomenclature). That will happen in a subsequent
change.

To use this evaluator, just enable the pass in (currently) "release"
mode, but also pass the base name for the 2 channel files via the
pass-specific flag.

The 2 files are the responsibilty of the hosting process. The added
tests use a minimal, toy such host, illustrating setup and
communication.

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

17 months agoUpgrade llgdb script for Python 3 compatibility.
Adrian Prantl [Sat, 4 Feb 2023 00:05:51 +0000 (16:05 -0800)]
Upgrade llgdb script for Python 3 compatibility.

17 months ago[mlir][sparse] implement bufferizableOpInterface for sparse_tensor.pack operation
Peiming Liu [Fri, 3 Feb 2023 17:31:32 +0000 (17:31 +0000)]
[mlir][sparse] implement bufferizableOpInterface for sparse_tensor.pack operation

Reviewed By: aartbik

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

17 months ago[mlir][sparse] implement lowering rules for sparse_tensor.pack operation
Peiming Liu [Fri, 3 Feb 2023 00:28:12 +0000 (00:28 +0000)]
[mlir][sparse] implement lowering rules for sparse_tensor.pack operation

Reviewed By: aartbik

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

17 months ago[Clang][SemaCXX][Coroutines] Fix misleading diagnostics with -Wunsequenced
Bruno Cardoso Lopes [Thu, 19 Jan 2023 03:17:15 +0000 (00:17 -0300)]
[Clang][SemaCXX][Coroutines] Fix misleading diagnostics with -Wunsequenced

D115187 exposed CoroutineSuspendExpr's operand, which makes some nodes to show
up twice during the traversal, confusing the check for unsequenced operations.
Skip the operand since it's already handled as part of the common expression
and get rid of the misleading warnings.

https://github.com/llvm/llvm-project/issues/56768

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

17 months ago[MachineOutliner][AArch64] NFC: Split MBBs into "outlinable ranges"
Jessica Paquette [Wed, 16 Feb 2022 20:50:31 +0000 (12:50 -0800)]
[MachineOutliner][AArch64] NFC: Split MBBs into "outlinable ranges"

Recommit with bug fixes + added testcases to the outliner. Also adds some
debug output.

We found a case in the Swift benchmarks where the MachineOutliner introduces
about a 20% compile time overhead in comparison to building without the
MachineOutliner.

The origin of this slowdown is that the benchmark has long blocks which incur
lots of LRU checks for lots of candidates.

Imagine a case like this:

```
bb:
  i1
  i2
  i3
  ...
  i123456
```

Now imagine that all of the outlining candidates appear early in the block, and
that something like, say, NZCV is defined at the end of the block.

The outliner has to check liveness for certain registers across all candidates,
because outlining from areas where those registers are used is unsafe at call
boundaries.

This is fairly wasteful because in the previously-described case, the outlining
candidates will never appear in an area where those registers are live.

To avoid this, precalculate areas where we will consider outlining from.
Anything outside of these areas is mapped to illegal and not included in the
outlining search space. This allows us to reduce the size of the outliner's
suffix tree as well, giving us a potential memory win.

By precalculating areas, we can also optimize other checks too, like whether
or not LR is live across an outlining candidate.

Doing all of this is about a 16% compile time improvement on the case.

This is likely useful for other targets (e.g. ARM + RISCV) as well, but for now,
this only implements the AArch64 path. The original "is the MBB safe" method
still works as before.

17 months ago[LLVM Utils] Update GitPython for CVE-2022-24439
John Demme [Fri, 3 Feb 2023 23:25:59 +0000 (23:25 +0000)]
[LLVM Utils] Update GitPython for CVE-2022-24439

GitPython 3.1.28 has a security vulnerability which was fixed in 3.1.30:
https://nvd.nist.gov/vuln/detail/CVE-2022-24439

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

17 months ago[libc] add printf auto float conversion
Michael Jones [Mon, 23 Jan 2023 23:11:22 +0000 (15:11 -0800)]
[libc] add printf auto float conversion

This patch adds the final conversion to printf, %g. This is a floating
point conversion that selects automatically between the %e and %f
formats based on the precision requested and resulting exponent.
Additionally it trims trailing zeroes. With this done all that's left
for finishing printf is adding long double support to the decimal float
conversions.

Reviewed By: sivachandra

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

17 months ago[clang][deps] Fix module context hash for constant strings
Ben Langmuir [Wed, 1 Feb 2023 01:56:48 +0000 (17:56 -0800)]
[clang][deps] Fix module context hash for constant strings

We were not hashing constant strings in the command-line, only ones that
required allocations. This was causing us to get the same hash across
different flag options.

rdar://101053855

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

17 months ago[Tooling/Inclusion] qualifed_name() => qualifiedName(), NFC
Haojian Wu [Fri, 3 Feb 2023 22:57:30 +0000 (23:57 +0100)]
[Tooling/Inclusion] qualifed_name() => qualifiedName(), NFC

17 months agoFix tsan problem where the per-thread shared_ptr() can be locked right before the...
Parker Schuh [Fri, 3 Feb 2023 22:53:00 +0000 (23:53 +0100)]
Fix tsan problem where the per-thread shared_ptr() can be locked right before the cache is destroyed causing a race where it tries to remove an entry from a destroyed cache.

This is a rollforward with fixes of https://reviews.llvm.org/rGbcc10817d5569172ee065015747e226280e9b698 (originally https://reviews.llvm.org/D142394). The original patch exposed an asan problem on aarch64, which is fixed by simply calling the context destructors properly.

Reviewed By: rriddle

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

17 months ago[libc++] Remove leftover LIBCXX_ENABLE_CLANG_TIDY in run-buildbot
Louis Dionne [Fri, 3 Feb 2023 22:34:55 +0000 (17:34 -0500)]
[libc++] Remove leftover LIBCXX_ENABLE_CLANG_TIDY in run-buildbot

17 months ago[mlir][sparse] introduce sparse_tensor.pack operation
Peiming Liu [Thu, 2 Feb 2023 23:34:28 +0000 (23:34 +0000)]
[mlir][sparse] introduce sparse_tensor.pack operation

Reviewed By: aartbik

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

17 months ago[libc][NFC] Print the GPU architectures to build and fix the CMake list
Joseph Huber [Fri, 3 Feb 2023 22:20:57 +0000 (16:20 -0600)]
[libc][NFC] Print the GPU architectures to build and fix the CMake list

Summary:
This list previously had empty members. Fix it and print out which
architectures we're building for as a status message.

17 months ago[libc++] Add a CI configuration to test Modules with LSV enabled
Louis Dionne [Thu, 2 Feb 2023 23:50:10 +0000 (18:50 -0500)]
[libc++] Add a CI configuration to test Modules with LSV enabled

Some clients use libc++ with modules and LSV (Local Submodule Visibility)
enabled, and we see frequent downstream breakage caused by that. Until
modules use LSV by default (which is apparently a desire), add a CI job
that tests this sub-configuration to avoid high cost downstream breakage.

For more information about LSV, see https://lists.llvm.org/pipermail/cfe-commits/Week-of-Mon-20150504/128395.html.

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

17 months ago[mlir][sparse] start using size_hint provided in allocation op
Aart Bik [Fri, 3 Feb 2023 21:08:46 +0000 (13:08 -0800)]
[mlir][sparse] start using size_hint provided in allocation op

Even though we introduced the size_hint, we never used it.
This is a very first step, using the hint during the codegen path.
Note that we can refine the heuristics. Also, we need to start
adding the hint on all allocation generated for reading tensors,
converting tensors, etc.

Reviewed By: Peiming, bixia

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

17 months ago[mlir] Canonicalize dynamic tensor.pad ops with constant inputs
George Petterson [Fri, 3 Feb 2023 21:43:45 +0000 (16:43 -0500)]
[mlir] Canonicalize dynamic tensor.pad ops with constant inputs

This commit adds a canonicalization pattern for tensor.pad which changes the output type to static at each dimension where the input shape is static and the high and low operands are constants. This corrects an issue arising in Torch-MLIR where pad ops would sometimes introduce dynamic shapes unnecessarily.

Reviewed By: raikonenfnu

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

17 months ago[RISCV] Remove side effects from vsetvli intrinsics.
Craig Topper [Fri, 3 Feb 2023 21:03:56 +0000 (13:03 -0800)]
[RISCV] Remove side effects from vsetvli intrinsics.

Delete the opt intrinsics since they are now identical.

I left the side effects due to user expectations about how these
interact with things like inline assembly or function calls. Or
that they wouldn't be hoisted. I think we should look at other
ways to address thoughs.

If I could, I'd rename them these somehow to distance them from
the vsetvli instruction. In some sense they only query the VL for
a particular SEW and LMUL. They don't guarantee a vsetvli
instruction will be emitted.

Fixes https://github.com/llvm/llvm-project/issues/59359

Reviewed By: rogfer01, kito-cheng

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

17 months agoUpdate llgdb to use python3.
Adrian Prantl [Fri, 3 Feb 2023 20:54:10 +0000 (12:54 -0800)]
Update llgdb to use python3.

17 months ago[RISCV] MC relaxation for out-of-range conditional branch.
Craig Topper [Fri, 3 Feb 2023 20:33:44 +0000 (12:33 -0800)]
[RISCV] MC relaxation for out-of-range conditional branch.

If .L1 is not within +-4KiB range,

convert

```
bge a0, a1, .L1
```

to

```
blt a0, a1, 8
j   .L1
```

In this patch, if the symbol is unresolved at assembly time, do not do
this relaxation.

Fix the bug reported in https://bugs.llvm.org/show_bug.cgi?id=47910

Co-authored-by: Hsiangkai Wang
Reviewed By: asb

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

17 months ago[lldb] Add a way to get a scripted process implementation from the SBAPI
Med Ismail Bennani [Fri, 3 Feb 2023 20:28:47 +0000 (12:28 -0800)]
[lldb] Add a way to get a scripted process implementation from the SBAPI

This patch introduces a new `GetScriptedImplementation` method to the
SBProcess class in the SBAPI. It will allow users of Scripted Processes to
fetch the scripted implementation object from to script interpreter to be
able to interact with it directly (without having to go through lldb).

This allows to user to perform action that are not specified in the
scripted process interface, like calling un-specified methods, but also
to enrich the implementation, by passing it complex objects.

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

Signed-off-by: Med Ismail Bennani <medismail.bennani@gmail.com>
17 months ago[libc][Obvious] Change `ninja llvmlibc` to `ninja libc` in the documentations.
Tue Ly [Fri, 3 Feb 2023 20:16:01 +0000 (15:16 -0500)]
[libc][Obvious] Change `ninja llvmlibc` to `ninja libc` in the documentations.

17 months ago[libc] Add -mavx2 together with -mfma to allow clang pre-12 to generate fma
Tue Ly [Fri, 3 Feb 2023 01:05:30 +0000 (20:05 -0500)]
[libc] Add -mavx2 together with -mfma to allow clang pre-12 to generate fma
instructions.

For clang-11, having -mfma without -mavx2 does not generate fma
instructions, causing a build bot to fail on log10_test.

Reviewed By: sivachandra

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

17 months ago[libc][bazel] Add bazel targets and unit tests for math functions.
Tue Ly [Fri, 3 Feb 2023 16:41:22 +0000 (11:41 -0500)]
[libc][bazel] Add bazel targets and unit tests for math functions.

Add bazel targets and unit tests for single precision exponential,
logarithm, trigonometric, inverse trig, hyperbolic, and inverse hyperbolic
functions.

Reviewed By: sivachandra

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

17 months ago[ORC] Make weak-comdat.ll testcase UNSUPPORTED on Darwin, rather than XFAIL.
Lang Hames [Fri, 3 Feb 2023 20:03:21 +0000 (12:03 -0800)]
[ORC] Make weak-comdat.ll testcase UNSUPPORTED on Darwin, rather than XFAIL.

17 months ago[Cloning] Pass blocks as ArrayRef to remapInstructions (NFC).
Florian Hahn [Fri, 3 Feb 2023 20:03:15 +0000 (20:03 +0000)]
[Cloning] Pass blocks as ArrayRef to remapInstructions (NFC).

Passing ArrayRef doesn't force users to construct a SmallVector to pass
blocks.

17 months ago[sanitizer] Undef _TIME_BITS along with _FILE_OFFSET_BITS on Linux
Khem Raj [Fri, 3 Feb 2023 19:48:35 +0000 (11:48 -0800)]
[sanitizer] Undef _TIME_BITS along with _FILE_OFFSET_BITS on Linux

On 32-bit glibc>=2.34 systems using 64bit time_t build fails because
_FILE_OFFSET_BITS is undefined here but _TIME_BITS is still set to 64

Fixes

```
/usr/include/features-time64.h:26:5: error: "_TIME_BITS=64 is allowed
 only with _FILE_OFFSET_BITS=64"
| #   error "_TIME_BITS=64 is allowed only with _FILE_OFFSET_BITS=64"
|     ^
| 1 error generated.
```

Reviewed By: thesamesam, MaskRay

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

17 months ago[InstCombine] fold shuffle of fabs
Sanjay Patel [Fri, 3 Feb 2023 19:19:55 +0000 (14:19 -0500)]
[InstCombine] fold shuffle of fabs

shuffle (fabs X), Mask --> fabs (shuffle X, Mask)
shuffle (fabs X), (fabs Y), Mask --> fabs (shuf X, Y, Mask)

https://alive2.llvm.org/ce/z/JH2nkf

This generalizes the existing fneg transforms to also work with fabs.

A likely follow-up would generalize this further to move any unary
intrinsic op.

17 months ago[Docs] Updated my Office Hours
Anastasia Stulova [Fri, 3 Feb 2023 19:10:18 +0000 (19:10 +0000)]
[Docs] Updated my Office Hours

17 months agoRevert "[AMDGPU] Modify adjustInliningThreshold to also consider the cost of passing...
Janek van Oirschot [Fri, 3 Feb 2023 19:09:17 +0000 (19:09 +0000)]
Revert "[AMDGPU] Modify adjustInliningThreshold to also consider the cost of passing function arguments through the stack"

This reverts commit 142c28ffa1323e9a8d53200a22c80d5d778e0d0f.

17 months ago[mlir][sparse] add some documentation to storage layout (NFC)
Aart Bik [Fri, 3 Feb 2023 17:55:51 +0000 (09:55 -0800)]
[mlir][sparse] add some documentation to storage layout (NFC)

in particular, the trailing COO optimization was not
desribed in the general layout description

Reviewed By: Peiming

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

17 months ago[ELF] Support quoted output section names
Fangrui Song [Fri, 3 Feb 2023 19:03:00 +0000 (11:03 -0800)]
[ELF] Support quoted output section names

Similar to e7a7ad134fe182aad190cb3ebc441164470e92f5 and
2bf06d9345caeb26520be8e830c092683bbdf0f7 for other linker script syntax.

Close https://github.com/llvm/llvm-project/issues/60496

17 months ago[mlir] Fix an unused variable warning
Kazu Hirata [Fri, 3 Feb 2023 18:52:35 +0000 (10:52 -0800)]
[mlir] Fix an unused variable warning

This patch fixes:

  mlir/lib/Dialect/Transform/Transforms/TransformInterpreterPassBase.cpp:248:14:
  error: unused variable 'root' [-Werror,-Wunused-variable]

17 months ago[AArch64] Unconditionally use DW_EH_PE_indirect|DW_EH_PE_pcrel personality/lsda/ttype...
Fangrui Song [Fri, 3 Feb 2023 18:41:04 +0000 (10:41 -0800)]
[AArch64] Unconditionally use DW_EH_PE_indirect|DW_EH_PE_pcrel personality/lsda/ttype encodings

For -fno-pic, without DW_EH_PE_indirect, the personality routine pointer in a
CIE needs an R_AARCH64_ABS64 relocation. In common configurations that
`__gcc_personality_v0` is defined in a shared object, this will lead to a
discouraged canonical PLT entry, or, if `ld.lld -z notext` (betwen D122459 and
D143136), a dynamic R_AARCH64_ABS64 relocation with an incorrect offset:
https://github.com/llvm/llvm-project/issues/60392

Since GCC uses DW_EH_PE_indirect for -fno-pic code (the behavior hasn't changed
since the initial port in 2012), let's follow suit by simplifying the code.
(
For tiny and small code models, we use DW_EH_PE_sdata8 instead of GCC's
DW_EH_PE_sdata4. This is a deliberate choice to support personality-.eh_frame
offset > 2GiB. This is necessary for small code model since "Max text segment
size < 2GiB" but it is unnecessary to make `-fno-pic -mcmodel={tiny,small}`
different: The scenarios that uses both -fno-pic and C++ exceptions have been
increasingly rare now, so there is little advantage optimizing for the little
size saving with code complexity.
)

Reviewed By: MatzeB

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

17 months ago[ELF] -z notext: avoid dynamic relocations in .eh_frame
Fangrui Song [Fri, 3 Feb 2023 18:27:33 +0000 (10:27 -0800)]
[ELF] -z notext: avoid dynamic relocations in .eh_frame

Fix https://github.com/llvm/llvm-project/issues/60392

```
// a.cc
void raise() { throw 42; }
bool foo() {
  try { raise(); } catch (int) { return true; }
  return false;
}
int main() { foo(); }
```

```
clang++ --target=x86_64-linux-gnu -fno-pic -mcmodel=large -no-pie -fuse-ld=lld -z notext a.cc -o a && ./a
clang++ --target=aarch64-linux-gnu -fno-pic -no-pie -fuse-ld=lld -Wl,--dynamic-linker=/usr/aarch64-linux-gnu/lib/ld-linux-aarch64.so.1 -Wl,-rpath=/usr/aarch64-linux-gnu/lib -z notext a.cc -o a && ./a
```
Both commands fail because we produce a dynamic relocation for
R_X86_64_64/R_AARCH64_ABS64 in .eh_frame which will be adjusted to a wrong
offset by `SectionBase::getOffset` after D122459.

Since GNU ld uses a canonical PLT entry instead of a dynamic relocation for
.eh_frame, we follow suit as well to avoid the issue.

Mips has an ABI issue (https://github.com/llvm/llvm-project/issues/5837) and we
don't implement GNU ld's DW_EH_PE_absptr conversion. mips64-eh-abs-reloc.s wants
a dynamic relocation, so keep the original behavior for EM_MIPS.

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

17 months agoRevert "[SelectionDAG] Add pcsections recursively on SDNode values"
Marco Elver [Fri, 3 Feb 2023 17:11:13 +0000 (18:11 +0100)]
Revert "[SelectionDAG] Add pcsections recursively on SDNode values"
Revert "[SelectionDAG] Add missing setValue calls in visitIntrinsicCall"

This reverts commit 0c64e1b68f36640ffe82fc90e6279c50617ad1cc.
This reverts commit 1142e6c7c795de7f80774325a07ed49bc95a48c9.

It spuriously added !pcsections where they shouldn't be. See added test
case in test/CodeGen/X86/pcsections.ll as an example. The reason is that
the SelectionDAG chains operations in a basic block as "operands"
pointing to preceding instructions. This resulted in setting the
metadata on _all_ instructions preceding the one that should have the
metadata.

Reverting for now because the semantics of !pcsections was completely
buggy now.

17 months agoFix tests commited in 450a461
ManuelJBrito [Fri, 3 Feb 2023 17:51:43 +0000 (17:51 +0000)]
Fix tests commited in 450a461

Remove alignment matching in tests to avoid ABI compatibility issues

17 months ago[NFC][TargetParser] Remove llvm/Support/AArch64TargetParser.h
Archibald Elliott [Fri, 3 Feb 2023 13:55:31 +0000 (13:55 +0000)]
[NFC][TargetParser] Remove llvm/Support/AArch64TargetParser.h

Removes the forwarding header `llvm/Support/AArch64TargetParser.h`.

I am proposing to do this for all the forwarding headers left after
rGf09cf34d00625e57dea5317a3ac0412c07292148 - for each header:
- Update all relevant in-tree includes
- Remove the forwarding Header

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

17 months ago[OpenMP][libomp] Fix CMake version symbol testing
Jonathan Peyton [Thu, 2 Feb 2023 17:18:36 +0000 (11:18 -0600)]
[OpenMP][libomp] Fix CMake version symbol testing

Do not check for version symbol support if the necessary linker flag is
not supported.

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

17 months agoRevert "[Clang] Implement Change scope of lambda trailing-return-type"
Jordan Rupprecht [Fri, 3 Feb 2023 16:49:34 +0000 (08:49 -0800)]
Revert "[Clang] Implement Change scope of lambda trailing-return-type"

This reverts commit d708a186b6a9b050d09558163dd353d9f738c82d (and typo fix e4bc9898ddbeb70bc49d713bbf863f050f21e03f). It causes a compilation error for this:

```
struct StringLiteral {
  template <int N>
  StringLiteral(const char (&array)[N])
      __attribute__((enable_if(N > 0 && N == __builtin_strlen(array) + 1,
                               "invalid string literal")));
};

struct Message {
  Message(StringLiteral);
};

void Func1() {
  auto x = Message("x");  // Note: this is fine

  // Note: "xx\0" to force a different type, StringLiteral<3>, otherwise this
  // successfully builds.
  auto y = [&](decltype(Message("xx"))) {};

  // ^ fails with: repro.cc:18:13: error: reference to local variable 'array'
  // declared in enclosing function 'StringLiteral::StringLiteral<3>'

  (void)x;
  (void)y;
}
```

More details posted to D124351.

17 months ago[NFC] Cosmetic change + remove irrelevant FIXME
Guillaume Chatelet [Fri, 3 Feb 2023 16:38:52 +0000 (16:38 +0000)]
[NFC] Cosmetic change + remove irrelevant FIXME

17 months ago[AMDGPU] GFX11: rename VALU pknorm instructions to pk_norm
Jay Foad [Fri, 3 Feb 2023 14:46:48 +0000 (14:46 +0000)]
[AMDGPU] GFX11: rename VALU pknorm instructions to pk_norm

GFX11 renames:
v_cvt_pknorm_i16_f32 to v_cvt_pk_norm_i16_f32
v_cvt_pknorm_u16_f32 to v_cvt_pk_norm_u16_f32

Accept the old name as an alias.

Fixes https://github.com/llvm/llvm-project/issues/60334

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

17 months ago[NFC] Migrate aarch64 alignment to Align
Guillaume Chatelet [Fri, 3 Feb 2023 16:28:56 +0000 (16:28 +0000)]
[NFC] Migrate aarch64 alignment to Align

17 months ago[AArch64][SVE2p1] Add IntrNoMem to int_aarch64_sve_psel intrinsic
David Sherwood [Fri, 3 Feb 2023 13:33:18 +0000 (13:33 +0000)]
[AArch64][SVE2p1] Add IntrNoMem to int_aarch64_sve_psel intrinsic

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

17 months ago[NFC] Remove dead code
Guillaume Chatelet [Fri, 3 Feb 2023 16:05:45 +0000 (16:05 +0000)]
[NFC] Remove dead code

17 months ago[include-mapping] Implement language separation in stdlib recognizer library
Viktoriia Bakalova [Fri, 3 Feb 2023 13:00:51 +0000 (14:00 +0100)]
[include-mapping] Implement language separation in stdlib recognizer library

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

17 months ago[MemProf] Add helper to access the back (last) call stack id
Teresa Johnson [Thu, 2 Feb 2023 15:01:16 +0000 (07:01 -0800)]
[MemProf] Add helper to access the back (last) call stack id

This is split out of D140908 as suggested.

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

17 months ago[clang][Interp] Support pointers in compound assignment operators
Timm Bäder [Tue, 3 Jan 2023 09:04:27 +0000 (10:04 +0100)]
[clang][Interp] Support pointers in compound assignment operators

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

17 months ago[NFC] Simplify logic in ConstantFold
Guillaume Chatelet [Fri, 3 Feb 2023 15:21:02 +0000 (15:21 +0000)]
[NFC] Simplify logic in ConstantFold

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

17 months ago[Orc] XFAIL test with Comdats on macOS
Jonas Hahnfeld [Fri, 3 Feb 2023 15:33:02 +0000 (16:33 +0100)]
[Orc] XFAIL test with Comdats on macOS

The bots report:
LLVM ERROR: MachO doesn't support COMDATs, 'f' cannot be lowered.

17 months ago[AMDGPU] Modify adjustInliningThreshold to also consider the cost of passing function...
Janek van Oirschot [Fri, 3 Feb 2023 15:23:29 +0000 (15:23 +0000)]
[AMDGPU] Modify adjustInliningThreshold to also consider the cost of passing function arguments through the stack

A regression from when new PM got enabled as default. Functions with a big number of instructions will elide getting inlined but do not consider the cost of passing arguments over stack if there are a lot of function arguments. This patch attempts to add a heuristic for AMDGPU's function calling convention that also considers function arguments passed through the stack.

Reviewed By: #amdgpu, arsenm

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

17 months ago[mlir][llvm] Use tablegen for enum conversion.
Tobias Gysi [Fri, 3 Feb 2023 15:20:30 +0000 (16:20 +0100)]
[mlir][llvm] Use tablegen for enum conversion.

The revision uses tablegen to convert multiple atomic and comparison
related enums automatically rather than using hand coded functions
in the import and export from and to LLVM IR.

The revision also adds additional binary operation cases to the
AtomicBinOp enum that have not been supported till now. It also
introduces the possibility to define unsupported enum cases that exist
only in LLVM IR and that are not imported into MLIR. These unsupported
cases are helpful to handle sentinel values such as BAD_BINOP that
LLVM commonly uses to terminate its enums.

Reviewed By: Dinistro

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

17 months agoRevert "[clang][Interp] Only generate disassembly in debug builds"
Timm Bäder [Fri, 3 Feb 2023 15:23:39 +0000 (16:23 +0100)]
Revert "[clang][Interp] Only generate disassembly in debug builds"

This reverts commit 60dcc70e48fa9814a4e0d5e12856bc88b7f927eb.

This breaks builders, e.g.
https://lab.llvm.org/buildbot/#/builders/36/builds/30036

17 months ago[Tooling/Inclusions] ensure the Mapping is inititalized in
Haojian Wu [Fri, 3 Feb 2023 15:08:06 +0000 (16:08 +0100)]
[Tooling/Inclusions] ensure the Mapping is inititalized in
Symbol/Header::all() calls

17 months ago[clang][Interp][NFCI] Handle DiscardResult for ExprWithCleanups
Timm Bäder [Thu, 22 Dec 2022 16:43:50 +0000 (17:43 +0100)]
[clang][Interp][NFCI] Handle DiscardResult for ExprWithCleanups

Just pop the pointer.

17 months ago[LoopVectorize][TTI] NFCI: Clarify enum for the tail folding style.
Sander de Smalen [Fri, 3 Feb 2023 09:38:45 +0000 (09:38 +0000)]
[LoopVectorize][TTI] NFCI: Clarify enum for the tail folding style.

This NFC (intended) patch has several small changes:
* It renames PredicationStyle to TailFoldingStyle.
* It renames TTI.emitActiveLaneMask() to TTI.getPreferredTailFoldingStyle()
* Simplifies some of its uses in the LoopVectorizer

Rationale: To my surprise PredicationStyle::None did not mean 'no
predication', but rather 'no active lane mask intrinsic', such that the
predicate is created using a splat + compare with stepvector. The enum is
also highly specific to tail folding, so it seems better to name this
around that feature, i.e. 'tail folding style'.

This also makes it more amenable to extend it to other tail folding styles,
such as the one added in D142109.

Reviewed By: david-arm

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

17 months ago[SDAG] fix miscompiles caused by using ValueTracking matchSelectPattern to create...
Sanjay Patel [Fri, 3 Feb 2023 14:31:31 +0000 (09:31 -0500)]
[SDAG] fix miscompiles caused by using ValueTracking matchSelectPattern to create FMINIMUM/FMAXIMUM

ValueTracking attempts to match compare+select patterns to FP min/max
operations, but it was created before the newer IEEE-754-2019
minimum/maximum ops were defined. Ie, matchSelectPattern() does not
account for the -0.0/+0.0 behavior that is specified in the newer
standard.

FMINIMUM/FMAXIMUM nodes were created to map to the newer standard:

/// FMINIMUM/FMAXIMUM - NaN-propagating minimum/maximum that also treat -0.0
/// as less than 0.0. While FMINNUM_IEEE/FMAXNUM_IEEE follow IEEE 754-2008
/// semantics, FMINIMUM/FMAXIMUM follow IEEE 754-2018 draft semantics.

We could adjust ValueTracking to deal with signed zero, but it seems like
a moot point given the divergent NaN behavior discussed in D143056, so just
delete this possibility to avoid bugs when converting IR to SDAG.

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

17 months ago[lldb] Enable arm64 target for entry values test
Felipe de Azevedo Piovezan [Tue, 31 Jan 2023 17:23:11 +0000 (12:23 -0500)]
[lldb] Enable arm64 target for entry values test

This test is supposed to work in arm64.

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

17 months ago[libc] Fix quotation marks in overlay mode instructions
David Spickett [Fri, 3 Feb 2023 10:22:35 +0000 (10:22 +0000)]
[libc] Fix quotation marks in overlay mode instructions

These were using ” ("right double quotation mark") instead of
the usual ". This means CMake took the value literally and you
got:
```
CMake Error at CMakeLists.txt:139 (MESSAGE):
  ”libc” isn't a known project:
  bolt;clang;clang-tools-extra;compiler-rt;cross-project-tests;libc;libclc;lld;lldb;mlir;openmp;polly;pstl;flang.
  Did you mean to enable it as a runtime in LLVM_ENABLE_RUNTIMES?
```
`="libc"` works fine.

Reviewed By: lntue

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

17 months ago[clang][Interp] Only generate disassembly in debug builds
Timm Bäder [Fri, 27 Jan 2023 08:14:31 +0000 (09:14 +0100)]
[clang][Interp] Only generate disassembly in debug builds

With the current set of opcodes, this saves 3460 lines in the generated
Opcodes.inc in release builds (-17%).

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

17 months ago[clang][Interp][NFC] Make VariableScope::getParent() const
Timm Bäder [Mon, 30 Jan 2023 08:09:22 +0000 (09:09 +0100)]
[clang][Interp][NFC] Make VariableScope::getParent() const

17 months ago[SanitizerBinaryMetadata] Treat constant globals and non-escaping addresses specially
Marco Elver [Fri, 3 Feb 2023 14:34:42 +0000 (15:34 +0100)]
[SanitizerBinaryMetadata] Treat constant globals and non-escaping addresses specially

For atomics metadata, we can make data race analysis more efficient by
entirely ignoring functions that include memory accesses but which only
access non-escaping (non-shared) and/or non-mutable memory. Such
functions will not be considered to be covered by "atomics" metadata,
resulting in the following benefits:

  1. reduces "covered" metadata; and
  2. allows data race analysis to skip such functions.

Reviewed By: dvyukov

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

17 months ago[InstCombine] add tests for shuffle-of-fabs; NFC
Sanjay Patel [Thu, 2 Feb 2023 21:16:48 +0000 (16:16 -0500)]
[InstCombine] add tests for shuffle-of-fabs; NFC

Adapted from the existing shuffle-of-fneg tests.

17 months ago[mlir] properly fix concurrent transform interpreter pass base
Alex Zinenko [Tue, 31 Jan 2023 09:37:09 +0000 (09:37 +0000)]
[mlir] properly fix concurrent transform interpreter pass base

The original implementation of the transform interpreter pass base was
cloning the entire transform IR in presence of PDL-related operations to
avoid concurrency issues when running the pass with the same transform
IR on multiple operations of the payload IR. The root cause of those
issues is the `transform.pdl_match` operation that was moving the PDL
pattern definition operation into a new module, consumed by the PDL
interpreter and leading to a race. Clone the pattern operation instead.
This avoids the race as well as the cost for transform IR that doesn't
use PDL.

Depends on D142729.

Reviewed By: nicolasvasilache

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

17 months ago[mlir] provide a base class for transform interpreter passes
Alex Zinenko [Fri, 27 Jan 2023 16:01:26 +0000 (16:01 +0000)]
[mlir] provide a base class for transform interpreter passes

The transform dialect infrastructure does not provide a default
interpreter pass and instead expects users to create their own to ensure
all relevant extensions and dependent dialects are loaded. Provide a
base class for implementing such passes that includes the additional
facilities for debugging and is aware of the multithreaded nature of
pass execution.

Reviewed By: pifon2a, nicolasvasilache

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

17 months ago[clang][Interp] Materializing primitive temporaries
Timm Bäder [Sat, 15 Oct 2022 12:40:23 +0000 (14:40 +0200)]
[clang][Interp] Materializing primitive temporaries

Implement MaterializeTemporaryExpr for primitive types.

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

17 months ago[flang][hlfir] Handle intrinsic subroutines
Jean Perier [Fri, 3 Feb 2023 14:02:26 +0000 (15:02 +0100)]
[flang][hlfir] Handle intrinsic subroutines

The code did not propagate the result optionality for subroutine.
Make the result of genIntrinsicRef optional.

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

17 months ago[clang] Change AMX macros to match names from GCC
Joe Loser [Wed, 1 Feb 2023 17:19:27 +0000 (10:19 -0700)]
[clang] Change AMX macros to match names from GCC

The current behavior for AMX macros is:

```
gcc -march=native -dM -E - < /dev/null | grep TILE

clang -march=native -dM -E - < /dev/null | grep TILE
```

which is not ideal.  Change `__AMXTILE__` and friends to `__AMX_TILE__` (i.e.
have an underscore in them).  This makes GCC and Clang agree on the naming of
these AMX macros to simplify downstream user code.

Fix this for `__AMXTILE__`, `__AMX_INT8__`, `__AMX_BF16__`, and `__AMX_FP16__`.

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

17 months ago[OpenMP][FIX] Do not overalign mapped structures
Johannes Doerfert [Fri, 3 Feb 2023 13:32:10 +0000 (07:32 -0600)]
[OpenMP][FIX] Do not overalign mapped structures

While we potentially need to align partially mapped structs more than
the first member, we do not need to align past the struct itself. This
prevents us from moving the base pointer past the struct beginning too.

See https://reviews.llvm.org/D142508 for a discussion.

Reviewed By: pavelkopyl, grokos, jhuber6

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

17 months agoRevert "[AArch64][CostModel]: Add costs for zero/sign extend."
Hassnaa Hamdi [Fri, 3 Feb 2023 13:45:00 +0000 (13:45 +0000)]
Revert "[AArch64][CostModel]: Add costs for zero/sign extend."

This reverts commit d65c3bf39aa49eda0f5a6bff02c9292895a37e26.

17 months ago[clang][Interp] Fix Pointer::toAPValue() for expressions
Timm Bäder [Mon, 16 Jan 2023 16:58:22 +0000 (17:58 +0100)]
[clang][Interp] Fix Pointer::toAPValue() for expressions

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

17 months ago[X86] Add some very basic test coverage for the few @llvm.vp.* intrinsics that correc...
Simon Pilgrim [Thu, 2 Feb 2023 17:14:56 +0000 (17:14 +0000)]
[X86] Add some very basic test coverage for the few @llvm.vp.* intrinsics that correctly expand

Inspired by Issue #60464 - wel can add/enable additional intrinsics when we add expansion support

17 months ago[mlir] Add nontemporal field to memref.load/store and convey to llvm.load/store
Guray Ozen [Fri, 3 Feb 2023 11:11:38 +0000 (12:11 +0100)]
[mlir] Add nontemporal field to memref.load/store and convey to llvm.load/store

`llvm.load` op has nonTemporal field which is missing for `memref.load` and `memref.store`. This revision first adds nonTemporal field to memref's load/store op, then it lowers the field to llvm.load/store ops.

Reviewed By: nicolasvasilache

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

17 months agoRevert unintended debug things :-(
Sam McCall [Fri, 3 Feb 2023 12:47:13 +0000 (13:47 +0100)]
Revert unintended debug things :-(

17 months ago[Tooling] Add stdlib::Symbol::all() and stdlib::Symbol::qualified_name()
Sam McCall [Tue, 24 Jan 2023 14:40:35 +0000 (15:40 +0100)]
[Tooling] Add stdlib::Symbol::all() and stdlib::Symbol::qualified_name()

These address some remaining reasons to #include StdSymbolMap.inc directly.

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

17 months ago[NFC] PHITransAddr refactoring - use range-based loops and standard algorithms
Sergey Kachkov [Thu, 2 Feb 2023 14:49:54 +0000 (17:49 +0300)]
[NFC] PHITransAddr refactoring - use range-based loops and standard algorithms

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

17 months ago[AArch64][SVE2p1] Add 2-way SVE2p1 dot product intrinsics
David Sherwood [Wed, 1 Feb 2023 13:48:48 +0000 (13:48 +0000)]
[AArch64][SVE2p1] Add 2-way SVE2p1 dot product intrinsics

This patch adds the LLVM IR intrinsics for the following:

* sdot (2-way, vectors + indexed)
* udot (2-way, vectors + indexed)
* fdot (vectors + indexed)

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

17 months agoAMDGPU: Add more tests to fneg modifier with casting tests
Matt Arsenault [Fri, 27 Jan 2023 14:11:55 +0000 (10:11 -0400)]
AMDGPU: Add more tests to fneg modifier with casting tests

17 months ago[flang] Avoid double finalization when intrinsic assignment is done in the runtime
Valentin Clement [Fri, 3 Feb 2023 11:21:59 +0000 (12:21 +0100)]
[flang] Avoid double finalization when intrinsic assignment is done in the runtime

genRecordAssignment is emitting code to call Assign in the runtime for some cases.
In these cases, the finalization is done by the runtime so we do not need to do it in
a separate cal to avoid multiple finalization..
Also refactor the code in Bridge so the actual finalization of allocatable
is done before any reallocation. We might need to push this into ReallocIfNeeded.
It is not clear if the allocatable lhs needs to be finalized in any cases or only if it is
reallocated.

Reviewed By: jeanPerier

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

17 months agoFix up tests committed in 57a6bb34729df30df18a133ee2083b3323a936dc
David Sherwood [Fri, 3 Feb 2023 11:00:35 +0000 (11:00 +0000)]
Fix up tests committed in 57a6bb34729df30df18a133ee2083b3323a936dc

I committed an older version of the patch without the test updates.
This patch uses the latest versions on
https://reviews.llvm.org/D142904

17 months ago[AArch64][SME2] Add multi-vector zip/uzp intrinsics
David Sherwood [Mon, 30 Jan 2023 16:10:22 +0000 (16:10 +0000)]
[AArch64][SME2] Add multi-vector zip/uzp intrinsics

This patch adds the LLVM IR intrinsics for the following:

* zip (2 and 4 vectors, 8 to 64-bit elements) - aarch64.sve.zip.*
* zip (2 and 4 vectors, 128-bit elements) - aarch64.sve.zipq.*
* uzp (2 and 4 vectors, 8 to 64-bit elements) - aarch64.sve.uzp.*
* uzp (2 and 4 vectors, 128-bit elements) - aarch64.sve.uzpq.*

I have created separate intrinsics for the 128-bit variants
in a similar way to what was done for int_aarch64_sme_readq_horiz.
This permits us to use any vector type (<vscale x 16 x i8>, etc.)
for the 128-bit versions.

I have also named the tests sve2p1-intrinsics-* because although
the instructions are added as part of the SME2 feature they only
operate on SVE vectors.

NOTE: These intrinsics are still in development and are subject to future changes.

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

17 months ago[MLIR] NFC: fully scope use FastMathFlag.
Christian Sigg [Fri, 3 Feb 2023 10:47:28 +0000 (11:47 +0100)]
[MLIR] NFC: fully scope use FastMathFlag.

Second instance.

17 months ago[AMDGPU] Make offset a 32-bit operand
Piotr Sobczak [Thu, 2 Feb 2023 12:37:46 +0000 (13:37 +0100)]
[AMDGPU] Make offset a 32-bit operand

Promote offset to 32-bit, similarily to what D142549 did for flat_offset.

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

17 months ago[NFC] Remove isSafeToSpeculativelyExecute checks for casts
Sergey Kachkov [Fri, 3 Feb 2023 10:26:30 +0000 (13:26 +0300)]
[NFC] Remove isSafeToSpeculativelyExecute checks for casts

isSafeToSpeculativelyExecute always return true for casts, so remove
this redundant checks.

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

17 months ago[gn build] Port 1e72920c8859
LLVM GN Syncbot [Fri, 3 Feb 2023 10:26:23 +0000 (10:26 +0000)]
[gn build] Port 1e72920c8859

17 months ago[Test] Add tests with narrow checks for SCEVLoopGuardRewriter
Max Kazantsev [Fri, 3 Feb 2023 10:21:29 +0000 (17:21 +0700)]
[Test] Add tests with narrow checks for SCEVLoopGuardRewriter

17 months ago[ORC] Drop Comdat when discarding IR symbol
Jonas Hahnfeld [Tue, 24 Jan 2023 09:54:55 +0000 (10:54 +0100)]
[ORC] Drop Comdat when discarding IR symbol

According to the IR verifier, "Declaration[s] may not be in a Comdat!"

This is a re-commit of 76b3f0b4d5a0b8c54147c4c73a30892bbca76467 with
updates to the test:
 * Force emission of the extra-module, to trigger the bug after D138264,
   by providing a second symbol @g, and making the comdat nodeduplicate.
   (Technically only one is needed, but two should be safer.)
 * Name the comdat $f to avoid failure on Windows:
   LLVM ERROR: Associative COMDAT symbol 'c' does not exist.

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

17 months ago[dsymutil] dsymutil produces broken lines info (probably) with LTO on mac
Alexey Lapshin [Mon, 30 Jan 2023 14:05:53 +0000 (15:05 +0100)]
[dsymutil] dsymutil produces broken lines info (probably) with LTO on mac

This patch fixes #60307 issue. The 8bb4451 introduces the possibility
to unite overlapped or adjacent address ranges to keep address ranges
in an unambiguous state. The AddressRangesMap is used to normalize
address ranges. The AddressRangesMap keeps address ranges and the value
of the relocated address. For intersected range, it creates a united
range that keeps the last inserted mapping value. The same for adjusted ranges.
While it is OK to use the last inserted mapping value for intersected ranges
(as there is no way how to resolve ambiguity) It is not OK to use the
last inserted value for adjacent address ranges. Currently, two following
address ranges are united into a single one:

{0,24,17e685c} {24,d8,55afe20} -> {0,d8,55afe20}

To avoid the problem, the AddressRangesMap should not unite adjacent address ranges
with different relocated addresses. Instead, it should leave adjacent address ranges
as separate ranges. So, the ranges should look like this:

{0,24,17e685c} {24,d8,55afe20}

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

17 months ago[llvm-objcopy] Fix strip-all-gnu test
Anton Sidorenko [Wed, 1 Feb 2023 15:58:24 +0000 (18:58 +0300)]
[llvm-objcopy] Fix strip-all-gnu test

Originally the test has a bug: in the input YAML `.symtab.dyn` section has a type
repeated twice with different values (SHT_SYMTAB and SHT_NOBITS). YAML parser
took SHT_NOBITS as a type of the section, so the test wasn't checking the desired
case.

This patch changes the test to verify that a section with SHT_SYMTAB type and
SHF_ALLOC flag is not removed when --strip-all-gnu flag present.

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

17 months ago[Test] Add signed counterparts of unsigned tests on SCEVLoopGuardRewriter
Max Kazantsev [Fri, 3 Feb 2023 10:06:37 +0000 (17:06 +0700)]
[Test] Add signed counterparts of unsigned tests on SCEVLoopGuardRewriter

17 months ago[Test] Add motivating test for umin support in SCEVLoopGuardRewriter
Max Kazantsev [Fri, 3 Feb 2023 09:00:24 +0000 (16:00 +0700)]
[Test] Add motivating test for umin support in SCEVLoopGuardRewriter

This test is equivalent to another one, where we can infer a
reasonable iteration count. The only difference is that umin and zext
here are swapped, and rewriter fails here.