[SimplifyLibCalls] Place deref attr even if nonnull already set
authorNikita Popov <npopov@redhat.com>
Tue, 4 Oct 2022 09:20:54 +0000 (11:20 +0200)
committerNikita Popov <npopov@redhat.com>
Tue, 4 Oct 2022 09:26:15 +0000 (11:26 +0200)
commit635f93dff7f07a58af4e8a7c915dfdb1852bb76b
treeefeea2f9907fe18be902a4b51fad8bc420b150f5
parent0f32f0e147abdbfa98b9011c0aae2ea213de2205
[SimplifyLibCalls] Place deref attr even if nonnull already set

If nonnull is already set, we currently skip setting both nonnull
and dereferenceable. Make these independent, to avoid regressions
when additional nonnull attributes are inferred earlier.
21 files changed:
llvm/lib/Transforms/Utils/SimplifyLibCalls.cpp
llvm/test/Transforms/InstCombine/memchr-4.ll
llvm/test/Transforms/InstCombine/memchr-6.ll
llvm/test/Transforms/InstCombine/memchr-7.ll
llvm/test/Transforms/InstCombine/memchr.ll
llvm/test/Transforms/InstCombine/memset-1.ll
llvm/test/Transforms/InstCombine/printf-1.ll
llvm/test/Transforms/InstCombine/printf-2.ll
llvm/test/Transforms/InstCombine/sprintf-1.ll
llvm/test/Transforms/InstCombine/strchr-1.ll
llvm/test/Transforms/InstCombine/strchr-3.ll
llvm/test/Transforms/InstCombine/strcmp-memcmp.ll
llvm/test/Transforms/InstCombine/strcpy-1.ll
llvm/test/Transforms/InstCombine/strlcpy-1.ll
llvm/test/Transforms/InstCombine/strlen-1.ll
llvm/test/Transforms/InstCombine/strlen-4.ll
llvm/test/Transforms/InstCombine/strncat-2.ll
llvm/test/Transforms/InstCombine/strncmp-3.ll
llvm/test/Transforms/InstCombine/strncpy-1.ll
llvm/test/Transforms/InstCombine/strnlen-2.ll
llvm/test/Transforms/InstCombine/strnlen-3.ll