An intriguing hypothesis that there exists a decaying X-ray emission component before the gamma-ray burst (GRB) trigger has been suggested in order to explain the shallow decay phase of the X-ray afterglow detected in many Swift GRBs. If this ‘prior emission’ is from an external shock, one would expect a corresponding optical emission component during the GRB prompt emission phase. In this paper we apply the available prompt optical emission data (both detections and upper limits) to constrain such a scenario. We fit the shallow and normal decay segments of the X-ray Telescope light curves in our sample with a TΔ-shifted single power law, and extrapolate the X-ray flux back to the time of the early optical observations. We then use the synchrotron spectrum predicted by the standard external shock model to extrapolate from the X-ray flux to the optical band, and obtain the possible range of the predicted optical flux. Finally, we compare the predictions with the observations. In the cases where later optical data are available, we also compare the shapes of the optical light curves to the predicted optical light curves from the external shock prior emission model. We find that for a good fraction of GRBs (four out of eight; up to 2006 December), the available data already impose severe constraints on the hypothesis. In particular, the expected optical flux from the external shock prior emission model is higher than what the data allow. We conclude that if the shallow-decay X-ray component were from a prior emission component, it would have to be of an internal origin with optical flux suppressed.