[PATCH] D105115: [ConstantRanges] Use APInt for constant case for urem/srem.
Roman Lebedev via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jun 30 01:49:24 PDT 2021
lebedev.ri 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)};
+ }
----------------
Technically these also can be `if(const APInt *LHSInt = getSingleElement()) return {LHSInt->urem(*RHSInt)};`
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