Changes

Summary

  1. [VE][Clang][NFC] Disable VE toolchain tests on Windows (details)
  2. [AArch64][SVE] Enable bf16 vector.insert (details)
  3. Expand testing of necessary features for print-changed=dot-cfg. (details)
  4. [fir] Declare test function inline (details)
  5. Add new clang-tidy check for string_view(nullptr) (details)
  6. Fix documentation for `forEachLambdaCapture` and `hasAnyCapture` (details)
  7. [HIPSPV] Add CUDA->SPIR-V address space mapping (details)
  8. [flang] GettingInvolved: update LLVM Alias Analysis Technical Call info (details)
  9. [gn build] Port 6a9487df73e9 (details)
  10. [MemoryLocation] Support memset_chk in getForArgument. (details)
  11. [PatternMatch] create and use matcher for 'not' that excludes undef elements (details)
  12. [libc] Fix a bug in MPFRUtils making ULP values off by 2^(-mantissaWidth). (details)
  13. [MemoryLocation] Support strncpy in getForArgument. (details)
  14. [VE][NFC] Cleanup redundant namespace wrapper (details)
  15. [AMDGPU] Test for in-order waitcnt insertion for bvh instructions (details)
  16. [AMDGPU] Add support for in-order bvh in waitcnt pass (details)
  17. [SLP][NFC]Add a test for extractelements with many uses vectorization, NFC. (details)
  18. [clang-tidy] Fix build broken by commit 6a9487df73e917c4faf5e060f2bb33c6ade3f967 (D113148) (details)
  19. [AnnotationRemarks] Support generating annotation remarks with -O0. (details)
  20. [Clang] Fix LTO pipeline test after 770a50b28c00211f9a. (details)
  21. [clangd] cleanup of header guard names (details)
  22. [InstCombine] add tests for icmp with mul op; NFC (details)
Commit 3b442644e278b53e351addf349c75b995b10f029 by simon.moll
[VE][Clang][NFC] Disable VE toolchain tests on Windows

VE hardware is unsupported under Windows. Disable the clang VE toolchain
tests here. Tests breaking because of non-POSIX path separators.
The file was modifiedclang/test/Driver/ve-toolchain.cpp
The file was modifiedclang/test/Driver/ve-toolchain.c
Commit 4244f95cc6ce73ab38fbb91929a0888309f3ca8d by matthew.devereau
[AArch64][SVE] Enable bf16 vector.insert

Allow passthrough bf16 registers for vector.insert

Differential revision: https://reviews.llvm.org/D114858
The file was modifiedllvm/test/CodeGen/AArch64/sve-insert-vector.ll
The file was modifiedllvm/lib/Target/AArch64/AArch64ISelLowering.cpp
Commit 2a1bf9e0cf78a0582b62de8e78375394bb8f6711 by schmeise
Expand testing of necessary features for print-changed=dot-cfg.

Summary:
Expand the testing for whether the lit tests for print-changed=dot-cfg
are supported to include checking whether dot supports pdf output.

Author: Jamie Schmeiser <schmeise@ca.ibm.com>
Reviewed By: hvdijk (Harald van Dijk)
Differential Revision: https://reviews.llvm.org/D113187
The file was modifiedllvm/test/Other/ChangePrinters/DotCfg/lit.local.cfg
Commit 99961b4f1c73f135e5022d7c09dca05eb867cf7b by clementval
[fir] Declare test function inline

Declare functions checkCallOp and checkCallOpFromResultBox inline due to buildbot failure flang-aarch64-latest-clang
The file was modifiedflang/unittests/Optimizer/Builder/Runtime/RuntimeCallTestBase.h
Commit 6a9487df73e917c4faf5e060f2bb33c6ade3f967 by yitzhakm
Add new clang-tidy check for string_view(nullptr)

Checks for various ways that the `const CharT*` constructor of `std::basic_string_view` can be passed a null argument and replaces them with the default constructor in most cases. For the comparison operators, braced initializer list does not compile so instead a call to `.empty()` or the empty string literal are used, where appropriate.

