This is an archive of the discontinued LLVM Phabricator instance.

Model UB in integer division operations in the arith dialect
ClosedPublic

Authored by sanjoy on Nov 10 2022, 10:55 PM.

Details

Summary

Before this commit arith.{ceil}div{u|s}i were marked Pure which is
incorrect because these operations invoke UB on certain inputs.

Fixes: https://github.com/llvm/llvm-project/issues/58700

Diff Detail

Event Timeline

sanjoy created this revision.Nov 10 2022, 10:55 PM
sanjoy requested review of this revision.Nov 10 2022, 10:55 PM
kuhar accepted this revision.Nov 11 2022, 7:16 AM

LGTM. Thanks for taking care of this!

This revision is now accepted and ready to land.Nov 11 2022, 7:16 AM
kuhar added a comment.Nov 11 2022, 7:22 AM

(BTW, you probably already know this, but if you add Fixes: <github-issue-url> to the commit description landing the change will automatically close the issue.)

sanjoy edited the summary of this revision. (Show Details)Nov 11 2022, 10:41 AM
This revision was landed with ongoing or failed builds.Nov 11 2022, 10:49 AM
This revision was automatically updated to reflect the committed changes.