[PowerPC] Add patterns for atomic load with immediates
Adds pattern to use the immediate form of and, or, and xor for
atomic loads. The matching is limited to 16-bit immediates, which
seems to be the most used ones.
[NVPTX][FIX] Ensure memmove are kept if not lowered to loops
Memmove lowering can fail, so we cannot unconditionally remove the
intrinsic.
Issue found by Robert Imschweiler <robert.imschweiler at amd.com>
[lit] Remove redundant f.close() in TestingConfig (#200459)
[This
commit](https://github.com/llvm/llvm-project/commit/5536348d060066e875c9bf9e056447ece59c783d)
moved the config file `open()` into a `with` context manager but left
the trailing `f.close()` call behind. Since the context manager already
closes the file, the call is redundant. It is also outside the `with`
block, so `f` is unbound on the `except OSError` path. This removes it.
No change in behavior.
Signed-off-by: Prasoon Kumar <prasoonkumar054 at gmail.com>
[offload] use argument pointer array in olLaunchKernel (#194333)
This PR changes olLaunchKernel to accept an array of pointers to
arguments:
```
void *ArgPtrs[] = {&A, &B, &C};
size_t ArgSizes[] = {sizeof(A), sizeof(B), sizeof(C)};
olLaunchKernel(Queue, Device, Kernel, &LaunchArgs, std::size(ArgPtrs), ArgPtrs, ArgSizes);
```
The newly proposed interface is implementable by existing and
anticipated
backends, is familiar to CUDA programmers, eliminates the extraneous
construction of a contiguous arguments buffer, replacing it with
constructing
an array of pointers, sidesteps the alignment requirements, does not
require reading program image metadata where it's impractical, and
enables
[34 lines not shown]
[CIR] Implement __sync_synchronize builtin (#200423)
This showed up on a spec test, but is a very simple system-sequentially
consistent fence instruction.
LangRef: Clarify that unnamed_addr constants can be duplicated.
It has always been the intent that it was possible to duplicate
unnamed_addr constants, and LTO takes advantage of it. The current LangRef
wording allows it, but it was not explicitly spelled out, which led Clang
developers to add an optimization that assumed that it wasn't possible.
We are considering changing the semantics of unnamed_addr, but for now,
just make the current state explicit.
Reviewers:
teresajohnson, zygoloid, rjmccall, ChuanqiXu9, efriedma-quic, ojhunt
Pull Request: https://github.com/llvm/llvm-project/pull/199251
[Clang][test] Fix space in ld path (#200012)
The driver resolves the path to the linker ("ld") to the absolute path.
Microsoft Visual Studio comes with its own instance of `ld.lld` which it
installs under
"c:\\program files\\microsoft visual studio\\2022\\community\\vc\\tools\\llvm\\x64\\bin\\ld.lld.exe"
In the developer command prompt, this path is added to PATH where the
Clang driver finds it. However, this path does not match regular
expression `"{{[^" ]*}}ld{{[^" ]*}}"` used by the MIPS test because the
path contains spaces.
Fix the test failure by matching only the the trailing component after
`ld`. Matching the prefix of the path is unique to the MIPS test, this
is not done with tests for other platforms.
llvm-objdump: Support --disassemble= option.
This is compatible with GNU, as well as being shorter and allowing users
to specify symbol names with commas in them.
Note that this is distinct from the existing --disassemble which has
existed for a long time and disassembles all symbols. This change adds
a near-alias for the existing LLVM-specific --disassemble-symbols=.
Reviewers: jh7370, MaskRay
Pull Request: https://github.com/llvm/llvm-project/pull/196594