[all-commits] [llvm/llvm-project] 039617: [InstCombine] Extend pattern to replace shuffle's ...

Piotr Sobczak via All-commits all-commits at lists.llvm.org
Wed Nov 3 01:44:14 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 03961709edd138a3b3d3e813ad30d20cdf8d7740
      https://github.com/llvm/llvm-project/commit/03961709edd138a3b3d3e813ad30d20cdf8d7740
  Author: Piotr Sobczak <Piotr.Sobczak at amd.com>
  Date:   2021-11-03 (Wed, 03 Nov 2021)

  Changed paths:
    M llvm/lib/Transforms/InstCombine/InstCombineVectorOps.cpp
    M llvm/test/Transforms/InstCombine/insert-extract-shuffle.ll

  Log Message:
  -----------
  [InstCombine] Extend pattern to replace shuffle's insertelement operand

In D71220 a pattern was added to replace shuffle's insertelement operand
if inserted scalar is not demanded. The pattern was added only for
the case where the shuffle's mask size is equal to element's vector size.
However, that condition is not required because the pattern does not
change the shuffle vector size.

This patch extends the pattern to also include cases where shuffle's mask
size is not equal to element's vector size.

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




More information about the All-commits mailing list