[PATCH] D105115: [ConstantRanges] Use APInt for constant case for urem/srem.
Florian Hahn via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jun 30 01:52:53 PDT 2021
fhahn marked an inline comment as done.
fhahn added inline comments.
================
Comment at: llvm/lib/IR/ConstantRange.cpp:1229-1230
+ // Use APInt's implementation of UREM for single element ranges.
+ if (isSingleElement())
+ return {getSingleElement()->urem(*RHSInt)};
+ }
----------------
lebedev.ri wrote:
> Technically these also can be `if(const APInt *LHSInt = getSingleElement()) return {LHSInt->urem(*RHSInt)};`
yeah I 'll update that in the committed version
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D105115/new/
https://reviews.llvm.org/D105115
More information about the llvm-commits
mailing list