[all-commits] [llvm/llvm-project] 557b89: [InstCombine] improve demanded element analysis fo...

RotateRight via All-commits all-commits at lists.llvm.org
Mon Aug 24 14:00:47 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 557b890ff4f4dd5fa979c232df5b31cf3fef04c1
      https://github.com/llvm/llvm-project/commit/557b890ff4f4dd5fa979c232df5b31cf3fef04c1
  Author: Sanjay Patel <spatel at rotateright.com>
  Date:   2020-08-24 (Mon, 24 Aug 2020)

  Changed paths:
    M llvm/lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp
    M llvm/test/Transforms/InstCombine/vec_demanded_elts.ll
    M llvm/test/Transforms/SLPVectorizer/AArch64/getelementptr.ll
    M llvm/test/Transforms/SLPVectorizer/X86/operandorder.ll

  Log Message:
  -----------
  [InstCombine] improve demanded element analysis for vector insert-of-extract

InstCombine currently has odd rules for folding insert-extract chains to shuffles,
so we miss collapsing seemingly simple cases as shown in the tests here.

But poison makes this not quite as easy as we might have guessed. Alive2 tests to
show the subtle difference (similar to the regression tests):
https://alive2.llvm.org/ce/z/hp4hv3 (this is ok)
https://alive2.llvm.org/ce/z/ehEWaN (poison leakage)

SLP tends to create these patterns (as shown in the SLP tests), and this could
help with solving PR16739.

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




More information about the All-commits mailing list