https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118377

--- Comment #7 from Tejas Belagod <belagod at gcc dot gnu.org> ---
Sorry for the delay in replying. Though variable-length(VLA) SVE vector types
behave as GNU vectors for C/C++ operator semantics, there is currently no
support for decomposing them into scalar operation sequences if no native
support exists.

For this test case, fixed length SVE vectors(eg. -msve-vector-bits=256) compile
fine because the div is optimized into a sequence of shifts and adds. This
optimization is currently only supported for fixed-size vectors
(expand_vector_divmod ()) and even if we do end up supporting VLA vector types
for this optimization, we'd have to fallback to piecewise operation if the
optimization is unsuccessful for which the support doesn't exist. Therefore, I
think it's best to diagnose and reject such types' operations in the FE as
unsupported by the target.

Reply via email to