This is an archive of the discontinued LLVM Phabricator instance.

[ARM] Fix rewrite of frame index in Thumb2's address mode i8s4
ClosedPublic

Authored by vhscampos on May 26 2020, 8:09 AM.

Details

Summary

In Thumb2's frame index rewriting process, the address mode i8s4, which
is used by LDRD and STRD instructions, is handled by taking the
immediate offset operand and multiplying it by 4.

This behaviour is wrong, however. In this specific address mode, the
MachineInstr's immediate operand is already in the expected form. By
consequence of that, multiplying it once more by 4 yields a flawed
offset value, four times greater than it should be.

Diff Detail

Unit TestsFailed

Event Timeline

vhscampos created this revision.May 26 2020, 8:09 AM
vhscampos retitled this revision from [ARM] fix rewrite of frame index in Thumb2's address mode i8s4 to [ARM] Fix rewrite of frame index in Thumb2's address mode i8s4.May 26 2020, 8:10 AM
This revision is now accepted and ready to land.May 26 2020, 10:10 AM
This revision was automatically updated to reflect the committed changes.