diff options
| author | Dan Gohman <gohman@apple.com> | 2008-03-31 20:32:52 +0000 |
|---|---|---|
| committer | Dan Gohman <gohman@apple.com> | 2008-03-31 20:32:52 +0000 |
| commit | f549b26254dc65e0f61bb71b26502adc1aee0d9f (patch) | |
| tree | eba186f8190dd90c27d6371da224f0acd08bd396 /llvm/lib | |
| parent | 93eea6e1a00c8409a9dfaf72c0494b3a00be4ee8 (diff) | |
| download | bcm5719-llvm-f549b26254dc65e0f61bb71b26502adc1aee0d9f.tar.gz bcm5719-llvm-f549b26254dc65e0f61bb71b26502adc1aee0d9f.zip | |
Fix a DAGCombiner optimization to respect volatile qualification.
llvm-svn: 48994
Diffstat (limited to 'llvm/lib')
| -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 && |

