Page MenuHomePhabricator

[SCEV] Check the cache in get{S|U}MaxExpr before doing any work
ClosedPublic

Authored by sanjoy on Mar 29 2019, 1:46 PM.

Details

Summary

This lets us avoid e.g. checking if A >=s B in getSMaxExpr(A, B) if we've
already established that (A smax B) is the best we can do.

Fixes PR41225.

Diff Detail

Repository
rL LLVM

Event Timeline

sanjoy created this revision.Mar 29 2019, 1:46 PM
Herald added a project: Restricted Project. · View Herald TranscriptMar 29 2019, 1:46 PM
sanjoy planned changes to this revision.Mar 29 2019, 1:53 PM

Sorry, this is buggy, one moment.

sanjoy updated this revision to Diff 192908.Mar 29 2019, 2:26 PM

Fix bug: when trying to look up the smax/umax SCEV again (after simplification) we can't use the older ID since it was computed based on the unsimplified operands.

asbirlea accepted this revision.Mar 29 2019, 2:37 PM

Thank you for the fix!

This revision is now accepted and ready to land.Mar 29 2019, 2:37 PM
This revision was automatically updated to reflect the committed changes.