This prevents code from invoking behavior which is unconditionally undefined. The single-argument `const CharT*` constructor does not check for the null case before dereferencing its input. The standard is slated to add an explicitly-deleted overload to catch some of these cases: wg21.link/p2166

https://reviews.llvm.org/D114823 is a companion change to prevent duplicate warnings from the `bugprone-string-constructor` check.

Reviewed By: ymandel

Differential Revision: https://reviews.llvm.org/D113148
The file was modifiedclang-tools-extra/clang-tidy/bugprone/CMakeLists.txt
The file was modifiedclang-tools-extra/docs/clang-tidy/checks/list.rst
The file was addedclang-tools-extra/clang-tidy/bugprone/StringviewNullptrCheck.cpp
The file was addedclang-tools-extra/clang-tidy/bugprone/StringviewNullptrCheck.h
The file was addedclang-tools-extra/docs/clang-tidy/checks/bugprone-stringview-nullptr.rst
The file was modifiedclang-tools-extra/docs/ReleaseNotes.rst
The file was modifiedclang-tools-extra/clang-tidy/bugprone/BugproneTidyModule.cpp
The file was addedclang-tools-extra/test/clang-tidy/checkers/bugprone-stringview-nullptr.cpp
Commit 4e9e2f24178077d7055c0f667d13f887fef508d5 by yitzhakm
Fix documentation for `forEachLambdaCapture` and `hasAnyCapture`

Updates the return types of these matchers' definitions to use
`internal::Matcher<LambdaCapture>` instead of `LambdaCaptureMatcher`. This
ensures that they are categorized as traversal matchers, instead of narrowing
matchers.

Reviewed By: ymandel, tdl-g, aaron.ballman

Differential Revision: https://reviews.llvm.org/D114809
The file was modifiedclang/docs/LibASTMatchersReference.html
The file was modifiedclang/include/clang/ASTMatchers/ASTMatchers.h
Commit f4d3cb4ca833d0b165d199e78ed8f1d59a8032eb by anastasia.stulova
[HIPSPV] Add CUDA->SPIR-V address space mapping

Add mapping for CUDA address spaces for HIP to SPIR-V
translation. This change allows HIP device code to be
emitted as valid SPIR-V by mapping unqualified pointers
to generic address space and by mapping __device__ and
__shared__ AS to their equivalent AS in SPIR-V
(CrossWorkgroup and Workgroup, respectively).

Cuda's __constant__ AS is handled specially. In HIP
unqualified pointers (aka "flat" pointers) can point to
__constant__ objects. Mapping this AS to ConstantMemory
would produce to illegal address space casts to
generic AS. Therefore, __constant__ AS is mapped to
CrossWorkgroup.

Patch by linjamaki (Henry Linjamäki)!

Differential Revision: https://reviews.llvm.org/D108621
The file was modifiedclang/lib/Basic/Targets/SPIR.h
The file was addedclang/test/CodeGenHIP/hipspv-addr-spaces.cpp
Commit 6f08b55213d8a7646b01b20d506bd7f2e170de83 by jeroen.dobbelaere
[flang] GettingInvolved: update LLVM Alias Analysis Technical Call info

The google doc was changed and the calls are now using teams.

Reviewed By: sameeranjoshi

Differential Revision: https://reviews.llvm.org/D114145
The file was modifiedflang/docs/GettingInvolved.md
Commit a692c5492ad534c54ee283ac266e841d781cac90 by llvmgnsyncbot
[gn build] Port 6a9487df73e9
The file was modifiedllvm/utils/gn/secondary/clang-tools-extra/clang-tidy/bugprone/BUILD.gn
Commit 9f9e8ba114ce091f375f7ea9316a65c7582d6882 by flo
[MemoryLocation] Support memset_chk in getForArgument.

The size argument for memset_chk is an upper bound for the size of the
pointer argument. memset_chk may write less than the specified length,
if it exceeds the specified max size and aborts.

