Currently, we generate "select" operation with one operand of zeros based the mask of active elements we have and then we issue addition or subtraction we the result of "select". But instead we could issue just masked based addition or subtraction with the mask of active elements.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Commandeering this patch whilst Dinar is on vacation to ensure it lands before LLVM 15 branches.
Perhaps worth having a less descriptive name for the test (e.g. sve-masked-int-arith.ll or even less descriptive) given we're likely to add many more cases.
llvm/lib/Target/AArch64/AArch64SVEInstrInfo.td | ||
---|---|---|
341–342 | Is this strictly required? There's only a single pattern and no operand shuffling going on so I think not. | |
343–348 | We have a naming scheme documented above which says these should be called AArch64add_m1 and AArch64sub_m1 which means you don't need to rename the original AArch64subr def. |
- Rename test to be less specific.
- Remove unnecessary PatFrag for subr.
- Append _m1 to PatFrags op names.
llvm/lib/Target/AArch64/AArch64SVEInstrInfo.td | ||
---|---|---|
341–342 |
Nope, not sure was I was thinking there, removed |
Is this strictly required? There's only a single pattern and no operand shuffling going on so I think not.