[PATCH] D141902: [GlobalISel] Detect splats built with G_CONCAT_VECTORS

Diana Picus via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 17 04:14:31 PST 2023


rovka added a comment.

In D141902#4058303 <https://reviews.llvm.org/D141902#4058303>, @foad wrote:

>> This should make it easier to match complex immediates for certain
>> instructions on AMDGPU, where for instance a <8 x s16> will be split
>> before instruction selection into a G_CONCAT_VECTORS of <2 x s16>
>> splats.
>
> I don't quite understand when this would be useful. If <8 x s16> is split up into <2 x s16> pieces during legalization, because only the latter is legal, then why would we still have a G_CONCAT_VECTORS with result type <8 x s16>? What operations would use that result? Do you have an example in mind?

There are some intrinsics that use large vector types, e.g. v16f16 <https://github.com/llvm/llvm-project/blob/main/llvm/include/llvm/IR/IntrinsicsAMDGPU.td#L2060>.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D141902/new/

https://reviews.llvm.org/D141902



More information about the llvm-commits mailing list