Changes

Summary

  1. [NFC][X86][CostModel] Add tests for byteswap intrinsic (details)
  2. RISSCV: clang-format RISC-V AsmParser (NFC) (details)
  3. [llvm-objcopy][ELF] --only-keep-debug: set offset/size of segments with no sections to zero (details)
  4. [NFC][SimplifyCFG] Update documentation comments for SinkCommonCodeFromPredecessors() after 1886aad (details)
  5. [Clang] remove text extension from diag::err_drv_invalid_value_with_suggestion (details)
  6. Make clangd CompletionModel not depend on directory layout. (details)
  7. [lld-macho] Have --reproduce account for path rerooting (details)
  8. [lld-macho] Preliminary support for ARM_RELOC_BR24 (details)
  9. [hwasan] Fix missing synchronization in AllocThread. (details)
  10. [libomptarget] Initial documentation on amdgpu offload (details)
  11. [WebAssembly] Set alignment to 1 for SIMD memory intrinsics (details)
  12. [libc++] NFC: Remove stray semicolon in from-scratch config files (details)
Commit 833b33a7f4dc1d1f1a75bb3e04dee7ce8ed22f06 by lebedev.ri
[NFC][X86][CostModel] Add tests for byteswap intrinsic
The file was addedllvm/test/Analysis/CostModel/X86/bswap-vec.ll
The file was modifiedllvm/test/Analysis/CostModel/X86/bswap.ll
The file was addedllvm/test/Analysis/CostModel/X86/bswap-store.ll
The file was addedllvm/test/Analysis/CostModel/X86/load-bswap.ll
Commit ba5c122647c79586a6d060ca649e586feb7f57a0 by Saleem Abdulrasool
RISSCV: clang-format RISC-V AsmParser (NFC)

This corrects a few issues identified by `clang-format`.  This is meant
to be preparation for a subsequent change.
The file was modifiedllvm/lib/Target/RISCV/AsmParser/RISCVAsmParser.cpp
Commit b3336bfa2e6a38f16c4ecf4d77bd0f97ec5a46eb by i
[llvm-objcopy][ELF] --only-keep-debug: set offset/size of segments with no sections to zero

PR50160: we currently ignore non-PT_PHDR segments with no sections, not
accounting for its p_offset and p_filesz: this can cause an out-of-bounds write
in `writeSegmentData` if the p_offset+p_filesz is larger than the total file
size.

This can be fixed by setting p_offset=p_filesz=0. The logic nicely unifies with
the logic added in D90897.

Reviewed By: jhenderson, rupprecht

Differential Revision: https://reviews.llvm.org/D101560
The file was modifiedllvm/test/tools/llvm-objcopy/ELF/only-keep-debug.test
The file was modifiedllvm/tools/llvm-objcopy/ELF/Object.cpp
Commit 8048005739ebf6734b2d841a528c06595062f899 by lebedev.ri
[NFC][SimplifyCFG] Update documentation comments for SinkCommonCodeFromPredecessors() after 1886aad
The file was modifiedllvm/lib/Transforms/Utils/SimplifyCFG.cpp
Commit aefbfbcbd776f5549b18cd6083d6408f661efacc by ndesaulniers
[Clang] remove text extension from diag::err_drv_invalid_value_with_suggestion

This hinders translations, as per:
https://clang.llvm.org/docs/InternalsManual.html#the-format-string

Reviewed By: MaskRay, xbolva00

Differential Revision: https://reviews.llvm.org/D101387
The file was modifiedclang/include/clang/Basic/DiagnosticDriverKinds.td
The file was modifiedclang/lib/Driver/ToolChains/Clang.cpp
The file was modifiedflang/lib/Frontend/CompilerInvocation.cpp
The file was modifiedflang/test/Driver/fixed-line-length.f90
The file was modifiedclang/test/Driver/stack-protector-guard.c
Commit 7907c46fe6195728fafd843b8c0fb19a3e68e9ad by harald
Make clangd CompletionModel not depend on directory layout.

The current code accounts for two possible layouts, but there is at
least a third supported layout: clang-tools-extra may also be checked
out as clang/tools/extra with the releases, which was not yet handled.
Rather than treating that as a special case, use the location of
CompletionModel.cmake to handle all three cases. This should address the
problems that prompted D96787 and the problems that prompted the
proposed revert D100625.

