[PATCH] D76490: [ARM,MVE] Add ACLE intrinsics for the vminv/vmaxv family.

Simon Tatham via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Mar 20 05:23:36 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.

I've implemented these as target-specific IR intrinsics, because
they're not //quite// enough like @llvm.experimental.vector.reduce.min
(which doesn't take the extra scalar parameter). Also this keeps the
predicated and unpredicated versions looking similar, and the
floating-point minnm/maxnm versions fold into the same schema.

We had a couple of min/max reductions already implemented, from the
initial pathfinding exercise in D67158 <https://reviews.llvm.org/D67158>. Those were done by having
separate IR intrinsic names for the signed and unsigned integer
versions; as part of this commit, I've changed them to use a flag
parameter indicating signedness, which is how we ended up deciding
that the rest of the MVE intrinsics family ought to work. So now
hopefully the ewhole lot is consistent.

In the new llc test, the output code from the `v8f16` test functions
looks quite unpleasant, but most of it is PCS lowering (you can't pass
a `half` directly in or out of a function). In other circumstances,
where you do something else with your `half` in the same function, it
doesn't look nearly as nasty.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D76490

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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D76490.251616.patch
Type: text/x-patch
Size: 82429 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20200320/7afa331d/attachment-0001.bin>


More information about the cfe-commits mailing list