Changes

Summary

  1. [InstCombine] add a strnlen handler stub. (details)
  2. [InstCombine] Fold strnlen with a bound of zero and one. (details)
  3. [InstCombine] Fold memrchr calls with constant size, bail on excessive. (details)
  4. [InstCombine] Fold memrchr calls with a constant character. (details)
  5. Revert "[demangler] Simplify OutputBuffer initialization" (details)
  6. Disable symbol on-demand feature for Windows (details)
  7. [PS5] Add debug option testing for the PS5 target (details)
  8. Recommit "[SLP][TTI] Refactoring of `getShuffleCost` `Args` to work like `getArithmeticInstrCost`" (details)
  9. [AMDGPU] Properly mark MUBUF and FLAT LDS DMA instructions. NFC. (details)
  10. Revert "[compiler-rt] Use C_STANDARD instead of custom logic for adding -std=c11" (details)
  11. [InstCombine] Add tests reproducing PR53252 (NFC) (details)
  12. [OpenMPIRBuilder] Remove ContinuationBB argument from Body callback. (details)
  13. [InstCombine] Update predicate when canonicalizing comparisons in canonicalizeClampLike. (details)
  14. [NFC] Cleanup miscellaneous header items (details)
  15. [NFC] More synching of sources for upstreaming. (details)
  16. try to fix check-llvm on windows after 0a27622a1d62 (details)
  17. [InstCombine] Fold strnlen of constant strings. (details)
  18. [mlir][sparse] support pattern-only matrices from Matrix Market (details)
  19. [BOLT][NFC] Fix warning for unqualified call to std::move (details)
  20. [SimplifyLibCalls] avoid slicing 64-bit integers in an ILP32 build (PR #54739) (details)
  21. [AIX][XCOFF] error on emit symbol visibility for XCOFF object file (details)
  22. [NFC] Fix argument types in doxygen comment (details)
  23. Fix missing import for test (details)
  24. [libc] Minor test signedness fixes (details)
  25. Fix [libc] Minor test signedness fixes (details)
  26. [AMDGPU] Remove vdata from buffer to lds load (details)
  27. [AMDGPU] Add both mayLoad and mayStore to MUBUF LDS opcodes (details)
  28. [CUDA][HIP] Fix linkage of __clang_gpu_used_external (details)
  29. [AMDGPU] Remove now unused variable HasLdsModifier. NFC. (details)
  30. [Support] Factor out isCrash from throwIfCrash (details)
  31. Upstream test for wide character literals. (details)
  32. Don't push null ExecutionContext on CommandInterp exectx stack (details)
  33. [mlir][PDLL] Don't use the result of `Constraint::getDefName()` when uniquing (details)
  34. [mlir][PDLL] Add support for generating PDL patterns from PDLL at build time (details)
  35. [mlir][PDLL] Add initial support for a PDLL compilation database (details)
  36. [mlir][PDLL] Add document link and hover support to mlir-pdll-lsp-server (details)
  37. [mlir][PDLL-LSP] Add code completion for include file paths (details)
  38. [RISCV][NFC] Add RV64Zbs invalid tests (details)
  39. [ELF] Prevent LTO stripping of wrapped script-referenced symbols (details)
  40. [mlir:PDLL] Fix build on windows related to different file paths (details)
  41. [mlir:PDLL] Use normalized paths in compilation database test (details)
  42. [mlir] Add extensible dialects (details)
  43. [clang-tidy] Modernize-macro-to-enum should skip macros used in other macros (details)
  44. [RISCV] Precommit test for D121881 (details)
  45. [RISCV][RVV] Select unmasked TU RVV pseudos in a DAG post-process (details)
  46. [docs] Fix typos in the 'CodeGenerator' doc (details)
  47. [CMake][compiler-rt] Use COMPILE_OPTIONS and LINK_OPTIONS (details)
  48. Revert "[CMake][compiler-rt] Use COMPILE_OPTIONS and LINK_OPTIONS" (details)
  49. [FuncSpec] Conditional jump or move depends on uninitialised value(s). (details)
  50. [clangd] Output inlay hints with `clangd --check` (details)
  51. [Driver] Support for compressed debug info on Fuchsia (details)
  52. [RISCV][NFC] Update and add missing closed curly bracket comment in RISCVInstrInfoZb.td (details)
  53. [AsmParser] Automatically declare and lex attribute keywords (NFC) (details)
  54. [InstCombine] Combine opaque pointer GEPs with mismatching element types (details)
  55. Revert "[asan] Enable detect_stack_use_after_return=1 by default" (details)
  56. [CostModel] Add basic fptoi_sat costs (details)
Commit 2807c420cd23dac7f7624c8f9038c2ec251831d9 by msebor
[InstCombine] add a strnlen handler stub.

Reviewed By: nikic

Differential Revision: https://reviews.llvm.org/D123815
The file was modifiedllvm/test/Transforms/InstCombine/strnlen-2.ll
The file was modifiedllvm/lib/Transforms/Utils/SimplifyLibCalls.cpp
The file was modifiedllvm/test/Transforms/InstCombine/strnlen-5.ll
The file was modifiedllvm/include/llvm/Transforms/Utils/SimplifyLibCalls.h
The file was modifiedllvm/test/Transforms/InstCombine/strnlen-3.ll
The file was modifiedllvm/test/Transforms/InstCombine/strnlen-1.ll
The file was modifiedllvm/test/Transforms/InstCombine/strnlen-6.ll
Commit 25febbd155a5f2edcbe6115e6944cf9ee0367f5e by msebor
[InstCombine] Fold strnlen with a bound of zero and one.

Reviewed By: nikic

Differential Revision: https://reviews.llvm.org/D123816
The file was modifiedllvm/test/Transforms/InstCombine/strnlen-1.ll
The file was modifiedllvm/test/Transforms/InstCombine/strnlen-2.ll
The file was modifiedllvm/include/llvm/Transforms/Utils/SimplifyLibCalls.h
The file was modifiedllvm/test/Transforms/InstCombine/strnlen-3.ll
The file was modifiedllvm/test/Transforms/InstCombine/strnlen-5.ll
The file was modifiedllvm/lib/Transforms/Utils/SimplifyLibCalls.cpp
Commit 10c99ce67d541eb783971f8237b96530b821479a by msebor
[InstCombine] Fold memrchr calls with constant size, bail on excessive.

Reviewed By: nikic

Differential Revision: https://reviews.llvm.org/D123626
Differential Revision: https://reviews.llvm.org/D123628
The file was modifiedllvm/lib/Transforms/Utils/SimplifyLibCalls.cpp
The file was modifiedllvm/test/Transforms/InstCombine/memrchr-4.ll
The file was modifiedllvm/test/Transforms/InstCombine/memrchr-3.ll
The file was modifiedllvm/test/Transforms/InstCombine/memrchr-2.ll
Commit ce8f42d4af2cf56c96f5a8cc4c4a02bf6b790ccc by msebor
[InstCombine] Fold memrchr calls with a constant character.

Reviewed By: nikic

Differential Revision: //reviews.llvm.org/D123629
The file was modifiedllvm/test/Transforms/InstCombine/memrchr-2.ll
The file was modifiedllvm/lib/Transforms/Utils/SimplifyLibCalls.cpp
The file was modifiedllvm/test/Transforms/InstCombine/memrchr-3.ll
Commit aabeb5eb7f0aaa2c80147d904959c882cdeba1e5 by kstoimenov
Revert "[demangler] Simplify OutputBuffer initialization"

Reverting due to a bot failure:
https://lab.llvm.org/buildbot/#/builders/5/builds/22738

This reverts commit 5b3ca24a35e91bf9c19af856e7f92c69b17f989e.
The file was modifiedllvm/lib/Demangle/MicrosoftDemangleNodes.cpp
The file was modifiedllvm/lib/Demangle/RustDemangle.cpp
The file was modifiedllvm/lib/Demangle/ItaniumDemangle.cpp
The file was modifiedlibcxxabi/src/demangle/Utility.h
The file was modifiedllvm/include/llvm/Demangle/Utility.h
The file was modifiedllvm/lib/Demangle/MicrosoftDemangle.cpp
The file was modifiedllvm/lib/Demangle/DLangDemangle.cpp
The file was modifiedlibcxxabi/src/cxa_demangle.cpp
Commit d738d4717f6da88494683da62648f91f04f7c8ce by jeffreytan
Disable symbol on-demand feature for Windows

Symbol on-demand feature is never tested on Windows so it is not a surprise
that we are getting Buildbot failure from Windows:
https://lab.llvm.org/buildbot/#/builders/83/builds/18228

This patch disables symbol on-demand feature on Windows. I will find a Windows
machine to test and re-enable symbol on-demand feature as follow-up.

Differential Revision: https://reviews.llvm.org/D124471
The file was modifiedlldb/test/API/symbol_ondemand/breakpoint_language/TestBreakpointLanguageOnDemand.py
The file was modifiedlldb/test/Shell/SymbolFile/OnDemand/source-breakpoint.test
The file was modifiedlldb/test/Shell/SymbolFile/OnDemand/symbolic-breakpoint.test
The file was modifiedlldb/test/API/symbol_ondemand/breakpoint_source_regex/TestSourceTextRegexBreakpoint.py
The file was modifiedlldb/test/API/symbol_ondemand/shared_library/TestSharedLib.py
Commit 72adc461cca59ecccc3ed1fd2409aa592805572b by paul.robinson
[PS5] Add debug option testing for the PS5 target

The functionality was added in 7726ad0, catching up on the tests now.

This test mostly runs clang and checks one thing each time, which isn't
very efficient.  I added some -DAG suffixes and combined some checks so
adding PS5 checking didn't actually increase the number of clang runs.
The file was modifiedclang/test/Driver/debug-options.c
Commit fa8a9fea47e08f8d26e5796aed02e05668df1e80 by vporpodas
Recommit "[SLP][TTI] Refactoring of `getShuffleCost` `Args` to work like `getArithmeticInstrCost`"

This reverts commit 6a9bbd9f20dcd700e28738788bb63a160c6c088c.

Code review: https://reviews.llvm.org/D124202
The file was modifiedllvm/include/llvm/Analysis/TargetTransformInfoImpl.h
The file was modifiedllvm/include/llvm/CodeGen/BasicTTIImpl.h
The file was modifiedllvm/lib/Target/X86/X86TargetTransformInfo.h
The file was modifiedllvm/lib/Target/Hexagon/HexagonTargetTransformInfo.cpp
The file was modifiedllvm/lib/Target/SystemZ/SystemZTargetTransformInfo.cpp
The file was modifiedllvm/lib/Target/X86/X86TargetTransformInfo.cpp
The file was modifiedllvm/lib/Target/AMDGPU/AMDGPUTargetTransformInfo.h
The file was modifiedllvm/lib/Target/Hexagon/HexagonTargetTransformInfo.h
The file was modifiedllvm/lib/Target/ARM/ARMTargetTransformInfo.cpp
The file was modifiedllvm/include/llvm/Analysis/TargetTransformInfo.h
The file was modifiedllvm/lib/Target/SystemZ/SystemZTargetTransformInfo.h
The file was modifiedllvm/lib/Analysis/TargetTransformInfo.cpp
The file was modifiedllvm/lib/Target/RISCV/RISCVTargetTransformInfo.h
The file was modifiedllvm/lib/Target/PowerPC/PPCTargetTransformInfo.cpp
The file was modifiedllvm/lib/Target/AArch64/AArch64TargetTransformInfo.h
The file was modifiedllvm/lib/Target/RISCV/RISCVTargetTransformInfo.cpp
The file was modifiedllvm/lib/Target/ARM/ARMTargetTransformInfo.h
The file was modifiedllvm/test/Analysis/CostModel/X86/splat-load.ll
The file was modifiedllvm/lib/Target/AMDGPU/AMDGPUTargetTransformInfo.cpp
The file was modifiedllvm/lib/Target/PowerPC/PPCTargetTransformInfo.h
The file was modifiedllvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
The file was modifiedllvm/lib/Target/AArch64/AArch64TargetTransformInfo.cpp
The file was modifiedllvm/test/Analysis/CostModel/AArch64/shuffle-load.ll
Commit a9ccc7bc54bd5bb403e949b7a60a5306b19ccccb by Stanislav.Mekhanoshin
[AMDGPU] Properly mark MUBUF and FLAT LDS DMA instructions. NFC.

Add these bits to the MUBUF and FLAT LDS DMA instructions:

- LGKM_CNT - these operate on LDS;
- VALU - SPG 3.9.8: This instruction acts as both a MUBUF and
VALU instruction;

Codegen currently does not produce any of this, so the change is NFC.

Differential Revision: https://reviews.llvm.org/D124472
The file was modifiedllvm/lib/Target/AMDGPU/BUFInstructions.td
The file was modifiedllvm/lib/Target/AMDGPU/FLATInstructions.td
Commit 1692c2fdaacc628cf19638025727496397e52c5a by martin
Revert "[compiler-rt] Use C_STANDARD instead of custom logic for adding -std=c11"

This reverts commit 2f251925db060f83894a4cf5448259b7a1255552.

This was reported to break the Builtins-powerpc64le-linux::qdiv_test.c
test on ppc64le buildbots, e.g. these:

https://lab.llvm.org/buildbot/#/builders/105/builds/24538
https://lab.llvm.org/buildbot/#/builders/121/builds/18755
The file was modifiedcompiler-rt/lib/crt/CMakeLists.txt
The file was modifiedcompiler-rt/cmake/Modules/AddCompilerRT.cmake
The file was modifiedcompiler-rt/lib/builtins/CMakeLists.txt
The file was modifiedcompiler-rt/cmake/config-ix.cmake
The file was modifiedcompiler-rt/cmake/builtin-config-ix.cmake
The file was modifiedcompiler-rt/cmake/crt-config-ix.cmake
Commit 077488a6bf2e61c5fea994d5db6c040902754dcc by spatel
[InstCombine] Add tests reproducing PR53252 (NFC)

This are baseline tests for D119690 ( #53252 )

Differential Revision: https://reviews.llvm.org/D119689
The file was modifiedllvm/test/Transforms/InstCombine/canonicalize-clamp-like-pattern-between-negative-and-positive-thresholds.ll
Commit ff289feeba402a7cf68444e05e4ad2f1e5816767 by llvm-project
[OpenMPIRBuilder] Remove ContinuationBB argument from Body callback.

The callback is expected to create a branch to the ContinuationBB (sometimes called FiniBB in some lambdas) argument when finishing. This creates problems:

1. The InsertPoint used for CodeGenIP does not need to be the end of a block. If it is not, a naive callback will insert a branch instruction into the middle of the block.

2. The BasicBlock the CodeGenIP is pointing to may or may not have a terminator. There is an conflict where to branch to if the block already has a terminator.

3. Some API functions work only with block having a terminator. Some workarounds have been used to insert a temporary terminator that is removed again.

4. Some callbacks are sensitive to whether the BasicBlock has a terminator or not. This creates a callback ordering problem where different callback may have different behaviour depending on whether a previous callback created a terminator or not. The problem also exists for FinalizeCallbackTy where some callbacks do create branch to another "continue" block, but unlike BodyGenCallbackTy does not receive the target as argument. This is not addressed in this patch.

With this patch, the callback receives an CodeGenIP into a BasicBlock where to insert instructions. If it has to insert control flow, it can split the block at that position as needed but otherwise no separate ContinuationBB is needed. In particular, a callback can be empty without breaking the emitted IR. If the caller needs the control flow to branch to a specific target, it can insert the branch instruction itself and pass an InsertPoint before the terminator to the callback.

Certain frontends such as Clang may expect the current IRBuilder position to be at the end of a basic block. In this case its callbacks must split the block at CodeGenIP before setting the IRBuilder position such that the instructions after CodeGenIP are moved to another basic block and before returning create a new branch instruction to the split block.

Some utility functions such as `splitBB` are supporting correct splitting of BasicBlocks, independent of whether they have a terminator or not, returning/setting the InsertPoint of an IRBuilder to the end of split predecessor block, and optionally omitting creating a branch to the split successor block to be added later.

Reviewed By: kiranchandramohan

Differential Revision: https://reviews.llvm.org/D118409
The file was modifiedclang/test/OpenMP/critical_codegen_attr.cpp
The file was modifiedclang/test/OpenMP/cancel_codegen.cpp
The file was modifiedllvm/include/llvm/Frontend/OpenMP/OMPIRBuilder.h
The file was modifiedllvm/unittests/Frontend/OpenMPIRBuilderTest.cpp
The file was modifiedmlir/test/Target/LLVMIR/openmp-llvm.mlir
The file was modifiedclang/test/OpenMP/masked_codegen.cpp
The file was modifiedclang/lib/CodeGen/CGStmtOpenMP.cpp
The file was modifiedmlir/lib/Target/LLVMIR/Dialect/OpenMP/OpenMPToLLVMIRTranslation.cpp
The file was modifiedclang/test/OpenMP/critical_codegen.cpp
The file was modifiedclang/lib/CodeGen/CodeGenFunction.h
The file was modifiedllvm/lib/Transforms/IPO/OpenMPOpt.cpp
The file was modifiedclang/test/OpenMP/master_codegen.cpp
The file was modifiedllvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp
The file was modifiedclang/test/OpenMP/ordered_codegen.cpp
Commit 4041c44853588c1e4918ec4a160c053cf08432b5 by spatel
[InstCombine] Update predicate when canonicalizing comparisons in canonicalizeClampLike.

canonicalizeClampLike canonicalizes the ule/ugt comparisons to ult/uge,
respectively. However, it does not update the variable holding the
comparison predicate type after doing this. Later code fails to handle
the non-canonical predicate type (specifically, the swap of
ThresholdLowIncl and ThresholdHighExcl when Pred0 has been canonicalized
from ugt to uge). This leads to the miscompile reported in PR53252. Fix
this by updating the comparison predicate after canonicalizing.

Fixes #53252

Differential Revision: https://reviews.llvm.org/D119690
The file was modifiedllvm/test/Transforms/InstCombine/canonicalize-clamp-like-pattern-between-negative-and-positive-thresholds.ll
The file was modifiedllvm/lib/Transforms/InstCombine/InstCombineSelect.cpp
Commit df08b3493869540bad5d4b040dae814e078b411d by warren.ristow
[NFC] Cleanup miscellaneous header items

- Explain the use of the _MM_SHUFFLE and _MM_SHUFFLE2 macros
- Update some doxygen parameter descriptions to match the implementations
- Add "see also" doxygen tags to some intrinsics
- Minor clang-format changes

Reviewers: RKSimon

Differential Revision: https://reviews.llvm.org/D124469
The file was modifiedclang/lib/Headers/xmmintrin.h
The file was modifiedclang/lib/Headers/smmintrin.h
The file was modifiedclang/lib/Headers/emmintrin.h
The file was modifiedclang/lib/Headers/bmiintrin.h
The file was modifiedclang/lib/Headers/__wmmintrin_pclmul.h
The file was modifiedclang/lib/Headers/avxintrin.h
Commit 44e58509be72b49c3abc7b4c5a7ffa81a754fe1c by eschweitz
[NFC] More synching of sources for upstreaming.

Reviewed By: clementval

Differential Revision: https://reviews.llvm.org/D124476
The file was modifiedflang/test/Fir/addrof.fir
The file was modifiedflang/lib/Optimizer/CodeGen/TargetRewrite.cpp
The file was modifiedflang/lib/Optimizer/CodeGen/TypeConverter.h
The file was modifiedflang/test/Fir/embox.fir
The file was modifiedflang/lib/Optimizer/CodeGen/CodeGen.cpp
The file was modifiedflang/test/Fir/rebox.fir
Commit a1bb5719eca6a0e5b142518de6e25f45858baf1a by thakis
try to fix check-llvm on windows after 0a27622a1d62
The file was modifiedllvm/test/DebugInfo/NVPTX/debug-file-loc.ll
The file was modifiedllvm/test/DebugInfo/NVPTX/debug-file-loc-only.ll
Commit 449adafabe46ded951bf9bcde9c88c883c8aa0e6 by msebor
[InstCombine] Fold strnlen of constant strings.

Reviewed By: nikic

Differential Revision: https://reviews.llvm.org/D123817
The file was modifiedllvm/test/Transforms/InstCombine/strnlen-3.ll
The file was modifiedllvm/lib/Transforms/Utils/SimplifyLibCalls.cpp
The file was modifiedllvm/test/Transforms/InstCombine/strnlen-1.ll
Commit 33e8ab8ea089229e6c31855fbccda278e43f9df1 by ajcbik
[mlir][sparse] support pattern-only matrices from Matrix Market

We simply set nonzero entries to the value "1" in this case.

Reviewed By: bixia

Differential Revision: https://reviews.llvm.org/D124475
The file was modifiedmlir/lib/ExecutionEngine/SparseTensorUtils.cpp
Commit a0b8ab1ba3165d468792cf0032fce274c7d624e1 by paulkirth
[BOLT][NFC] Fix warning for unqualified call to std::move

Fixes warning from RetpolineInsertion.cpp:171:44:
warning: unqualified call to std::move [-Wunqualified-std-cast-call]

Reviewed By: maksfb

Differential Revision: https://reviews.llvm.org/D124482
The file was modifiedbolt/lib/Passes/RetpolineInsertion.cpp
Commit ffed0cfcdbee1b692fa19f9d97302cdf4423e5ee by msebor
[SimplifyLibCalls] avoid slicing 64-bit integers in an ILP32 build (PR #54739)

Reviewed By: nikic

Differential Revision: https://reviews.llvm.org/D123472
The file was modifiedllvm/lib/Transforms/Utils/SimplifyLibCalls.cpp
The file was addedllvm/test/Transforms/InstCombine/memchr-4.ll
The file was addedllvm/test/Transforms/InstCombine/strncmp-3.ll
Commit f6d209b3ec4c923f20388e3380099b2b0707f786 by daltenty
[AIX][XCOFF] error on emit symbol visibility for XCOFF object file

This is a follow on to the revert of D84265 to add an error if we'd need
to write a non-zero visibility type in the xcoff object file. We can't
currently do that because we lack the auxilary header to interpret the
bits in XCOFF32. This is important because visibility is being enabled
in the assembly writing path, and without this error the visibility
could be silently ignored.

Differential Revision: https://reviews.llvm.org/D124392
The file was modifiedllvm/test/CodeGen/PowerPC/aix-xcoff-visibility.ll
The file was modifiedllvm/lib/MC/XCOFFObjectWriter.cpp
The file was modifiedllvm/include/llvm/MC/MCSectionXCOFF.h
Commit 35e7b4f82cfabc28ebc23558917440aece3f489f by warren.ristow
[NFC] Fix argument types in doxygen comment

The argument types for _mm_extract_epi16 and _mm_insert_epi16 were
incorrectly identified as '__m256i' instead of '__m128i'.  Introduced
by df08b3493869540bad5d4b040dae814e078b411d, and fixed here.
The file was modifiedclang/lib/Headers/emmintrin.h
Commit 0ffcec418e45210a9c25632e7fe0a3ef0629b652 by jeffreytan
Fix missing import for test

The last fix missed an import in one test file causing skipIfWindows attribute
can't be recognized.
I feel embarrassed to miss it. I have run all tests on Mac to make sure them
passing in this patch.

Differential Revision: https://reviews.llvm.org/D124479
The file was modifiedlldb/test/API/symbol_ondemand/breakpoint_language/TestBreakpointLanguageOnDemand.py
Commit de94cf528627f400b580a0948c8341494baf690d by ddchen
[libc] Minor test signedness fixes

Resolve compiler warnings about signed conversion

Differential Revision: https://reviews.llvm.org/D124468
The file was modifiedlibc/utils/testutils/ExecuteFunction.h
The file was modifiedlibc/test/src/threads/cnd_test.cpp
Commit 684b1f03e3363837554bc327879c8403d0cb42c2 by ddchen
Fix [libc] Minor test signedness fixes

Add namespace specifier

Differential Revision: https://reviews.llvm.org/D124468
The file was modifiedlibc/utils/testutils/ExecuteFunction.h
Commit 00d84a9f923ab564438206b8538c721c1cc1f797 by Stanislav.Mekhanoshin
[AMDGPU] Remove vdata from buffer to lds load

Differential Revision: https://reviews.llvm.org/D124485
The file was modifiedllvm/test/MC/AMDGPU/gfx7_asm_mubuf.s
The file was modifiedllvm/test/MC/AMDGPU/mubuf.s
The file was modifiedllvm/test/MC/AMDGPU/gfx9_asm_mubuf.s
The file was modifiedllvm/test/MC/AMDGPU/mubuf-gfx10.s
The file was modifiedllvm/test/MC/Disassembler/AMDGPU/mubuf_vi.txt
The file was modifiedllvm/lib/Target/AMDGPU/AsmParser/AMDGPUAsmParser.cpp
The file was modifiedllvm/test/MC/Disassembler/AMDGPU/gfx8_dasm_all.txt
The file was modifiedllvm/test/MC/AMDGPU/gfx90a_ldst_acc.s
The file was modifiedllvm/test/MC/Disassembler/AMDGPU/gfx90a_ldst_acc.txt
The file was modifiedllvm/lib/Target/AMDGPU/BUFInstructions.td
The file was modifiedllvm/test/MC/AMDGPU/gfx8_asm_mubuf.s
The file was modifiedllvm/test/MC/Disassembler/AMDGPU/gfx9_dasm_all.txt
Commit 0274811b5a83580aaded752757a98ec0363f6113 by Stanislav.Mekhanoshin
[AMDGPU] Add both mayLoad and mayStore to MUBUF LDS opcodes

Differential Revision: https://reviews.llvm.org/D124483
The file was modifiedllvm/lib/Target/AMDGPU/BUFInstructions.td
Commit 57a210e5b705f4d176facbd8a15aa3e89ea9e335 by Yaxun.Liu
[CUDA][HIP] Fix linkage of __clang_gpu_used_external

Different TU's may have this globl var. appending linkage can
only be used with lld recognized special variables.

Change it to internal linkage.

Reviewed by: Artem Belevich

Differential Revision: https://reviews.llvm.org/D124466
The file was modifiedclang/test/CodeGenCUDA/host-used-extern.cu
The file was modifiedclang/lib/CodeGen/CodeGenModule.cpp
Commit 6a24e372192a129917996faf9d4dafcd12f59fa7 by Stanislav.Mekhanoshin
[AMDGPU] Remove now unused variable HasLdsModifier. NFC.
The file was modifiedllvm/lib/Target/AMDGPU/AsmParser/AMDGPUAsmParser.cpp
Commit 6beb2db7d168a952b4b97ca8b1e7f1b8f63460cb by ashaposhnikov
[Support] Factor out isCrash from throwIfCrash

This diff factors out the check "isCrash" from the static method "throwIfCrash".
This is a helper function that can be useful in debugging / analysis, in particular,
I'm planning to use it in the future patches for lld-fuzzer.

Test plan:
1/ ninja check-all
2/ export LLD_IN_TEST=5 ninja check-lld

Differential revision: https://reviews.llvm.org/D124414
The file was modifiedllvm/lib/Support/CrashRecoveryContext.cpp
The file was modifiedllvm/include/llvm/Support/CrashRecoveryContext.h
Commit 8dc8e59eba4930980fa42232dbcafa969f79477a by eschweitz
Upstream test for wide character literals.

Reviewed By: vdonaldson

Differential Revision: https://reviews.llvm.org/D124488
The file was addedflang/test/Fir/widechar.fir
Commit a2681c43308c5d1748a7ade4df5188972a3dd8aa by Jason Molenda
Don't push null ExecutionContext on CommandInterp exectx stack

The driver can push a null ExecutionContext on to this stack,
and later calls to SBCommandInterpreter::HandleCommand which
don't specify an ExecutionContext can pull an entry from the
stack, resulting in settings that aren't applied.

Differential Revision: https://reviews.llvm.org/D111209
rdar://81489207
The file was modifiedlldb/source/Interpreter/CommandInterpreter.cpp
Commit b3fc0fa84a09540d8fc7214899021acbf2fd6ff8 by riddleriver
[mlir][PDLL] Don't use the result of `Constraint::getDefName()` when uniquing

In the case of anonymous defs this may return the name of the base def class,
which can lead to two different defs with the same name (which hits an assert).
This commit adds a new `getUniqueDefName` method that returns a unique name
for the constraint.

Differential Revision: https://reviews.llvm.org/D124074
The file was modifiedmlir/include/mlir/Tools/PDLL/ODS/Constraint.h
The file was addedmlir/lib/Tools/PDLL/ODS/Constraint.cpp
The file was modifiedmlir/include/mlir/TableGen/Constraint.h
The file was modifiedmlir/lib/TableGen/Constraint.cpp
The file was modifiedmlir/lib/Tools/PDLL/ODS/CMakeLists.txt
The file was modifiedmlir/test/mlir-pdll/Parser/include/ops.td
The file was modifiedmlir/lib/Tools/PDLL/ODS/Context.cpp
The file was modifiedmlir/lib/Tools/PDLL/Parser/Parser.cpp
The file was modifiedmlir/test/mlir-pdll/Parser/include_td.pdll
Commit 597fde54a8d6f19b5fe6563c0ba9f8b6b9158c28 by riddleriver
[mlir][PDLL] Add support for generating PDL patterns from PDLL at build time

This essentially sets up mlir-pdll to function in a similar manner to mlir-tblgen. Aside
from the boilerplate of configuring CMake and setting up a basic initial test, two new
options are added to mlir-pdll to mirror options provided by tblgen:

* -d
This option generates a dependency file (i.e. a set of build time dependencies) while
processing the input file.

* --write-if-changed
This option only writes to the output file if the data would have changed, which for
the build system prevents unnecesarry rebuilds if the file was touched but not actually
changed.

Differential Revision: https://reviews.llvm.org/D124075
The file was addedmlir/test/lib/Tools/PDLL/CMakeLists.txt
The file was addedmlir/test/mlir-pdll/Parser/dependency-file.pdll
The file was modifiedmlir/cmake/modules/CMakeLists.txt
The file was modifiedmlir/CMakeLists.txt
The file was addedmlir/test/lib/Tools/CMakeLists.txt
The file was modifiedmlir/tools/mlir-pdll/CMakeLists.txt
The file was modifiedmlir/cmake/modules/MLIRConfig.cmake.in
The file was modifiedmlir/tools/mlir-opt/CMakeLists.txt
The file was addedmlir/test/lib/Tools/PDLL/TestPDLL.pdll
The file was modifiedmlir/cmake/modules/AddMLIR.cmake
The file was addedmlir/test/mlir-pdll/Integration/test-pdll.mlir
The file was modifiedmlir/tools/mlir-pdll/mlir-pdll.cpp
The file was modifiedmlir/tools/CMakeLists.txt
The file was modifiedmlir/tools/mlir-opt/mlir-opt.cpp
The file was modifiedmlir/test/lib/CMakeLists.txt
The file was addedmlir/test/lib/Tools/PDLL/TestPDLL.cpp
The file was addedmlir/test/lib/Tools/PDLL/lit.local.cfg
Commit fb5a59f6e1b9ec3192ecdc14b69ab83dafcf90f2 by riddleriver
[mlir][PDLL] Add initial support for a PDLL compilation database

The compilation database acts in a similar way to the compilation database
(compile_commands.json) used by clang-tidy, i.e. it provides additional
information about the compilation of project files to help the language
server. The main piece of information provided by the PDLL compilation
database in this commit is the set of include directories used when processing
the input .pdll file. This allows for the server to properly process .pdll files
that use includes anchored by the include directories set up in the build system.

The structure of the textual form of a compilation database is a yaml file
containing documents of the following form:

```
--- !FileInfo:
  filepath: <string> - Absolute file path of the file.
  includes: <string> - Semi-colon delimited list of include directories.
```

This commit also adds support to cmake for automatically generating
a `pdll_compile_commands.yml` file at the top-level of the build
directory.

Differential Revision: https://reviews.llvm.org/D124076
The file was addedmlir/test/mlir-pdll-lsp-server/compilation_database.test
The file was modifiedmlir/utils/vscode/src/mlirContext.ts
The file was addedmlir/lib/Tools/mlir-pdll-lsp-server/CompilationDatabase.h
The file was modifiedmlir/lib/Tools/mlir-pdll-lsp-server/CMakeLists.txt
The file was modifiedmlir/utils/vscode/src/configWatcher.ts
The file was addedmlir/test/mlir-pdll-lsp-server/include/included.pdll
The file was addedmlir/test/mlir-pdll-lsp-server/include/included.td
The file was addedmlir/lib/Tools/mlir-pdll-lsp-server/CompilationDatabase.cpp
The file was modifiedmlir/lib/Tools/mlir-pdll-lsp-server/PDLLServer.h
The file was modifiedmlir/lib/Tools/mlir-pdll-lsp-server/MlirPdllLspServerMain.cpp
The file was modifiedmlir/lib/Tools/mlir-pdll-lsp-server/PDLLServer.cpp
The file was addedmlir/test/mlir-pdll-lsp-server/lit.local.cfg
The file was modifiedmlir/cmake/modules/AddMLIR.cmake
The file was modifiedmlir/utils/vscode/package.json
Commit 09af7fefc8dce7648fe45fd9ffce6795b56400f2 by riddleriver
[mlir][PDLL] Add document link and hover support to mlir-pdll-lsp-server

This allows for navigating to included files on click, and also provides hover
information about the include file (similarly to clangd).

Differential Revision: https://reviews.llvm.org/D124077
The file was modifiedmlir/test/mlir-pdll-lsp-server/hover.test
The file was modifiedmlir/lib/Tools/lsp-server-support/Protocol.cpp
The file was modifiedmlir/lib/Tools/mlir-pdll-lsp-server/PDLLServer.cpp
The file was modifiedmlir/lib/Tools/PDLL/Parser/Lexer.h
The file was modifiedmlir/lib/Tools/mlir-pdll-lsp-server/PDLLServer.h
The file was modifiedmlir/lib/Tools/PDLL/Parser/Parser.cpp
The file was addedmlir/test/mlir-pdll-lsp-server/document-links.test
The file was modifiedllvm/include/llvm/Support/SourceMgr.h
The file was modifiedmlir/lib/Tools/lsp-server-support/Protocol.h
The file was modifiedmlir/test/mlir-pdll-lsp-server/initialize-params.test
The file was modifiedmlir/lib/Tools/PDLL/Parser/Lexer.cpp
The file was modifiedmlir/lib/Tools/mlir-pdll-lsp-server/LSPServer.cpp
Commit 41d2c6df5cce4a4d65ff2956be762a50600ebfd9 by riddleriver
[mlir][PDLL-LSP] Add code completion for include file paths

This allows for providing completion results for include directive
file paths by searching the set of include directories for the current
file.

Differential Revision: https://reviews.llvm.org/D124112
The file was modifiedmlir/include/mlir/Tools/PDLL/Parser/CodeComplete.h
The file was modifiedmlir/lib/Tools/PDLL/Parser/Parser.cpp
The file was modifiedmlir/lib/Tools/mlir-pdll-lsp-server/PDLLServer.cpp
The file was modifiedmlir/test/mlir-pdll-lsp-server/completion.test
The file was modifiedmlir/lib/Tools/PDLL/Parser/Lexer.cpp
The file was modifiedmlir/lib/Tools/PDLL/Parser/Lexer.h
The file was modifiedmlir/lib/Tools/mlir-pdll-lsp-server/LSPServer.cpp
Commit c15ae0a37dda4a776d974dbe5360707163e34bda by ben.shi
[RISCV][NFC] Add RV64Zbs invalid tests

Add a new test rv64zbs-invalid.s along with the aleady
existing rv32zbs-invalid.s.

Reviewed By: craig.topper, asb

Differential Revision: https://reviews.llvm.org/D124428
The file was addedllvm/test/MC/RISCV/rv64zbs-invalid.s
Commit 7cc328600e250ef44f86da34e93fcdd0635339e0 by smeenai
[ELF] Prevent LTO stripping of wrapped script-referenced symbols

After 1af25a986069f2ae8c724133fa8649bb795a7925, we stop unconditionally
retaining wrapped symbols, which means that LTO's summary-based global
dead stripping can eliminate them even if they'll be referenced by a
linker script after the wrapping is performed. Mark symbols referenced
in linker scripts as `referenced` in addition to `isUsedInRegularObj`,
so that the wrapping logic correctly sets `referencedAfterWrap` for the
symbols which will be referenced after wrapping, which will prevent LTO
from eliminating them.

An alternative would have been to change the `referencedAfterWrap` logic
to look at `isUsedInRegularObj` in addition to `referenced`, but
`isUsedInRegularObj` is also set in other places (e.g. for the entry
symbol), and it's not clear that we want `referencedAfterWrap` to take
all those places into account, so it seemed better to keep that logic
as-is and instead set `referenced` for linker script-referenced symbols.

Reviewed By: MaskRay

Differential Revision: https://reviews.llvm.org/D124433
The file was modifiedlld/ELF/Driver.cpp
The file was addedlld/test/ELF/lto/wrap-script-referenced.ll
Commit 021b2545476d01f6996c13b6892fbf0f47761f41 by riddleriver
[mlir:PDLL] Fix build on windows related to different file paths

This fixes issues with the compilation database when the file path
isn't in the correct form.
The file was modifiedmlir/test/mlir-pdll-lsp-server/completion.test
The file was modifiedmlir/lib/Tools/mlir-pdll-lsp-server/CompilationDatabase.cpp
The file was modifiedmlir/lib/Tools/mlir-pdll-lsp-server/PDLLServer.cpp
Commit 71aad31c0bcb28e821584e9ac6acf05e7550b23c by riddleriver
[mlir:PDLL] Use normalized paths in compilation database test

This fixes issues with the compilation database when the file path
isn't in the correct form.
The file was modifiedmlir/test/mlir-pdll-lsp-server/compilation_database.test
Commit 9e0b5533594e168285d4d5f9b682bdbbdc149d7a by riddleriver
[mlir] Add extensible dialects

Depends on D104534
Add support for extensible dialects, which are dialects that can be
extended at runtime with new operations and types.

These operations and types cannot at the moment implement traits
or interfaces.

Reviewed By: rriddle

Differential Revision: https://reviews.llvm.org/D104554
The file was modifiedmlir/test/lib/Dialect/Test/TestDialect.td
The file was modifiedmlir/include/mlir/IR/Dialect.h
The file was modifiedmlir/test/lib/Dialect/Test/TestDialect.h
The file was modifiedmlir/lib/TableGen/Dialect.cpp
The file was addedmlir/include/mlir/IR/ExtensibleDialect.h
The file was modifiedmlir/test/lib/Dialect/Test/TestTypes.cpp
The file was addedmlir/docs/ExtensibleDialects.md
The file was modifiedmlir/test/lib/Dialect/Test/TestAttributes.cpp
The file was modifiedmlir/tools/mlir-tblgen/DialectGen.cpp
The file was addedmlir/lib/IR/ExtensibleDialect.cpp
The file was modifiedmlir/include/mlir/IR/AttributeSupport.h
The file was modifiedmlir/include/mlir/IR/TypeSupport.h
The file was addedmlir/test/IR/dynamic.mlir
The file was modifiedmlir/lib/IR/CMakeLists.txt
The file was modifiedmlir/tools/mlir-tblgen/AttrOrTypeDefGen.cpp
The file was modifiedmlir/include/mlir/IR/DialectBase.td
The file was modifiedmlir/include/mlir/TableGen/Dialect.h
The file was modifiedmlir/test/lib/Dialect/Test/TestDialect.cpp
Commit 693246e03f28eaa72e0959fe6a969cea655b1fdc by richard
[clang-tidy] Modernize-macro-to-enum should skip macros used in other macros

If a macro is used in the expansion of another macro, that can cause
a compile error if the macro is replaced with an enum.  Token-pasting is
an example where converting a macro defined as an integral constant can
cause code to no longer compile.

This change causes such macros to be skipped from the conversion
process in order to prevent fixits from creating code that no longer
compiles.

A subsequent enhancement will examine macro usage in more detail to
allow more cases to be handled without breaking code.

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

Fixes #54948
The file was modifiedclang-tools-extra/clang-tidy/modernize/MacroToEnumCheck.cpp
The file was modifiedclang-tools-extra/test/clang-tidy/checkers/modernize-macro-to-enum.cpp
Commit bcb2b86df672c0c7779c070000c3d4cdab6017bb by shihpo.hung
[RISCV] Precommit test for D121881

Differential Revision: https://reviews.llvm.org/D123385
The file was addedllvm/test/CodeGen/RISCV/rvv/allone-masked-to-unmasked.ll
Commit 6b55f133fb0727e30fd07f56de7a386ad5a72b30 by shihpo.hung
[RISCV][RVV] Select unmasked TU RVV pseudos in a DAG post-process

Following D118810 that reduced the size of ISel table,
this patch optimizes allone-masked RVV pseudos with TU policy and
swap them out to their unmasked TU pseudos.

Since the UNDEF merge operand is not preserved, we turn it into TA
pseudo regardless of the policy operand.

Reviewed By: craig.topper, frasercrmck
Differential Revision: https://reviews.llvm.org/D121881
The file was modifiedllvm/lib/Target/RISCV/RISCVISelDAGToDAG.cpp
The file was modifiedllvm/test/CodeGen/RISCV/rvv/allone-masked-to-unmasked.ll
The file was modifiedllvm/lib/Target/RISCV/RISCVISelDAGToDAG.h
The file was modifiedllvm/lib/Target/RISCV/RISCVInstrInfoVPseudos.td
Commit e1567e771b8943861f5c886773b19ebfbf395ac5 by minyihh
[docs] Fix typos in the 'CodeGenerator' doc

NFC.

Differential Revision: https://reviews.llvm.org/D124305
The file was modifiedllvm/docs/CodeGenerator.rst
Commit d47565ed62a383175ebb5cb5733f169d72715253 by phosek
[CMake][compiler-rt] Use COMPILE_OPTIONS and LINK_OPTIONS

This avoids the need for string-ification and lets CMake deduplicate
potentially duplicate flags.

Differential Revision: https://reviews.llvm.org/D122750
The file was modifiedcompiler-rt/cmake/Modules/CompilerRTUtils.cmake
Commit 0571af01df2044b976cbd0b0c72163f6090940e6 by phosek
Revert "[CMake][compiler-rt] Use COMPILE_OPTIONS and LINK_OPTIONS"

This reverts commit d47565ed62a383175ebb5cb5733f169d72715253.
The file was modifiedcompiler-rt/cmake/Modules/CompilerRTUtils.cmake
Commit a910337b5d01b2ad889abbd41db04314fcad664e by alexandros.lamprineas
[FuncSpec] Conditional jump or move depends on uninitialised value(s).

I found this bug when performing a two-stage build of clang with
Function Specialization enabled and tuned aggressively. The crash
appears only on release builds.

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

Before accessing the contents of the ArgInfo iterator inside
SCCPInstVisitor::markArgInFuncSpecialization, we should be
checking that the iterator is valid.

Differential Revision: https://reviews.llvm.org/D124114
The file was addedllvm/test/Transforms/FunctionSpecialization/bug55000-read-uninitialized-value.ll
The file was modifiedllvm/lib/Transforms/Utils/SCCPSolver.cpp
Commit 56058b921bd9b9e14697fb6108903836f7f9c328 by zeratul976
[clangd] Output inlay hints with `clangd --check`

With the addition of inlay hints to clangd, it would be useful to output them during verbose `clangd --check`.
This patch adds an output step for inlay hints and unifies the way `--check-lines` are passed around

Reviewed By: nridge

Differential Revision: https://reviews.llvm.org/D124344
The file was modifiedclang-tools-extra/clangd/tool/ClangdMain.cpp
The file was modifiedclang-tools-extra/clangd/Protocol.cpp
The file was modifiedclang-tools-extra/clangd/Protocol.h
The file was modifiedclang-tools-extra/clangd/tool/Check.cpp
Commit 19190cc651ef153c308d23fb56f064223b144488 by phosek
[Driver] Support for compressed debug info on Fuchsia

Pass the --compress-debug-sections=zlib argument to the linker when
the use of compressed debug info is requested.

Differential Revision: https://reviews.llvm.org/D114115
The file was modifiedclang/lib/Driver/ToolChains/Fuchsia.cpp
The file was modifiedclang/test/Driver/fuchsia.c
Commit 9de7b93bc00804585a8e36fc35f6449329d8225a by jim
[RISCV][NFC] Update and add missing closed curly bracket comment in RISCVInstrInfoZb.td
The file was modifiedllvm/lib/Target/RISCV/RISCVInstrInfoZb.td
Commit 86c770346c26ce4c9abf5a5b7ab4b5bbfdcf9d78 by npopov
[AsmParser] Automatically declare and lex attribute keywords (NFC)

Rather than listing these by hand, include all enum attribute
keywords from Attributes.inc. This reduces the number of places
one has to update whenever an enum attribute is added.

Differential Revision: https://reviews.llvm.org/D124465
The file was modifiedllvm/lib/AsmParser/LLLexer.cpp
The file was modifiedllvm/include/llvm/AsmParser/LLToken.h
Commit c103f5e9da496866f2834a76709ae3a78054bb3f by npopov
[InstCombine] Combine opaque pointer GEPs with mismatching element types

Currently, two GEPs will only be combined if the result element
type of one is the same as the source element type of the other.
However, this means we may miss folding opportunities where the
second GEP could be rewritten using a different element type. This
is especially relevant for opaque pointers, where constant GEPs
often use i8 element type.

Address this by converting GEP indices to offsets, adding them,
and then converting them back to indices. The first (inner) GEP
is allowed to have variable indices as well, in which case only
the constant suffix is converted into an offset.

This should address the regression reported in
https://reviews.llvm.org/D123300#3467615.

Differential Revision: https://reviews.llvm.org/D124459
The file was modifiedllvm/test/Transforms/InstCombine/opaque-ptr.ll
The file was modifiedllvm/lib/Transforms/InstCombine/InstructionCombining.cpp
Commit c1e94591bcc95f36da0372080c455b09af8c46fd by Vitaly Buka
Revert "[asan] Enable detect_stack_use_after_return=1 by default"

Temporarily revert the option to fix
https://bugs.chromium.org/p/chromium/issues/detail?id=1319387

This reverts option default and documentation of the commit. Test
changes are not being reverted as they are improvement and break
reliance on option defaults.

Additional memory usage is a problem on mobile devices with low memory.
Even heavy thread desktop programs may need some FakeStack tunning.

This reverts commit 4b4437c084e2b8a2643e97e7aef125c438635a4d.
The file was modifiedclang/docs/ReleaseNotes.rst
The file was modifiedcompiler-rt/lib/asan/asan_flags.inc
The file was modifiedclang/docs/AddressSanitizer.rst
Commit 4a8c13a6f42e9c58af64421790509cc58208859b by david.green
[CostModel] Add basic fptoi_sat costs

This adds some basic fptosi_sat and fptoui_sat target independent cost
modelling. The fptosi_sat is modelled as a fmin/fmax to saturate the
value, followed by a fp convert. The signed values then have an
additional fcmp+select for handling Nan correctly.

The AArch64/Arm costs may be more incorrect, as the instruction exist
natively. This can be fixed with target specific cost updates.

Differential Revision: https://reviews.llvm.org/D124269
The file was modifiedllvm/test/Analysis/CostModel/ARM/fptoi_sat.ll
The file was modifiedllvm/test/Analysis/CostModel/X86/fptoi_sat.ll
The file was modifiedllvm/test/Analysis/CostModel/AArch64/fptoi_sat.ll
The file was modifiedllvm/include/llvm/CodeGen/BasicTTIImpl.h