Two questions, two instruments
RP-HPLC answers a quantitative question: of the material that absorbs at the detection wavelength, what fraction elutes as a single peak at the expected retention time. Mass spectrometry answers a qualitative one: is the molecule present the molecule specified.
Neither substitutes for the other. A sample can be 99.5% pure by HPLC and be the wrong peptide entirely — purity says nothing about identity. Equally, a mass spectrum can confirm the correct molecular weight in a sample that is 60% related substances, because MS detects presence rather than proportion.