For now, when final suspend can be simplified by simplifySuspendPoint, handleFinalSuspend is executed as well to remove last case in switch instruction. This causes issue in https://bugs.llvm.org/show_bug.cgi?id=45130, this patch fixes it.
TestPlan: check-llvm
Beginner question of mine: what is this assert testing? I would guess that it's testing that SI != nullptr, but the cast<CoroSuspendInst>(...) above would also fail were that the case. As far as I know CoroSuspendInst and its class hierarchy don't implement a boolean conversion operator either... so if this is a null check, I think it's redundant and can be removed, but if it does something more, please let me know!