Description
I'm adding some wrappers around some of the AVX512 intrinsics to make them a bit more useful. In doing so, I found that there's no real way to propagate that an intrinsic with an argument marked as constant by the [rustc_args_required_const]
attribute is constant in any wrapper.
This seems to also have been an issue in implementing the Altivec intrinsics, eg rust-lang/rust#61180. It's also a pain when adding one's own implementation of an intrinsic that needs to take a constant argument, eg _kshiftli_mask8()
. One can decorate the function, but it then needs nightly to work (but it needs it anyway to use additional target features like avx512bw to get access to the __mmask8
type).
Is there any possibility this working group could push a way of passing arguments as constants as part of const generics into wider Rust? At the moment, I can workaround this problem with the world's worst looking match statement...