The on-and-off (and on-and-off) couple duet on the track "Who You Love" from Mayer's upcoming album, Paradise Valley, out Aug. 20.
In the song, Mayer croons: "My girl, she ain't the one that I saw coming / sometimes I don't know which way to go / and I tried to run before but I'm not running anymore / 'cause I fought against it hard enough to know / that you love who you love who you love / you can't make yourself stop dreaming of who you're dreaming of / if it's who you love, then it's who you love."
Perry references Mayer's longstanding bad boy reputation in her subsequent verse: "My boy he ain't the one that I saw coming / and some have said his heart's too hard to hold / and it takes a little time / but you should see him when he shines / 'cause you never want to let that feeling go / when you love who you love who you love."
The couple, who originally started dating back in August 2012, have enjoyed the rare public display of affection, but Perry told Vogue she was "still madly in love" with him after their most recent breakup. In July, Mayer dedicated a song to Perry and said he was thankful she had taken the time "to get to know me and love me."
Perry also has a new album, Prism, which hits stores on Oct. 22.
Listen to "Who You Love" here:
What do you think of the duet?