A numerical study is presented of the flow in the endwall region of a compressor blade row, in conditions of operation with both smooth and grooved endwalls. The computations are first compared to velocity field measurements in a cantilevered stator/rotating hub configuration to confirm that the salient features are captured. Computations are then interrogated to examine the tip leakage flow structure since this is a dominant feature of the endwall region. In particular, the high blockage that can exist near the endwalls at the rear of a compressor blade passage appears to be directly linked to low total pressure fluid associated with the leakage flow. The fluid dynamic action of the grooved endwall, representative of the casing treatments that have been most successful in suppressing stall, is then simulated computationally and two principal effects are identified. One is suction of the low total pressure, high blockage fluid at the rear of the passage. The second is energizing of the tip leakage flow, most notably in the core of the leakage vortex, thereby suppressing the blockage at its source.