If you’re referring to the so-called Prophecy of St. Malachy, your question doesn’t belong in the Scripture forum, because it’s not scripture.
Second, it’s not actually by St. Malachy. It was a custom of the Middle Ages and Renaissance to write political articles or histories or fantasies in the form of prophecies by people like Merlin, Tam Lin, kings, saints, and so forth. Some were meant to be believed; some weren’t.
The “Prophecy of St. Malachy” was apparently written up by some Irish priest or monk guys living in Rome. Since St. Malachy lived hundreds of years before them, they could use him to write a big chronological history poem about the previous popes of the kind the Irish love, with lots of kennings and references and fun stuff like that. Then they tacked on some future prophecies, all very vague; but if I recall correctly, the first one was either a description of their current pope, or a political “prediction” about the guy whom they supported as the next Pope.
Since the thing was written in Latin and was entertaining, it got a bit circulation. Since the future “prophecy” stanzas were vague and there were tons of them, they could be made to apply to pretty much anybody. (Especially if you altered verses, as apparently did happen in some cases.)
So at this point, we have reached the verse about “Glory of the Olives”, which is supposed to apply to Pope Benedict XVI. Whoever had been elected, it would have been made to apply to him, too. I remember people talking about how it applied to Cardinal Arinze.
But since even poetic Irish guys eventually get tired of writing stanza after stanza, the next verse says the next pope will be Peter, because the world will end.

But of course, every pope is Peter, so it’s not all that great a prophecy!
I wouldn’t lose any sleep about it. If even Jesus Christ didn’t know the day or the hour, I doubt a bunch of poetry-writing Irish priests hanging around Rome and drinking vino would have been let in on the date of the end of the world. There will be popes and rumors of popes, no doubt.

But none of the other fun fake prophecies could accurately predict the end of the world, either.