This is an archive of the discontinued LLVM Phabricator instance.

[DAGCombine] Extend combineCarryDiamond()
ClosedPublic

Authored by chfast on Jan 27 2022, 6:35 AM.

Details

Summary

In combineCarryDiamond() use getAsCarry() to find more candidates for being a carry flag.

Diff Detail

Event Timeline

chfast created this revision.Jan 27 2022, 6:35 AM
chfast requested review of this revision.Jan 27 2022, 6:35 AM
Herald added a project: Restricted Project. · View Herald TranscriptJan 27 2022, 6:35 AM
RKSimon added inline comments.Jan 28 2022, 2:24 AM
llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
3157–3159

Do we need this change to get the codegen diff? Or is it just from the getAsCarry? If so we probably want to split the changes for clarity - one as cleanup and the other as improvement?

@chfast You might want to check D57317 to see if there's anything you can reuse

chfast added inline comments.Jan 28 2022, 1:03 PM
llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
3157–3159

The usage of isOperandOf is only esthetics. I should commit it separately. Does it need another review?

RKSimon added inline comments.Jan 28 2022, 1:10 PM
llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
3157–3159

No, a pre-commit is fine - then rebase this patch.

chfast retitled this revision from [DAGCombine] Extend and refactor combineCarryDiamond() to [DAGCombine] Extend combineCarryDiamond().Feb 21 2022, 12:46 PM
chfast edited the summary of this revision. (Show Details)
RKSimon accepted this revision.Feb 23 2022, 4:23 AM

LGTM - cheers

This revision is now accepted and ready to land.Feb 23 2022, 4:23 AM
lebedev.ri edited the summary of this revision. (Show Details)Feb 23 2022, 4:26 AM
This revision was landed with ongoing or failed builds.Feb 23 2022, 12:38 PM
This revision was automatically updated to reflect the committed changes.