Sex before marriage, before Islam?

We visited 'Amr bin Al-'as (May Allah be pleased with him) when he was in his deathbed. He wept for a long time and turned his face towards the wall. His son said: "O father, did not the Messenger of Allah (ﷺ) give you the good news of such and such? Did he not give you glad tidings of such and such?" Then he ('Amr) turned his face towards us and said: "The best thing which you can count upon is the affirmation that: La ilaha illallah (there is no true god except Allah), and that Muhammad is the Messenger of Allah. I have passed through three phases. I remember when I hated none more than I hated the Messenger of Allah (ﷺ), and there was no other desire stronger in me than that of killing him. Had I died in that state, I would have definitely been one of the dwellers of Fire (Hell). When Allah instilled the love for Islam in my heart, I went to Messenger of Allah (ﷺ) and said, 'Extend your right hand, so that I pledge allegiance to you.' He (ﷺ) stretched out his right hand, but I withdrew my hand. He said, 'What is the matter, 'Amr?' I said, 'I wish to lay down same conditions.' He asked, 'What conditions do you wish to put forward?' I replied, 'To be granted forgiveness.' He said, 'Do you not know that (embracing) Islam wipes out all that has gone before it (previous misdeeds). Verily, emigration wipes out all the previous sins, and the Hajj (pilgrimage) wipes out all the previous sins.' Thereafter, no one was dearer to me than Messenger of Allah (ﷺ), and none was more respectable than him in my eyes. So bright was his splendour that I could not gather enough courage to look at his face for any length of time. If I were asked to describe his feature, I would not be able to do so because I have never caught a full glimpse of his face. Had I died in that state I could have hoped to be one of the dwellers of Jannah. Thereafter, we were made responsible for many things and in the light of which I am unable to know what is in store for me. When I die, no mourner, nor fire should accompany my bier. When you bury me, throw the earth gently over me and stand over my grave for the space of time within which a camel is slaughtered and its meat is distributed so that I may enjoy your intimacy, and in your presence ascertain what answer can I give to the Messengers of my Rubb (the angels in grave)."

TLDR: that (embracing) Islam wipes out all that has gone before it (previous misdeeds).

Source of the Hadith(with Arabic).

/r/islam Thread