This is an archive of the discontinued LLVM Phabricator instance.

AMDGPU: Remove redundant combine
ClosedPublic

Authored by arsenm on Nov 6 2017, 12:22 AM.

Details

Reviewers
rampitec
Summary

This combine was already done in two places. The
generic combiner already has done this since
r217610, for adds (with a single use)

This one was added in r303641, and added support for handling
or as well. r313251 later added support to the generic
combine for or. It also turns out the isOrEquivalentToAdd
check is not necessary for this combine.

Additionally, we already reproduce this combine in yet
another place in the backend, although in that version
multiple uses of the add are still folded if it will
allow a fold into the addressing mode. That version needs
to be improved to understand ors though, as well as the
correct legal offsets for private.

Diff Detail

Event Timeline

arsenm created this revision.Nov 6 2017, 12:22 AM
This revision is now accepted and ready to land.Nov 6 2017, 10:52 AM
arsenm closed this revision.Nov 6 2017, 4:07 PM

r317526