[cfe-dev] [RFC] Opt-in vector of bool type

Simon Moll via cfe-dev cfe-dev at lists.llvm.org
Thu May 14 06:38:53 PDT 2020


Hi,

We would like to extend Clang to allow 'bool' as a valid vector element
type in C/C++ code for select targets.

This is the natural type for SIMD masks and would facilitate clean SIMD
intrinsic declarations in C/C++ code.
Vectors of i1 are supported on IR level and below down to many SIMD
ISAs, such as AVX512 or the VE target (NEC SX-Aurora TSUBASA).
We understand the historical reasons for not supporting this (gcc
complicance).
However, this would be an opt-in feature and toolchains/targets that do
not want this will be unaffected by the change.

Looking forward to your feedback.

- Simon


More information about the cfe-dev mailing list