This is an archive of the discontinued LLVM Phabricator instance.

[AArch64][SVE] Add SVE intrinsics for saturating add & subtract
ClosedPublic

Authored by kmclaughlin on Mar 30 2020, 6:13 AM.

Details

Summary

Adds the following intrinsics:

  • @llvm.aarch64.sve.[s|u]qadd.x
  • @llvm.aarch64.sve.[s|u]qsub.x

Diff Detail

Event Timeline

kmclaughlin created this revision.Mar 30 2020, 6:13 AM
Herald added a project: Restricted Project. · View Herald Transcript

I can understand why you might want the new intrinsics as a temporary measure, but I don't see the point of removing the already working support for llvm.sadd. etc.

Added patterns to AArch64SVEInstrInfo.td to support llvm.[s|u]add & llvm.[s|u]sub again, which was removed by my previous patch

You should be able to refactor the patterns into the definitions of the multiclasses sve_int_bin_cons_arit_0 and sve_int_arith_imm0, to avoid repeating them four times. (You might want to look at other places using null_frag in SVEInstrFormats.td for inspiration.)

Moved patterns for the new intrinsics into the sve_int_bin_cons_arit_0 and sve_int_arith_imm0 multiclasses

This revision is now accepted and ready to land.Apr 3 2020, 11:43 AM
This revision was automatically updated to reflect the committed changes.