[PATCH] D68360: PR41162 Implement LKK remainder and divisibility algorithms
Tim Gymnich via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun Oct 6 05:24:37 PDT 2019
TG908 marked 2 inline comments as done.
TG908 added inline comments.
================
Comment at: llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:3975
+ } else {
+ FVT = EVT::getIntegerVT(*DAG.getContext(), VT.getScalarSizeInBits() * 2);
+ }
----------------
lebedev.ri wrote:
> So no 64-bit remainders on basically everything?
According to the paper a good choice for the number of fraction bits would be twice the number of numerator bits. This limits us on 64bit platforms to 32bit rem only.
================
Comment at: llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:3990-3991
+ // If MUL is unavailable, we cannot proceed in any case.
+ if (!TLI.isOperationLegalOrCustomOrPromote(ISD::MUL, FVT) &&
+ TLI.isOperationExpand(ISD::MUL, FVT))
+ return SDValue();
----------------
lebedev.ri wrote:
> I think you want just `isOperationLegalOrCustom()`.
agree
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D68360/new/
https://reviews.llvm.org/D68360
More information about the llvm-commits
mailing list