[all-commits] [llvm/llvm-project] 195953: [X86] combineAdd - remove unnecessary add(a, concat...

Simon Pilgrim via All-commits all-commits at lists.llvm.org
Thu Jul 16 07:06:13 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 19595357e32b36383a025fddaaf8c38f90658b7b
      https://github.com/llvm/llvm-project/commit/19595357e32b36383a025fddaaf8c38f90658b7b
  Author: Simon Pilgrim <llvm-dev at redking.me.uk>
  Date:   2026-07-16 (Thu, 16 Jul 2026)

  Changed paths:
    M llvm/lib/Target/X86/X86ISelLowering.cpp
    M llvm/test/CodeGen/X86/vpdpwssd.ll

  Log Message:
  -----------
  [X86] combineAdd - remove unnecessary add(a,concat(vpmaddwd(x,y),vpmaddwd(z,w))) -> vpdpwssd(a,concat(x,z),concat(y,w)) fold (#209838)

We already handle vpmaddwd concatenation in combineConcatVectorOps - but
512-bit vpmaddwd is only available on BWI targets, which was missing
from the tests

Technically if there's a target that has AVX512VNNI but not BWI, then
this fold would be useful, but there's no such target and there's a
limit to "what if" optimisations we really need.

A small attempt at cleaning out some not very useful code from
X86ISelLowering.cpp - I'm intending to do a lot more of this for 24.x / #143088



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list