[all-commits] [llvm/llvm-project] 4a95a6: [instcombine] (extelt (inselt Vec, Value, Index), ...

Daniel Sanders via All-commits all-commits at lists.llvm.org
Mon Oct 10 15:42:58 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 4a95a64e4ad83d742d25bb291e16a62b601e429a
      https://github.com/llvm/llvm-project/commit/4a95a64e4ad83d742d25bb291e16a62b601e429a
  Author: Daniel Sanders <daniel_l_sanders at apple.com>
  Date:   2022-10-10 (Mon, 10 Oct 2022)

  Changed paths:
    M llvm/lib/Transforms/InstCombine/InstCombineVectorOps.cpp
    A llvm/test/Transforms/InstCombine/vector-inseltextelt.ll

  Log Message:
  -----------
  [instcombine] (extelt (inselt Vec, Value, Index), Index) -> Value

When Index is variable but still trivially known to be equal we can use Value
from before the insertion, possibly eliminating the vector.

Reverts a functional change from:
Author: Philip Reames <listmail at philipreames.com>
Date:   Wed Dec 8 12:21:10 2021 -0800

    [instcombine] A couple style tweaks to visitExtractElementInst [nfc]

Thanks to Michele Scandale for identifying the bug

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




More information about the All-commits mailing list