This is an archive of the discontinued LLVM Phabricator instance.

[ARM] Don't be overzealous converting Thumb1 3 to 2 operands
ClosedPublic

Authored by scott-0 on Jul 9 2015, 3:33 AM.

Details

Summary

Small shifts can be done in 3 operand form and the ARMARM says they should not be converted to 2 operand.

Depends on http://reviews.llvm.org/D11054.

Diff Detail

Repository
rL LLVM

Event Timeline

scott-0 updated this revision to Diff 29310.Jul 9 2015, 3:33 AM
scott-0 retitled this revision from to [ARM] Don't be overzealous converting Thumb1 3 to 2 operands.
scott-0 updated this object.
scott-0 added a subscriber: llvm-commits.

What about the FIXME that you had added in the tests earlier on? Didn't that get fixed?

This one?
@ FIXME: ARMARM says 'add sp, sp, #32'
@ CHECK: add sp, #32 @ encoding: [0x08,0xb0]

No, I haven't fixed that yet (in any patch).

This patch is just implementing "Encoding T1 is preferred to encoding T2 if <Rd> is specified and encoding T2 is preferred to encoding T1 if <Rd> is omitted." (ARMARM v7-A/R rev C.c page A8-307)

rengolin accepted this revision.Jul 9 2015, 6:23 AM
rengolin added a reviewer: rengolin.

Right, ok. Thanks!

This revision is now accepted and ready to land.Jul 9 2015, 6:23 AM
This revision was automatically updated to reflect the committed changes.