[LPM] Fix PR18616 where the shifts to the loop pass manager to extract