[PATCH] D138790: [DAG] Attempt to replace a mul nodes with an existing umul_lohi/smul_lohi node (PR59217)

Simon Pilgrim via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 28 04:17:20 PST 2022


RKSimon created this revision.
RKSimon added reviewers: chfast, spatel, foad, deadalnix.
Herald added subscribers: kosarev, ecnelises, kerbowa, pengfei, hiraditya, jvesely.
Herald added a project: All.
RKSimon requested review of this revision.
Herald added a project: LLVM.

As discussed on Issue #59217, under certain circumstances the DAG can generate duplicate MUL and MUL_LOHI nodes, often during MULO legalization.

This patch attempts to replace MUL nodes with additional uses of the LO result from the MUL_LOHI node.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D138790

Files:
  llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
  llvm/test/CodeGen/AMDGPU/llvm.mulo.ll
  llvm/test/CodeGen/X86/combine-mul.ll
  llvm/test/CodeGen/X86/muloti.ll
  llvm/test/CodeGen/X86/smul-with-overflow.ll
  llvm/test/CodeGen/X86/smul_fix_sat.ll
  llvm/test/CodeGen/X86/smulo-128-legalisation-lowering.ll
  llvm/test/CodeGen/X86/vec_smulo.ll
  llvm/test/CodeGen/X86/xmulo.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D138790.478189.patch
Type: text/x-patch
Size: 231666 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20221128/1f9cd35e/attachment-0001.bin>


More information about the llvm-commits mailing list