[PATCH] D110890: [GlobalISel] Port the udiv -> mul by constant combine.
Amara Emerson via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Sep 30 16:04:28 PDT 2021
aemerson added a comment.
@arsenm @foad The `udiv.i64.ll` test has had an abort line put it because this patch causes a G_MULH of <2 x s64> to be generated which is currently not legalized for AMDGPU.
================
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;
----------------
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.
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