[PATCH] D141221: [AVR] Fix incorrect expansion of the pseudo 'ELPMBRdZ' instruction

Ben Shi via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Jan 8 05:20:16 PST 2023


benshi001 added inline comments.


================
Comment at: llvm/lib/Target/AVR/AVRInstrInfo.td:1744
+  let Defs = [R0] in
+  def ELPMBRdZ : Pseudo<(outs GPR8:$dst), (ins ZREG:$z, LD8:$p),
+                        "elpmb\t$dst, $z, $p", []>,
----------------
`ELPMBRdZ` does not clobber the `Z` register.


================
Comment at: llvm/test/CodeGen/AVR/elpm.ll:246
+; NOX-NEXT:    out 59, r18
+; NOX-NEXT:    elpm
+; NOX-NEXT:    mov r18, r0
----------------
The only difference between `CHECK` and `NOX` is that `elpm rd, z` is replaced by `elpm` + `mov rd, r0`.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D141221/new/

https://reviews.llvm.org/D141221



More information about the llvm-commits mailing list