Page MenuHomePhabricator

[InstSimplify] Fold division by zero to poison
ClosedPublic

Authored by nikic on Sun, Jan 3, 9:39 AM.

Details

Summary

Div/rem by zero is immediate undefined behavior and anything goes. Currently we fold it to undef, this patch changes it to fold to poison instead, which is slightly stronger.

Diff Detail

Event Timeline

nikic created this revision.Sun, Jan 3, 9:39 AM
nikic requested review of this revision.Sun, Jan 3, 9:39 AM
Herald added a project: Restricted Project. · View Herald TranscriptSun, Jan 3, 9:39 AM
aqjune accepted this revision.Sun, Jan 3, 11:51 AM

LGTM - Thanks!

This revision is now accepted and ready to land.Sun, Jan 3, 11:51 AM
This revision was automatically updated to reflect the committed changes.