[PATCH] D158135: [Clang][CodeGen] Add __builtin_bcopy

Shafik Yaghmour via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Aug 24 16:15:35 PDT 2023


shafik added inline comments.


================
Comment at: clang/lib/CodeGen/CGBuiltin.cpp:3567
+  case Builtin::BI__builtin_bcopy: {
+    Address Dest = EmitPointerWithAlignment(E->getArg(1));
+    Address Src = EmitPointerWithAlignment(E->getArg(0));
----------------
Maybe it is better to do these in order to be consistent with the rest of the code to avoid easy confusion.


================
Comment at: clang/lib/CodeGen/CGBuiltin.cpp:3573
+    EmitNonNullArgCheck(RValue::get(Src.getPointer()), E->getArg(0)->getType(),
+                        E->getArg(0)->getExprLoc(), FD, 1);
+    Builder.CreateMemMove(Dest, Src, SizeVal, false);
----------------



Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D158135/new/

https://reviews.llvm.org/D158135



More information about the cfe-commits mailing list