A rotorcraft main-rotor blade experiences a broad range of the Mach number in high-speed forward flights or rapid maneuvering conditions. Near the boundary of the flight envelope, the rotor blade often encounters severe dynamic stall which limits the overall aerodynamic performance. Of interest here is effects of the Mach number on the dynamic stall. A rotor airfoil, VR-12, is computationally investigated for both static and dynamic stall conditions with varying the Mach number from 0.2 to 0.4. For the small enough Mach number 0.2, both static and dynamic stall are significantly influenced by flow separation due to adverse pressure gradient. For the highest Mach number 0.4, compressibility near the leading edge is no longer negligible, forming a shock there. The shock-induced separation occurs near the leading edge, which dominates both the static and dynamic stall at the high Mach number. At the intermediate Mach number 0.3, it is observed that both adverse pressure gradient and the shock affect the stall. Current computations are conducted with the unsteady Reynolds-averaged Navier Stokes approach with the Spalart-Allmaras model. Numerical results are compared to relevant wind-tunnel test data.