Skip to content

Commit 3beba7a

Browse files
committed
[Transform] Remove redundant condition
1 parent 7543d09 commit 3beba7a

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

llvm/lib/Transforms/Scalar/SimpleLoopUnswitch.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -770,8 +770,7 @@ static bool unswitchTrivialSwitch(Loop &L, SwitchInst &SI, DominatorTree &DT,
770770
// instruction in the block.
771771
auto *TI = BBToCheck.getTerminator();
772772
bool isUnreachable = isa<UnreachableInst>(TI);
773-
return !isUnreachable ||
774-
(isUnreachable && (BBToCheck.getFirstNonPHIOrDbg() != TI));
773+
return !isUnreachable || (BBToCheck.getFirstNonPHIOrDbg() != TI);
775774
};
776775

777776
SmallVector<int, 4> ExitCaseIndices;

0 commit comments

Comments
 (0)