A cylinder rolls up an inclined plane, reaches some height and then rolls down (without slipping through out these motions). The directions of frictional force acting on the cylinder are
During descending both translational and rotational motions are accelerated and the torque of f about centre of mass produces rotational motion whereas during ascending the torque of f produces retardation of rotation.