Convert some assert(0) to llvm_unreachable or fold an 'if' condition into the assert.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@211254 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Craig Topper
2014-06-19 06:10:58 +00:00
parent 64429cefba
commit bd01df2487
15 changed files with 26 additions and 47 deletions

View File

@@ -1538,14 +1538,13 @@ int HexagonInstrInfo::GetDotOldOp(const int opc) const {
int NewOp = opc;
if (isPredicated(NewOp) && isPredicatedNew(NewOp)) { // Get predicate old form
NewOp = Hexagon::getPredOldOpcode(NewOp);
if (NewOp < 0)
assert(0 && "Couldn't change predicate new instruction to its old form.");
assert(NewOp >= 0 &&
"Couldn't change predicate new instruction to its old form.");
}
if (isNewValueStore(NewOp)) { // Convert into non-new-value format
NewOp = Hexagon::getNonNVStore(NewOp);
if (NewOp < 0)
assert(0 && "Couldn't change new-value store to its old form.");
assert(NewOp >= 0 && "Couldn't change new-value store to its old form.");
}
return NewOp;
}