NMATCH

Detect no matching elements, setting the condition flags

This instruction compares each active 8-bit or 16-bit element in the first source vector with all of the elements in the corresponding 128-bit segment of the second source vector. For each element in the first source vector, if no matching element is found in the corresponding segment of the second source vector, the corresponding element of the destination predicate is set to true, otherwise it is set to false. Inactive elements in the destination predicate register are set to zero. This instruction sets the First (N), None (Z), and !Last (C) condition flags based on the predicate result, and sets the V flag to zero.

This instruction is illegal when executed in Streaming SVE mode, unless FEAT_SME_FA64 is implemented and enabled.

Byte and halfword
(FEAT_SVE2)

313029282726252423222120191817161514131211109876543210
010001010sz1Zm100PgZn1Pd
op

Encoding

NMATCH <Pd>.<T>, <Pg>/Z, <Zn>.<T>, <Zm>.<T>

Decode for this encoding

if !IsFeatureImplemented(FEAT_SVE2) then EndOfDecode(Decode_UNDEF); end; let esize : integer{} = 8 << UInt(sz); let g : integer = UInt(Pg); let d : integer = UInt(Pd); let n : integer = UInt(Zn); let m : integer = UInt(Zm);

Assembler Symbols

<Pd>

Is the name of the destination scalable predicate register, encoded in the "Pd" field.

<T>

Is the size specifier, encoded in sz:

sz <T>
0 B
1 H
<Pg>

Is the name of the governing scalable predicate register P0-P7, encoded in the "Pg" field.

<Zn>

Is the name of the first source scalable vector register, encoded in the "Zn" field.

<Zm>

Is the name of the second source scalable vector register, encoded in the "Zm" field.

Operation

CheckNonStreamingSVEEnabled(); let VL : integer{} = CurrentVL(); let PL : integer{} = VL DIV 8; let elements : integer = VL DIV esize; let eltspersegment : integer = 128 DIV esize; let mask : bits(PL) = P{}(g); let operand1 : bits(VL) = if AnyActiveElement{PL}(mask, esize) then Z{VL}(n) else Zeros{VL}; let operand2 : bits(VL) = if AnyActiveElement{PL}(mask, esize) then Z{VL}(m) else Zeros{VL}; var result : bits(PL); let psize : integer{} = esize DIV 8; for e = 0 to elements-1 do if ActivePredicateElement{PL}(mask, e, esize) then let segmentbase : integer = e - (e MOD eltspersegment); result[e*:psize] = ZeroExtend{psize}('1'); let element1 : bits(esize) = operand1[e*:esize]; for i = segmentbase to (segmentbase + eltspersegment) - 1 do let element2 : bits(esize) = operand2[i*:esize]; if element1 == element2 then result[e*:psize] = ZeroExtend{psize}('0'); end; end; else result[e*:psize] = ZeroExtend{psize}('0'); end; end; PSTATE.[N,Z,C,V] = PredTest{PL}(mask, result, esize); P{PL}(d) = result;


2026-03_rel 2026-03-26 20:48:11

Copyright © 2010-2026 Arm Limited or its affiliates. All rights reserved. This document is Non-Confidential.