To determine how many slices of the cherry pie they ate, we first need to find the fraction of the peach pie they consumed.
The peach pie is cut into 12 equal slices, and they ate 6 slices of it. The fraction of the peach pie they ate is:
\[ \frac{6}{12} = \frac{1}{2} \]
Since they ate the same fraction of the cherry pie, we will apply the same fraction to the cherry pie, which has 8 equal slices. The number of slices of cherry pie they ate can be calculated as:
\[ \frac{1}{2} \times 8 = 4 \]
Thus, they ate 4 slices of the cherry pie.
The answer is 4.