summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2012-03-27 16:27:21 +0000
committerChris Lattner <sabre@nondot.org>2012-03-27 16:27:21 +0000
commit1cc25e8a402693288b969b348e76e955f0b36cce (patch)
tree828c68a3afc96decb9705675f0e4ee15354ecc22 /llvm/lib/CodeGen
parent38c59108add53f4dc0fc7a46d0c05f6540fd4800 (diff)
downloadbcm5719-llvm-1cc25e8a402693288b969b348e76e955f0b36cce.tar.gz
bcm5719-llvm-1cc25e8a402693288b969b348e76e955f0b36cce.zip
fix what looks like a real logic bug, found by PVS-Studio (part of PR12357)
llvm-svn: 153513
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r--llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp b/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
index 7c4db97bfea..bac644a42a8 100644
--- a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
@@ -7991,8 +7991,8 @@ bool DAGCombiner::SimplifySelectOps(SDNode *TheSelect, SDValue LHS,
if ((LLD->hasAnyUseOfValue(1) &&
(LLD->isPredecessorOf(CondLHS) || LLD->isPredecessorOf(CondRHS))) ||
- (LLD->hasAnyUseOfValue(1) &&
- (LLD->isPredecessorOf(CondLHS) || LLD->isPredecessorOf(CondRHS))))
+ (RLD->hasAnyUseOfValue(1) &&
+ (RLD->isPredecessorOf(CondLHS) || RLD->isPredecessorOf(CondRHS))))
return false;
Addr = DAG.getNode(ISD::SELECT_CC, TheSelect->getDebugLoc(),
OpenPOWER on IntegriCloud