[all-commits] [llvm/llvm-project] d510fd: [X86] combineMulToPMADDWD - handle any pow2 vector...

Simon Pilgrim via All-commits all-commits at lists.llvm.org
Tue Nov 9 07:21:06 PST 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: d510fd2bed030ff2c42e1a365e1898ac6e822694
      https://github.com/llvm/llvm-project/commit/d510fd2bed030ff2c42e1a365e1898ac6e822694
  Author: Simon Pilgrim <llvm-dev at redking.me.uk>
  Date:   2021-11-09 (Tue, 09 Nov 2021)

  Changed paths:
    M llvm/lib/Target/X86/X86ISelLowering.cpp
    M llvm/test/CodeGen/X86/pmaddubsw.ll
    M llvm/test/CodeGen/X86/pmulh.ll
    M llvm/test/CodeGen/X86/shrink_vmul.ll
    M llvm/test/CodeGen/X86/slow-pmulld.ll
    M llvm/test/CodeGen/X86/vshli-simplify-demanded-bits.ll

  Log Message:
  -----------
  [X86] combineMulToPMADDWD - handle any pow2 vector type and split to legal types

combineMulToPMADDWD is currently limited to legal types, but there's no reason why we can't handle any larger type that the existing SplitOpsAndApply code can use to split to legal X86ISD::VPMADDWD ops.

This also exposed a missed opportunity for pre-SSE41 targets to handle SEXT ops from types smaller than vXi16 - without PMOVSX instructions these will always be expanded to unpack+shifts, so we can cheat and convert this into a ZEXT(SEXT()) sequence to make it a valid PMADDWD op.

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




More information about the All-commits mailing list