[clang] [clang] Implement __builtin_rotate{left,right}g (PR #160259)

Nikolas Klauser via cfe-commits cfe-commits at lists.llvm.org
Wed Sep 24 00:52:22 PDT 2025


================
@@ -767,12 +767,24 @@ def RotateLeft : BitInt8_16_32_64BuiltinsTemplate, Builtin {
   let Prototype = "T(T, T)";
 }
 
+def RotateLeftg : Builtin {
+  let Spellings = ["__builtin_rotateleftg"];
+  let Attributes = [NoThrow, Const, Constexpr, CustomTypeChecking];
+  let Prototype = "void(...)";
+}
+
 def RotateRight : BitInt8_16_32_64BuiltinsTemplate, Builtin {
   let Spellings = ["__builtin_rotateright"];
   let Attributes = [NoThrow, Const, Constexpr];
   let Prototype = "T(T, T)";
 }
 
+def RotateRightg : Builtin {
+  let Spellings = ["__builtin_rotaterightg"];
+  let Attributes = [NoThrow, Const, Constexpr, CustomTypeChecking];
----------------
philnik777 wrote:

This wasn't resolved. There is neither an implementation nor testing for constant evaluation.

https://github.com/llvm/llvm-project/pull/160259


More information about the cfe-commits mailing list