Reviewed By: usaxena95

Differential Revision: https://reviews.llvm.org/D101851
The file was modifiedclang-tools-extra/clangd/quality/CompletionModel.cmake
Commit 20f51ffe67d12ab72c917dc4b371b55c80321393 by jezng
[lld-macho] Have --reproduce account for path rerooting

We need to account for path rerooting when generating the response
file. We could either reroot the paths before generating the file, or pass
through the original filenames and change just the syslibroot. I've opted for
the latter, in order that the reproduction run more closely mirrors the
original.

We must also be careful *not* to make an absolute path relative if it is
shadowed by a rerooted path. See repro6.tar in reroot-path.s for
details.

I've moved the call to `createResponseFile()` after the initialization of
`config->systemLibraryRoots`, since it now needs to know what those roots are.

Reviewed By: #lld-macho, oontvoo

Differential Revision: https://reviews.llvm.org/D101224
The file was modifiedlld/test/MachO/reroot-path.s
The file was modifiedlld/MachO/DriverUtils.cpp
The file was modifiedlld/MachO/Driver.cpp
The file was modifiedlld/MachO/Driver.h
Commit 8806df4778349dac4e8744b9ae50f43b80eedda3 by jezng
[lld-macho] Preliminary support for ARM_RELOC_BR24

ARM_RELOC_BR24 is used for BL/BLX instructions from within ARM (i.e. not
Thumb) code. This diff just handles the basic case: branches from ARM to
ARM, or from ARM to Thumb where no shimming is required. (See comments
in ARM.cpp for why shims are required.)

Note: I will likely be deprioritizing ARM work for the near future to
focus on other parts of LLD. Apologies for the half-done state of this;
I'm just trying to wrap up what I've already worked on.

Reviewed By: #lld-macho, alexshap

Differential Revision: https://reviews.llvm.org/D101814
The file was modifiedlld/MachO/Arch/ARM.cpp
The file was addedlld/test/MachO/arm-branch-relocs.s
Commit 18959a6a094c6469fc2fd5cc167fda7cbe3f163b by eugenis
[hwasan] Fix missing synchronization in AllocThread.

The problem was introduced in D100348.

It's really hard to trigger the bug in a stress test - the race is just too
narrow - but the new checks in Thread::Init should at least provide usable
diagnostic if the problem ever returns.

Differential Revision: https://reviews.llvm.org/D101881
The file was modifiedcompiler-rt/lib/hwasan/hwasan_thread_list.h
The file was modifiedcompiler-rt/lib/hwasan/hwasan_thread.cpp
Commit 25fe17d3c1041de7e2dc5df865d7f65fd074f9a6 by jonathanchesterfield
[libomptarget] Initial documentation on amdgpu offload

[libomptarget] Initial documentation on amdgpu offload

Reviewed By: jdoerfert

Differential Revision: https://reviews.llvm.org/D101927
The file was modifiedopenmp/docs/SupportAndFAQ.rst
Commit 89333b35a7a909d29ae53fddcfb4792d87223b96 by tlively
[WebAssembly] Set alignment to 1 for SIMD memory intrinsics

The WebAssembly SIMD intrinsics in wasm_simd128.h generally try not to require
any particular alignment for memory operations to be maximally flexible. For
builtin memory access functions and their corresponding LLVM IR intrinsics,
there's no way to set the expected alignment, so the best we can do is set the
alignment to 1 in the backend. This change means that the alignment hints in the
emitted code will no longer be incorrect when users use the intrinsics to access
unaligned data.

Differential Revision: https://reviews.llvm.org/D101850
The file was modifiedllvm/lib/Target/WebAssembly/WebAssemblyISelLowering.cpp
The file was modifiedllvm/test/CodeGen/WebAssembly/simd-load-lane-offset.ll
The file was modifiedllvm/test/CodeGen/WebAssembly/simd-load-zero-offset.ll
Commit 7fbc7bfdfddd85e12156556e3c074f6dcef865df by Louis Dionne
[libc++] NFC: Remove stray semicolon in from-scratch config files
The file was modifiedlibcxx/test/configs/libcxx-trunk-shared.cfg.in
The file was modifiedlibcxx/test/configs/libcxx-trunk-static.cfg.in