[PATCH] D63391: [CodeGen] [SelectionDAG] More efficient code for X % C == 0 (UREM case) (try 2)
Roman Lebedev via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jun 27 14:01:07 PDT 2019
lebedev.ri marked an inline comment as done.
lebedev.ri added inline comments.
================
Comment at: llvm/trunk/lib/CodeGen/SelectionDAG/TargetLowering.cpp:4525-4526
+
+ // Q = floor((2^W - 1) / D0)
+ APInt Q = APInt::getAllOnesValue(W).udiv(D0);
+
----------------
Got it, this should be dividing by `D`, not `D l>> cttz(D)`
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D63391/new/
https://reviews.llvm.org/D63391
More information about the llvm-commits
mailing list