Reviewed By: nikic

Differential Revision: https://reviews.llvm.org/D114870
The file was modifiedllvm/lib/Analysis/MemoryLocation.cpp
The file was modifiedllvm/test/Analysis/BasicAA/libfuncs.ll
Commit 97e921c81fbfa75d6863cf08268373983193d420 by spatel
[PatternMatch] create and use matcher for 'not' that excludes undef elements

We needed a stricter version of m_Not for D114462, but I wasn't
sure if that was going to be required anywhere else, so I didn't bother
to make that reusable.

It turns out we have one more existing simplification that needs
this (currently miscompiles):
https://alive2.llvm.org/ce/z/9-nTKi

And there's at least one more fold in that family that we could add.

Differential Revision: https://reviews.llvm.org/D114882
The file was modifiedllvm/unittests/IR/PatternMatch.cpp
The file was modifiedllvm/lib/Analysis/InstructionSimplify.cpp
The file was modifiedllvm/include/llvm/IR/PatternMatch.h
Commit 32568fc95e75b9c6cfaf6964bcf2d8db342f23ad by lntue
[libc] Fix a bug in MPFRUtils making ULP values off by 2^(-mantissaWidth).

Fix a bug in MPFRUtils making ULP values off by 2^(-mantissaWidth) and incorrect eps for denormal numbers.

Differential Revision: https://reviews.llvm.org/D114878
The file was modifiedlibc/utils/MPFRWrapper/MPFRUtils.cpp
Commit 639a78a4bf9da0a03dcd12c27f625a134a3ee6cc by flo
[MemoryLocation] Support strncpy in getForArgument.

The size argument of strncpy can be used as bound for the size of
its pointer arguments.

strncpy is guaranteed to write N bytes and reads up to N bytes.

Reviewed By: xbolva00

Differential Revision: https://reviews.llvm.org/D114871
The file was modifiedllvm/lib/Analysis/MemoryLocation.cpp
The file was modifiedllvm/test/Analysis/BasicAA/libfuncs.ll
Commit e92429d99b2c903952a7217228a3eaaa02609163 by simon.moll
[VE][NFC] Cleanup redundant namespace wrapper
The file was modifiedllvm/lib/Target/VE/MCTargetDesc/VEInstPrinter.cpp
Commit 17a3385c3538530dc06851559a62eb8ec15f88d1 by david.stuttard
[AMDGPU] Test for in-order waitcnt insertion for bvh instructions

In-order bvh instructions don't require a waitcnt as order is
guaranteed.

However, waitcnt IS required for other image instruction types vs
bvh.

Pre-commit test for new functionality in https://reviews.llvm.org/D114794

Differential Revision: https://reviews.llvm.org/D114792
The file was addedllvm/test/CodeGen/AMDGPU/waitcnt-bvh.mir
Commit 0e8590f065992418b1da7dd2c1cc4f93c7831278 by david.stuttard
[AMDGPU] Add support for in-order bvh in waitcnt pass

bvh should be handled separately from vmem and vmem with sampler instructions
for waitcnt handling.

Differential Revision: https://reviews.llvm.org/D114794
The file was modifiedllvm/lib/Target/AMDGPU/SIInsertWaitcnts.cpp
The file was modifiedllvm/test/CodeGen/AMDGPU/waitcnt-bvh.mir
Commit 75106413d0802982b208ab5adf22c4c45766f0c2 by a.bataev
[SLP][NFC]Add a test for extractelements with many uses vectorization, NFC.
The file was addedllvm/test/Transforms/SLPVectorizer/X86/extractelement-multiple-uses.ll
Commit c006ea6bde234153abadc8927557da9b8e0dc029 by yitzhakm
[clang-tidy] Fix build broken by commit 6a9487df73e917c4faf5e060f2bb33c6ade3f967 (D113148)
The file was modifiedclang-tools-extra/clang-tidy/bugprone/CMakeLists.txt
Commit 770a50b28c00211f9a0ceb549da1f6fd9bb405a8 by flo
[AnnotationRemarks] Support generating annotation remarks with -O0.

