Closed michael-platzer closed 1 year ago
Is this an observation that happens to be true when
vd == v0
Yes, hence “effectively”.
The observation is not generally valid, it only applies when the destination vector register is v0
. This is confusing and should be clarified IMHO.
I don’t find it confusing, but file a PR if you want
Could this text simply be deleted? I would support that.
I don’t find it confusing
The statement is wrong. I find incorrect and/or contradictory statements confusing. The least would be to clarify that this only applies if vd == v0
.
file a PR if you want
Will do.
Section 11.8 of the spec states:
Is this an observation that happens to be true when
vd == v0
or is this part of the specification and takes precedence over the default handling of inactive elements as specified in section 3.4.3?As far as I understand, mask destination tail elements are always treated as tail-agnostic but mask destination inactive (i.e., masked-off) elements must be treated according to the current vector mask policy, which means that inactive elements must not be overwritten in the destination vector register if that policy is set to undisturbed.
In the quoted example the destination vector register is the same as the mask source register. Therefore, an AND between the mask source register and the actual result of the compare has the same effect as if the regular mask undisturbed policy had been applied (all elements in v0 that were 0 before the second instruction stay 0). However, if the destination vector register is not
v0
, then this does no longer apply since there could be any value stored in the inactive elements of the destination vector register.