Fix redundant condition (PR32138)

'!A || (A && B)' is equivalent to '!A || B'

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@297527 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Simon Pilgrim 2017-03-10 22:44:47 +00:00
parent 2f2421b3c0
commit 6cbddefc93

View File

@ -260,8 +260,8 @@ bool BranchCoalescing::canCoalesceBranch(CoalescingCandidateInfo &Cand) {
// For now only consider triangles (i.e, BranchTargetBlock is set,
// FalseMBB is null, and BranchTargetBlock is a successor to BranchBlock)
if (!Cand.BranchTargetBlock || (Cand.BranchTargetBlock && FalseMBB)
|| !Cand.BranchBlock->isSuccessor(Cand.BranchTargetBlock)) {
if (!Cand.BranchTargetBlock || FalseMBB ||
!Cand.BranchBlock->isSuccessor(Cand.BranchTargetBlock)) {
DEBUG(dbgs() << "Does not form a triangle - skip\n");
return false;
}