[llvm] [SelectionDAG] Emit a more efficient magic number multiplication for exact udivs (PR #87161)
Craig Topper via llvm-commits
llvm-commits at lists.llvm.org
Mon Apr 22 12:13:59 PDT 2024
================
@@ -5197,12 +5197,8 @@ bool CombinerHelper::matchUDivByConst(MachineInstr &MI) {
return false;
}
- auto CheckEltValue = [&](const Constant *C) {
- if (auto *CI = dyn_cast_or_null<ConstantInt>(C))
- return !CI->isZero();
- return false;
- };
- return matchUnaryPredicate(MRI, RHS, CheckEltValue);
+ return matchUnaryPredicate(
----------------
topperc wrote:
If you're going to put GlobalISel code in the patch, then you need to add more than `[SelectionDAG]` to the PR name.
https://github.com/llvm/llvm-project/pull/87161
More information about the llvm-commits
mailing list