Add some missing patterns for ld1rq's scalar + scalar addressing mode. Also, adds the scalar + imm and scalar + scalar addressing modes for the patterns added in https://reviews.llvm.org/D130010
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
llvm/lib/Target/AArch64/SVEInstrFormats.td | ||
---|---|---|
6918 ↗ | (On Diff #449306) | What side effects are you worried about here? |
8600–8613 ↗ | (On Diff #449306) | Classes like this that only contain isel patterns (i.e. are not used to define instructions) are best kept in AArch64SVEInstrInfo.td, typically next to the place they are used. Is it possible to merge the classes like how multiclass pred_load is implemented? I think you'll also be able to reuse complex patterns like am_sve_regreg_lsl# rather than explicitly matching against add and shifts. |
llvm/lib/Target/AArch64/SVEInstrFormats.td | ||
---|---|---|
6918 ↗ | (On Diff #449306) | Checks in N2-sve-instructions.s fail the HasSideEffects check without this. The failing ones have the same scalar for the base and index, i.e |
llvm/lib/Target/AArch64/AArch64SVEInstrInfo.td | ||
---|---|---|
2267–2283 | Can these be moved into LD1RQPat to mirror the three forms use by sve_ld1rq_pat. I guess there's also a shout for all the patterns to exist within a single multiclass given they're related but that's up to you. | |
llvm/test/CodeGen/AArch64/sve-intrinsics-loads.ll | ||
20–21 | You shouldn't be regressing existing code. You likely need to wrap the immediate variants with AddedComplexity, see pred_load so the immediate forms are matched first then the register ones only match when necessary. |
Multiclassed more LD1RQ patterns into ld1rq_pat
Added AddedComplexity to immediate patterns to prevent scalar + immediate cases regressing to scalar + scalar(mov)
Can these be moved into LD1RQPat to mirror the three forms use by sve_ld1rq_pat.
I guess there's also a shout for all the patterns to exist within a single multiclass given they're related but that's up to you.