This is an archive of the discontinued LLVM Phabricator instance.

[AVR] Fix def state of operands
ClosedPublic

Authored by aykevl on Feb 21 2021, 11:28 AM.

Details

Summary

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.

Diff Detail

Event Timeline

aykevl created this revision.Feb 21 2021, 11:28 AM
aykevl requested review of this revision.Feb 21 2021, 11:28 AM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 21 2021, 11:28 AM
aykevl edited the summary of this revision. (Show Details)Feb 21 2021, 11:29 AM
benshi001 accepted this revision.Feb 21 2021, 6:03 PM

Generally I am OK with this patch, except there is a lint warning.

This revision is now accepted and ready to land.Feb 21 2021, 6:03 PM
benshi001 added inline comments.Feb 21 2021, 6:04 PM
llvm/lib/Target/AVR/AVRRelaxMemOperations.cpp
116

Fix this lint warning.

Thank you for the review!

llvm/lib/Target/AVR/AVRRelaxMemOperations.cpp
116

I intentionally kept it as-is, to match the existing code. See the golden rule:

If you are extending, enhancing, or bug fixing already implemented code, use the style that is already being used so that the source is uniform and easy to follow.

This revision was landed with ongoing or failed builds.Mar 3 2021, 6:36 AM
This revision was automatically updated to reflect the committed changes.