================
@@ -129,6 +129,23 @@ RValue CIRGenFunction::emitBuiltinExpr(const GlobalDecl 
&gd, unsigned builtinID,
     return RValue::get(nullptr);
   }
 
+  case Builtin::BI__builtin_assume_aligned: {
+    const Expr *ptrExpr = e->getArg(0);
+    mlir::Value ptrValue = emitScalarExpr(ptrExpr);
+    mlir::Value offsetValue =
+        (e->getNumArgs() > 2) ? emitScalarExpr(e->getArg(2)) : nullptr;
+
+    const Expr *alignmentExpr = e->getArg(1);
+    mlir::Attribute alignmentAttr = ConstantEmitter(*this).emitAbstract(
----------------
Lancern wrote:

Updated to use `Expr::getIntegerConstantExpr`. Changes to `ConstantEmitter` are 
reverted.

https://github.com/llvm/llvm-project/pull/152152
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to