[PATCH] D140750: [TargetLowering] Teach BuildUDIV to take advantage of leading zeros in the dividend.
Craig Topper via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Dec 29 11:58:58 PST 2022
craig.topper added inline comments.
================
Comment at: llvm/unittests/Support/DivisionByConstantTest.cpp:182-206
for (bool AllowEvenDivisorOptimization : {true, false}) {
for (bool ForceNPQ : {false, true}) {
APInt MagicResult = UnsignedDivideUsingMagic(
Numerator, Divisor, AllowEvenDivisorOptimization, ForceNPQ,
- Magics);
+ false/*LZOptimization*/, Magics);
ASSERT_EQ(MagicResult, NativeResult)
<< " ... given the operation: urem i" << Bits << " "
----------------
lebedev.ri wrote:
>
Ok. I was trying to reduce test time since IsAdd is always false after we apply the leading zero optimization. But if you'd prefer to reduce the bit width instead we can do that.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D140750/new/
https://reviews.llvm.org/D140750
More information about the llvm-commits
mailing list