[llvm] [GlobalISel] Handle div-by-pow2 (PR #83155)
Shilei Tian via llvm-commits
llvm-commits at lists.llvm.org
Wed Mar 6 16:12:11 PST 2024
================
@@ -5286,6 +5286,156 @@ MachineInstr *CombinerHelper::buildSDivUsingMul(MachineInstr &MI) {
return MIB.buildMul(Ty, Res, Factor);
}
+bool CombinerHelper::matchDivByPow2(MachineInstr &MI, bool IsSigned) {
----------------
shiltian wrote:
I'll see how to use `MatchData` later.
https://github.com/llvm/llvm-project/pull/83155
More information about the llvm-commits
mailing list