OSDN Git Service

[PowerPC] Legalize SREM/UREM directly on P9.
authorEsme-Yi <esme.yi@ibm.com>
Mon, 6 Jul 2020 11:47:31 +0000 (11:47 +0000)
committerEsme-Yi <esme.yi@ibm.com>
Mon, 6 Jul 2020 11:47:31 +0000 (11:47 +0000)
commit0607c8df7faf71bd726e9d18bafd2f7566984e35
tree731886e08f9566cf7d0066be1db482bedbfb5e0c
parent5689b38c6a4220cc5f6ba68a56486229b10071bf
[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
llvm/lib/Target/PowerPC/PPCISelLowering.cpp
llvm/lib/Target/PowerPC/PPCISelLowering.h
llvm/test/CodeGen/PowerPC/ppc64-P9-mod.ll