[PATCH] D78960: [SveEmitter] Add builtins for ternary ops (fmla, fmad, etc)

Sander de Smalen via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Apr 27 13:28:01 PDT 2020


sdesmalen created this revision.
sdesmalen added reviewers: SjoerdMeijer, efriedma, ctetreau.
Herald added a subscriber: tschuett.
Herald added a project: clang.
sdesmalen added a comment.

Now that most of the functionality has been added to SveEmitter.cpp and CGBuiltin.cpp, the patches are becoming simpler and simpler. This patch is such an example, which is basically "builtin definitions + tests".

This is probably a good point to ask for some feedback how to best get these patches into Clang without spamming your inboxes too much :) I can choose to do this in individual patches for similar 'groups' of operations (like this patch does it). Alternatively I could collate them all into a single patch and put that up for review. Or I can  just commit such simple changes directly if you think there is little value in reviewing these (note that any patches that require code-changes or that add some macro in the arm_sve.h header file would still go through normal review process, the question is purely about structurally simple patches like this).

Do you have any preference/suggestions how to best approach this?

I'm also happy to add other reviewers, but I'm not sure who best to add. If you have suggestions, please let me know.


This patch adds builtins for:

- svmad, svmla, svmls, svmsb svnmad, svnmla, svnmls, svnmsb svmla_lane, svmls_lane

These builtins come in several flavours:

- Merge into first source vector (`_m`)
- False lanes are undef (`_x`)
- False lanes are zeroed (`_z`)

And can also have `_n` to indicate the last operand is a scalar.

For example:

  svint32_t svmla[_n_s32]_z(svbool_t pg, svint32_t op1, svint32_t op2, int32_t op3)


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D78960

Files:
  clang/include/clang/Basic/arm_sve.td
  clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_mad.c
  clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_mla.c
  clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_mls.c
  clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_msb.c
  clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_nmad.c
  clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_nmla.c
  clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_nmls.c
  clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_nmsb.c

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D78960.260413.patch
Type: text/x-patch
Size: 230958 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20200427/fafaef47/attachment-0001.bin>


More information about the cfe-commits mailing list