ART: ArrayGet hoisting restriction added.

Currently if we hoist ArrayGet from loop there is no guarantee
that insn will be executed at runtime. Because of that we could
face issues like crashes in generated code.

This patch introduces restriction for ArrayGet hoisting. We say
that ArrayGet execution is guaranteed at least one time if its bb
dominates all exit blocks.

Change-Id: I9f72c0f4c33b358341109238bea46cb5a82f490f
Signed-off-by: Anton Shamin <>
4 files changed