There actually was a part in SMW (cheese bridge maybe?) where you had to sacrifice Yoshi to go
under the end sign so it wouldn't trigger the end of the level, then take a run-up with the flying cape to get to the second level ending. Good times.
Unless there was some other way to do it that I'm not aware of, but killing Yoshi is more fun anyway.