This is an archive of the discontinued LLVM Phabricator instance.

Simplify `x >=u x >> y` and `x >=u x udiv y`
ClosedPublic

Authored by arthurprs on Oct 25 2016, 7:31 AM.

Details

Summary

Extends InstSimplify to handle both x >=u x >> y and x >=u x udiv y.

This is a folloup of rL258422 and https://github.com/rust-lang/rust/pull/30917
where llvm failed to optimize away the bounds checking in a binary search.

Diff Detail

Repository
rL LLVM

Event Timeline

arthurprs updated this revision to Diff 75699.Oct 25 2016, 7:31 AM
arthurprs retitled this revision from to Simplify `x >=u x >> y` and `x >=u x udiv y`.
arthurprs updated this object.
arthurprs set the repository for this revision to rL LLVM.

Added Sanjoy Das as the contribution guide suggests.

sanjoy requested changes to this revision.Oct 25 2016, 8:17 AM
sanjoy edited edge metadata.
This revision now requires changes to proceed.Oct 25 2016, 8:17 AM
arthurprs updated this revision to Diff 75719.Oct 25 2016, 9:36 AM
arthurprs edited edge metadata.

Update diff to include more context.

arthurprs edited edge metadata.Oct 25 2016, 9:36 AM
arthurprs changed the edit policy from "All Users" to "Administrators".
arthurprs changed the edit policy from "Administrators" to "All Users".
arthurprs added a subscriber: llvm-commits.
arthurprs updated this revision to Diff 75721.Oct 25 2016, 9:44 AM

Add more tests covering all 4 cases.

sanjoy accepted this revision.Oct 25 2016, 10:23 PM
sanjoy edited edge metadata.

lgtm

This revision is now accepted and ready to land.Oct 25 2016, 10:23 PM

Thank you @sanjoy, could you commit it or point me to someone?

This revision was automatically updated to reflect the committed changes.