forked from OSchip/llvm-project
SimplifyCFG: don't turn volatile stores to null/undef into unreachable. Fixes PR7369.
llvm-svn: 105914
This commit is contained in:
parent
c49ea3c50e
commit
b82de426de
|
@ -137,6 +137,9 @@ static bool MarkAliveBlocks(BasicBlock *BB,
|
|||
// they should be changed to unreachable by passes that can't modify the
|
||||
// CFG.
|
||||
if (StoreInst *SI = dyn_cast<StoreInst>(BBI)) {
|
||||
// Don't touch volatile stores.
|
||||
if (SI->isVolatile()) continue;
|
||||
|
||||
Value *Ptr = SI->getOperand(1);
|
||||
|
||||
if (isa<UndefValue>(Ptr) ||
|
||||
|
|
Loading…
Reference in New Issue