[PATCH] D111132: [GlobalISel] Better verification of G_UNMERGE_VALUES

Amara Emerson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 7 23:04:51 PDT 2021


aemerson added a comment.

In D111132#3042221 <https://reviews.llvm.org/D111132#3042221>, @foad wrote:

>> 1. Splitting a vector into subvectors (the converse of G_CONCAT_VECTORS).
>
> Is there any appetite for using a new (G_UNCONCAT_VECTORS???) opcode for this case?
>
> Unfortunately there are a couple of tests that fail the verification I implemented for this case:
>
> Failed Tests (2):
>
>   LLVM :: CodeGen/AArch64/GlobalISel/combine-unmerge.mir
>   LLVM :: CodeGen/AMDGPU/GlobalISel/artifact-combiner-unmerge-values.mir
>
> by building MIR like this: `%1:_(<2 x s16>), %2:_(<2 x s16>) = G_UNMERGE_VALUES %0:_(<2 x s32>)`
>
> Should this be allowed?

I don't like unmerge being able to do that. Seems better to handle that with a bitcast first.

>> 2. Splitting a vector into its elements (the converse of G_BUILD_VECTOR).
>
> Is there any appetite for using a new G_SPLIT_VECTOR opcode for this case?

As for splitting unmerge into separate opcodes, I don't have a particularly strong preference so I'm leaning towards keeping the status quo for now.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D111132



More information about the llvm-commits mailing list