RISCV: Fix optimizeCondBranch crash on an undef register (#216633)
Found by AI while working on something else.
Co-authored-by: Claude (Opus 4.8) <noreply at anthropic.com>
libnvmm(3): Fix sign-extension on immediates
It's the immediate size that should be used for sign-extension, not the
operand size. Fix this, and add a unit-test for it.
Credit: Maxime Villard (m00nbsd)
libnvmm(3): Fix the emulation of REP/REPN prefixes
- REP applies only to string instructions, so restrict the emulation
accordingly, and add a unit-test to ensure correctness.
- REPN applies only to SCAS and CMPS, neither of which we support;
nevertheless, allow REPN to be used with MOVS/LODS/STOS.
Credit: Maxime Villard (m00nbsd)
libnvmm(3): Do not confuse long-mode and 64bit-mode
32bit compatibility mode has EFER.LMA=1 and CS.L=0. Use CS.L rather than
EFER.LMA to determine whether to apply segmentation.
Credit: Maxime Villard (m00nbsd)
libnvmm(3): Remove erroneous PS check on L1 PTEs
On L1 PTEs, the PS bit is actually PAT, and it is legal for it to be set.
Credit: Maxime Villard (m00nbsd)
Revert "libnvmm(3): Simplify x86_emul.func prototype"
This reverts commit b4ca47aaefeba38c6205a34b0e24495f29d61463.
Directly passing 'uint64_t *gprs' saves a few fetch instructions.
In addition, we're not going to implement the instruction emulation that
requires further extend the 'func' prototype, so this reverted
simplification is of little use.
Discussed-with: Maxime Villard
testcases/libnvmm: Improve error handling of IO/memory callbacks
Don't simply abort the program in case of nvmm_assist_{io,mem}() errors.
Instead, propagate the error to the test runner so that the total
failures are counted and reported in the end.
This is a follow-up fix to my previous commit
dad22e44dc57d9ba999b6826494043a616e16b43.
multimedia/libvpl-tools: New port: Intel Video Processing Library Tools
Intel Video Processing Library (Intel VPL) tools provide access to hardware
accelerated video decode, encode, and processing capabilities on Intel GPU
from the command line.
The tools require the Intel VPL base library and a runtime library installed.
Current runtime implementations:
- Intel VPL GPU Runtime for use on Intel Iris Xe graphics and newner
- Intel Media SDK for use on legacy Intel graphic
WWW: https://www.intel.com/content/www/us/en/developer/tools/vpl/overview.html
PR: 297308
Reported by: Yuichiro NAITO <naito.yuichiro at gmail.com> (new maintainer)
multimedia/libvpl-tools: New port: Intel Video Processing Library Tools
Intel Video Processing Library (Intel VPL) tools provide access to hardware
accelerated video decode, encode, and processing capabilities on Intel GPU
from the command line.
The tools require the Intel VPL base library and a runtime library installed.
Current runtime implementations:
- Intel VPL GPU Runtime for use on Intel Iris Xe graphics and newner
- Intel Media SDK for use on legacy Intel graphic
WWW: https://www.intel.com/content/www/us/en/developer/tools/vpl/overview.html
PR: 297308
Reported by: Yuichiro NAITO <naito.yuichiro at gmail.com> (new maintainer)
[X86][CostModel] Free a clean narrow zext used as a GEP index (#216256)
`getCastInstrCost` already treats a narrow (i8/i16) zext of a load as
free (the extension folds into the load). This extends the same
movzx-free reasoning to any narrow zext whose single use is a **GEP
index** with a provably-clean source — a load, a `zeroext` argument, or
known-zero high bits. On x86-64 `[base + index*scale + disp]` reads the
index at full width, so a clean narrow index needs no `movzx`. A dirty
source (e.g. an `i16 add` used only as an index) still needs one and is
unchanged. The cost is consumed by SimplifyCFG's two-entry-PHI fold
budget (`TCK_SizeAndLatency`); overcharging a clean index by one kept
small select diamonds branched on x86.
Test: `llvm/test/Analysis/CostModel/X86/zext-gep-index.ll` — fails on
trunk
(clean known-bits index reports 1), passes with the patch.
---------
Co-authored-by: Cursor <cursoragent at cursor.com>
[RISCV] Move -mtune=native expansion into riscv::getRISCVTuneCPU. NFC (#215891)
Previously it was applied at one of the call sites. Applying it inside
makes it more clear how it is supposed to interact with
-mexperimental-mtune-syntax
[ORC] Extend SymbolLookupSet unit test coverage (#216617)
Covers the rest of the public API: construction, add/append, remove,
remove_if, forEachWithRemoval, getSymbolNames, sortByName, sortByAddress
and containsDuplicates.