This is an archive of the discontinued LLVM Phabricator instance.

[DAGCombine] Move setcc of freeze fold to brcond
ClosedPublic

Authored by nikic on Jun 9 2023, 8:11 AM.

Details

Summary

This fold goes against the usual approach of pushing freeze into operands. The idea behind the fold is that if the setcc feeds into a brcond, the freeze can be dropped entirely.

Move the fold to brcond, where we can remove the freeze directly. This ensures that there can be no infinite combine loops due to conflicting transforms

Diff Detail

Event Timeline

nikic created this revision.Jun 9 2023, 8:11 AM
Herald added a project: Restricted Project. · View Herald TranscriptJun 9 2023, 8:11 AM
nikic requested review of this revision.Jun 9 2023, 8:11 AM
Herald added a project: Restricted Project. · View Herald TranscriptJun 9 2023, 8:11 AM

I definitely prefer this approach to D152430 if it still fixes all the stage2 issues in D127115

deadalnix accepted this revision.Jun 9 2023, 5:10 PM

It also fixes the problem.

This revision is now accepted and ready to land.Jun 9 2023, 5:10 PM
This revision was automatically updated to reflect the committed changes.