[UpdateTestChecks] Add --filter/--filter-out support to update_mir_test_checks.py (#191059)
These options were already accepted by the script but silently ignored.
This patch makes them functional, consistent with
update_llc_test_checks.py.
Co-Authored-By: Claude Sonnet 4.6 <noreply at anthropic.com>
[Clang] Enable multilib library support for Linux/Windows (#188584)
Summary:
This PR standardizes the logic used in the baremtal build to the common
toolchain interface. We then use this to handle the support in Linux and
Windows.
The multilib functionality allows us to select variant libraries based
off of a configuration file. For example, if the `multilib.yaml` file
detects `-fsanitize=address` it will automatically use the libraries
inside of `asan/` instead. These are layered so they do not necessarily
need to be complete library builds. More documentation can be found at
https://clang.llvm.org/docs/Multilib.html.
The motivation for this is so platforms like ROCm can use a more
standard way to ship debug / asan variants of libraries like OpenMP or
similar for both GPU an CPU targets.
[lldb] Fix: Disable shared build dir when testing with PDB (#190991)
The mechanism to disable `SHARED_BUILD_TESTCASE` for tests
that set `TEST_WITH_PDB_DEBUG_INFO` doesn't work. The property
was set on the wrong object. This patch fixes it and moves the assignment
after the for-loop, since the respective dict only exists there.
[mlir][EmitC] Convert math::RoundEvenOp, SqrtOp and RsqrtOp (#190158)
This patch extends the Math-to-EmitC conversion to cover `math.roundeven` and
`math.sqrt` for scalar f32/f64 values.
`math.roundeven` and `math.sqrt` are lowered to `emitc.call_opaque` using the
appropriate target-specific names:
C: `roundevenf` / `roundeven`, `sqrtf` / `sqrt`
C++: `std::roundeven`, `std::sqrt`
The patch also adds coverage for `math.rsqrt`. There is no direct EmitC
lowering for `math.rsqrt`; instead, the new tests verify the existing expansion
path through `-math-expand-ops=ops=rsqrt`, followed by `-convert-math-to-emitc`
and `-convert-arith-to-emitc`. This ensures the cross-dialect lowering sequence
produces the expected `emitc.constant`, `emitc.call_opaque`, and `emitc.div`
operations for f32/f64.
Unsupported cases remain unchanged. In particular, the new test documents that
f16 math.rsqrt is not lowered because math.sqrt is only converted for f32/f64.
[UpdateTestChecks] Add --filter/--filter-out support to update_mir_test_checks.py
These options were already accepted by the script but silently ignored.
This patch makes them functional, consistent with update_llc_test_checks.py.
Co-Authored-By: Claude Sonnet 4.6 <noreply at anthropic.com>
[LV] Don't skip VPlan cost model for div/rem instructions (#187056)
In LoopVectorizationPlanner::precomputeCosts we are skipping calculation
of costs using the VPlan cost model, instead preferring to use the
legacy costs. This helps to prevent the legacy and vplan cost model
assert firing, but really we should be encouraging full use of the VPlan
cost model.
I've created this initial PR to stop skipping the computation costs for
udiv/urem/sdiv/srem instructions. The VPlan costs seem to match up
nicely.
I intend to follow up with more PRs to move more opcodes across.
[lldb] Use UNWIND_LOG macro in more places in RegisterContextUnwind (#192032)
Replace calls to `UnwindLogMsg()`/`UnwindLogMsgVerbose()` with
`UNWIND_LOG`/`UNWIND_LOG_VERBOSE` macros introduced in 8417922c.
This replaces calls whose format string contains only '%d' and sometimes
'%s' specifiers, the rest will be addressed in a future patch.
As a result of this change, the `UnwindLogMsgVerbose()` is no longer
used and has been removed.
[BOLT][runtime] fix readlink bound check in getBinaryPath. (#191666)
Ret was uint32_t truncating the uint64_t __readlink return, and was
compared against the unrelated getdents64 BufSize (1024) instead of
sizeof(TargetPath) (NameMax, 4096). A truncated readlink of exactly
NameMax bytes also wrote one byte past TargetPath.
[lldb] Start using formatv() in RegisterContextUnwind (NFCI) (#191576)
This introduces two macros that do the same
`UnwindLogMsg()`/`UnwindLogMsgVerbose()` functions, but allow using
`formatv()`-style formatting. In addition to the benefits that the
`formatv()` function provides, this makes `log enable -F lldb unwind`
print the correct methods names from which the messages originate
(previously, it printed the name of one of those two helper methods).
I didn't replace all function calls with macros because there are too
many of them for one PR. This only replaces calls whose format string
contains no specifiers or only '%s' specifiers.
[mlir][spirv] Mark several SPIR-V TOSA Ext Inst ops as NoMemoryEffects (#191814)
Initially such ops were marked Pure wrongly since they could overflow or
underflow the accumulator and result in undefined behavior.
Signed-off-by: Davide Grohmann <davide.grohmann at arm.com>
[LFI][AArch64] Add AArch64 LFI rewrites for system instructions (#186896)
This builds on the MCLFIRewriter infrastructure to add the
AArch64-specific LFI rewriter, which rewrites AArch64 instructions for
LFI sandboxing during the assembler step.
The initial rewriter handles system instructions: system calls, thread
pointer accesses, and also rejects modifications to reserved registers.