mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-14 11:32:34 +00:00
SimplifyCFG: don't turn volatile stores to null/undef into unreachable. Fixes PR7369.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@105914 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
31135c0692
commit
c05cb8d561
@ -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
Block a user