[PATCH] D123087: tests: add attributes that would normally come from inferattrs
Nikita Popov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jul 22 00:55:50 PDT 2022
nikic accepted this revision.
nikic added a comment.
This revision is now accepted and ready to land.
LGTM
================
Comment at: llvm/test/Transforms/MemCpyOpt/memcpy.ll:331
-declare noalias i8* @malloc(i32) willreturn
+declare noalias i8* @malloc(i32) willreturn allockind("alloc,uninitialized") allocsize(0)
----------------
durin42 wrote:
> nikic wrote:
> > Still don't understand why this one would need extra attributes.
> I think so that the analysis knows it's an uninitialized block. In any case, if I remove the allockind() the test fails once we're relying on attributes instead of the hard-coded list.
Oh duh, we need `allockind` to allow eliminating the dead malloc call. The `allocsize` is not necessary.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D123087/new/
https://reviews.llvm.org/D123087
More information about the llvm-commits
mailing list