diff options
Diffstat (limited to 'llvm/lib/CodeGen')
| -rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp | 3 | 
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp b/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp index 9f44c6a728f..4eccb815e3b 100644 --- a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp @@ -4387,7 +4387,8 @@ SDOperand DAGCombiner::visitLOAD(SDNode *N) {    // value.    // TODO: Handle store large -> read small portion.    // TODO: Handle TRUNCSTORE/LOADEXT -  if (LD->getExtensionType() == ISD::NON_EXTLOAD) { +  if (LD->getExtensionType() == ISD::NON_EXTLOAD && +      !LD->isVolatile()) {      if (ISD::isNON_TRUNCStore(Chain.Val)) {        StoreSDNode *PrevST = cast<StoreSDNode>(Chain);        if (PrevST->getBasePtr() == Ptr &&  | 

