================
@@ -706,39 +711,73 @@ foreach FPTy = [F32, F64, F128, PPCF128] in {
}
// Memory
-def MEMCMP : RuntimeLibcall<Int, [Ptr, Ptr, SizeT]>;
-def MEMCPY : RuntimeLibcall<Ptr, [Ptr, Ptr, SizeT]>;
+defvar ReadPtrAttrs = [ReadOnly, CapturesNone];
+
+class MemCmpLibcall : RuntimeLibcall<Int, [Ptr, Ptr, SizeT]> {
+ let FnAttrs = CommonFnAttrs;
+ let Memory = ArgMemReadOnly;
+ let ParamAttrs = [ReadPtrAttrs, ReadPtrAttrs];
+}
+
+def MEMCMP : MemCmpLibcall;
+def MEMCPY : RuntimeLibcall<Ptr, [Ptr, Ptr, SizeT]> {
+ let FnAttrs = CommonFnAttrs;
+ let Memory = ArgMemOnly;
+ let ParamAttrs = [[NoAlias, Returned, WriteOnly],
+ [NoAlias, ReadOnly, CapturesNone]];
+}
----------------
arsenm wrote:
I guess should cut out the arm variants, that's kind of just a broken
implementation
https://github.com/llvm/llvm-project/pull/240735
_______________________________________________
llvm-branch-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits