loop hoisting works for a simple invariant case