[clang] [clang] Implement __builtin_rotate{left,right}g (PR #160259)
Nikolas Klauser via cfe-commits
cfe-commits at lists.llvm.org
Tue Sep 23 02:34:44 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:
There should be one though. Otherwise these builtins are much less useful IMO. Given that the constant size builtins are constexpr it should also be fairly trivial to implement.
https://github.com/llvm/llvm-project/pull/160259
More information about the cfe-commits
mailing list