[PATCH] D141791: [Thumb2][MVE] Recognise shuffle truncation patterns suitable for ARMISD::MVETRUNC

Simon Pilgrim via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Jan 15 06:14:21 PST 2023


RKSimon created this revision.
RKSimon added reviewers: dmgreen, NickGuy, simon_tatham, john.brawn.
Herald added subscribers: hiraditya, kristof.beyls.
Herald added a project: All.
RKSimon requested review of this revision.
Herald added a project: LLVM.

I'm helping with the remaining regressions on D127115 <https://reviews.llvm.org/D127115>, and one of my candidate fixes caused some regressions with MVE interleaved shuffles due to poor handling of 'truncation' style shuffle masks (0,2,4,6,...).

This patch attempts to use the ARMISD::MVETRUNC node to handle these cases, based off existing code in LowerTruncate.

It handles both (0,2,4,6,...) and (1,3,5,7,....) 'top' style patterns (assuming no endian problems). I shift down the 'top' patterns - a basic search of ARM docs suggests MVE has some top/bottom truncation/narrowing instructions but I don't seem to be able to get them to be used.

NOTE: I don't know anything about MVE so this might be completely wrong :-(


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D141791

Files:
  llvm/lib/Target/ARM/ARMISelLowering.cpp
  llvm/test/CodeGen/Thumb2/LowOverheadLoops/mve-float-loops.ll
  llvm/test/CodeGen/Thumb2/mve-shuffle.ll
  llvm/test/CodeGen/Thumb2/mve-vld2.ll
  llvm/test/CodeGen/Thumb2/mve-vld4.ll
  llvm/test/CodeGen/Thumb2/mve-vqdmulh-minmax.ll
  llvm/test/CodeGen/Thumb2/mve-vqdmulh.ll
  llvm/test/CodeGen/Thumb2/mve-widen-narrow.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D141791.489352.patch
Type: text/x-patch
Size: 30584 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230115/5071a525/attachment.bin>


More information about the llvm-commits mailing list