More store/allocation elimination for singletons in case of loops

For a store into a singleton's location, if it happens inside a loop, it
means the singleton's location value may be killed by loop side effects.
However if the singleton is defined inside that loop, that loop should
be skipped since its loop side effects kill values at loop header where
the singleton's location doesn't exist yet.

Test: test-art-host

Bug: 31716107
Change-Id: Iae2494ea93295977f90d1463ee136a7e2e09ba9b
2 files changed