[clang] [clang][Sema] Allow splat initialization of a sizeless vector in a C++ code (PR #205432)
Paul Osmialowski via cfe-commits
cfe-commits at lists.llvm.org
Wed Jul 15 05:30:53 PDT 2026
pawosm-arm wrote:
> no one bothered to do it and preferred magic builtins
If no one bothered, would it be accepted if someone try extending C++ splat init to all kind of vectors?
I presume a magic builtin would be some equivalent of GCC's `__builtin_vec_splat` (although in GCC it applies to altivec only). In clang it could be available to all kind of vectors. Technically speaking, for immediate param values it could be turned into `splat` IR instruction, and for the param values known only at the execution time it could be turned into `shullfevector` (basically, what the splat init for the `ext_` vector currently does). Considering what it takes to introduce a new builtin like that into clang, it would have to be supported with strong argumentation and ruling out all other options (like C++ splat init extended to all kind of vectors). I have serious doubts it will happen.
https://github.com/llvm/llvm-project/pull/205432
More information about the cfe-commits
mailing list