[all-commits] [llvm/llvm-project] 544e02: Fix typo. NFC

Diana via All-commits all-commits at lists.llvm.org
Wed Jan 18 01:56:44 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 544e02906a48fbf9a79469d4588772b7c7b44041
      https://github.com/llvm/llvm-project/commit/544e02906a48fbf9a79469d4588772b7c7b44041
  Author: Diana Picus <Diana-Magda.Picus at amd.com>
  Date:   2023-01-18 (Wed, 18 Jan 2023)

  Changed paths:
    M llvm/lib/CodeGen/GlobalISel/Utils.cpp

  Log Message:
  -----------
  Fix typo. NFC


  Commit: 0a85c531fc5c4f2909ccd246eb60b05d769e15d8
      https://github.com/llvm/llvm-project/commit/0a85c531fc5c4f2909ccd246eb60b05d769e15d8
  Author: Diana Picus <Diana-Magda.Picus at amd.com>
  Date:   2023-01-18 (Wed, 18 Jan 2023)

  Changed paths:
    M llvm/lib/CodeGen/GlobalISel/Utils.cpp
    M llvm/unittests/CodeGen/GlobalISel/PatternMatchTest.cpp

  Log Message:
  -----------
  [GlobalISel] Detect splats built with G_CONCAT_VECTORS

Add support to the MI matching of vector splats for patterns that
consist of `G_CONCAT_VECTORS` of smaller splats with the same constant
value. With this, we would consider the following pseudo-MIR to be a splat:

```
%0 = G_[F]CONSTANT [...]
%1 = G_BUILD_VECTOR %0, %0, ..., %0
%2 = G_CONCAT_VECTORS %1, %1, ..., %1
```

Since it uses recursion for matching splats, it could match pretty
complicated patterns with all sorts of combinations of `G_BUILD_VECTOR`
and `G_CONCAT_VECTORS` (e.g. a `G_CONCAT_VECTORS` with
a `G_BUILD_VECTOR_TRUNC` and another `G_CONCAT_VECTORS` as operands),
and it should also look through copies etc.

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.

Differential Revision: https://reviews.llvm.org/D141902


Compare: https://github.com/llvm/llvm-project/compare/d7daa6364cfd...0a85c531fc5c


More information about the All-commits mailing list