[PATCH] D90096: [ARM] Match MVE vqdmulh

Dave Green via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Oct 24 06:44:15 PDT 2020


dmgreen created this revision.
dmgreen added reviewers: SjoerdMeijer, samtebbs, efriedma, simon_tatham, ostannard.
Herald added subscribers: danielkiss, hiraditya, kristof.beyls.
Herald added a project: LLVM.
dmgreen requested review of this revision.

This adds ISel matching for a form of VQDMULH. There are several ir patterns that we could match to that instruction, this one is for:

  min(ashr(mul(sext(a), sext(b)), 7), 127)

Which is what llvm will optimize to once it has removed the max that usually makes up the min/max saturate pattern, as in this case the compare will always be false. The additional complication to match i32 patterns (which extend into an i64) is that the min will be a vselect/setcc, as vmin is not supported for i64 vectors. Tablegen patterns have also been updated to attempt to reuse the MVE_TwoOpPattern patterns.


https://reviews.llvm.org/D90096

Files:
  llvm/lib/Target/ARM/ARMISelLowering.cpp
  llvm/lib/Target/ARM/ARMISelLowering.h
  llvm/lib/Target/ARM/ARMInstrMVE.td
  llvm/test/CodeGen/Thumb2/mve-vqdmulh.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D90096.300480.patch
Type: text/x-patch
Size: 35164 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20201024/1b99c826/attachment-0001.bin>


More information about the llvm-commits mailing list