Hi,
In some cases (see the new test-case, but basically phi elimination dumping millions of copies at the end of a block) a jump table's final jump can be moved too far away from the ADR instruction that calculates its base address to be reached.
There are a couple of solutions possible here: fuse jump table instructions together into one big barrier, or allow ConstantIslands to move the actual tables around to ensure they are in range. I decided the latter was probably less hacky, though still not trivial.
I've tested it by running LNT (ARM & Thumb, though both v7) with no regressions, but ConstantIslands is always a precarious pass to modify, so I'd really welcome some more eyes on the patch.
Cheers.
Tim.
This can be a foreach.