diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Transforms/IPO/FunctionAttrs.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/Transforms/IPO/FunctionAttrs.cpp b/lib/Transforms/IPO/FunctionAttrs.cpp index d4bce9e..39f48145 100644 --- a/lib/Transforms/IPO/FunctionAttrs.cpp +++ b/lib/Transforms/IPO/FunctionAttrs.cpp @@ -188,12 +188,12 @@ bool FunctionAttrs::AddReadAttrs(const CallGraphSCC &SCC) { continue; } } else if (LoadInst *LI = dyn_cast<LoadInst>(I)) { - // Ignore loads from local memory. - if (PointsToLocalMemory(LI->getPointerOperand())) + // Ignore non-volatile loads from local memory. + if (!LI->isVolatile() && PointsToLocalMemory(LI->getPointerOperand())) continue; } else if (StoreInst *SI = dyn_cast<StoreInst>(I)) { - // Ignore stores to local memory. - if (PointsToLocalMemory(SI->getPointerOperand())) + // Ignore non-volatile stores to local memory. + if (!SI->isVolatile() && PointsToLocalMemory(SI->getPointerOperand())) continue; } |