Add DestructiveBinaryComm* patterns for ADD, SUB, and SUBR.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
(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.)
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) |
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. |
nit: isOrig is a bit of a misnomer. Would isReverse maybe be more descriptive? (which would have the opposite meaning of isOrig)