[PATCH] D117095: [BasicAA] Add support for memmove intrinsic

Evgeniy via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 12 06:01:23 PST 2022


ebrevnov added a comment.

In D117095#3236981 <https://reviews.llvm.org/D117095#3236981>, @ebrevnov wrote:

> In D117095#3236854 <https://reviews.llvm.org/D117095#3236854>, @nikic wrote:
>
>> Pretty sure this is dead code and the generic code already takes care of it. Your tests also pass for me without this patch.
>
> For some reason generic code hadn't handled my original test case. Ok, let me check why... probably we should make generic code to be more generic :-)

The problem turned out to be in the check "AAQI.CI->isNotCapturedBeforeOrAt(Object, Call)" at BasicAliasAnalysis.cpp:935. AFAIU, If called function is marked with "inaccessiblemem_or_argmemonly" (or stronger) then we may simply ignore this check. Do you think this is a move in the right direction?
I got expected result If I change the mentioned line to:

(AAQI.CI->isNotCapturedBeforeOrAt(Object, Call) || AAResults::onlyAccessesInaccessibleOrArgMem(getModRefBehavior(Call)))


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D117095/new/

https://reviews.llvm.org/D117095



More information about the llvm-commits mailing list