This is an archive of the discontinued LLVM Phabricator instance.

[ARM][THUMB2] Allow emitting T3 types of add and sub
ClosedPublic

Authored by dnsampaio on Dec 11 2019, 8:08 AM.

Details

Summary

This patch allows to emit thumb2 add and sub
instructions with 12 bit immediates in the
emitT2RegPlusImmediate function.

  • Splitting parts of the D70680

Diff Detail

Event Timeline

dnsampaio created this revision.Dec 11 2019, 8:08 AM
Herald added a project: Restricted Project. · View Herald TranscriptDec 11 2019, 8:08 AM
dnsampaio retitled this revision from [THUMB] Allow thumb2 emit T3 type add and sub to [ARM][THUMB2] Allow emitting T3 types of add and sub.Dec 11 2019, 8:26 AM
efriedma added inline comments.
llvm/lib/Target/ARM/Thumb2InstrInfo.cpp
323

Move this assertion before the T1 check?

Maybe also easier to read as "DestReg != ARM::SP || BaseReg == ARM::SP"

llvm/test/CodeGen/Thumb2/mve-stacksplot.mir
121

I'd prefer a dedicated test; this only exercises the codepath by accident.

dnsampaio updated this revision to Diff 234043.Dec 16 2019, 6:11 AM
dnsampaio marked 2 inline comments as done.

Added mir test.
Moved assert before T1 test.

dnsampaio updated this revision to Diff 234046.Dec 16 2019, 6:30 AM
  • Fix existing test
efriedma accepted this revision.Dec 16 2019, 12:27 PM

LGTM

llvm/lib/Target/ARM/Thumb2InstrInfo.cpp
306

Whitespace.

This revision is now accepted and ready to land.Dec 16 2019, 12:27 PM
This revision was automatically updated to reflect the committed changes.
dnsampaio marked an inline comment as done.Dec 30 2019, 3:13 AM