LDWRdPtr would be expanded to ld+ldd. ldd only accepts the pointer register is Y or Z.
So the register class of pointer of LDWRdPtr should be PTRDISPREGS instead of PTRREGS.
Details
Diff Detail
- Repository
- rL LLVM
Event Timeline
lib/Target/AVR/AVRInstrInfo.td | ||
---|---|---|
1163 ↗ | (On Diff #200923) | Thanks for fixing this comment |
lib/Target/AVR/AVRRegisterInfo.td | ||
175 ↗ | (On Diff #200923) | I can't tell why the removal of Y is needed. LDWRdPtr expands to LDRdPtr and LDDRdPtrQ. LDRdPtr accepts any pointer register (X, Y, or Z), and as you point out, LDDRdPtrQ only accepts DREGS_WITHOUT_Z_WORKAROUND: (AKA some GPRs and X, Y). The register constraints over the instruction pair is the intersection of the register classes for these sub instructions, which is the set of pointer registers { X, Y } What are your thoughts? |
lib/Target/AVR/AVRRegisterInfo.td | ||
---|---|---|
168 ↗ | (On Diff #200923) | Since we change the register class of pointer for LDWRdPtr to the small one . We have the same issue like Z register. |
175 ↗ | (On Diff #200923) | LDRdPtr accepts X, Y or Z as pointer register, But LDDRdPtrQ only accepts Y or Z as pointer register. |
test/CodeGen/AVR/pseudo/LDDWRdPtrQ-same-src-dst.mir | ||
1 ↗ | (On Diff #200923) | The source register and pointer register of LDDWRdPtrQ will not be the same. So I deleted this test. |
lib/Target/AVR/AVRRegisterInfo.td | ||
---|---|---|
175 ↗ | (On Diff #200923) | That makes sense, thanks |