[PATCH] D116399: [AVR] Fix a bug of register allocation

Ben Shi via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 4 05:13:14 PST 2022


benshi001 added a comment.

In D116399#3218107 <https://reviews.llvm.org/D116399#3218107>, @aykevl wrote:

> Can you explain what the bug is and why this patch fixes it? I find it hard to interpret the diff.

Sorry, I should make some comments on my changes.

The key reason leads to the crash is the line in previous code

  CurDAG->getMachineNode(LPMOpc, DL, VT, MVT::i16, MVT::Other, Ptr, RegZ);

in which the implicit operand `RegZ` is explicitly specified in call to `getMachineNode`, and I remove the `RegZ` and change the above line to

  CurDAG->getMachineNode(LPMOpc, DL, VT, MVT::i16, MVT::Other, Ptr);

then the crash disappeared.

Actually there are four `getMachineNode` get `RegZ` removed. and others changes are NFC (just simplification for my future patches.)


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

https://reviews.llvm.org/D116399



More information about the llvm-commits mailing list