[clang] [MSVC, ARM64] Add _Copy* and _Count* intrinsics (PR #66554)

Eli Friedman via cfe-commits cfe-commits at lists.llvm.org
Fri Sep 15 17:08:38 PDT 2023


================
@@ -10752,6 +10752,68 @@ Value *CodeGenFunction::EmitAArch64BuiltinExpr(unsigned BuiltinID,
     return Load;
   }
 
+  if (BuiltinID == AArch64::BI_CopyDoubleFromInt64 ||
+      BuiltinID == AArch64::BI_CopyFloatFromInt32 ||
+      BuiltinID == AArch64::BI_CopyInt32FromFloat ||
+      BuiltinID == AArch64::BI_CopyInt64FromDouble) {
+    return EmitScalarExpr(E->getArg(0));
----------------
efriedma-quic wrote:

I suspect this won't actually work correctly in general (for example, if you try to do arithmetic on the returned value); the returned value has the wrong type.

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


More information about the cfe-commits mailing list