[clang] [Clang][RISCV] Add operator overloading for builtin RVV vector types (PR #192722)
Olaf Bernstein via cfe-commits
cfe-commits at lists.llvm.org
Sat Apr 18 00:34:40 PDT 2026
camel-cdr wrote:
There should be a feature detection macro once this is fleshed out.
It would make porting some existing SIMD abstractions possible without changing all operator overloading to function calls, but I do wonder if defining all operators by default may conflict with custom operator overloading.
E.g. you may want to implement a vfloat4 API that currently uses operator overloading, so ideally you'd want to always operate on vl=4, but if I understand this patch correclty that wouldn't work, because the operators are already defined and work at vl=vlmax.
The fixed size vector type are also not usable for that use case, because they require you to set the exect vector length at compile time, instead of the minimum.
https://github.com/llvm/llvm-project/pull/192722
More information about the cfe-commits
mailing list