[PATCH] D123087: tests: add attributes that would normally come from inferattrs
Augie Fackler via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jul 12 15:47:48 PDT 2022
durin42 marked 4 inline comments as done.
durin42 added inline comments.
================
Comment at: llvm/test/Transforms/InstCombine/objsize-64.ll:5
-declare noalias i8* @malloc(i64) nounwind
+declare noalias i8* @malloc(i64) nounwind allockind("alloc,uninitialized") allocsize(0)
declare noalias nonnull i8* @_Znwm(i64) ; new(unsigned long)
----------------
nikic wrote:
> Does this and the following test need more than allocsize?
They seem to! If I golf them the tests eventually end up failing later in the series.
================
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)
----------------
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.
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