[clang] cast operator from ext_vector_type of bool to an integer bitmask
- Dominant language
- LLVM
- Stars
- 40.5k
- Forks
- 18.7k
- PR merge metrics
- PR metrics pending
Description
Clang lacks an operator for converting SIMD vectors (ext_vector_type) consisting of bool elements to an integer type (and vice versa), for example to unsigned _BitInt(N). In LLVM IR this is done trivially, but in C such an operator does not exist. I propose adding it; currently, one has to use the __builtin_memcpy_inline builtin to do this.
Contributor guide
Research direction
Start at Clang's ext_vector_type cast handling and the __builtin_memcpy_inline workaround; compare the requested C conversion with the corresponding LLVM IR behavior. Done means conversions between bool ext_vector_type vectors and integer bitmasks, including unsigned _BitInt(N), are specified and supported in both directions.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c
- Domain
- compilers
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100