It was recently discovered that the ElimCompare pass can optimize:
%F2S<def> = LER %F0S LTEBRCompare %F0S, %F0S, %CC<imp-def> LTEBRCompare %F0S, %F0S, %CC<imp-def>
but not:
LTEBRCompare %F0S, %F0S, %CC<imp-def> LTEBRCompare %F0S, %F0S, %CC<imp-def> %F2S<def> = LER %F0S
My first thought was to swap the instructions as a setup for the algorithm, but then I realised I would still have
to do a search to do so, so I instead simply added the loop to do the forward search.
Have not yet checked if adjustCCMasksForInstr() can also be called here, but the calling fucntion is doing a
bottom-up traversal of MBB, so this might not work. For load-and-test, a top-down search here seems ok, I think.
Also fixed the comment at resultTests() which I thought was incomplete.