This is an archive of the discontinued LLVM Phabricator instance.

[ARM][test] Add new tests for (mul (add r, c0), c1)
ClosedPublic

Authored by benshi001 on Sep 1 2021, 7:29 PM.

Diff Detail

Event Timeline

benshi001 created this revision.Sep 1 2021, 7:29 PM
benshi001 requested review of this revision.Sep 1 2021, 7:29 PM
Herald added a project: Restricted Project. · View Herald TranscriptSep 1 2021, 7:29 PM
RKSimon added inline comments.Sep 2 2021, 2:35 AM
llvm/test/CodeGen/ARM/addimm-mulimm.ll
4

If you add a common CHECK you should be able to merge some of these (to reduce ambiguity I've avoided the '-6-' and '-7-' as well):

--check-prefixes=CHECK,CHECKV6
--check-prefixes=CHECK,CHECKV7
benshi001 updated this revision to Diff 370228.Sep 2 2021, 4:35 AM
benshi001 marked an inline comment as done.
benshi001 updated this revision to Diff 370229.Sep 2 2021, 4:42 AM
benshi001 updated this revision to Diff 370231.Sep 2 2021, 4:52 AM
benshi001 updated this revision to Diff 370468.Sep 2 2021, 7:02 PM
RKSimon added inline comments.Sep 3 2021, 8:51 AM
llvm/test/CodeGen/ARM/addimm-mulimm.ll
6

Generally its better not to name tests sequentially like this, as it tends to get messy with later alterations. Maybe name them after the scale + offset imediates?

e..g fold_add19_mul11_i32 ?

benshi001 updated this revision to Diff 370698.Sep 3 2021, 10:20 PM
benshi001 marked an inline comment as done.

What about non-i32 coverage?

llvm/test/CodeGen/ARM/addimm-mulimm.ll
20

THUNB -> THUMB ?

dmgreen added inline comments.Sep 5 2021, 2:08 AM
llvm/test/CodeGen/ARM/addimm-mulimm.ll
5

Can you use these thumb triples:
thumbv6m-none-eabi
thumbv7m-none-eabi

benshi001 updated this revision to Diff 370902.Sep 6 2021, 5:55 AM
benshi001 marked an inline comment as done.
benshi001 added inline comments.
llvm/test/CodeGen/ARM/addimm-mulimm.ll
20

fixed.

benshi001 marked 2 inline comments as done.Sep 6 2021, 5:56 AM

What about non-i32 coverage?

I have implemented each situation for both i32 and i16.

dmgreen accepted this revision.Sep 7 2021, 12:22 AM

LGTM

This revision is now accepted and ready to land.Sep 7 2021, 12:22 AM
This revision was automatically updated to reflect the committed changes.