[PATCH] D59386: [ValueTracking] ConstantRange based overflow detection for unsigned add/sub

Nikita Popov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 15 12:39:34 PDT 2019


nikic marked an inline comment as done.
nikic added inline comments.


================
Comment at: llvm/lib/Analysis/ValueTracking.cpp:5708
 
 ConstantRange llvm::computeConstantRange(const Value *V, bool UseInstrInfo) {
+  Type *Ty = V->getType();
----------------
lebedev.ri wrote:
> This is used in `simplifyICmpWithConstant()`. thus i think this can be split off too,
> although i'm not sure if that will show any test changes as-is?
For this code to apply in `simplifyICmpWithConstant()` it would have to be an icmp with both operands constant, which will already be folded earlier. (This code is split off from simplifyICmpWithConstant, which is why the constant handling was missing: It's not needed for that usage.)


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D59386/new/

https://reviews.llvm.org/D59386





More information about the llvm-commits mailing list