This is an archive of the discontinued LLVM Phabricator instance.

Unify the way we report overflow in increment/decrement operator.
ClosedPublic

Authored by samsonov on Mar 10 2015, 3:25 PM.

Details

Summary

Make sure signed overflow in "x--" is checked with
llvm.ssub.with.overflow intrinsic and is reported as:

"-2147483648 - 1 cannot be represented in type 'int'"

instead of:

"-2147483648 + -1 cannot be represented in type 'int'"

, like we do for unsigned overflow.

Diff Detail

Event Timeline

samsonov updated this revision to Diff 21650.Mar 10 2015, 3:25 PM
samsonov retitled this revision from to Unify the way we report overflow in increment/decrement operator..
samsonov updated this object.
samsonov edited the test plan for this revision. (Show Details)
samsonov added a reviewer: rsmith.
samsonov added a subscriber: Unknown Object (MLST).
rsmith accepted this revision.Mar 13 2015, 6:20 PM
rsmith edited edge metadata.
This revision is now accepted and ready to land.Mar 13 2015, 6:20 PM
This revision was automatically updated to reflect the committed changes.