This is an archive of the discontinued LLVM Phabricator instance.

[X86] Add a test to reveal a bug in CMOV conversion.
ClosedPublic

Authored by tianqing on Jun 21 2021, 11:27 PM.

Details

Summary

CMOV conversion first rewrites all CMOVs with memory load to branches.
Then runs a second pass to convert other CMOVs in loops if profitable.
But the first pass doesn't add new basic blocks to MachineLoopInfo,
CMOVs in these blocks are ignored in the subsequent pass.

Diff Detail

Event Timeline

tianqing created this revision.Jun 21 2021, 11:27 PM
tianqing requested review of this revision.Jun 21 2021, 11:27 PM
Herald added a project: Restricted Project. · View Herald TranscriptJun 21 2021, 11:27 PM
pengfei accepted this revision.Jun 22 2021, 1:53 AM

LGTM.

This revision is now accepted and ready to land.Jun 22 2021, 1:53 AM
This revision was landed with ongoing or failed builds.Jun 29 2021, 1:37 AM
This revision was automatically updated to reflect the committed changes.