[LoopInfo] Preserve profile information in makeLoopInvariant (#174171)
When hoisting loop invariant instructions, we can preserve profile
metadata because it depends solely on the condition (which is loop
invariant) rather than where we are in the control flow graph.