Voldemort recognizes Hagrid and calls Hagrid by his name at least twice.
“You carry him,” Voldemort said, “He will be nice and visible in your arms, will he not? Pick up your little friend, Hagrid. And the glasses—put on the glasses—he must be recognizable—”
“SILENCE!” cried Voldemort, and there was a bang and a flash of bright light, and silence was forced upon them all. “It’s over! Set him down, Hagrid, at my feet, where he belongs!”
Harry Potter and the Deathly Hallows,Chapter 36, The Flaw in the Plan
Voldemort (Tom Riddle) from the diary did make fun of Hagrid.
“Well, you see, Ginny told me all about you, Harry,” said Riddle. “Your whole fascinating history.” His eyes roved over the lightning scar on Harry’s forehead, and their expression grew hungrier. “I knew I must find out more about you, talk to you, meet you if I could. So I decided to show you my famous capture of that great oaf, Hagrid, to gain your trust —”
“Hagrid’s my friend,” said Harry, his voice now shaking. “And you framed him, didn’t you? I thought you made a mistake, but —”
Riddle laughed his high laugh again.
“It was my word against Hagrid’s, Harry. Well, you can imagine how it looked to old Armando Dippet. On the one hand, Tom Riddle, poor but brilliant, parentless but so brave, school prefect, model student... on the other hand, big, blundering Hagrid, in trouble every other week, trying to raise werewolf cubs under his bed, sneaking off to the Forbidden Forest to wrestle trolls... but I admit, even I was surprised how well the plan worked. I thought someone must realize that Hagrid couldn’t possibly be the Heir of Slytherin. It had taken me five whole years to find out everything I could about the Chamber of Secrets and discover the secret entrance... as though Hagrid had the brains, or the power!
Harry Potter and the Chamber of Secrets,Chapter 17, The Heir of Slytherin