The actor portrays Joe 'Deke' Deacon in the psychological crime thriller and he admitted working with the two younger fellow Oscar winners made him up his game on set.
"It absolutely energised me, having those two on the film," he told the Daily Mail's Baz Bamigboye, "I'm like, 'Uh-oh. I'd better read the script'. Obviously joking!"
One scene in the movie sees Denzel's character - who he described as having "a lot of haunting darkness that follows him like a cloud" - have to climb up a drainpipe and run across a rooftop and he admitted he wanted to pass that on to one of his younger co-stars.
"There comes a time in one's life where you're just not the guy running across the rooftop," he laughed. "I said to Rami, 'You go run across the rooftop!'"
However, Denzel eventually decided to do the scene.
The "Fences" actor also added he thinks it's hilarious he's regarded as a sex symbol.
"I've finally made it as an over-the-hill fat guy...and they still love me! Either that, or they just feel sorry for me," he grinned.
He said: "(He was a) brave man. He kept it to himself, and didn't complain. (Even though) he knew he wasn't going to make it."