diff options
author | Duncan Sands <baldrick@free.fr> | 2008-06-15 20:12:31 +0000 |
---|---|---|
committer | Duncan Sands <baldrick@free.fr> | 2008-06-15 20:12:31 +0000 |
commit | 075293ff46752793c46906d4d26b7d46267c9747 (patch) | |
tree | 78f3fac886bd151341b1be6f846adaffc082fba7 /llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp | |
parent | 0bc21c0551ef2024abd8f366b64a83c42d9d003f (diff) | |
download | bcm5719-llvm-075293ff46752793c46906d4d26b7d46267c9747.tar.gz bcm5719-llvm-075293ff46752793c46906d4d26b7d46267c9747.zip |
The transforms in visitEXTRACT_VECTOR_ELT are
not valid if the load is volatile. Hopefully
all wrong DAG combiner transforms of volatile
loads and stores have now been caught.
llvm-svn: 52293
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp')
-rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp b/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp index ac433cf3412..462a384d0a9 100644 --- a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp @@ -4093,8 +4093,8 @@ SDOperand DAGCombiner::visitBR_CC(SDNode *N) { } -/// CombineToPreIndexedLoadStore - Try turning a load / store and a -/// pre-indexed load / store when the base pointer is a add or subtract +/// CombineToPreIndexedLoadStore - Try turning a load / store into a +/// pre-indexed load / store when the base pointer is an add or subtract /// and it has other uses besides the load / store. After the /// transformation, the new indexed load / store has effectively folded /// the add / subtract in and all of its other uses are redirected to the @@ -4215,7 +4215,7 @@ bool DAGCombiner::CombineToPreIndexedLoadStore(SDNode *N) { return true; } -/// CombineToPostIndexedLoadStore - Try combine a load / store with a +/// CombineToPostIndexedLoadStore - Try to combine a load / store with a /// add / sub of the base pointer node into a post-indexed load / store. /// The transformation folded the add / subtract into the new indexed /// load / store effectively and all of its uses are redirected to the @@ -4749,7 +4749,7 @@ SDOperand DAGCombiner::visitEXTRACT_VECTOR_ELT(SDNode *N) { Elt = (Idx < NumElems) ? Idx : Idx - NumElems; } } - if (!LN0 || !LN0->hasOneUse()) + if (!LN0 || !LN0->hasOneUse() || LN0->isVolatile()) return SDOperand(); unsigned Align = LN0->getAlignment(); |