[llvm] r267617 - [LVI] Speculative fix for assertion seen in clang bots
Philip Reames via llvm-commits
llvm-commits at lists.llvm.org
Tue Apr 26 15:31:53 PDT 2016
Author: reames
Date: Tue Apr 26 17:31:53 2016
New Revision: 267617
URL: http://llvm.org/viewvc/llvm-project?rev=267617&view=rev
Log:
[LVI] Speculative fix for assertion seen in clang bots
I'll clean this up and add a test case shortly. I want to make sure this does actually fix the bots; if not, I'll revert.
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=267617&r1=267616&r2=267617&view=diff
==============================================================================
--- llvm/trunk/lib/Analysis/LazyValueInfo.cpp (original)
+++ llvm/trunk/lib/Analysis/LazyValueInfo.cpp Tue Apr 26 17:31:53 2016
@@ -1013,6 +1013,12 @@ bool LazyValueInfoCache::solveBlockValue
const unsigned OperandBitWidth =
BBI->getOperand(0)->getType()->getPrimitiveSizeInBits();
+ if (OperandBitWidth == 0) {
+ // Without knowing how wide the input is, we can't analyze it in any useful
+ // way.
+ BBLV.markOverdefined();
+ return true;
+ }
ConstantRange LHSRange = ConstantRange(OperandBitWidth);
if (hasBlockValue(BBI->getOperand(0), BB)) {
More information about the llvm-commits
mailing list