[PATCH] D79587: [CodeGen][SVE] Legalisation of extends with scalable types

Kerry McLaughlin via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu May 7 10:14:21 PDT 2020


kmclaughlin created this revision.
kmclaughlin added reviewers: sdesmalen, efriedma, david-arm.
Herald added subscribers: psnobl, rkruppe, hiraditya, tschuett.
Herald added a project: LLVM.

This patch adds legalisation of extensions where the operand
of the extend is a legal scalable type but the result is not.

In these cases we can try to use the [S|U]UNPK[HI|LO] operations
to extend each half individually and concatenate the result.

For example:

  zext <vscale x 16 x i8> %a to <vscale x 16 x i16>

should emit:

  uunpklo z2.h, z0.b
  uunpkhi z1.h, z0.b

Patch by Richard Sandiford


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D79587

Files:
  llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
  llvm/lib/Target/AArch64/AArch64ISelLowering.h
  llvm/test/CodeGen/AArch64/llvm-ir-to-intrinsic.ll
  llvm/test/CodeGen/AArch64/sve-arith.ll
  llvm/test/CodeGen/AArch64/sve-ext.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D79587.262679.patch
Type: text/x-patch
Size: 50343 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20200507/f8c46df4/attachment-0001.bin>


More information about the cfe-commits mailing list