[all-commits] [llvm/llvm-project] c23405: [DAGCombiner][AMDGPU] Canonicalize constants to th...

Craig Topper via All-commits all-commits at lists.llvm.org
Wed Aug 4 11:47:13 PDT 2021


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

  Changed paths:
    M llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
    M llvm/test/CodeGen/AMDGPU/amdgpu-codegenprepare-idiv.ll
    M llvm/test/CodeGen/AMDGPU/sdiv64.ll
    M llvm/test/CodeGen/AMDGPU/srem64.ll
    M llvm/test/CodeGen/AMDGPU/udiv64.ll

  Log Message:
  -----------
  [DAGCombiner][AMDGPU] Canonicalize constants to the RHS of MULHU/MULHS.

This allows special constants like to 0 to be recognized. It's also
expected by isel patterns if a target had a mulh with immediate instructions.
The commuting done by tablegen won't commute patterns with immediates since it
expects DAGCombine to have done it.

Reviewed By: foad

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




More information about the All-commits mailing list