gh-106529: Support FOR_ITER specializations as uops by gvanrossum · Pull Request #106542 · python/cpython
Another piece extracted from gh-106393. Without either this or an implementation of the POP_JUMP_IF_XXX part of gh-106529, the (in itself much simpler) JUMP_BACKWARD part (gh-106543) isn't useful or testable.
Once gh-106543 is merged, the test for this is simple: add a check for JUMP_TO_TOP to the test for FOR_ITER_RANGE.