[PATCH] D76359: [ARM,MVE] Add intrinsics for the VQDMLAD family.

Simon Tatham via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Mar 18 06:31:32 PDT 2020


simon_tatham created this revision.
simon_tatham added reviewers: dmgreen, MarkMurrayARM, miyuki, ostannard.
Herald added subscribers: cfe-commits, hiraditya, kristof.beyls.
Herald added a project: clang.

This is another set of instructions too complicated to be sensibly
expressed in IR by anything short of a target-specific intrinsic.
Given input vectors a,b, the instruction generates intermediate values
2*(a[0]*b[0]+a[1]+b[1]), 2*(a[2]*b[2]+a[3]+b[3]), etc; takes the high
half of each double-width values, and overwrites half the lanes in the
output vector c, which you therefore have to provide the input value
of. Optionally you can swap the elements of b so that the are things
like a[0]*b[1]+a[1]*b[0]; optionally you can round to nearest when
taking the high half; and optionally you can take the difference
rather than sum of the two products. Finally, saturation is applied
when converting back to a single-width vector lane.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D76359

Files:
  clang/include/clang/Basic/arm_mve.td
  clang/test/CodeGen/arm-mve-intrinsics/vqdmlad.c
  llvm/include/llvm/IR/IntrinsicsARM.td
  llvm/lib/Target/ARM/ARMInstrMVE.td
  llvm/test/CodeGen/Thumb2/mve-intrinsics/vqdmlad.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D76359.251062.patch
Type: text/x-patch
Size: 59564 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20200318/0d622510/attachment-0001.bin>


More information about the cfe-commits mailing list