aboutsummaryrefslogtreecommitdiffstats
path: root/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
commitb061c4bc44caf62a16adad6047cda60785c2d0a4 (patch)
treed9b9092680f8b93eb8642454450be69d167722fe /lib
parent56a7c88cc532e8a72a8c3c303559500cd24d438b (diff)
downloadexternal_llvm-b061c4bc44caf62a16adad6047cda60785c2d0a4.zip
external_llvm-b061c4bc44caf62a16adad6047cda60785c2d0a4.tar.gz
external_llvm-b061c4bc44caf62a16adad6047cda60785c2d0a4.tar.bz2
Fix a DAGCombiner optimization to respect volatile qualification.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48994 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r--lib/CodeGen/SelectionDAG/DAGCombiner.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/CodeGen/SelectionDAG/DAGCombiner.cpp b/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
index 9f44c6a..4eccb81 100644
--- a/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
+++ b/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 &&