Teach loop rotate to hoist trivially invariant instructions