An instruction cannot be found before itself

If we call FoundBefore with the same instruction in both parameters,
we will return true instead of false. By swapping the two ifs
inside the for, we can achieve what we want.

FoundBefore is used to sort in code sinking, and otherwise we
would be not be covering irreflexivity so we wouldn't be having a
strict weak ordering.

Bug: 296538046
Test: art/test/testrunner/testrunner.py --host --64 -b --optimizing
Change-Id: I0abab631842ed5e1442437608aaa16c106fe37a8
1 file changed