This revision was automatically updated to reflect the committed changes.
Closed by commit rG6bec3e9303d6: [APInt] Remove all uses of zextOrSelf,
sextOrSelf and truncOrSelf (authored by foad).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
lattner added inline comments.
Comment at: llvm/lib/Analysis/ConstantFolding.cpp:2884
if (IntrinsicID == Intrinsic::smul_fix_sat) {
- APInt Max = APInt::getSignedMaxValue(Width).sextOrSelf(ExtendedWidth);
- APInt Min =
efriedma added inline comments.
Comment at: llvm/lib/IR/ConstantRange.cpp:724
auto BW = getBitWidth();
-APInt Min = APInt::getMinValue(BW).zextOrSelf(ResultBitWidth);
-APInt Max = APInt::getMaxValue(BW).zextOrSelf(ResultBitWidth);
+APInt Min =
reames added a comment.
Coming into this late, but I'd have preferred to see this separated into at
least two pieces. One for each "non-obvious" adjustment, and one final one
which just did the replace on the renaming sites. This differs from feedback
from other reviewers above, so don't
foad added inline comments.
Comment at: llvm/lib/IR/ConstantRange.cpp:724
auto BW = getBitWidth();
-APInt Min = APInt::getMinValue(BW).zextOrSelf(ResultBitWidth);
-APInt Max = APInt::getMaxValue(BW).zextOrSelf(ResultBitWidth);
+APInt Min =
foad marked 2 inline comments as done.
foad added inline comments.
Comment at: llvm/lib/Analysis/ConstantFolding.cpp:2884
if (IntrinsicID == Intrinsic::smul_fix_sat) {
- APInt Max = APInt::getSignedMaxValue(Width).sextOrSelf(ExtendedWidth);
- APInt Min =
foad updated this revision to Diff 429466.
foad added a comment.
Address some review comments.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D125557/new/
https://reviews.llvm.org/D125557
Files:
clang/lib/AST/ExprConstant.cpp
lattner accepted this revision.
lattner added a comment.
This revision is now accepted and ready to land.
nice cleanup!
Comment at: llvm/lib/Analysis/ConstantFolding.cpp:2884
if (IntrinsicID == Intrinsic::smul_fix_sat) {
- APInt Max =
efriedma added subscribers: reames, efriedma.
efriedma added inline comments.
Comment at: llvm/lib/IR/ConstantRange.cpp:724
auto BW = getBitWidth();
-APInt Min = APInt::getMinValue(BW).zextOrSelf(ResultBitWidth);
-APInt Max =
foad created this revision.
foad added reviewers: lattner, RKSimon, lebedev.ri, spatel.
Herald added subscribers: kosarev, jsilvanus, hsmhsm, jeroen.dobbelaere,
frasercrmck, ecnelises, martong, kerbowa, luismarques, apazos, sameer.abuasal,
pengfei, s.egerton, Jim, jocewei, PkmX, the_o,
10 matches
Mail list logo