[all-commits] [llvm/llvm-project] 352df1: [X86][AVX] matchShuffleAsBlend - use isElementEqui...

Simon Pilgrim via All-commits all-commits at lists.llvm.org
Sun Aug 22 07:27:00 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 352df10a238f7a2abbfa55a2acd5a43fcff80410
      https://github.com/llvm/llvm-project/commit/352df10a238f7a2abbfa55a2acd5a43fcff80410
  Author: Simon Pilgrim <llvm-dev at redking.me.uk>
  Date:   2021-08-22 (Sun, 22 Aug 2021)

  Changed paths:
    M llvm/lib/Target/X86/X86ISelLowering.cpp
    M llvm/test/CodeGen/X86/avx.ll
    M llvm/test/CodeGen/X86/horizontal-sum.ll
    M llvm/test/CodeGen/X86/sse41.ll

  Log Message:
  -----------
  [X86][AVX] matchShuffleAsBlend - use isElementEquivalent to help match broadcast/repeated elements

Extend matchShuffleAsBlend to not only match against known in-place elements for BLEND shuffles, but use isElementEquivalent to determine if the shuffle mask's referenced element is the same as the in-place element.

This allows us to replace a number of insertps instructions with more general blendps instructions (better opportunities for commutation, concatenation etc.).




More information about the All-commits mailing list