[PATCH] D141246: [AVR] Do not emit 'LPM Rd, Z' on devices without 'FeatureLPMX'
Ben Shi via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun Jan 8 20:26:01 PST 2023
benshi001 added inline comments.
================
Comment at: llvm/lib/Target/AVR/AVRExpandPseudoInsts.cpp:869
const AVRSubtarget &STI = MBB.getParent()->getSubtarget<AVRSubtarget>();
+ bool HasX = IsExt ? STI.hasELPMX() : STI.hasLPMX();
----------------
`HasX` means if there is extended form of LPM/ELPM.
`IsExt` means it is E(xtended)LPM, not (ordinray) LPM.
================
Comment at: llvm/test/CodeGen/AVR/elpm.ll:161
+; NOX-NEXT: movw r30, r22
+; NOX-NEXT: lpm
+; NOX-NEXT: mov r18, r0
----------------
The only difference between `CHECK` and `NOX` is that `lpm Rd, Z` is replaced by `lpm` + `mov Rd, R0`.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D141246/new/
https://reviews.llvm.org/D141246
More information about the llvm-commits
mailing list