[LV] Extend epilogue vectorization test coverage with dead FORs/FMinMax. (#191799)
Extend test coverage with dedicated epilogue vectorization tests for
dead first-order recurrences and FMinMaxNum reductions.
Add users to FORs in existing tests where the dead FORs appeared
unintentional.
[clang][bytecode] Fix activating primitive array elements (#191772)
For primitive array elements, we would accidentally activate the element
and then immediate de-activate the array root, which is wrong. Ignore
the element from the beginning to the later check never even compares
with the element.
[clang-tidy] Emit warning when user is using deprecated `zircon` checks (#189522)
Add `utils::diagDeprecatedCheckAlias` so checks can detect whether they
are running under a deprecated name without enabling the new names.
This commit also comes with an example with `zircon` module. It is
deprecated in 22 release but we didn't provide a note for it before.
[Flang] External subprograms should be allowed as proc_target in procedure pointers. (#183268)
Fixes https://github.com/llvm/llvm-project/issues/177505.
This patch updates an existing external procedure symbol with the
correct function signature and argument attributes, so it can be safely
used as a proc_target without signature conflicts.
---------
Co-authored-by: jeanPerier <jean.perier.polytechnique at gmail.com>
[AArch64] Mark X16 as clobbered in PAUTH_EPILOGUE for hint-based PAuthLR (#175991)
When users request branch protection with PAuthLR on targets that do not
support the PAuthLR instructions, the PAUTH_EPILOGUE falls back to using
hint-space instructions. This fallback sequence uses X16 as a temporary
register, but X16 was not listed in the clobber set.
Because Speculative Load Hardening uses X16, this omission made SLH
incompatible with this PAUTH_EPILOGUE path.
Mark X16 as clobbered so the compiler does not assume X16 is preserved
across the epilogue, restoring compatibility with Speculative Load
Hardening and avoiding incorrect register liveness assumptions. The
clobber is added in C++ rather than TableGen, as X16 is only clobbered
when PAuthLR is requested as a branch protection variation and should
not be treated as clobbered unconditionally.
[NFC][SPIR-V] Fix logical-struct-access.ll to pass spirv-val validation (#191792)
OpReturnValue with a pointer type is invalid in SPIR-V Logical
addressing model (Vulkan). The functions in the test return
OpAccessChain results, which are pointers
related to https://github.com/llvm/llvm-project/issues/190736
[libc] Add Annex K strnlen_s function (#186112)
This patch adds the `strnlen_s` function from Annex K.
In order to reduce duplication between `strnlen` and `strnlen_s`, the
common logic has been extracted to a new internal function which both
now call.
In addition to the function definition, the patch adds a unit test and a
fuzzing test.
[TySan][Sanitizer Common] Enable TySan testing in the sanitizer commo… (#191385)
…n test suite
Secondary pr to enable tests after
https://github.com/llvm/llvm-project/pull/183310 enables the features
[flang][NFC] Converted five tests from old lowering to new lowering (part 43) (#191753)
Tests converted from test/Lower/Intrinsics: transpose.f90,
transpose_opt.f90, trim.f90, ubound.f90, ubound01.f90
[MLIR][LLVMIR] Handle MDTuple-of-MDStrings module flags (e.g. riscv-isa) (#188741)
The "riscv-isa" LLVM module flag stores its value as an MDTuple
containing MDStrings (e.g. `\!{\!"rv64i2p1", \!"m2p0"}`). Previously,
this fell through the unrecognized-key path in
`convertModuleFlagValueFromMDTuple`, which emitted a warning and dropped
the flag during import.
This patch adds generic handling for MDTuples whose operands are all
MDStrings:
- Import: convert to `ArrayAttr<StringAttr>` in
`convertModuleFlagValueFromMDTuple`
- Export: convert `ArrayAttr<StringAttr>` back to an MDTuple of
MDStrings in `convertModuleFlagValue`, enabling a lossless round-trip
- Verifier: allow `ArrayAttr<StringAttr>` as a valid `ModuleFlagAttr`
value for keys not otherwise handled by specific verifier branches
Fixes #188122
Assisted-by: Claude Code
[lldb] Add binary multiplication, division, remainder to DIL (#187281)
Add binary arithmetic multiplication, division, remainder to DIL.
This patch also passes DILMode to the parser to check if binary
multiplication is allowed by the mode. This cannot be done in the lexer
alone, because it allows token `*` as a dereference operator for legacy
mode, but that token could also be a binary multiplication allowed only
in full mode.
[MLIR][ODS] Error on optional attribute used outside optional group in assemblyFormat (#188726)
Using an optional attribute directly in assemblyFormat (e.g., `$attr
attr-dict`) without wrapping it in an optional group causes the
generated printer to call `printAttribute` with a null `Attribute` when
the attribute is absent. This leads to a crash in the alias initializer
when it calls `getAlias` on a null attribute.
Add a validation check in `OpFormatParser::verifyAttributes` that
detects this pattern and emits a diagnostic error with a helpful note
pointing users to the correct `($attr^)?` syntax.
Fixes #58064
Assisted-by: Claude Code
[lldb][Process/FreeBSDKernelCore] Improve error handling (#191423)
Improve error handling with the following changes:
- If `kvm_open2()` fails in `DoLoadCore()`, log error with a message
obtained from the function.
- Return false or continue for loop if memory read fails.
- Rename `!error.Success()` to `error.Fail()` for readability (NFC).
Signed-off-by: Minsoo Choo <minsoochoo0122 at proton.me>
[compiler-rt] clang-cl: skip MSVC external-header probe; -std=c++ for unit-test compiles (#191564)
1. `check_cxx_compiler_flag` marked `COMPILER_RT_HAS_EXTERNAL_FLAG` true
for clang-cl, so `/experimental:external` and `/external:anglebrackets`
were passed and clang-cl warned they were unused. Now only probe with
real MSVC (not Clang); set the flag false otherwise; rely on that in
asan/interception/ubsan.
2. Custom compile lines for unit tests didn’t get C++17, so headers hit
`-Wc++17-extensions` (e.g. `constexpr if` / message-less `static_assert`
in FuzzedDataProvider / asan_fake_stack). Now append
`-std=c++${CMAKE_CXX_STANDARD}` or `-std=c++17` for C++ sources in
`clang_compile()` for both standalone and non-standalone builds.