No functional change is intended. The loop could only execute, at most,
once.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259701
91177308-0d34-0410-b5e6-
96231b3b80d8
while (isa<PHINode>(IP))
++IP;
- while (IP->isEHPad()) {
- if (isa<FuncletPadInst>(IP) || isa<LandingPadInst>(IP)) {
- ++IP;
- } else if (isa<CatchSwitchInst>(IP)) {
- IP = MustDominate->getFirstInsertionPt();
- } else {
- llvm_unreachable("unexpected eh pad!");
- }
+ if (isa<FuncletPadInst>(IP) || isa<LandingPadInst>(IP)) {
+ ++IP;
+ } else if (isa<CatchSwitchInst>(IP)) {
+ IP = MustDominate->getFirstInsertionPt();
+ } else {
+ assert(!IP->isEHPad() && "unexpected eh pad!");
}
return IP;