Fix scan-build uninitialized warning and assert the final diff isn't null.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@361095
91177308-0d34-0410-b5e6-
96231b3b80d8
assert(LoadIndex < getNumLoads() &&
"getCompareLoadPairs() called with no remaining loads");
std::vector<Value *> XorList, OrList;
assert(LoadIndex < getNumLoads() &&
"getCompareLoadPairs() called with no remaining loads");
std::vector<Value *> XorList, OrList;
const unsigned NumLoads =
std::min(getNumLoads() - LoadIndex, NumLoadsPerBlockForZeroCmp);
const unsigned NumLoads =
std::min(getNumLoads() - LoadIndex, NumLoadsPerBlockForZeroCmp);
while (OrList.size() != 1) {
OrList = pairWiseOr(OrList);
}
while (OrList.size() != 1) {
OrList = pairWiseOr(OrList);
}
+
+ assert(Diff && "Failed to find comparison diff");
Cmp = Builder.CreateICmpNE(OrList[0], ConstantInt::get(Diff->getType(), 0));
}
Cmp = Builder.CreateICmpNE(OrList[0], ConstantInt::get(Diff->getType(), 0));
}