platform/upstream/llvm.git
13 months ago[DAGCombiner][NFC] Factor out ByteProvider
Jeffrey Byrnes [Mon, 8 May 2023 18:43:15 +0000 (11:43 -0700)]
[DAGCombiner][NFC] Factor out ByteProvider

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

Change-Id: I3dc03787a3382c0c3fe6b869f869c2946f450874

13 months ago[libc++][NFC] Sort header list in header_information.py
Louis Dionne [Mon, 19 Jun 2023 15:53:53 +0000 (11:53 -0400)]
[libc++][NFC] Sort header list in header_information.py

13 months agoAMDGPU: Remove amdgpu-waves-per-eu support in old attribute pass
Matt Arsenault [Fri, 10 Dec 2021 23:48:16 +0000 (18:48 -0500)]
AMDGPU: Remove amdgpu-waves-per-eu support in old attribute pass

AMDGPUAttributor now handles this attribute with value merging, so
delete the old approach which could only apply this to functions which
did not set it, or cloned the function.

13 months agoclang: Add __builtin_elementwise_round
Matt Arsenault [Thu, 5 Jan 2023 19:50:11 +0000 (14:50 -0500)]
clang: Add __builtin_elementwise_round

13 months agoValueTracking: Handle compare to nan and -inf constants in fcmpToClassTest
Matt Arsenault [Wed, 24 May 2023 11:47:57 +0000 (12:47 +0100)]
ValueTracking: Handle compare to nan and -inf constants in fcmpToClassTest

This will help enable a cleanup of simplifyFCmpInst

13 months ago[Hexagon] Fix range checks for immediate operands
Krzysztof Parzyszek [Mon, 19 Jun 2023 15:18:05 +0000 (08:18 -0700)]
[Hexagon] Fix range checks for immediate operands

