| Issue |
177125
|
| Summary |
[clang] Add __builtin_bitreverseg for generic bitreverse handling
|
| Labels |
good first issue,
clang:frontend,
clang:bytecode
|
| Assignees |
|
| Reporter |
RKSimon
|
It would be useful to provide a generic __builtin_bitreverseg builtin to handle bitreverse patterms, similar to how we added __builtin_bswapg - #160266 / #162433
```cpp
constexpr int kWordBits = 128;
using Word = unsigned _BitInt(kWordBits);
Word bitrev(const Word &w) {
return __builtin_bitreverseg(w);
}
```
Similar semantic constraints (although I don't think we need the modulo 16 bit width limit?), constexpr handling and test coverage.
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs