[PATCH] D23194: [LVI] Relax the assertion about LVILatticeVal type in getConstantRange
Artur Pilipenko via llvm-commits
llvm-commits at lists.llvm.org
Wed Aug 10 06:02:52 PDT 2016
This revision was automatically updated to reflect the committed changes.
Closed by commit rL278217: [LVI] Relax the assertion about LVILatticeVal type in getConstantRange (authored by apilipenko).
Changed prior to commit:
https://reviews.llvm.org/D23194?vs=66929&id=67514#toc
Repository:
rL LLVM
https://reviews.llvm.org/D23194
Files:
llvm/trunk/lib/Analysis/LazyValueInfo.cpp
Index: llvm/trunk/lib/Analysis/LazyValueInfo.cpp
===================================================================
--- llvm/trunk/lib/Analysis/LazyValueInfo.cpp
+++ llvm/trunk/lib/Analysis/LazyValueInfo.cpp
@@ -1537,11 +1537,14 @@
const DataLayout &DL = BB->getModule()->getDataLayout();
LVILatticeVal Result =
getCache(PImpl, AC, &DL, DT).getValueInBlock(V, BB, CxtI);
- assert(!Result.isConstant());
if (Result.isUndefined())
return ConstantRange(Width, /*isFullSet=*/false);
if (Result.isConstantRange())
return Result.getConstantRange();
+ // We represent ConstantInt constants as constant ranges but other kinds
+ // of integer constants, i.e. ConstantExpr will be tagged as constants
+ assert(!(Result.isConstant() && isa<ConstantInt>(Result.getConstant())) &&
+ "ConstantInt value must be represented as constantrange");
return ConstantRange(Width, /*isFullSet=*/true);
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D23194.67514.patch
Type: text/x-patch
Size: 928 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160810/714f4d8e/attachment.bin>
More information about the llvm-commits
mailing list