Add DestructiveBinaryComm* patterns for ORR, EOR, AND and BIC.
The above instructions requires that the source and destination registers are
equal, so use movprfx should be beneficial to performance.
Details
Diff Detail
Event Timeline
llvm/lib/Target/AArch64/SVEInstrFormats.td | ||
---|---|---|
2776 | Sorry I wasn't being very clear - I was relying upon my comment highlighting the right part of the code! I just mean that the ", SVEInstr2Rev<...>" bits are unnecessary I think? We don't have any reverse logical operations so perhaps we can just delete it? If so, you can also just delete the 'revname' and 'isOrig' arguments passed to the multiclass as well. |
llvm/lib/Target/AArch64/AArch64SVEInstrInfo.td | ||
---|---|---|
342 | If you don't mind indulging my OCD I've tried to ensure the pseudo instructions are defined after the real ones so can you move the definitions for ORR_ZPmZ..BIC_ZPmZ to the bottom of this block so they're before the following UseExperimentalZeroingPseudos block. | |
359 | BIC (i.e. A & ~B) is not a commutative operation and so should use DestructiveBinary. |
llvm/lib/Target/AArch64/AArch64SVEInstrInfo.td | ||
---|---|---|
471 | Not quite the placement I had in mind but it doesn't matter. |
Looks like this broke tests: http://45.33.8.238/linux/74409/step_12.txt
Please take a look and revert for now if it takes while to fix.
@thakis sorry for this patch
@paulwalker-arm thanks very much for helping fix this issue
llvm/lib/Target/AArch64/AArch64SVEInstrInfo.td | ||
---|---|---|
342 | Apply your review, thanks | |
359 | good catch, thanks for your carefully review | |
llvm/lib/Target/AArch64/SVEInstrFormats.td | ||
2776 | Thanks very much for explaining. |
If you don't mind indulging my OCD I've tried to ensure the pseudo instructions are defined after the real ones so can you move the definitions for ORR_ZPmZ..BIC_ZPmZ to the bottom of this block so they're before the following UseExperimentalZeroingPseudos block.