This matches the legacy pass manager behavior. If remarks are not
enabled the pass is effectively a no-op.
The file was modifiedllvm/include/llvm/Transforms/Scalar/AnnotationRemarks.h
The file was modifiedllvm/lib/Passes/PassBuilderPipelines.cpp
The file was modifiedllvm/test/Other/new-pm-O0-defaults.ll
Commit 89d645dd3a60cd5bb3cc9a78ad17d3b063cc98bf by flo
[Clang] Fix LTO pipeline test after 770a50b28c00211f9a.
The file was modifiedclang/test/CodeGen/lto-newpm-pipeline.c
Commit 5bd643d31d11e96bcae833025b241681370e527c by kuhnel
[clangd] cleanup of header guard names

Renaming header guards to match the LLVM convention.
This patch was created by automatically applying the fixes from
clang-tidy.

I've removed the [NFC]  tag from the title, as we're adding header guards in some files and thus might trigger behavior changes.

Differential Revision: https://reviews.llvm.org/D113896
The file was modifiedclang-tools-extra/clangd/unittests/tweaks/TweakTesting.h
The file was modifiedclang-tools-extra/clangd/refactor/Tweak.h
The file was modifiedclang-tools-extra/clangd/unittests/support/TestTracer.h
The file was modifiedclang-tools-extra/clangd/unittests/TestTU.h
The file was modifiedclang-tools-extra/clangd/index/SymbolOrigin.h
The file was modifiedclang-tools-extra/clangd/unittests/TestWorkspace.h
The file was modifiedclang-tools-extra/clangd/FindTarget.h
The file was modifiedclang-tools-extra/clangd/HeaderSourceSwitch.h
The file was modifiedclang-tools-extra/clangd/index/CanonicalIncludes.h
The file was modifiedclang-tools-extra/clangd/IncludeCleaner.h
The file was modifiedclang-tools-extra/clangd/unittests/TestFS.h
The file was modifiedclang-tools-extra/clangd/IncludeFixer.h
The file was modifiedclang-tools-extra/clangd/unittests/Annotations.h
The file was modifiedclang-tools-extra/clangd/index/Serialization.h
The file was modifiedclang-tools-extra/clangd/unittests/TestIndex.h
The file was modifiedclang-tools-extra/clangd/index/remote/Client.h
The file was modifiedclang-tools-extra/clangd/URI.h
The file was modifiedclang-tools-extra/clangd/HeuristicResolver.h
The file was modifiedclang-tools-extra/clangd/CollectMacros.h
The file was modifiedclang-tools-extra/clangd/index/ProjectAware.h
The file was modifiedclang-tools-extra/clangd/index/IndexAction.h
The file was modifiedclang-tools-extra/clangd/InlayHints.h
The file was modifiedclang-tools-extra/clangd/PathMapping.h
The file was modifiedclang-tools-extra/clangd/index/BackgroundIndexLoader.h
The file was modifiedclang-tools-extra/clangd/index/SymbolCollector.h
The file was modifiedclang-tools-extra/clangd/index/dex/Trigram.h
The file was modifiedclang-tools-extra/clangd/unittests/LSPClient.h
The file was modifiedclang-tools-extra/clangd/index/BackgroundRebuild.h
The file was modifiedclang-tools-extra/clangd/index/SymbolLocation.h
The file was modifiedclang-tools-extra/clangd/unittests/Matchers.h
The file was modifiedclang-tools-extra/clangd/unittests/SyncAPI.h
The file was removedclang-tools-extra/clangd/unittests/TestScheme.h
The file was modifiedclang-tools-extra/clangd/ExpectedTypes.h
The file was modifiedclang-tools-extra/clangd/index/dex/Token.h
Commit 3f8edce44707c93aa40602c75382bd79b2f57813 by spatel
[InstCombine] add tests for icmp with mul op; NFC
The file was modifiedllvm/test/Transforms/InstCombine/icmp-mul.ll