<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/122819>122819</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
[Clang] Consider adding `__builtin_rotate{left,right}g`
</td>
</tr>
<tr>
<th>Labels</th>
<td>
enhancement,
clang
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
philnik777
</td>
</tr>
</table>
<pre>
I don't think there is much of a reason not to add them and would avoid a long list of `if constexpr` just for clang to go through the same code gen path in the end. A generic version would also add support for other integral types like `_BitInt` and `__int128`.
P.S. I don't really understand why this hasn't been done in the first place. Now we just have a bunch of `g` version for all the builtins as well as numbered ones without any benefit I can see.
</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJxEksGOqzoMhp8mbKyDIEChCxYzrSrN5upK9wFGgRiSM8FBidPevv1R6IzOKiLEv__vt1WMdiXEUXTvorsWKrHxYdyNdWS_-r4vJq-f4wdoT0L2DGwsfQEbDAg2wpZmA34BBQFV9ATkGdiD0jo_2kCRhodPToO6e6tBgfO0grORc504VXaB2VNk_H8P4lTB7xQZFh9gdorWLLZ6YBN8Wk3WhKg2hNlrhBUJdsUGLB1_kHQJb_kag53hjiFaTz_9XXz5imnffXj18JkELDGuQTng544RnP3C7Ozz3fIHcTaVMfLNpyWu5SBOVSmqN1G9_Vv-V8LfeAIq556QSGOIfMCbZw4tglHx9WZCpFyAP7YXGyLD7tSMJfzjH_DAVwpG3REUTIleKYtTtWY3P2CZQDl3iEzJOrYUQUV4oHP5pLRNGFCDJ4zwsGx8YlD0hAkJF8vwAbMiiIgZp9Bjo8_NWRU41n1zGqpzL9vCjLjU9bmuu7nuh6XRUlftfJ6brtd6qNuuL-woK9lVdd3IphratmyrU9fLqW6qYZJDI0Vb4aasK527b6UPa2FjTDjWUg71uXBqQhePJZQSySiacUNiIaWQFyHlsQv5q7sWYcwiv6a0RtFWeZPiX1m27I5tvhwV3RUunqLVGPLsLa2vMX6n9Rk8K0bRvztcWMhLsKth0V9zzEUKbjTMexTNm5A3IW-rZZOmcvabkLfc8_v4tQf_G2cW8nZwRSFv32j3Uf4JAAD__2DcH0M">