diff options
author | Hal Finkel <hfinkel@anl.gov> | 2014-01-24 18:25:26 +0000 |
---|---|---|
committer | Hal Finkel <hfinkel@anl.gov> | 2014-01-24 18:25:26 +0000 |
commit | 08aa5bf1d544774d4689521b525a34a0807278ee (patch) | |
tree | 2a311ee1886a5bf335e3ccd94208eadecb967cb5 /lib/CodeGen | |
parent | fb282c68b7a31e8ee2810c81f5a6ed06e77cf7d1 (diff) | |
download | llvm-08aa5bf1d544774d4689521b525a34a0807278ee.tar.gz llvm-08aa5bf1d544774d4689521b525a34a0807278ee.tar.bz2 llvm-08aa5bf1d544774d4689521b525a34a0807278ee.tar.xz |
Restrict FindBetterChain DAG combines to unindexed nodes
These transformations obviously won't work for indexed (pre/post-inc) loads and
stores. In practice, I'm not sure there is any benefit to enabling them for
indexed nodes because other transformations that these might enable likely also
won't handle indexed nodes.
I don't have an in-tree test case that hits this problem, but an upcoming bug
fix will make it much more likely.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200023 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen')
-rw-r--r-- | lib/CodeGen/SelectionDAG/DAGCombiner.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/CodeGen/SelectionDAG/DAGCombiner.cpp b/lib/CodeGen/SelectionDAG/DAGCombiner.cpp index 04fe316ca6..afd80727da 100644 --- a/lib/CodeGen/SelectionDAG/DAGCombiner.cpp +++ b/lib/CodeGen/SelectionDAG/DAGCombiner.cpp @@ -7729,7 +7729,7 @@ SDValue DAGCombiner::visitLOAD(SDNode *N) { bool UseAA = CombinerAA.getNumOccurrences() > 0 ? CombinerAA : TLI.getTargetMachine().getSubtarget<TargetSubtargetInfo>().useAA(); - if (UseAA) { + if (UseAA && LD->isUnindexed()) { // Walk up chain skipping non-aliasing memory nodes. SDValue BetterChain = FindBetterChain(N, Chain); @@ -9317,7 +9317,7 @@ SDValue DAGCombiner::visitSTORE(SDNode *N) { bool UseAA = CombinerAA.getNumOccurrences() > 0 ? CombinerAA : TLI.getTargetMachine().getSubtarget<TargetSubtargetInfo>().useAA(); - if (UseAA) { + if (UseAA && ST->isUnindexed()) { // Walk up chain skipping non-aliasing memory nodes. SDValue BetterChain = FindBetterChain(N, Chain); |