On microstructured hydrophobic surfaces, geometrical patterns may lead to the appearance of a superhydrophobic state, where gas bubbles at the surface can have a strong impact on the fluid flow along such surfaces. In particular, they can strongly influence a detected slip at the surface. We present two-phase lattice Boltzmann simulations of a flow over structured surfaces with attached gas bubbles and demonstrate how the detected slip depends on the pattern geometry, the bulk pressure, or the shear rate. Since a large slip leads to reduced friction, our results give assistance in the optimization of microchannel flows for large throughput