[all-commits] [llvm/llvm-project] 6bdb3c: [DAG] reduceBuildVecExtToExtBuildVec - don't combi...

Simon Pilgrim via All-commits all-commits at lists.llvm.org
Sat Jun 27 03:05:03 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 6bdb3ce4529ffbaad0354b052f2e9f06b4431085
      https://github.com/llvm/llvm-project/commit/6bdb3ce4529ffbaad0354b052f2e9f06b4431085
  Author: Simon Pilgrim <llvm-dev at redking.me.uk>
  Date:   2020-06-27 (Sat, 27 Jun 2020)

  Changed paths:
    M llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
    M llvm/test/CodeGen/X86/broadcastm-lowering.ll
    M llvm/test/CodeGen/X86/buildvec-insertvec.ll

  Log Message:
  -----------
  [DAG] reduceBuildVecExtToExtBuildVec - don't combine if it would break a splat.

reduceBuildVecExtToExtBuildVec was breaking a splat(zext(x)) pattern into buildvector(x, 0, x, 0, ..) resulting in much more complex insert+shuffle codegen.

We already go to some lengths to avoid this in SimplifyDemandedVectorElts etc. when we encounter splat buildvectors.

It should be OK to fold all splat(aext(x)) patterns - we might need to tighten this if we find a case where we mustn't introduce a buildvector(x, undef, x, undef, ..) but I can't find one.

Fixes PR46461.




More information about the All-commits mailing list