When working on changes such as #17293 it was noticed that moving from explicit HEAP access to makeGetValue/makeSetValue we lost the ability to hoist the initial >>2 or >>3 outside of a loop.
Perhaps we can add a new preShifted=true argument or we could create a completely new helper function.