The output assembly (textual) contains the instruction
  r29 = add(r29,#4294967136)
The value 4294967136 is -160 when interpreted as a signed 32-bit
integer, so it fits in the range of the immediate operand without
a constant extender. The range check in HexagonInstrInfo was putting
the operand value into an int variable, reporting no need for an
extender. This resulted in a packet with 4 instructions, including
the "add". The corresponding check in HexagonMCInstrInfo was using
an int64_t variable, causing the range check to fail, and an extender
to be emitted when lowering to MCInst, resulting in a packet with
too many instructions.

13 months ago[NFC] Add libc++ formatting commit to the git-blame ignore file
Louis Dionne [Mon, 19 Jun 2023 15:21:15 +0000 (11:21 -0400)]
[NFC] Add libc++ formatting commit to the git-blame ignore file

13 months ago[libc++][NFC] Apply clang-format on large parts of the code base
Louis Dionne [Fri, 16 Jun 2023 13:49:04 +0000 (09:49 -0400)]
[libc++][NFC] Apply clang-format on large parts of the code base

This commit does a pass of clang-format over files in libc++ that
don't require major changes to conform to our style guide, or for
which we're not overly concerned about conflicting with in-flight
patches or hindering the git blame.

This roughly covers:
- benchmarks
- range algorithms
- concepts
- type traits

I did a manual verification of all the changes, and in particular I
applied clang-format on/off annotations in a few places where the
result was less readable after than before. This was not necessary
in a lot of places, however I did find that clang-format had pretty
bad taste when it comes to formatting concepts.

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

13 months ago[llvm-mca][TimelineView] Skip invalid entries when printing the json output.
Andrea Di Biagio [Mon, 19 Jun 2023 13:37:22 +0000 (14:37 +0100)]
[llvm-mca][TimelineView] Skip invalid entries when printing the json output.

13 months ago[CVP] Use simpler urem expansion when LHS >= RHS (PR63330)
Nikita Popov [Mon, 19 Jun 2023 15:14:37 +0000 (17:14 +0200)]
[CVP] Use simpler urem expansion when LHS >= RHS (PR63330)

In this case we don't need to emit the comparison and select.

This is papering over a weakness in CVP in that newly added
instructions don't get revisited. If they were revisited, the
icmp would be folded at that point.

However, even without that it makes sense to handle this explicitly,
because it avoids the need to insert freeze, which may prevent
further analysis of the operation by LVI.

Proofs: https://alive2.llvm.org/ce/z/quyBxp

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

13 months ago[CVP] Add additional tests for PR63330 (NFC)
Nikita Popov [Mon, 19 Jun 2023 15:04:49 +0000 (17:04 +0200)]
[CVP] Add additional tests for PR63330 (NFC)

13 months ago[BOLT] Implement composed relocations
Job Noorman [Mon, 19 Jun 2023 14:51:43 +0000 (16:51 +0200)]
[BOLT] Implement composed relocations

BOLT currently assumes (and asserts) that no two relocations can share
the same offset. Although this is true in most cases, ELF has a feature
called (not sure if this is an official term) composed relocations [1]
where multiple relocations at the same offset are combined to produce a
single value.

For example, to support label subtraction (a - b) on RISC-V, two
relocations are emitted at the same offset:
- R_RISCV_ADD32 a + 0
- R_RISCV_SUB32 b + 0
which, when combined, will produce the value of (a - b).

To support this in BOLT, first, RelocationSetType in BinarySection is
changed to be a multiset in order to allow it to store multiple
relocations at the same offset.

Next, Relocation::emit() is changed to receive an iterator pair of
relocations. In most cases, these will point to a single relocation in
which case its behavior is unaltered by this patch. For composed
relocations, they should point to all relocations at the same offset and
the following happens:
- A new method Relocation::createExpr() is called for every relocation.
  This method is essentially the same as the original emit() except that
  it returns the MCExpr without emitting it.
- The MCExprs of relocations i and i+1 are combined using the opcode
  returned by the new method Relocation::getComposeOpcodeFor().
- After combining all MCExprs, the last one is emitted.

Note that in the current patch, getComposeOpcodeFor() simply calls
llvm_unreachable() since none of the current targets use composed
relocations. This will change once the RISC-V target lands.

Finally, BinarySection::emitAsData() is updated to group relocations by
offset and emit them all at once.

Note that this means composed relocations are only supported in data
sections. Since this is the only place they seem to be used in RISC-V, I
believe it's reasonable to only support them there for now to avoid
further code complexity.

[1]: https://www.sco.com/developers/gabi/latest/ch4.reloc.html

Reviewed By: rafauler

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

13 months ago[libc++] "Implements" new SI prefixis.
Mark de Wever [Sat, 17 Jun 2023 13:50:50 +0000 (15:50 +0200)]
[libc++] "Implements" new SI prefixis.

Like yocto, zepto, zetta, and yotta. The new prefixes quecto, ronto,
ronna, and quetta can't be implemented in a intmax_t. So their
implementation does nothing.

Implements
- P2734R0 Adding the new SI prefixes

Depends on D153192

Reviewed By: #libc, philnik

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

13 months ago[libc++][regex] Removes operator!=.
Mark de Wever [Tue, 16 Aug 2022 06:15:51 +0000 (08:15 +0200)]
[libc++][regex] Removes operator!=.

Implements part of:
- P1614R2 The Mothership has Landed

Reviewed By: #libc, H-G-Hristov, philnik

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

13 months ago[libc++] Marks __cpp_lib_bitops as implemented.
Mark de Wever [Sun, 18 Jun 2023 10:35:44 +0000 (12:35 +0200)]
[libc++] Marks __cpp_lib_bitops as implemented.

This FTM was introduced in
  P0553R4 Bit operations

Which has been implemented since libc++ 9.

This was noticed while working on D153192.

Reviewed By: #libc, philnik

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

13 months ago[gn] port 6f2e92c10cebca5 better (lld/unittests)
Nico Weber [Mon, 19 Jun 2023 14:58:08 +0000 (10:58 -0400)]
[gn] port 6f2e92c10cebca5 better (lld/unittests)

lld/test/Unit/lit.site.cfg.py.in got cleaned up in the reland.

13 months ago[libc++] Update status after Varna meeting.
Mark de Wever [Sat, 17 Jun 2023 10:00:23 +0000 (12:00 +0200)]
[libc++] Update status after Varna meeting.

This updates:
- The status tables
- Feature test macros
- New headers for modules
The latter avoids forgetting about modules when implementing the feature
in a new header.

Reviewed By: #libc, philnik

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

13 months ago[mlir][Vector] Let VectorToLLVM operate on non-ModuleOp
Nicolas Vasilache [Mon, 19 Jun 2023 14:54:14 +0000 (14:54 +0000)]
[mlir][Vector] Let VectorToLLVM operate on non-ModuleOp

13 months agoRevert "[mlir][Vector] Let VectorToLLVM operate on non-ModuleOp"
Nicolas Vasilache [Mon, 19 Jun 2023 14:51:12 +0000 (14:51 +0000)]
Revert "[mlir][Vector] Let VectorToLLVM operate on non-ModuleOp"

This reverts commit aabea3d320c87561fe98b56c9f53cca1c6d18869.

That commit had mistakenly squashed spurious changes in.

13 months ago[gn] port c7d3c84449f4
Nico Weber [Mon, 19 Jun 2023 14:49:44 +0000 (10:49 -0400)]
[gn] port c7d3c84449f4

13 months ago[gn] port 3956a34e4fc6
Nico Weber [Mon, 19 Jun 2023 14:48:35 +0000 (10:48 -0400)]
[gn] port 3956a34e4fc6

13 months agoReland "[gn build] Port 2700da5fe28d (lld/unittests etc)"
Nico Weber [Mon, 19 Jun 2023 14:47:20 +0000 (10:47 -0400)]
Reland "[gn build] Port 2700da5fe28d (lld/unittests etc)"

The lld CL relanded in 6f2e92c10cebca5.

This reverts commit d76b37e6954ad0cf66f1f3c6a9c70328c45859f3.

13 months ago[AArch64] Add and expand the testing of fmin/fmax reduction. NFC
David Green [Mon, 19 Jun 2023 14:47:21 +0000 (15:47 +0100)]
[AArch64] Add and expand the testing of fmin/fmax reduction. NFC

For both CodeGen and CostModelling, this adds extran testing for the new
lvm.vector.reduce.fmaximum and lvm.vector.reduce.fminimum intrinsics, as well
as making sure there is test coverage for all the various cases.

13 months ago[AMDGPU] Fix operand class of v_ldexp_f16 src1
Joe Nash [Mon, 12 Jun 2023 21:21:29 +0000 (17:21 -0400)]
[AMDGPU] Fix operand class of v_ldexp_f16 src1

Patch eece6ba283bd changed the src1 type of v_ldexp_f16 from i32 to
i16. Though semantically src1 is an i16, the hardware reads this operand as an
f16 type, which primarily enables floating point inline constants.
Therefore this patch changes the operand type to f16. It maintains the
current behavior where floating point source modifiers are not allowed
on src1. SDWA sext modifier continues to be allowed.
The test asm and disasm test changes in eece6ba283bd are reverted,
because the floating point inline constants are allowed.

Reviewed By: arsenm

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

13 months ago[DebugMetadata][DwarfDebug] Support function-local types in lexical block scopes...
Vladislav Dzhidzhoev [Mon, 19 Jun 2023 14:42:05 +0000 (16:42 +0200)]
[DebugMetadata][DwarfDebug] Support function-local types in lexical block scopes (4/7)

RFC https://discourse.llvm.org/t/rfc-dwarfdebug-fix-and-improve-handling-imported-entities-types-and-static-local-in-subprogram-and-lexical-block-scopes/68544

Similar to imported declarations, the patch tracks function-local types in
DISubprogram's 'retainedNodes' field. DwarfDebug is adjusted in accordance with
the aforementioned metadata change and provided a support of function-local
types scoped within a lexical block.

The patch assumes that DICompileUnit's 'enums field' no longer tracks local
types and DwarfDebug would assert if any locally-scoped types get placed there.

Authored-by: Kristina Bessonova <kbessonova@accesssoftek.com>
Differential Revision: https://reviews.llvm.org/D144006

Depends on D144005

13 months ago[clang][Serialization][RISCV] Increase the number of reserved predefined type IDs
Roger Ferrer Ibanez [Mon, 19 Jun 2023 14:37:46 +0000 (14:37 +0000)]
[clang][Serialization][RISCV] Increase the number of reserved predefined type IDs

In D152070 we added many new intrinsic types required for the RISC-V
Vector Extension.

This was crashing when loading the AST as those types are intrinsically
added to the AST (they don't come from the disk).

The total number required now by clang exceeds 400 so increasing the
value to 500 solves the problem. This value was already increased in
D92715 but I assume this has some impact on the on-disk format.

Also add a static assert to avoid this happening again in the future.

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

13 months ago[LSR] Add test for for issue leading to revert of abfeda5af329b5.
Florian Hahn [Mon, 19 Jun 2023 14:35:48 +0000 (15:35 +0100)]
[LSR] Add test for for issue leading to revert of abfeda5af329b5.

Add unit test triggering an assertion with abfeda5af329b5.

13 months ago[mlir][NVGPU] NFC - Add a more convenient C++ builder for nvgpu::MmaSyncOp
Nicolas Vasilache [Mon, 19 Jun 2023 13:33:30 +0000 (13:33 +0000)]
[mlir][NVGPU] NFC - Add a more convenient C++ builder for nvgpu::MmaSyncOp

13 months ago[mlir][Vector] Let VectorToLLVM operate on non-ModuleOp
Nicolas Vasilache [Mon, 19 Jun 2023 13:26:00 +0000 (13:26 +0000)]
[mlir][Vector] Let VectorToLLVM operate on non-ModuleOp

Restriction to ModuleOp is ancient and unnecessarily restrictive.

13 months ago[libc++] Move non operator new definitions outside of new.cpp
Louis Dionne [Wed, 14 Jun 2023 22:36:37 +0000 (15:36 -0700)]
[libc++] Move non operator new definitions outside of new.cpp

This makes it such that new.cpp contains only the definitions of
operator new and operator delete, like its libc++abi counterpart.

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

13 months ago[CVP] Don't freeze value if guaranteed non-undef
Nikita Popov [Mon, 19 Jun 2023 13:41:39 +0000 (15:41 +0200)]
[CVP] Don't freeze value if guaranteed non-undef

Avoid inserting the freeze if not necessary, as this allows LVI
to continue reasoning about the expression.

13 months ago[CVP] Add test for PR63330 (NFC)
Nikita Popov [Mon, 19 Jun 2023 13:38:35 +0000 (15:38 +0200)]
[CVP] Add test for PR63330 (NFC)

13 months ago[FuncSpec] Promote stack values before specialization.
Alexandros Lamprineas [Mon, 19 Jun 2023 10:08:03 +0000 (11:08 +0100)]
[FuncSpec] Promote stack values before specialization.

After each iteration of the function specializer, constant stack values
are promoted to constant globals in order to enable recursive function
specialization. This should also be done once before running the
specializer. Enables specialization of _QMbrute_forcePdigits_2 from
SPEC2017:548.exchange2_r.

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

13 months ago[OpenMP] Implement printing TDGs to dot files
Adrian Munera [Thu, 15 Jun 2023 19:27:01 +0000 (14:27 -0500)]
[OpenMP] Implement printing TDGs to dot files

This patch implements the "__kmp_print_tdg_dot" function, that prints a task dependency graph into a dot file containing the tasks and their dependencies.

It is activated through a new environment variable "KMP_TDG_DOT"

Reviewed By: tianshilei1992

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

13 months ago[BBUtils] Don't add 'then' block to a loop if it's terminated with unreachable
Dmitry Makogon [Thu, 8 Jun 2023 11:56:18 +0000 (18:56 +0700)]
[BBUtils] Don't add 'then' block to a loop if it's terminated with unreachable

SplitBlockAndInsertIfThen utility creates two new blocks,
they're called ThenBlock and Tail (true and false destinations of a conditional
branch correspondingly). The function has a bool parameter Unreachable,
and if it's set, then ThenBlock is terminated with an unreachable.
At the end of the function the new blocks are added to the loop of the split
block. However, in case ThenBlock is terminated with an unreachable,
it cannot belong to any loop.

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

13 months ago[mlir] Add support for LLVMIR comdat operation
David Truby [Fri, 16 Jun 2023 11:45:54 +0000 (12:45 +0100)]
[mlir] Add support for LLVMIR comdat operation

The LLVM comdat operation specifies how to deduplicate globals with the
same key in two different object files. This is necessary on Windows
where e.g. two object files with linkonce globals will not link unless
a comdat for those globals is specified. It is also supported in the ELF
format.

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

13 months ago[RISCV] Add support for XCVbitmanip extension in CV32E40P
melonedo [Wed, 14 Jun 2023 13:42:57 +0000 (21:42 +0800)]
[RISCV] Add support for XCVbitmanip extension in CV32E40P

Implement XCVbitmanip intrinsics for CV32E40P according to the specification.

This commit is part of a patch-set to upstream the 7 vendor specific extensions of CV32E40P.

Contributors: @CharKeaney, @jeremybennett, @lewis-revill, @liaolucy, @simoncook, @xmj.

Spec: https://github.com/openhwgroup/cv32e40p/blob/62bec66b36182215e18c9cf10f723567e23878e9/docs/source/instruction_set_extensions.rst

Reviewed By: craig.topper

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

13 months ago[libc++] Split sources for <filesystem>
Louis Dionne [Mon, 12 Jun 2023 17:43:55 +0000 (10:43 -0700)]
[libc++] Split sources for <filesystem>

The operations.cpp file contained the implementation of a ton of
functionality unrelated to just the filesystem operations, and
filesystem_common.h contained a lot of unrelated functionality as well.

Splitting this up into more files will make it possible in the future
to support parts of <filesystem> (e.g. path) on systems where there is
no notion of a filesystem.

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

13 months ago[libc++][NFC] Move several .fail.cpp tests to .verify.cpp
Louis Dionne [Fri, 16 Jun 2023 15:11:56 +0000 (11:11 -0400)]
[libc++][NFC] Move several .fail.cpp tests to .verify.cpp

A few tests were also straightforward to translate to SFINAE tests
instead, so in a few cases I did that and removed the .fail.cpp test
entirely.

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

13 months ago[libc++][NFC] Rename __lower_bound_impl to __lower_bound
Louis Dionne [Fri, 16 Jun 2023 13:52:23 +0000 (09:52 -0400)]
[libc++][NFC] Rename __lower_bound_impl to __lower_bound

For consistency with other algorithms.

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

13 months agoclang/HIP: Remove __llvm_amdgcn_* wrapper hacks
Matt Arsenault [Tue, 22 Nov 2022 16:24:09 +0000 (11:24 -0500)]
clang/HIP: Remove __llvm_amdgcn_* wrapper hacks

These are leftover hacks from using asm declaratios to access
intrinsics.

13 months agoHIP: Directly call isfinite builtins
Matt Arsenault [Sun, 20 Nov 2022 16:49:35 +0000 (08:49 -0800)]
HIP: Directly call isfinite builtins

13 months ago[BasicAA] Add test for PR63266 (NFC)
Nikita Popov [Mon, 19 Jun 2023 12:40:33 +0000 (14:40 +0200)]
[BasicAA] Add test for PR63266 (NFC)

13 months ago[MLIR][OpenMP] Refactoring createTargetData in OMPIRBuilder
Akash Banerjee [Mon, 19 Jun 2023 11:46:15 +0000 (12:46 +0100)]
[MLIR][OpenMP] Refactoring createTargetData in OMPIRBuilder

Key changes:
  - Refactor the createTargetData function to make use of the emitOffloadingArrays and emitOffloadingArraysArgument functions to generate code.
  - Added a new emitIfClause helper function to allow handling if clauses in a similar fashion to Clang.
  - Updated the MLIR side of code to account for changes to createTargetData.

Depends on D149872

Reviewed By: jdoerfert

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

13 months ago[lldb][AArch64] Add thread local storage tpidr register
David Spickett [Mon, 19 Jun 2023 10:52:06 +0000 (11:52 +0100)]
[lldb][AArch64] Add thread local storage tpidr register

This register is used as the pointer to the current thread
local storage block and is read from NT_ARM_TLS on Linux.

Though tpidr will be present on all AArch64 Linux, I am soon
going to add a second register tpidr2 to this set.

tpidr is only present when SME is implemented, therefore the
NT_ARM_TLS set will change size. This is why I've added this
as a dynamic register set to save changes later.

Reviewed By: omjavaid

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

13 months agoRe-land [LLD] Allow usage of LLD as a library
Alexandre Ganea [Mon, 19 Jun 2023 11:32:34 +0000 (07:32 -0400)]
Re-land [LLD] Allow usage of LLD as a library

This reverts commit aa495214b39d475bab24b468de7a7c676ce9e366.

As discussed in https://github.com/llvm/llvm-project/issues/53475 this patch
allows for using LLD-as-a-lib. It also lets clients link only the drivers that
they want (see unit tests).

This also adds the unit test infra as in the other LLVM projects. Among the
test coverage, I've added the original issue from @krzysz00, see:
https://github.com/ROCmSoftwarePlatform/D108850-lld-bug-reproduction

Important note: this doesn't allow (yet) linking in parallel. This will come a
bit later hopefully, in subsequent patches, for COFF at least.

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

13 months agoEmit MLIR trampoline wrapper function with LLVM private linkage
Mehdi Amini [Mon, 19 Jun 2023 09:58:49 +0000 (11:58 +0200)]
Emit MLIR trampoline wrapper function with LLVM private linkage

The wrapper, as most of compiler-generated functions, are intended to serve the
IR for the current module. The safest linkage is to keep these private to avoid
any possible collision with other modules.

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

13 months agoRemove extra closing `)` from MLIR --view-op-graph GraphViz emission
Mehdi Amini [Mon, 19 Jun 2023 09:23:50 +0000 (11:23 +0200)]
Remove extra closing `)` from MLIR --view-op-graph GraphViz emission

This was a spurious closing parenthese.

13 months ago[SCCP] Fix conversion of range to constant for vectors (PR63380)
Nikita Popov [Mon, 19 Jun 2023 10:27:46 +0000 (12:27 +0200)]
[SCCP] Fix conversion of range to constant for vectors (PR63380)

The ConstantRange specifies the range of the scalar elements in the
vector. When converting into a Constant, we need to create a vector
splat with the correct type. For that purpose, pass in the expected
type for the constant.

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

13 months agolldb: do more than 1 kilobyte at a time to vastly increase binary sync speed
Russell Greene [Mon, 19 Jun 2023 09:59:20 +0000 (09:59 +0000)]
lldb: do more than 1 kilobyte at a time to vastly increase binary sync speed

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

I setup a simple test with a large .so (~100MiB) that was only present on the target machine
but not present on the local machine, and ran a lldb server on the target and connectd to it.

LLDB properly downloads the file from the remote, but it does so at a very slow speed, even over a hardwired 1Gbps connection!

Increasing the buffer size for downloading these helps quite a bit.

Test setup:

```
$ cat gen.py
print('const char* hugeglobal = ')

for _ in range(1000*500):
    print('  "' + '1234'*50 + '"')

print(';')
print('const char* mystring() { return hugeglobal; }')
$ gen.py > huge.c
$ mkdir libdir
$ gcc -fPIC huge.c -Wl,-soname,libhuge.so -o libdir/libhuge.so -shared
$ cat test.c
#include <string.h>
#include <stdio.h>
extern const char* mystring();
int main() {
        printf("%d\n", strlen(mystring()));
}
$ gcc test.c -L libdir -l huge -Wl,-rpath='$ORIGIN' -o test
$ rsync -a libdir remote:~/
$ ssh remote bash -c "cd ~/libdir && /llvm/buildr/bin/lldb-server platform --server --listen '*:1234'"
```

in another terminal

```
$ rm -rf ~/.lldb # clear cache
$ cat connect.lldb
platform select remote-linux
platform connect connect://10.0.0.14:1234
file test
b main
r
image list
c
q
$ time /llvm/buildr/bin/lldb --source connect.lldb
```

Times with various buffer sizes:

1kiB (current): ~22s
8kiB: ~8s
16kiB: ~4s
32kiB: ~3.5s
64kiB: ~2.8s
128kiB: ~2.6s
256kiB: ~2.1s
512kiB: ~2.1s
1MiB: ~2.1s
2MiB: ~2.1s

I choose 512kiB from this list as it seems to be the place where the returns start diminishing and still isn't that much memory

My  understanding of how this makes such a difference is ReadFile issues a request for each call, and larger buffer means less round trip times. The "ideal" situation is ReadFile() being async and being able to issue multiple of these, but that is much more work for probably little gains.

NOTE: this is my first contribution, so wasn't sure who to choose as a reviewer. Greg Clayton seems to be the most appropriate of those in CODE_OWNERS.txt

Reviewed By: clayborg, jasonmolenda

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

13 months ago[FuncSpec] Add Freeze and CallBase to the InstCostVisitor.
Alexandros Lamprineas [Mon, 19 Jun 2023 09:45:42 +0000 (10:45 +0100)]
[FuncSpec] Add Freeze and CallBase to the InstCostVisitor.

Allows constant folding of such instructions when estimating user bonus.

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

13 months ago[InstSimplify] Fold icmp of uadd.sat/usub.sat (PR63381)
Nikita Popov [Mon, 19 Jun 2023 09:42:21 +0000 (11:42 +0200)]
[InstSimplify] Fold icmp of uadd.sat/usub.sat (PR63381)

Fold uadd.sat(X, Y) uge X and usub.sat(X, Y) ule X to true.

Proof: https://alive2.llvm.org/ce/z/596m9X

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

13 months ago[InstSimplify] Add test for icmp of uadd.sat/usub.sat (NFC)
Nikita Popov [Mon, 19 Jun 2023 09:29:46 +0000 (11:29 +0200)]
[InstSimplify] Add test for icmp of uadd.sat/usub.sat (NFC)

13 months ago[flang][hlfir] Add hlfir.count intrinsic
Jacob Crawley [Mon, 12 Jun 2023 12:52:47 +0000 (12:52 +0000)]
[flang][hlfir] Add hlfir.count intrinsic

Adds a new HLFIR operation for the COUNT intrinsic according to
the design set out in flang/docs/HighLevel.md. This patch includes all
the necessary changes to create a new HLFIR operation and lower it into
the fir runtime call.

Author was @jacob-crawley. Minor adjustments by @tblah

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

13 months ago[flang] don't allow conversions between logical and floating point
Tom Eccles [Wed, 14 Jun 2023 16:23:40 +0000 (16:23 +0000)]
[flang] don't allow conversions between logical and floating point

Codegen only supports conversions between logicals and integers. The
verifier should reflect this.

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

13 months ago[flang][hlfir] Fix multiple return declaration type
Tom Eccles [Wed, 14 Jun 2023 13:23:00 +0000 (13:23 +0000)]
[flang][hlfir] Fix multiple return declaration type

When the ENTRY statement is used, the same source can return different
types depending on the entry point. These different return values are
storage associated (share the same storage). Previously, this led to the
declaration of the results to all have the largest type. This patch adds
a convert between the stack allocation and the declaration so that the
hlfir.decl gets the right type.

I haven't managed to generate code where this convert converted a
reference to an allocation for a smaller type into an allocation for a
larger one, but I have added an assert just in case.

This is a different solution to https://reviews.llvm.org/D152725, see
discussion there.

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

13 months ago[Test] Add test for PR62430 showing bug in SCEV mul expression creation (NFC)
Dmitry Makogon [Mon, 19 Jun 2023 08:49:47 +0000 (15:49 +0700)]
[Test] Add test for PR62430 showing bug in SCEV mul expression creation (NFC)

13 months ago[libc++][ranges] Mark `views::stride` in progress
Hristo Hristov [Mon, 19 Jun 2023 08:45:58 +0000 (11:45 +0300)]
[libc++][ranges] Mark `views::stride` in progress

13 months ago[FuncSpec][NFC] Improve the unittest coverage.
Alexandros Lamprineas [Sun, 18 Jun 2023 17:51:45 +0000 (18:51 +0100)]
[FuncSpec][NFC] Improve the unittest coverage.

The specialization bonus is zero in some unittests because the basic blocks
containing the users of the constant arguments are executed less frequently
than the entry block. Sinking them into loops solves that.

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

13 months ago[CodeGenPrepare] Fix for using outdated/corrupt LoopInfo
Momchil Velikov [Mon, 19 Jun 2023 08:11:20 +0000 (09:11 +0100)]
[CodeGenPrepare] Fix for using outdated/corrupt LoopInfo

Some transformation in CodeGenPrepare pass may create and/or delete
basic block, but they don't update the LoopInfo, so the LoopInfo may
end up containing dangling pointers and sometimes reused basic blocks,
which leads to "interesting" non-deterministic behaviour.

These transformations do not seem to alter the loop structure of the
function, and updating the loop info is quite straighforward.

Reviewed By: efriedma

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

Change-Id: If8ab3905749ea6be94fbbacd54c5cfab5bc1fba1

13 months ago[clang][dataflow] Create `Value`s for integer literals.
Martin Braenne [Thu, 15 Jun 2023 19:07:05 +0000 (19:07 +0000)]
[clang][dataflow] Create `Value`s for integer literals.

This patch includes a test that fails without the fix.

I discovered that we weren't creating `Value`s for integer literals when, in a
different patch, I tried to overwrite the value of a struct field with a literal
for the purposes of a test and was surprised to find that the struct compared
the same before and after the assignment.

This functionality therefore seems useful at least for tests, but is probably
also useful for actual analysis of code.

Reviewed By: ymandel, xazax.hun, gribozavr2

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

13 months ago[libc] Disable atomic optimizations for `libc` AMDGPU builds
Joseph Huber [Mon, 19 Jun 2023 08:25:37 +0000 (03:25 -0500)]
[libc] Disable atomic optimizations for `libc` AMDGPU builds

Recently the AMDGPU backend automatically enables a pass to optimize
atomics. This results in the LTO build taking about 10x longer in all
cases. For now we disable this by default as was the case before the
patch in D152649.

Reviewed By: lntue

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

13 months ago[mlir][ExecutionEngine] Only load JITDyLibs without init/destroy funcs.
Ingo Müller [Mon, 19 Jun 2023 07:15:01 +0000 (07:15 +0000)]
[mlir][ExecutionEngine] Only load JITDyLibs without init/destroy funcs.

In https://reviews.llvm.org/D153029, I moved the loading/unloading
mechanisms of shared libraries from the JIT runner to the execution
engine in order to make that mechanism available in the latter
(including its Python bindings). However, I realized that I introduced a
small change in semantic: previously, the JIT runner checked for the
presence of init/destroy functions and only loaded the library as
JITDyLib if they were not present. After I moved the code, all libraries
were loaded as JITDyLib, even if they registered their symbols
explicitly in their init function. I am not sure if this is really a
problem but (1) the previous behavior was different and (2) I guess it
could cause a problem if some symbols are exported through the init
function *and*  have public visibility. This patch reestablishes the
original behaviour in the new place of the code.

Reviewed By: mehdi_amini

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

13 months ago[Bazel][mlir] Fix layering check after 11db162db07d6083b79f4724e649a8c2c69913e1
Christian Sigg [Mon, 19 Jun 2023 07:26:17 +0000 (09:26 +0200)]
[Bazel][mlir] Fix layering check after 11db162db07d6083b79f4724e649a8c2c69913e1

13 months ago[clang-tidy] Reserved-identifier: Improved AllowedIdentifiers option to support regul...
Felix [Mon, 19 Jun 2023 05:54:08 +0000 (05:54 +0000)]
[clang-tidy] Reserved-identifier: Improved AllowedIdentifiers option to support regular expressions

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

Reviewed By: PiotrZSL

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

13 months ago[X86][AMX] Let Store not be removed if combineCastStore failed
Bing1 Yu [Mon, 19 Jun 2023 07:07:36 +0000 (15:07 +0800)]
[X86][AMX] Let Store not be removed if combineCastStore failed

Reviewed By: LuoYuanke

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

13 months ago[mlir][transform] SequenceOp: Top-level operations can be used as matchers
Matthias Springer [Mon, 19 Jun 2023 07:04:53 +0000 (09:04 +0200)]
[mlir][transform] SequenceOp: Top-level operations can be used as matchers

As a convenience to the user, top-level sequence ops can optionally be used as matchers: the op type is specified by the type of the block argument.

This is similar to how pass pipeline targets can be specified on the command line (`-pass-pipeline='builtin.module(func.func(...))`).

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

13 months ago[mlir][transform] ApplyPatternsOp: Add check to prevent modifying the transform IR
Matthias Springer [Mon, 19 Jun 2023 06:56:49 +0000 (08:56 +0200)]
[mlir][transform] ApplyPatternsOp: Add check to prevent modifying the transform IR

Add an extra check to make sure that transform IR is not getting modified by this op while it is being interpreted. This generally dangerous and we may want to enforce this for all transform ops that modify the payload in the future.

Users should generally try to apply patterns only to the piece of IR where it is needed (e.g., a matched function) and not the entire module (which may contain the transform IR).

This revision is in response to a crash in a downstream compiler that was caused by a dead `transform.structured.match` op that was removed by the GreedyPatternRewriteDriver's DCE while the enclosing sequence was being interpreted.

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

13 months ago[AArch64] More tablegen patterns for addp of two extracts
David Green [Mon, 19 Jun 2023 06:52:46 +0000 (07:52 +0100)]
[AArch64] More tablegen patterns for addp of two extracts

Similar to D152245, this adds integer addp patterns, using the larger
v4i32 addp from addp extractlow, extracthi.

13 months ago[AArch64] Add tablegen patterns for faddp of two extracts
David Green [Mon, 19 Jun 2023 06:48:31 +0000 (07:48 +0100)]
[AArch64] Add tablegen patterns for faddp of two extracts

This adds some simple tablegen patterns for converting
`faddp v2f32 extractlow(Rn), v2f32 extracthigh(Rn)` to
`faddp v4f32 Rn, v4f32 Rn` using the q variants of the
instructions, avoiding the extra ext needed to extract
the high lanes. Only the bottom lanes of the new faddp
are used, the second Rn operand is used as a placeholder.
It uses Rn to prevent any false dependencies, but could
equally by undef.

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

13 months ago[SCCP][NFC] Regenerate test case
luxufan [Mon, 19 Jun 2023 06:15:01 +0000 (14:15 +0800)]
[SCCP][NFC] Regenerate test case

13 months ago[SCCP][NFC] Regenerate test case
luxufan [Mon, 19 Jun 2023 06:07:42 +0000 (14:07 +0800)]
[SCCP][NFC] Regenerate test case

13 months ago[LoopUnrollRuntime] Allow indirect transition to deopt non-latch exit blocks
Yevgeny Rouban [Thu, 8 Jun 2023 09:32:12 +0000 (16:32 +0700)]
[LoopUnrollRuntime] Allow indirect transition to deopt non-latch exit blocks

Relax condition on runtime trip count unrolling loops with 1 non-latch exit
that leads to a deop block.

There are cases when the deopt blocks are common exits for different loops.
LoopSimplify pass splits such edges to the common deopting blocks to make
sure that all exit nodes of the loop only have predecessors that are inside
of the loop (See simplifyOneLoop()). This breaks the current condition for
unrolling. This patch allows the split transitive blocks that still lead to
the deopting blocks.

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

13 months agoRecommit [ABI] [C++20] [Modules] Don't generate vtable if the class is defined in...
Chuanqi Xu [Mon, 19 Jun 2023 02:35:16 +0000 (10:35 +0800)]
Recommit [ABI] [C++20] [Modules] Don't generate vtable if the class is defined in other module unit

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

The root cause is that clang will generate vtable as strong symbol now
even if the corresponding class is defined in other module units. After
I check the wording in Itanium ABI, I find this is not inconsistent.
Itanium ABI 5.2.3
(https://itanium-cxx-abi.github.io/cxx-abi/abi.html#vague-vtable) says:

> The virtual table for a class is emitted in the same object containing
> the definition of its key function, i.e. the first non-pure virtual
> function that is not inline at the point of class definition.

So the current behavior is incorrect. This patch tries to address this.
Also I think we need to do a similar change for MSVC ABI. But I don't
find the formal wording. So I don't address this in this patch.

Reviewed By: rjmccall, iains, dblaikie

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

13 months ago[XRay] Mark Mach-O xray_instr_map and xray_fn_idx as S_ATTR_LIVE_SUPPORT
Fangrui Song [Mon, 19 Jun 2023 02:30:16 +0000 (19:30 -0700)]
[XRay] Mark Mach-O xray_instr_map and xray_fn_idx as S_ATTR_LIVE_SUPPORT

Add the `S_ATTR_LIVE_SUPPORT` attribute to the sections so that `ld -dead_strip`
will retain subsections that reference live functions, once we we add linker
private "l" symbols as atoms.

13 months ago[RISCV] Match shl (ext v, splat 1) to vector widening add.
Jianjian GUAN [Fri, 16 Jun 2023 08:58:24 +0000 (16:58 +0800)]
[RISCV] Match shl (ext v, splat 1) to vector widening add.

Since we use match shl (v, splat 1) to vadd, we could also expand to widening add.

Reviewed By: craig.topper

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

13 months ago[MC] flushPendingLabels: set Atom for new fragment after D71368
Fangrui Song [Mon, 19 Jun 2023 00:49:53 +0000 (17:49 -0700)]
[MC] flushPendingLabels: set Atom for new fragment after D71368

Fixes: c26c5e47ab9ca60835f191c90fa751e9a7dd0f3d (essentially a no-op)

The newly created MCDataFragment should inherit Atom (see
MCMachOStreamer::finishImpl). To the best of my knowledge, this change cannot be
tested at present, but this is important to ensure
MCExpr.cpp:AttemptToFoldSymbolOffsetDifference gives the same result in case we
evaluate the expression again with a MCAsmLayout.

In the following case,
```
.section __DATA,xray_instr_map
lxray_sleds_start1:
.space 16
Lxray_sleds_end1:
.section __DATA,xray_fn_idx
.quad (Lxray_sleds_end1-lxray_sleds_start1)>>4 // can be folded without a MCAsmLayout
```

When we have a MCAsmLayout, without this change, evaluating
(Lxray_sleds_end1-lxray_sleds_start1)>>4 again will fail due to
`FA->getAtom() == nullptr && FB.getAtom() != nullptr` in
MachObjectWriter::isSymbolRefDifferenceFullyResolvedImpl, called by
AttemptToFoldSymbolOffsetDifference.

13 months ago[MC] Fold A-B when A is a pending label or A/B are separated by a MCFillFragment
Fangrui Song [Mon, 19 Jun 2023 00:18:38 +0000 (17:18 -0700)]
[MC] Fold A-B when A is a pending label or A/B are separated by a MCFillFragment

When the MCAssembler is non-null and the MCAsmLayout is null, we can fold A-B
in these additional cases:

* when A is a pending label (will be reassigned to a real fragment in flushPendingLabels())
* A and B are separated by a MCFillFragment with a constant size

13 months ago[MC] Remove unneeded MCDataFragment check from AttemptToFoldSymbolOffsetDifference
Fangrui Song [Sun, 18 Jun 2023 23:00:18 +0000 (16:00 -0700)]
[MC] Remove unneeded MCDataFragment check from AttemptToFoldSymbolOffsetDifference

If FA == FB, we can use SA.getOffset() - SB.getOffset() even if FA is
not a MCDataFragment, as the only case this can be problematic
(different offsets for a variable-size fragment) is invalid/unreachable.
If FA != FB, the `if (FI->getKind() != MCFragment::FT_Data)` check below
can bail out correctly.

This change will help Mach-O fold more expressions. For ELF this is NFC,
unless evaluateFixup has a bug that would evaluate an expression
differently.

13 months ago[MC] flushPendingLabels: set Atom for new fragment after D71368
Fangrui Song [Sun, 18 Jun 2023 22:14:21 +0000 (15:14 -0700)]
[MC] flushPendingLabels: set Atom for new fragment after D71368

The newly created MCDataFragment should inherit Atom (see
MCMachOStreamer::finishImpl). I cannot think of a case to test the
behavior, but this is one step towards folding the Mach-O label
difference below and making Mach-O more similar to ELF.

```
.section __DATA,xray_instr_map
lxray_sleds_start1:
.space 16
Lxray_sleds_end1:
.section __DATA,xray_fn_idx
.quad (Lxray_sleds_end1-lxray_sleds_start1)>>4  // error: expected relocatable expression // Mach-O
```

13 months ago[libc] [NFC] malloc.h: fix include guard typo
Alfred Persson Forsberg [Sun, 18 Jun 2023 22:08:18 +0000 (23:08 +0100)]
[libc] [NFC] malloc.h: fix include guard typo

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

13 months ago[XRay][test] Make tests less sensitive to .Ltmp/Ltmp label changes
Fangrui Song [Sun, 18 Jun 2023 20:32:40 +0000 (13:32 -0700)]
[XRay][test] Make tests less sensitive to .Ltmp/Ltmp label changes

13 months ago[Target] Use llvm::is_contained (NFC)
Kazu Hirata [Sun, 18 Jun 2023 19:44:00 +0000 (12:44 -0700)]
[Target] Use llvm::is_contained (NFC)

13 months ago[BOLT] Use llvm::is_contained (NFC)
Kazu Hirata [Sun, 18 Jun 2023 18:53:01 +0000 (11:53 -0700)]
[BOLT] Use llvm::is_contained (NFC)

13 months ago[AST] Use DenseMapBase::lookup (NFC)
Kazu Hirata [Sun, 18 Jun 2023 18:52:59 +0000 (11:52 -0700)]
[AST] Use DenseMapBase::lookup (NFC)

13 months ago[libc++][spaceship][NFC] P1612R2: Mark remove `operator!=` from "Ranges Library"...
Hristo Hristov [Mon, 12 Jun 2023 16:10:38 +0000 (19:10 +0300)]
[libc++][spaceship][NFC] P1612R2: Mark remove `operator!=` from "Ranges Library" items as "Complete"

Marked already implemented parts of P1612R2 as "Complete":
- `ranges::iota_view::iterator` https://reviews.llvm.org/D110774
- `iota_view::sentinel` https://reviews.llvm.org/D107396
- `filter_view::iterator` https://reviews.llvm.org/D109086
- `filter_view::sentinel` https://reviews.llvm.org/D109086
- `ranges::transform_view::iterator` https://reviews.llvm.org/D110774
- `transform_view::sentinel` https://reviews.llvm.org/D103056
- `take_view::sentinel` https://reviews.llvm.org/D123600
- `join_view::iterator` https://reviews.llvm.org/D107671
- `join_view::sentinel ` https://reviews.llvm.org/D107671
- `split_view::outer_iterator` https://reviews.llvm.org/D142063
- `split_view::inner_iterator` https://reviews.llvm.org/D142063

Note these operators were added and removed in C++20.

Reviewed By: Mordante, #libc

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

13 months ago[Bazel][mlir] Port ee8b8d6b58e1ff45d1bcbad38c6cf458f872b38d
Pranav Kant [Sun, 18 Jun 2023 17:51:56 +0000 (17:51 +0000)]
[Bazel][mlir] Port ee8b8d6b58e1ff45d1bcbad38c6cf458f872b38d

13 months ago[MLIR] Provide bare pointer memref lowering option on gpu-to-nvvm pass
Uday Bondhugula [Sat, 17 Jun 2023 17:57:59 +0000 (23:27 +0530)]
[MLIR] Provide bare pointer memref lowering option on gpu-to-nvvm pass

Provide the bare pointer memref lowering option on gpu-to-nvvm pass.
This is needed whenever we lower memrefs on the host function side and
the kernel calls on the host-side (gpu-to-llvm) with the bare ptr
convention. The GPU module side of the lowering should also "align" and
use the bare pointer convention.

Reviewed By: krzysz00

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

13 months agoclang/HIP: Use __builtin_fmaf16
Matt Arsenault [Tue, 22 Nov 2022 17:51:21 +0000 (12:51 -0500)]
clang/HIP: Use __builtin_fmaf16

Missed these in 43fd46fda3c90b014e8a73c62f67af9543ea4d59

13 months ago[Doc] Fix table layout
Serge Pavlov [Sun, 18 Jun 2023 16:46:08 +0000 (23:46 +0700)]
[Doc] Fix table layout

13 months ago[GlobalIsel][X86] selectDivRem - fix typo in 64-bit AH handling code
Simon Pilgrim [Sun, 18 Jun 2023 16:37:17 +0000 (17:37 +0100)]
[GlobalIsel][X86] selectDivRem - fix typo in 64-bit AH handling code

This function was lifted from fast-isel, and still referred to the Instruction::SRem/URrem opcodes, instead of the G_SREM/G_UREM opcodes.

But it turns out these aren't necessary at all as only the G_SREM/G_UREM codepaths will use the AH register for DivRemResultReg anyhow.

13 months ago[GlobalIsel][X86] Regenerate srem/urem select test coverage
Simon Pilgrim [Sun, 18 Jun 2023 16:06:32 +0000 (17:06 +0100)]
[GlobalIsel][X86] Regenerate srem/urem select test coverage

13 months ago[clang] Add __builtin_isfpclass
Serge Pavlov [Sun, 18 Jun 2023 15:53:32 +0000 (22:53 +0700)]
[clang] Add __builtin_isfpclass

A new builtin function __builtin_isfpclass is added. It is called as:

    __builtin_isfpclass(<floating point value>, <test>)

and returns an integer value, which is non-zero if the floating point
argument falls into one of the classes specified by the second argument,
and zero otherwise. The set of classes is an integer value, where each
value class is represented by a bit. There are ten data classes, as
defined by the IEEE-754 standard, they are represented by bits:

    0x0001 (__FPCLASS_SNAN)         - Signaling NaN
    0x0002 (__FPCLASS_QNAN)         - Quiet NaN
    0x0004 (__FPCLASS_NEGINF)       - Negative infinity
    0x0008 (__FPCLASS_NEGNORMAL)    - Negative normal
    0x0010 (__FPCLASS_NEGSUBNORMAL) - Negative subnormal
    0x0020 (__FPCLASS_NEGZERO)      - Negative zero
    0x0040 (__FPCLASS_POSZERO)      - Positive zero
    0x0080 (__FPCLASS_POSSUBNORMAL) - Positive subnormal
    0x0100 (__FPCLASS_POSNORMAL)    - Positive normal
    0x0200 (__FPCLASS_POSINF)       - Positive infinity

They have corresponding builtin macros to facilitate using the builtin
function:

    if (__builtin_isfpclass(x, __FPCLASS_NEGZERO | __FPCLASS_POSZERO) {
      // x is any zero.
    }

The data class encoding is identical to that used in llvm.is.fpclass
function.

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

13 months ago[CodeGenPrepare][RISCV] Remove asserting VH references before erasing the dead GEP
Yingwei Zheng [Sun, 18 Jun 2023 15:40:19 +0000 (23:40 +0800)]
[CodeGenPrepare][RISCV] Remove asserting VH references before erasing the dead GEP

Fixes issue https://github.com/llvm/llvm-project/issues/63365

Reviewed By: craig.topper

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

13 months ago[SCCP][NFC] Regenerate test case
luxufan [Sun, 18 Jun 2023 13:52:19 +0000 (21:52 +0800)]
[SCCP][NFC] Regenerate test case

13 months ago[mlir][math] Uplift from arith to math.fma
Ivan Butygin [Sat, 10 Jun 2023 20:59:24 +0000 (22:59 +0200)]
[mlir][math] Uplift from arith to math.fma

Add pass to uplift from arith mulf + addf ops to math.fma if fastmath flags allow it.

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

13 months ago[X86] Regenerate tls.ll and reuse common linux check prefixes
Simon Pilgrim [Sun, 18 Jun 2023 14:24:44 +0000 (15:24 +0100)]
[X86] Regenerate tls.ll and reuse common linux check prefixes

13 months ago[X86] Regenerate add32ri8.ll
Simon Pilgrim [Sun, 18 Jun 2023 14:08:44 +0000 (15:08 +0100)]
[X86] Regenerate add32ri8.ll

13 months ago[SVE][AArch64TTI] Fix invalid mla combine that miscomputes the value of inactive...
Paul Walker [Sat, 17 Jun 2023 16:51:49 +0000 (17:51 +0100)]
[SVE][AArch64TTI] Fix invalid mla combine that miscomputes the value of inactive lanes.

Consider: add(pg, a, mul_u(pg, b, c))

Although the multiply's inactive lanes are undefined, they don't
contribute to the final result.  The overall result of the inactive
lanes come from "a" and thus the above is another form of mla
rather than mla_u.

13 months ago[NFC][AArch64TTI] Breakout add/sub combines into discrete functions.
Paul Walker [Sat, 17 Jun 2023 15:48:09 +0000 (16:48 +0100)]
[NFC][AArch64TTI] Breakout add/sub combines into discrete functions.