This is an archive of the discontinued LLVM Phabricator instance.

[ARM] Fix erroneous availability of SMMLS for Armv7-M

Authored by avieira on Jan 9 2018, 2:27 AM.



Currently Armv7-M targets will generate a SMMLS instruction which is only available for Armv7E-M which does have DSP extensions in contrary to Armv7-M.

This patch fixes that and adds a test.

Diff Detail

Event Timeline

avieira created this revision.Jan 9 2018, 2:27 AM
samparker added inline comments.

This duplicates line 6, and why remove the v6 triple? And what about a test that ensures v7E-M works?

avieira added inline comments.Jan 9 2018, 3:40 AM

It does indeed, didnt see it. As for v7E-M... that was in the other patch, Ill add one here too. Thanks.

avieira updated this revision to Diff 129084.Jan 9 2018, 7:30 AM
avieira added inline comments.

Right, I was missing my coffee ... line 2 and 6 are for arm and thumb mode respectively. I had another look at the ARM ARM and for arm mode, v6 accepts SMMLS, for thumb only v6T2 accepts it.

I see in that FeatureDSP was only added to armv6t2. I have now added it to Armv6.

samparker accepted this revision.Jan 9 2018, 7:45 AM

LGTM, thanks.

This revision is now accepted and ready to land.Jan 9 2018, 7:45 AM
This revision was automatically updated to reflect the committed changes.