Page MenuHomePhabricator

[ARM] VQADD instructions

Authored by dmgreen on Oct 7 2019, 4:00 AM.



This selects MVE VQADD from the vector llvm.sadd.sat or llvm.uadd.sat intrinsics.

The signed versions seem hard to get from C, but the unsigned are simple enough. And both are available from llvm, obviously.

Diff Detail

Event Timeline

dmgreen created this revision.Oct 7 2019, 4:00 AM
Herald added a project: Restricted Project. · View Herald TranscriptOct 7 2019, 4:00 AM
SjoerdMeijer accepted this revision.Oct 7 2019, 5:07 AM

Looks like a nice bit of isel to me.


And looking at this, I almost start to like tablegen. :-)

This revision is now accepted and ready to land.Oct 7 2019, 5:07 AM

Just wondering, who generates the intrinsics? From the little that I remember from the last time I looked, I thought it was clang but it that is was x86 specific? Do we have some hooks somewhere saying that we support them?

dmgreen marked an inline comment as done.Oct 7 2019, 7:24 AM

The usat version can be idiom recognised from C:
ssat is more difficult like I mentioned, but I don't think it should be impossible to do the same thing there too.


This is from D67158. The idea is that an intrinsic can be easily added in here, same as for vadds in that patch.

This revision was automatically updated to reflect the committed changes.