mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-28 06:32:09 +00:00
make sure not to zap volatile stores, thanks a lot to Dale for noticing this!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45402 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
d60eedca01
commit
b253a8b382
@ -4252,7 +4252,8 @@ SDOperand DAGCombiner::visitSTORE(SDNode *N) {
|
|||||||
if (LoadSDNode *Ld = dyn_cast<LoadSDNode>(Value)) {
|
if (LoadSDNode *Ld = dyn_cast<LoadSDNode>(Value)) {
|
||||||
if (Chain.Val == Ld && Ld->getBasePtr() == Ptr &&
|
if (Chain.Val == Ld && Ld->getBasePtr() == Ptr &&
|
||||||
ST->getAddressingMode() == ISD::UNINDEXED &&
|
ST->getAddressingMode() == ISD::UNINDEXED &&
|
||||||
ST->getStoredVT() == Ld->getLoadedVT()) {
|
ST->getStoredVT() == Ld->getLoadedVT() &&
|
||||||
|
!ST->isVolatile()) {
|
||||||
// The store is dead, remove it.
|
// The store is dead, remove it.
|
||||||
return Chain;
|
return Chain;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user