Taylor Swift
Taylor Swift said a song from her hit album 1989 came to her in a dreamReuters/LE Baskow

American singer/songwriter Taylor Swift revealed one of her latest songs was inspired by her past relationship. The 25-year-old singer said she came up with the track, All You Had To Do Was Stay, from a dream she had involving a former boyfriend.

In an interview with Ryan Adams for GQ, Swift said: "I had a dream that my ex showed up at my door, knocked on the door, and I opened it up and I was about ready to launch into like the perfect thing to say, and instead all that would come out of my mouth was that high-pitched chorus of people saying 'Stay!'"

"You go to say something else, and it's just like 'Stay, stay, stay,'" she continued. "And I woke up and I was like, 'Oh, that was mortifying, but that's kind of a cool vocal part.'"

It was previously revealed that the Bad Blood hitmaker was single for a long time since splitting up with One Direction star Harry Styles. Swift, who has a history of dating high-profile celebrities including Jake Gyllenhaal, Joe Jonas, Taylor Lautner, John Mayer, Zac Efron and Conor Kennedy, split with the 21-year-old singer in January 2014, after dating for two months.

During an interview with Glamour UK magazine, the Shake It Off singer, who is dating Scottish singer/DJ Calvin Harris, admitted that she does not find it easy having a boyfriend. She said: "There is no easy way for me to engage with romance. I'm really busy, so I can't. And it's a good thing that I feel really independent and I feel that my friends are all I need."

"It's kind of a sad way I got there, though, being shamed into it. What else is it when you have two boyfriends in one year and everyone's calling you boy crazy, making jokes about you at awards shows? That's public humiliation. And I don't think its fair," the Red hitmaker added.