[AST] Don't assert instruction reads/writes memory (PR51333)
authorNikita Popov <npopov@redhat.com>
Thu, 16 Jun 2022 08:22:11 +0000 (10:22 +0200)
committerNikita Popov <npopov@redhat.com>
Fri, 1 Jul 2022 15:04:48 +0000 (17:04 +0200)
commit560e694d48a6020f613281c29ffd17184f56dfb0
treee1dfc1dadbac784cd3abdafcd7e10d186aa04dc5
parenta322c104cb5987df93be22b09e527a8a0c932af5
[AST] Don't assert instruction reads/writes memory (PR51333)

This function is well-defined for an instruction that doesn't access
memory (and thus trivially doesn't alias anything in the AST), so
drop the assert. We can end up with a readnone call here if we
originally created a MemoryDef for an indirect call, which was
later replaced with a direct readnone call.

Fixes https://github.com/llvm/llvm-project/issues/51333.

Differential Revision: https://reviews.llvm.org/D127947
llvm/lib/Analysis/AliasSetTracker.cpp
llvm/test/Transforms/LICM/pr51333.ll [new file with mode: 0644]