[clang] [CIR] Add rotate operation (PR #148426)

Sirui Mu via cfe-commits cfe-commits at lists.llvm.org
Mon Jul 14 08:32:35 PDT 2025


================
@@ -57,6 +57,20 @@ static RValue emitBuiltinBitOp(CIRGenFunction &cgf, const CallExpr *e,
   return RValue::get(result);
 }
 
+RValue CIRGenFunction::emitRotate(const CallExpr *e, bool isRotateLeft) {
+  mlir::Value input = emitScalarExpr(e->getArg(0));
+  mlir::Value amount = emitScalarExpr(e->getArg(1));
+
+  // The builtin's amount parameter may have a different type than the input
+  // argument, but the CIR op uses the same type for all values.
----------------
Lancern wrote:

I just removed this because MSVC flavor builtins are excluded from this patch in the latest commit.

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


More information about the cfe-commits mailing list