diff options
author | Philip Reames <listmail@philipreames.com> | 2016-12-07 04:48:50 +0000 |
---|---|---|
committer | Philip Reames <listmail@philipreames.com> | 2016-12-07 04:48:50 +0000 |
commit | 02bb6a6b0bd13656f836bffa3015812f52db63b9 (patch) | |
tree | a5157f07302a1e2efa94e0673b00d32cf385693a /llvm/lib/Analysis/LazyValueInfo.cpp | |
parent | 4de746f3267b42038563fb1c63b458f7d6a0dfb3 (diff) | |
download | bcm5719-llvm-02bb6a6b0bd13656f836bffa3015812f52db63b9.tar.gz bcm5719-llvm-02bb6a6b0bd13656f836bffa3015812f52db63b9.zip |
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.
llvm-svn: 288886
Diffstat (limited to 'llvm/lib/Analysis/LazyValueInfo.cpp')
-rw-r--r-- | llvm/lib/Analysis/LazyValueInfo.cpp | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/llvm/lib/Analysis/LazyValueInfo.cpp b/llvm/lib/Analysis/LazyValueInfo.cpp index 5b00491ce5b..e51e8217360 100644 --- a/llvm/lib/Analysis/LazyValueInfo.cpp +++ b/llvm/lib/Analysis/LazyValueInfo.cpp @@ -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(); |