summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2008-03-31 20:32:52 +0000
committerDan Gohman <gohman@apple.com>2008-03-31 20:32:52 +0000
commitf549b26254dc65e0f61bb71b26502adc1aee0d9f (patch)
treeeba186f8190dd90c27d6371da224f0acd08bd396 /llvm/lib
parent93eea6e1a00c8409a9dfaf72c0494b3a00be4ee8 (diff)
downloadbcm5719-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.cpp3
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 &&
OpenPOWER on IntegriCloud