Details
- Reviewers
aykevl dylanmckay
Diff Detail
Unit Tests
Time | Test | |
---|---|---|
70 ms | x64 debian > LLVM.Bindings/Go::go.test |
Event Timeline
llvm/lib/Target/AVR/AVRISelDAGToDAG.cpp | ||
---|---|---|
171 | the previous variable AM is not longer used, so merge it to the if condition. | |
378 | The deleted operand RegZ triggered the ran out of register error, actually we need not spiecify any implicit operands when calling getMachineNode. | |
393 | We already have ReplaceUses(SDValue(N, 1), SDValue(ResNode, 1)); in the end of this function, any same lines in other places of current function AVRDAGToDAGISel::select<ISD::LOAD>(SDNode *N) are deleted. | |
llvm/test/CodeGen/AVR/lpmx.ll | ||
2 | -O1 / -O2 / -O3 are normal, and only -O0 triggers the error. |
llvm/lib/Target/AVR/AVRISelDAGToDAG.cpp | ||
---|---|---|
185 | This form is better for future patches which will add ELPM. |
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 leaded to the crash was the line in previous code
CurDAG->getMachineNode(LPMOpc, DL, VT, MVT::i16, MVT::Other, Ptr, RegZ);
in which the implicit operand RegZ was 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 disappears.
Actually there are four getMachineNode get RegZ removed. and others changes are NFC (just simplification for my future patches.)
The bug is recorded at https://github.com/llvm/llvm-project/issues/52839
There is a crash caused by the implicit operand RegZ is explicitly specified when calling CurDAG->getMachineNode.
the previous variable AM is not longer used, so merge it to the if condition.