summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen
diff options
context:
space:
mode:
authorNadav Rotem <nrotem@apple.com>2012-10-18 18:06:48 +0000
committerNadav Rotem <nrotem@apple.com>2012-10-18 18:06:48 +0000
commitd5f8859672baeb93c69ba00e3bf3018c094ad946 (patch)
tree7e0635f16d2607ca141155e0701ce0a8c220e462 /llvm/lib/CodeGen
parent4d3611ca8294d11c6c87b46154947bff5f42d849 (diff)
downloadbcm5719-llvm-d5f8859672baeb93c69ba00e3bf3018c094ad946.tar.gz
bcm5719-llvm-d5f8859672baeb93c69ba00e3bf3018c094ad946.zip
In SimplifySelectOps we pulled two loads through a select node despite the fact that one was dependent on the other.
rdar://12513091 llvm-svn: 166196
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r--llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp b/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
index f2d3a8d4fe9..22270968e3f 100644
--- a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
@@ -9075,6 +9075,10 @@ bool DAGCombiner::SimplifySelectOps(SDNode *TheSelect, SDValue LHS,
if ((LLD->hasAnyUseOfValue(1) && LLD->isPredecessorOf(CondNode)) ||
(RLD->hasAnyUseOfValue(1) && RLD->isPredecessorOf(CondNode)))
return false;
+ // The loads must not depend on one another.
+ if (LLD->isPredecessorOf(RLD) ||
+ RLD->isPredecessorOf(LLD))
+ return false;
Addr = DAG.getNode(ISD::SELECT, TheSelect->getDebugLoc(),
LLD->getBasePtr().getValueType(),
TheSelect->getOperand(0), LLD->getBasePtr(),
OpenPOWER on IntegriCloud