summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
diff options
context:
space:
mode:
authorArtur Pilipenko <apilipenko@azulsystems.com>2016-12-13 16:26:15 +0000
committerArtur Pilipenko <apilipenko@azulsystems.com>2016-12-13 16:26:15 +0000
commit469fcd2afd56a0611715408d43af996d05dde25a (patch)
treebd5b68e177053b18d4df89efa7181d5d43066c03 /llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
parent88c0fac53432db3b680eb08ff3876492b42915e7 (diff)
downloadbcm5719-llvm-469fcd2afd56a0611715408d43af996d05dde25a.tar.gz
bcm5719-llvm-469fcd2afd56a0611715408d43af996d05dde25a.zip
Use more detailed assertion messages in the code introduced by r289538
llvm-svn: 289545
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp')
-rw-r--r--llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp b/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
index a8f8d4bcd15..20a6477e210 100644
--- a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
@@ -4446,7 +4446,8 @@ collectByteProviders(SDValue Op, bool CheckNumberOfUses = false) {
Result.insert(Result.begin(), ByteShift, ByteProvider::getZero());
Result.insert(Result.end(), Original->begin(),
std::prev(Original->end(), ByteShift));
- assert(Result.size() == ByteWidth && "sanity");
+ assert(Result.size() == ByteWidth &&
+ "Computed width doesn't match from type width");
return Result;
}
case ISD::ZERO_EXTEND: {
@@ -4460,7 +4461,8 @@ collectByteProviders(SDValue Op, bool CheckNumberOfUses = false) {
Result.insert(Result.begin(), Original->begin(), Original->end());
Result.insert(Result.end(), ByteWidth - NarrowByteWidth,
ByteProvider::getZero());
- assert(Result.size() == ByteWidth && "sanity");
+ assert(Result.size() == ByteWidth &&
+ "Computed width doesn't match from type width");
return Result;
}
case ISD::LOAD: {
@@ -4469,7 +4471,8 @@ collectByteProviders(SDValue Op, bool CheckNumberOfUses = false) {
L->getExtensionType() != ISD::NON_EXTLOAD)
return None;
- assert(BitWidth == L->getMemoryVT().getSizeInBits() && "sanity");
+ assert(BitWidth == L->getMemoryVT().getSizeInBits() &&
+ "For non-extend loads widths must be the same");
SmallVector<ByteProvider, 4> Result(ByteWidth);
for (unsigned i = 0; i < ByteWidth; i++)
@@ -4517,7 +4520,8 @@ SDValue DAGCombiner::MatchLoadCombine(SDNode *N) {
return SDValue();
auto &Bytes = Res.getValue();
unsigned ByteWidth = Bytes.size();
- assert(VT.getSizeInBits() == ByteWidth * 8 && "sanity");
+ assert(VT.getSizeInBits() == ByteWidth * 8 &&
+ "collectByteProviders computed width differs from type width");
auto LittleEndianByteAt = [](unsigned BW, unsigned i) { return i; };
auto BigEndianByteAt = [](unsigned BW, unsigned i) { return BW - i - 1; };
OpenPOWER on IntegriCloud