================ @@ -82,7 +82,7 @@ define void @test_store(ptr %p) { @G = external global ptr define i8 @test_store_capture(ptr %p) { -; FNATTRS: Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(readwrite, argmem: read, inaccessiblemem: none) +; FNATTRS: Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(readwrite, argmem: read, inaccessiblemem: none, errnomem: none) ---------------- antoniofrighetto wrote:
Hmm, the pointer is never accessed with an integer size, it should never alias errno, so should be correct to infer NoModRef for `test_store_capture`? Though now I think we might still miss something as follows while inferring attributes (and then let AA conclude if it aliases errno or not)? ```c++ if (Loc->Size == LocationSize::precise(sizeof(int))) ME |= MemoryEffects::errnoMemOnly(MR); ``` https://github.com/llvm/llvm-project/pull/120783 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits