[all-commits] [llvm/llvm-project] 77d625: [DAG] MergeInnerShuffle with BinOps - sometimes ac...

Simon Pilgrim via All-commits all-commits at lists.llvm.org
Thu Apr 1 06:37:49 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 77d625f8d8aa08cd162d20af51c41776a5034705
      https://github.com/llvm/llvm-project/commit/77d625f8d8aa08cd162d20af51c41776a5034705
  Author: Simon Pilgrim <llvm-dev at redking.me.uk>
  Date:   2021-04-01 (Thu, 01 Apr 2021)

  Changed paths:
    M llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
    M llvm/test/CodeGen/X86/haddsub-undef.ll
    M llvm/test/CodeGen/X86/phaddsub.ll
    M llvm/test/CodeGen/X86/x86-interleaved-access.ll

  Log Message:
  -----------
  [DAG] MergeInnerShuffle with BinOps - sometimes accept undef mask elements

If the inner shuffle already contains undef elements, then accept them in the merged shuffle as well.

This helps some X86 HADD/SUB patterns where slow targets were ending up with HADD/SUB because the (un)merged shuffles were stuck either side of the ADD/SUB - meaning we ended up with a total cost much higher than the "2*shuffle+add" that a slow target usually expands a HADD/SUB to.




More information about the All-commits mailing list