We demonstrate an ultrafast (<0.1 ps) reversible phase transition in silicon (Si) under ultrafast pressure loading using molecular dynamics. Si changes its structure from cubic diamond to β-Sn on the shock-wave front. The phase transition occurs when the shock-wave pressure exceeds 11 GPa. Atomic volume, centrosymmetry, and the X-ray-diffraction spectrum were revealed as effective indicators of phase-transition dynamics. The latter, being registered in actual experimental conditions, constitutes a breakthrough in the path towards simple X-ray optical cross-correlation and pump-probe experiments