Influence of the transport regime on the energetic particle density profiles upstream and downstream of interplanetary shocks