fix what looks like a real logic bug, found by PVS-Studio (part of PR12357)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153513 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner 2012-03-27 16:27:21 +00:00
parent aba6559370
commit 77d9521945

View File

@ -7991,8 +7991,8 @@ bool DAGCombiner::SimplifySelectOps(SDNode *TheSelect, SDValue LHS,
if ((LLD->hasAnyUseOfValue(1) && if ((LLD->hasAnyUseOfValue(1) &&
(LLD->isPredecessorOf(CondLHS) || LLD->isPredecessorOf(CondRHS))) || (LLD->isPredecessorOf(CondLHS) || LLD->isPredecessorOf(CondRHS))) ||
(LLD->hasAnyUseOfValue(1) && (RLD->hasAnyUseOfValue(1) &&
(LLD->isPredecessorOf(CondLHS) || LLD->isPredecessorOf(CondRHS)))) (RLD->isPredecessorOf(CondLHS) || RLD->isPredecessorOf(CondRHS))))
return false; return false;
Addr = DAG.getNode(ISD::SELECT_CC, TheSelect->getDebugLoc(), Addr = DAG.getNode(ISD::SELECT_CC, TheSelect->getDebugLoc(),