[AVR] Fix def state of operands
authorAyke van Laethem <aykevanlaethem@gmail.com>
Sun, 21 Feb 2021 19:23:46 +0000 (20:23 +0100)
committerAyke van Laethem <aykevanlaethem@gmail.com>
Wed, 3 Mar 2021 14:36:05 +0000 (15:36 +0100)
commit15f495c0bcb2fcab282582d9a50e234e4103cd1a
tree7ff584e21d3ca708c4b2e68e860536861cdac9fd
parentbbfef8ac952bffb01a7a471a2953cbda77231054
[AVR] Fix def state of operands

Some instructions (especially mov+pop instructions) were setting the
wrong operands. For example, the pop instruction had the register set as
a source operand while it is a destination operand (the value is loaded
into the register).

I have found these issues using the machine verifier and using manual
code inspection.

Differential Revision: https://reviews.llvm.org/D97159
llvm/lib/Target/AVR/AVRExpandPseudoInsts.cpp
llvm/lib/Target/AVR/AVRRelaxMemOperations.cpp
llvm/test/CodeGen/AVR/relax-mem/STDWPtrQRr.mir