You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
riscv-isa-manual specifies that vector reduction operations with vl=0 don't update their destination register at all.
Tail-agnostic mask-agnostic reduction intrinsics (e.g. __riscv_vredand_vs_i32m2_i32m1) do not provide a configurable initial destination value, meaning that they essentially return an arbitrary result when vl=0, whereas it could be useful to be able to provide a custom one. Namely, the manual notes that using the same source & destination register can provide a guarantee that the destination always gives the expected reduction result, but there's no way to do this with intrinsics.
The best option as-is with intrinsics is to use a _tu reduction, but this clearly has a downside.
(not a super-important issue considering that vl=0 is a pain by itself (initializing said initial scalar argument requires some vl>0 at some point anyway), but worth noting nonetheless)
The text was updated successfully, but these errors were encountered:
riscv-isa-manual specifies that vector reduction operations with vl=0 don't update their destination register at all.
Tail-agnostic mask-agnostic reduction intrinsics (e.g.
__riscv_vredand_vs_i32m2_i32m1
) do not provide a configurable initial destination value, meaning that they essentially return an arbitrary result when vl=0, whereas it could be useful to be able to provide a custom one. Namely, the manual notes that using the same source & destination register can provide a guarantee that the destination always gives the expected reduction result, but there's no way to do this with intrinsics.The best option as-is with intrinsics is to use a
_tu
reduction, but this clearly has a downside.(not a super-important issue considering that vl=0 is a pain by itself (initializing said initial scalar argument requires some vl>0 at some point anyway), but worth noting nonetheless)
The text was updated successfully, but these errors were encountered: