[clang] [clang] Implement __builtin_stdc_rotate_left, __builtin_stdc_rotate_right (PR #160259)

Eli Friedman via cfe-commits cfe-commits at lists.llvm.org
Fri Oct 10 12:52:15 PDT 2025


================
@@ -64,3 +64,217 @@ long long rotr64(long long x, unsigned long long y) {
   return __builtin_rotateright64(x, y);
 }
 
+// CHECK-LABEL: test_builtin_stdc_rotate_left
----------------
efriedma-quic wrote:

The CHECK lines here seem to miss some important bits.  A lot of the patch is dedicated to converting the shift amounts into the proper form; we should have some checks showing that we generate appropriate code.

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


More information about the cfe-commits mailing list