[PATCH] D53594: [GlobalISel] Introduce G_BUILD_VECTOR and G_CONCAT_VECTOR opcodes

Volkan Keles via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 24 10:52:31 PDT 2018


volkan added a comment.

In https://reviews.llvm.org/D53594#1273910, @nhaehnle wrote:

> Are two different opcodes for this really needed? Why not a single opcode with uniformly typed operands, either scalar or vector, which concatenates the operands as an appropriately sized vector? I know there's precedent for the separation elsewhere in LLVM, but it has always seemed redundant to me personally. The code for handling the BUILD vs. CONCAT cases tends to be very similar.


It doesn't make much difference if we don't add both, we would need the check the types to figure out if the inputs are scalars or vectors. Having separate opcodes is going to simplify the legalization strategies and make it easier to match patterns when writing combines.


Repository:
  rL LLVM

https://reviews.llvm.org/D53594





More information about the llvm-commits mailing list