1960s or 70s refereeing, it goes the distance with Ali winning a wide decision, possibly a shutout. Modern refereeing, I could see it being stopped in a later round due to Ali having a huge lead and Mercer showing no signs of coming back from it.
Ali would probably bully and tease Ray and knock him around for 15 unanimous rounds. Ray might win a few rounds. I just don't see Ray getting close/set enough to land solidly against, say, the Zora Folley Ali. If old man Holmes made him look bad....
Muhammad Ali of 1964-1967 dances, jabs, and fires combinations non stop, in scoring a unanimous decision over Ray Mercer. Ray would not be able to keep up with Ali's pace and speed. Ray would hang in there in a one sided fight.