summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
diff options
context:
space:
mode:
authorMatt Arsenault <Matthew.Arsenault@amd.com>2015-10-13 00:49:00 +0000
committerMatt Arsenault <Matthew.Arsenault@amd.com>2015-10-13 00:49:00 +0000
commite5d9515fb71bc6655cfbb2ef8ce000891aade2b1 (patch)
tree0f228b41be9d0befd1c06c13586e10a7ecb553d0 /llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
parente69bdd10ead6347dfe42593247dec9a07687389d (diff)
downloadbcm5719-llvm-e5d9515fb71bc6655cfbb2ef8ce000891aade2b1.tar.gz
bcm5719-llvm-e5d9515fb71bc6655cfbb2ef8ce000891aade2b1.zip
DAGCombiner: Don't stop finding better chain on 2 aliases
The comment says this was stopped because it was unlikely to be profitable. This is not true if you want to combine vector loads with multiple components. For a simple case that looks like t0 = load t0 ... t1 = load t0 ... t2 = load t0 ... t3 = load t0 ... t4 = store t0:1, t0:1 t5 = store t4, t1:0 t6 = store t5, t2:0 t7 = store t6, t3:0 We want to get all of these stores onto a chain that is a TokenFactor of these N loads. This mostly solves the AMDGPU merge-stores.ll regressions with -combiner-alias-analysis for merging vector stores of vector loads. llvm-svn: 250138
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp')
-rw-r--r--llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp b/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
index a26f378b49a..b9b37fd0be8 100644
--- a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
@@ -14298,14 +14298,12 @@ void DAGCombiner::GatherAllAliases(SDNode *N, SDValue OriginalChain,
SDValue Chain = Chains.pop_back_val();
// For TokenFactor nodes, look at each operand and only continue up the
- // chain until we find two aliases. If we've seen two aliases, assume we'll
- // find more and revert to original chain since the xform is unlikely to be
- // profitable.
+ // chain until we reach the depth limit.
//
// FIXME: The depth check could be made to return the last non-aliasing
// chain we found before we hit a tokenfactor rather than the original
// chain.
- if (Depth > 6 || Aliases.size() == 2) {
+ if (Depth > 6) {
Aliases.clear();
Aliases.push_back(OriginalChain);
return;
OpenPOWER on IntegriCloud