Phase-field model for the Rayleigh--Taylor instability of immiscible fluids