[all-commits] [llvm/llvm-project] 0607c8: [PowerPC] Legalize SREM/UREM directly on P9.

Esme via All-commits all-commits at lists.llvm.org
Mon Jul 6 04:48:11 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 0607c8df7faf71bd726e9d18bafd2f7566984e35
      https://github.com/llvm/llvm-project/commit/0607c8df7faf71bd726e9d18bafd2f7566984e35
  Author: Esme-Yi <esme.yi at ibm.com>
  Date:   2020-07-06 (Mon, 06 Jul 2020)

  Changed paths:
    M llvm/lib/Target/PowerPC/PPCISelLowering.cpp
    M llvm/lib/Target/PowerPC/PPCISelLowering.h
    M llvm/test/CodeGen/PowerPC/ppc64-P9-mod.ll

  Log Message:
  -----------
  [PowerPC] Legalize SREM/UREM directly on P9.

Summary: As Bugzilla-35090 reported, the rationale for using custom lowering SREM/UREM should no longer be true. At the IR level, the div-rem-pairs pass performs the transformation where the remainder is computed from the result of the division when both a required. We should now be able to lower these directly on P9. And the pass also fixed the problem that divide is in a different block than the remainder. This is a patch to remove redundant code and make SREM/UREM legal directly on P9.

Reviewed By: lkail

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




More information about the All-commits mailing list