This is an archive of the discontinued LLVM Phabricator instance.

[AArch64][SVE] Add some integer DestructiveBinaryComm* patterns
ClosedPublic

Authored by cameron.mcinally on Mar 24 2020, 9:15 AM.

Details

Summary

Add DestructiveBinaryComm* patterns for ADD, SUB, and SUBR.

Diff Detail

Event Timeline

Herald added a project: Restricted Project. · View Herald TranscriptMar 24 2020, 9:15 AM

Ping and rebase.

Ping.

If there's something I can do to ease reviewing, please let me know.

efriedma resigned from this revision.Apr 30 2020, 9:48 AM

(I haven't been keeping up with the destructive binary operator work. Let me know if you continue have trouble finding a reviewer, and I'll spend some time to catch up on it.)

sdesmalen accepted this revision.May 1 2020, 3:12 PM

Thanks for the patch @cameron.mcinally, LGTM with one nit.

As we previously discussed offline, this design will need a rethink at some point because it is a bit rigid and it could be generalized to handle more cases than zeroing predication. However we can leave that for later.

llvm/lib/Target/AArch64/SVEInstrFormats.td
2347

nit: isOrig is a bit of a misnomer. Would isReverse maybe be more descriptive? (which would have the opposite meaning of isOrig)

This revision is now accepted and ready to land.May 1 2020, 3:12 PM
cameron.mcinally marked an inline comment as done.May 4 2020, 8:58 AM

As we previously discussed offline, this design will need a rethink at some point because it is a bit rigid and it could be generalized to handle more cases than zeroing predication. However we can leave that for later.

Ok, no problem. If you'd like to hold off on this project, I can switch to something else.

llvm/lib/Target/AArch64/SVEInstrFormats.td
2347

That seems reasonable. I don't really have a strong opinion on it.

To be clear, I should update isOrig everywhere? E.g. SVEPseudo2Instr, getSVERevInstr, getSVEOrigInstr?

If so, that should probably be a separate patch since there are other multiclasses currently using it.

This revision was automatically updated to reflect the committed changes.