If I've done this correctly, then the patch is nearly trivial. :)
Is MachineOperand.isDead() the proper predicate for the EFLAGS operand of an integer math op that we want to reassociate?
This is part of fixing:
https://llvm.org/bugs/show_bug.cgi?id=21768