A wavefront reconstruction method was proposed based on spatial light modulator(SLM) to achieve the requirement of real-time testing of different aspheric surfaces.An interference measurement system based on SLM wavefront reconstruction was designed,in which the computer-generated hologram(CGH) encoding method was chosen according to the intrinsic properties of SLM.To resolve the quality degradation problem of the reconstructed wavefront,a dislocation optimization method was proposed.The process is verified through simulation,and the results showed that the RMS of the reconstructed wavefront was improved by 4.45 times.