[PATCH] D114611: [AVR] Expand STDWSPQRr & STDSPQRr, approach #2

Patryk Wychowaniec via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sat Jan 22 04:47:35 PST 2022


Patryk27 added inline comments.


================
Comment at: llvm/lib/Target/AVR/AVRExpandPseudoInsts.cpp:1261
+    if (!DstIsKill) {
+      buildMI(MBB, MBBI, AVR::POPWRd).addDef(Dst.getReg());
+    }
----------------
I'm not sure if that's correct, but the previous approach:
```
buildMI(MBB, MBBI, AVR::POPWRd)
    .addDef(Ptr.getReg(), getKillRegState(Ptr.isKill()));
```
... wasn't correct either, since it's not possible to `addDef()` a killed register (this crashes LLVM, but there was no test to check it on our side).


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D114611



More information about the cfe-commits mailing list