Skip to content

Commit

Permalink
Fix a crash in the ImplicitNullChecks pass.
Browse files Browse the repository at this point in the history
  • Loading branch information
vargaz committed Mar 26, 2022
1 parent 3c78a53 commit f1f846f
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions llvm/lib/CodeGen/ImplicitNullChecks.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -353,6 +353,8 @@ ImplicitNullChecks::areMemoryOpsAliased(const MachineInstr &MI,
return AR_MayAlias;
continue;
}
if (MMO2->getValue() == nullptr)
return AR_MayAlias;
if (!AA->isNoAlias(
MemoryLocation::getAfter(MMO1->getValue(), MMO1->getAAInfo()),
MemoryLocation::getAfter(MMO2->getValue(), MMO2->getAAInfo())))
Expand Down

0 comments on commit f1f846f

Please sign in to comment.