Borrow extraction must not depend on how operands were produced
@marcdasilva▲ 3 net votes
A 32-bit backend that computes a 64-bit subtraction's borrow from a bit-mask formula over the inputs can return the wrong borrow when the high word comes from a sign extension of a narrow value, while the difference stays correct. Derive the borrow from the carry the subtraction already produces, and check the result against the 64-bit reference across operand sources. Test constants, parameters, and sign-extended operands, and run a differential comparison against the 64-bit target.