[all-commits] [llvm/llvm-project] 8a2d1b: [X86] Add test cases for pr51371. NFC

Craig Topper via All-commits all-commits at lists.llvm.org
Sat Aug 7 08:49:21 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 8a2d1b183df9f6f4230866db368c230273b2087c
      https://github.com/llvm/llvm-project/commit/8a2d1b183df9f6f4230866db368c230273b2087c
  Author: Craig Topper <craig.topper at sifive.com>
  Date:   2021-08-07 (Sat, 07 Aug 2021)

  Changed paths:
    A llvm/test/CodeGen/X86/pr51371.ll

  Log Message:
  -----------
  [X86] Add test cases for pr51371. NFC


  Commit: 24dfba8d507e383eeccfc0cfa30ad6340f71a377
      https://github.com/llvm/llvm-project/commit/24dfba8d507e383eeccfc0cfa30ad6340f71a377
  Author: Craig Topper <craig.topper at sifive.com>
  Date:   2021-08-07 (Sat, 07 Aug 2021)

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

  Log Message:
  -----------
  [X86] Teach shouldSinkOperands to recognize pmuldq/pmuludq patterns.

The IR for pmuldq/pmuludq intrinsics uses a sext_inreg/zext_inreg
pattern on the inputs. Ideally we pattern match these away during
isel. It is possible for LICM or other middle end optimizations
to separate the extend from the mul. This prevents SelectionDAG
from removing it or depending on how the extend is lowered, we
may not be able to generate an AssertSExt/AssertZExt in the
mul basic block. This will prevent pmuldq/pmuludq from being
formed at all.

This patch teaches shouldSinkOperands to recognize this so
that CodeGenPrepare will clone the extend into the same basic
block as the mul.

Fixes PR51371.

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


Compare: https://github.com/llvm/llvm-project/compare/c21f6dc8a4bf...24dfba8d507e


More information about the All-commits mailing list