If we have:
R = sub X, Y P = cmp Y, X
...then flipping the operands in the compare instruction can allow using a subtract that sets compare flags.
Motivated by diffs in D58875 - not sure if this changes anything there, but this seems like a good thing independent of that.
I've never seen Lanai code before this, so I don't know whether that change is good, bad, or even correct.