1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2025-02-01 05:01:59 +01:00

[DSE] Bail out from getLocForWriteEx if call is not argmemonly/inacc_mem.

This change should currently not have any impact, but guard against
further inconsistencies between MemoryLocation and function attributes.
This commit is contained in:
Florian Hahn 2020-10-20 13:27:54 +01:00
parent d93677f652
commit 71fb3918b4

View File

@ -1701,6 +1701,11 @@ struct DSEState {
return {MemoryLocation::getForDest(MTI)};
if (auto *CB = dyn_cast<CallBase>(I)) {
// If the functions may write to memory we do not know about, bail out.
if (!CB->onlyAccessesArgMemory() &&
!CB->onlyAccessesInaccessibleMemOrArgMem())
return None;
LibFunc LF;
if (TLI.getLibFunc(*CB, LF) && TLI.has(LF)) {
switch (LF) {