[all-commits] [llvm/llvm-project] 1bd01d: [VE] Remove switch with only default case statemen...

Simon Pilgrim via All-commits all-commits at lists.llvm.org
Wed Dec 1 08:38:11 PST 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 1bd01defff8a21ea714b4cfd3fffadb7b71e3e58
      https://github.com/llvm/llvm-project/commit/1bd01defff8a21ea714b4cfd3fffadb7b71e3e58
  Author: Simon Pilgrim <llvm-dev at redking.me.uk>
  Date:   2021-12-01 (Wed, 01 Dec 2021)

  Changed paths:
    M llvm/lib/Target/VE/MCTargetDesc/VEInstPrinter.cpp

  Log Message:
  -----------
  [VE] Remove switch with only default case statement to fix MSVC warning. NFC.


  Commit: 19d34f6e95fe94928ec275168d4d69d89aa54bbc
      https://github.com/llvm/llvm-project/commit/19d34f6e95fe94928ec275168d4d69d89aa54bbc
  Author: Simon Pilgrim <llvm-dev at redking.me.uk>
  Date:   2021-12-01 (Wed, 01 Dec 2021)

  Changed paths:
    M llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
    M llvm/lib/Target/X86/X86ISelLowering.cpp
    M llvm/test/CodeGen/X86/pmulh.ll

  Log Message:
  -----------
  [X86] combinePMULH - recognise 'cheap' trunctions via PACKS/PACKUS as well as SEXT/ZEXT

combinePMULH currently only truncates vXi32/vXi64 multiplies to PMULHW/PMULUW if the source operands are SEXT/ZEXT instructions for a 'free' truncation.

But we can generalize this to any source operand with sufficient leading sign/zero bits that would allow PACKS/PACKUS to be used as a 'cheap' truncation.

This helps us avoid the wider multiplies, in exchange for truncation on both source operands instead of the result.

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


Compare: https://github.com/llvm/llvm-project/compare/444013d324fe...19d34f6e95fe


More information about the All-commits mailing list