[PATCH] D68360: PR41162 Implement LKK remainder and divisibility algorithms [urem]
Tim Gymnich via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Oct 7 18:04:05 PDT 2019
TG908 marked 2 inline comments as done and an inline comment as not done.
TG908 added a comment.
================
Comment at: llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:3940
// makes sense since the simplification results in fatter code.
if (DAG.isKnownNeverZero(N1) && !TLI.isIntDivCheap(VT, Attr)) {
SDValue OptimizedDiv =
----------------
>>! In D68360#1698334, @lebedev.ri wrote:
> Where is that lowering being performed?
Right here
================
Comment at: llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp:4941-4943
+ if (!D.isStrictlyPositive() || D.isMaxValue() || D.isOneValue() ||
+ D.isPowerOf2()) {
+ // Divisor must be in the range of (1,2^N)
----------------
lebedev.ri wrote:
> TG908 wrote:
> > lebedev.ri wrote:
> > > There is no such restriction.
> > What do you mean?
> > In my code?
> > In LKK?
> I haven't read the paper, so i'm only looking at this code,
> and they don't incur any restrictions on the divisor: https://rise4fun.com/Alive/HiT
Oops. You are right.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D68360/new/
https://reviews.llvm.org/D68360
More information about the llvm-commits
mailing list