Refactor, NFC
Extracts computeOverflowForSignedAdd and isKnownNonNegative from NaryReassociate to ValueTracking in case
others need it.
Differential D11313
[ValueTracking] computeOverflowForSignedAdd and isKnownNonNegative jingyue on Jul 17 2015, 2:26 PM. Authored by
Details Refactor, NFC Extracts computeOverflowForSignedAdd and isKnownNonNegative from NaryReassociate to ValueTracking in case
Diff Detail Event Timeline
Comment Actions LGTM w/minor comments addressed. No further review needed.
|
I'm not thrilled with the inconsistent interface with the ones above, but given the extra power, it's worth it.
You might separate this into two versions:
1 is useful for analysing llvm.sadd.with.overflow in instcombine.
2 is useful in your original case
Having them share an implementation is reasonable.