[all-commits] [llvm/llvm-project] 5b657f: AMDGPU: Move LICM after AMDGPUCodeGenPrepare

Matt Arsenault via All-commits all-commits at lists.llvm.org
Sat Jun 10 04:58:11 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 5b657f50b8e8dc5836fb80e566ca7569fd04c26f
      https://github.com/llvm/llvm-project/commit/5b657f50b8e8dc5836fb80e566ca7569fd04c26f
  Author: Matt Arsenault <Matthew.Arsenault at amd.com>
  Date:   2023-06-10 (Sat, 10 Jun 2023)

  Changed paths:
    M llvm/lib/Target/AMDGPU/AMDGPUTargetMachine.cpp
    M llvm/test/CodeGen/AMDGPU/idiv-licm.ll
    M llvm/test/CodeGen/AMDGPU/llc-pipeline.ll
    M llvm/test/CodeGen/AMDGPU/sdiv64.ll
    M llvm/test/CodeGen/AMDGPU/si-annotate-cf.ll
    M llvm/test/CodeGen/AMDGPU/srem64.ll
    M llvm/test/CodeGen/AMDGPU/udiv64.ll
    M llvm/test/CodeGen/AMDGPU/urem64.ll
    M llvm/test/Transforms/InferAddressSpaces/AMDGPU/flat_atomic.ll

  Log Message:
  -----------
  AMDGPU: Move LICM after AMDGPUCodeGenPrepare

The commit that added the run says it's to hoist uniform parts of
integer division expansion. That expansion is performed later, so this
didn't do anything in that case. Move this later so the original test
shows the improvement.

This also saves a run of "Canonicalize natural loops". Not sure why
this appears to be still getting a separate loop PM run. Also feels a
bit heavy to run this just for divide. Is there a way to specifically
hoist the divide sequence when it expands?




More information about the All-commits mailing list