Skip to content

Commit

Permalink
Update wordings to describe agnostic values in the RVV C intrinsics
Browse files Browse the repository at this point in the history
Signed-off-by: eop Chen <[email protected]>
  • Loading branch information
eopXD committed Nov 17, 2023
1 parent ec1e50d commit ffff198
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions doc/rvv-intrinsic-spec.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -624,11 +624,16 @@ unsigned __riscv_vlenb();

== Programming Notes

=== Uninitialized variables with RVV types and `vundefined`
=== Agnostic value in the RVV C intrinsics

Variables created in the declaration of an RVV type represents a scalable-sized object that corresponds to a memory address. The default values inside such uninitialized variables, and also to variables being assigned to the `vundefined` intrinsics, represent non-deterministic values. Users should be aware to not rely on the result of these values.
An agnostic value is in the granularity of "element" contained in an RVV type. Agnostic values are either:

For example, a `vxor` operation whose operands are either two uninitialized variables or two function calls to `vundefined` may not yield a zero.
- Tail element(s) of an RVV value produced through a `ta` instruction
- Masked-off element(s) of an RVV value produced through a `ma` instruction
- All elements in an uninitialized value
- A value assigned with the `vundefined` intrinsics

An agnostic value is an indeterminate value and evaluation of an agnostic value is undefined behavior. Users should not rely on any evaluation to an agnostic value.

=== Copying vector register group contents

Expand Down

0 comments on commit ffff198

Please sign in to comment.