llvm-project
370529c7 - [clang] Implement __builtin_stdc_rotate_left, __builtin_stdc_rotate_right (#160259)

Commit
105 days ago
[clang] Implement __builtin_stdc_rotate_left, __builtin_stdc_rotate_right (#160259) This patch adds type-generic rotate builtins that accept any unsigned integer type. These builtins provide: - Support for all unsigned integer types, including _BitInt - Constexpr evaluation capability - Automatic normalization of rotation counts modulo the bit-width - Proper handling of negative rotation counts (converted to equivalent positive rotations in the opposite direction) - Implicit conversion support for both arguments for types with conversion operators. The builtins follow C23 naming conventions. Resolves https://github.com/llvm/llvm-project/issues/122819
Author
Parents
Loading