[PATCH] D110646: [SelectionDAG] Handle promotion + widening in getCopyToPartsVector

Sander de Smalen via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 28 11:40:14 PDT 2021


sdesmalen created this revision.
Herald added subscribers: ctetreau, ecnelises, hiraditya, tschuett.
sdesmalen requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

Some vectors require both widening and promotion for their legalization.
This case is not yet handled in getCopyToPartsVector and falls back
on scalarizing by default. BBecause scalable vectors can't easily be
scalarised, we need to implement this in two separate stages:

1. Widen the vector.
2. Promote the vector.

As part of this patch, PromoteIntRes_CONCAT_VECTORS also needed to be
made scalable aware. Instead of falling back on scalarizing the vector
(fixed-width only), each sub-part of the CONCAT vector is promoted,
and the operation is performed on the type with the widest element type,
finally truncating the result to the promoted result type.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D110646

Files:
  llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
  llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
  llvm/test/CodeGen/AArch64/sve-extract-scalable-vector.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D110646.375657.patch
Type: text/x-patch
Size: 5303 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210928/ebfbce68/attachment.bin>


More information about the llvm-commits mailing list