[PATCH] D67514: [SCEV] Add smin/umin support to getRangeRef
Nikita Popov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Sep 12 12:51:38 PDT 2019
nikic added inline comments.
================
Comment at: lib/Analysis/ScalarEvolution.cpp:5602
+ for (unsigned i = 1, e = SMin->getNumOperands(); i != e; ++i)
+ X = X.smin(getRangeRef(SMin->getOperand(i), SignHint));
+ return setRange(SMin, SignHint,
----------------
Just a side note: For operations that have an intrinsic sign preference, I think it would be better to pass on that specific signedness as the SignHint (here signed, below unsigned). Not sure if there's an assumption about a getRangeRef() chain always using the same signedness somewhere though.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D67514/new/
https://reviews.llvm.org/D67514
More information about the llvm-commits
mailing list