mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-28 22:00:30 +00:00
Add some comments here because the lack of a check for volatile/atomic here is a bit unusual.
llvm-svn: 137662
This commit is contained in:
parent
b81c3ed76d
commit
a88908f4e7
@ -188,12 +188,16 @@ Value *llvm::FindAvailableLoadedValue(Value *Ptr, BasicBlock *ScanBB,
|
||||
|
||||
--ScanFrom;
|
||||
// If this is a load of Ptr, the loaded value is available.
|
||||
// (This is true even if the load is volatile or atomic, although
|
||||
// those cases are unlikely.)
|
||||
if (LoadInst *LI = dyn_cast<LoadInst>(Inst))
|
||||
if (AreEquivalentAddressValues(LI->getOperand(0), Ptr))
|
||||
return LI;
|
||||
|
||||
if (StoreInst *SI = dyn_cast<StoreInst>(Inst)) {
|
||||
// If this is a store through Ptr, the value is available!
|
||||
// (This is true even if the store is volatile or atomic, although
|
||||
// those cases are unlikely.)
|
||||
if (AreEquivalentAddressValues(SI->getOperand(1), Ptr))
|
||||
return SI->getOperand(0);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user