[llvm] r288886 - Reintroduce a check accidentally removed in 288873 to fix clang bots
Philip Reames via llvm-commits
llvm-commits at lists.llvm.org
Tue Dec 6 20:48:51 PST 2016
Author: reames
Date: Tue Dec 6 22:48:50 2016
New Revision: 288886
URL: http://llvm.org/viewvc/llvm-project?rev=288886&view=rev
Log:
Reintroduce a check accidentally removed in 288873 to fix clang bots
I believe this is the cause of the failure, but have not been able to confirm. Note that this is a speculative fix; I'm still waiting for a full build to finish as I synced and ended up doing a clean build which takes 20+ minutes on my machine.
Modified:
llvm/trunk/lib/Analysis/LazyValueInfo.cpp
Modified: llvm/trunk/lib/Analysis/LazyValueInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/LazyValueInfo.cpp?rev=288886&r1=288885&r2=288886&view=diff
==============================================================================
--- llvm/trunk/lib/Analysis/LazyValueInfo.cpp (original)
+++ llvm/trunk/lib/Analysis/LazyValueInfo.cpp Tue Dec 6 22:48:50 2016
@@ -71,12 +71,14 @@ class LVILatticeVal {
/// "nothing known yet".
undefined,
- /// This Value has a specific constant value. (For integers, constantrange
- /// is used instead.)
+ /// This Value has a specific constant value. (For constant integers,
+ /// constantrange is used instead. Integer typed constantexprs can appear
+ /// as constant.)
constant,
- /// This Value is known to not have the specified value. (For integers,
- /// constantrange is used instead.)
+ /// This Value is known to not have the specified value. (For constant
+ /// integers, constantrange is used instead. As above, integer typed
+ /// constantexprs can appear here.)
notconstant,
/// The Value falls within this range. (Used only for integer typed values.)
@@ -232,6 +234,12 @@ public:
}
assert(isConstantRange() && "New LVILattice type?");
+ if (!RHS.isConstantRange()) {
+ // We can get here if we've encountered a constantexpr of integer type
+ // and merge it with a constantrange.
+ markOverdefined();
+ return;
+ }
ConstantRange NewR = Range.unionWith(RHS.getConstantRange());
if (NewR.isFullSet())
markOverdefined();
More information about the llvm-commits
mailing list