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 | ccc18e1330a7e3e2be33adb0192d87b0cfb1f30c (patch) | |
tree | fad0b00351d92a4ee26a15bae7867c2fbafcee6f /llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp | |
parent | 38b67d0cafd5bfb2465bd290b0e9dba699ec2bdd (diff) | |
download | bcm5719-llvm-ccc18e1330a7e3e2be33adb0192d87b0cfb1f30c.tar.gz bcm5719-llvm-ccc18e1330a7e3e2be33adb0192d87b0cfb1f30c.zip |
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.
llvm-svn: 200023
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp')
-rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp b/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp index 04fe316ca6e..afd80727da0 100644 --- a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp +++ b/llvm/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); |