Heat the oven to 425°F. Spray an 8-inch square or 11x7-inch pan with the cooking spray.
Peel and crush the garlic in a garlic press. Sprinkle salt and pepper over all sides of the pork tenderloin. Rub the rosemary and garlic on all sides of pork. Place pork in the pan.
Bake uncovered 20 to 30 minutes or until pork has a slight blush of pink in the center and a meat thermometer inserted in the center reads 160°F. Cut pork crosswise into thin slices.