This is an archive of the discontinued LLVM Phabricator instance.

Make likelihood lit test less brittle
ClosedPublic

Authored by Mordante on Oct 11 2020, 7:36 AM.

Details

Summary

Jeremy Morse discovered an issue with the lit test introduced in D88363. The test gives different results for Sony's -O1.

The test needs to run at -O1 otherwise the likelihood attribute will be ignored. Instead of running all -O1 passes it only runs the lower-expect pass which is needed to lower __builtin_expect.

@jmorse can you verify this fixes Sony's issue?

Diff Detail

Event Timeline

Mordante requested review of this revision.Oct 11 2020, 7:36 AM
Mordante created this revision.
jmorse accepted this revision.Oct 12 2020, 3:28 AM

This fixes things for us, and by limiting to one optimisation pass it's much less brittle for the future -- much appreciated!

This revision is now accepted and ready to land.Oct 12 2020, 3:28 AM

This fixes things for us, and by limiting to one optimisation pass it's much less brittle for the future -- much appreciated!

I'm glad to hear it fixes your issue. Thanks for testing!

This revision was landed with ongoing or failed builds.Oct 12 2020, 9:58 AM
This revision was automatically updated to reflect the committed changes.