[PATCH] D110890: [GlobalISel] Port the udiv -> mul by constant combine.

Christopher Tetreault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 1 13:25:46 PDT 2021


ctetreau added inline comments.


================
Comment at: llvm/lib/CodeGen/GlobalISel/CombinerHelper.cpp:4429
+/// of the divided value are known zero.
+static mu magicu(const APInt &d, unsigned LeadingZeros = 0) {
+  unsigned p;
----------------
foad wrote:
> aemerson wrote:
> > This function currently copied but can be shared with the DAG, but I'm waiting for D98200 to land so we can put it in a common utils file.
> Do you mean D110747?
This patch is merged now, by the way. I'm glad there's another usage upstream now, so hopefully nobody tries to make it a static local again.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D110890/new/

https://reviews.llvm.org/D110890



More information about the llvm-commits mailing list