[all-commits] [llvm/llvm-project] deaa67: AMDGPU/SDAG: Factor out the fold (add (mul x, y), ...

Nicolai Hähnle via All-commits all-commits at lists.llvm.org
Mon May 2 15:40:27 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: deaa678137e52f51ca694fdfd1dc9988360fb69b
      https://github.com/llvm/llvm-project/commit/deaa678137e52f51ca694fdfd1dc9988360fb69b
  Author: Nicolai Hähnle <nicolai.haehnle at amd.com>
  Date:   2022-05-02 (Mon, 02 May 2022)

  Changed paths:
    M llvm/lib/Target/AMDGPU/SIISelLowering.cpp
    M llvm/lib/Target/AMDGPU/SIISelLowering.h

  Log Message:
  -----------
  AMDGPU/SDAG: Factor out the fold (add (mul x, y), y) --> mad_[iu]64_[iu]32

Refactor to simplify a follow-up change.

No functional change intended. However, there is a rather subtle logic
change: the subsequent combines (e.g. reassociation) are skipped *always*
when one of the operands of the add is a mul, instead of only when
additionally mad64_32 etc. are available. This change makes sense because
the subsequent combines should never apply when one of the operands is a
mul.

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




More information about the All-commits mailing list