BEVERLY HILLS, Calif. >> John Fogerty performed with the Foo Fighters and Jennifer Hudson. R. Kelly debuted a tribal new song in tribute to Nelson Mandela. And Miley Cyrus basically called the audience old.

Clive Davis’ annual pre-Grammy gala drew stars who are set to shine at Sunday’s Grammy Awards and featured performances from musical dynamos like Lionel Richie and newcomers such as Lorde and Macklemore & Ryan Lewis.

“Maybe this song is better for this crowd,” she said before performing Dolly Parton’s “Jolene,” which earned the 21-year-old a louder applause.

Robin Thicke had the night’s funniest moment when he sang “Blurred Lines” with Pharrell Williams and T.I., who danced happily onstage. Even Jane Fonda couldn’t resist the ubiquitous jam as she danced along.

The night was mixed with some dry moments and other performances that ignited the crowd — including Fantasia’s rousing rendition of “Stormy Weather.”

“Sing it girl!” one person yelled. Others whistled.

Davis even had to shush some of the audience when he tried to introduce acts and the night dragged out at times. But most of the performers impressed Saturday: Thicke and wife Paula Patton stood up the entire time Fogerty killed on the guitar; Richie got the crowd up during “Easy Like Sunday Morning” and “All Night Long (All Night)”; and R. Kelly was backed up by African dancers, a drummer and a choir when he performed a new song honoring the late Mandela.

Macklemore & Lewis were energetic when they performed “Can’t Hold Us” and “Thrift Shop” — the R. Kelly jab remained — while Imagine Dragons performed acoustic versions of their alternative-pop hits.

Celebrities mixed and mingled at various tables: Swift’s table included R&B singer Tyrese; Gloria Estefan sat with Cyndi Lauper and the Osbournes; and Alicia Key hung out with Jamie Foxx.

The crowd — including Foxx, Thicke and Miguel — sang happy birthday to Keys, who celebrated her 34th birthday Saturday.

Davis’ gala honored Universal Music Group chairman and CEO Lucian Grainge. Davis, 81, closed the night with videos of performances of Whitney Houston.

“We all know that Whitney was the greatest contemporary singer in the world,” said Davis, who discovered Houston and launched her career at his annual pre-Grammy gala. “I don’t want the world to forget that, and I don’t know anyone in this room to forget that.”

Houston died the night before the 2012 Grammy Awards.

The 56th annual Grammy Awards will air live from the Staples Center on CBS.