A novel phase-flip model is proposed for thermodynamically consistent and computationally efficient description of spallation and cavitation in pure liquids within the framework of ideal hydrodynamics. Aiming at ultra-fast dynamic loads, the spall failure of a liquid under tension is approximated as an instantaneous decomposition of metastable states upon reaching the spinodal stability limit of an appropriate two-phase liquid-gas equation of state. The spall energy dissipation occurs as entropy jumps in two types of discontinuous solutions, namely, in hypersonic spall fronts and in pull-back compression shocks. Practical application of the proposed model is illustrated with numerical simulations and a detailed analysis of a particular problem of symmetric plate impact. The numerical results are found to be in good agreement with the previously published molecular-dynamics simulations. Also, new approximate nonlinear formulae are derived for evaluation of the strain rate, fractured mass, and spall strength in terms of the observed variation of the free-surface velocity. The new formula for the spall strength clarifies complex interplay of the three first-order nonlinear correction terms and establishes a universal value of the correction factor for attenuation of the spall pulse, which in the limit of weak initial loads is independent of the equation of state.