diff options
author | Craig Topper <craig.topper@gmail.com> | 2014-06-19 06:10:58 +0000 |
---|---|---|
committer | Craig Topper <craig.topper@gmail.com> | 2014-06-19 06:10:58 +0000 |
commit | 35b2f75733c98e5904c5a75f8bcedeb96c4f4eda (patch) | |
tree | 6bc77166e70e62a9afed3fd9b00beab50a4ea99d /llvm/lib/Target/Hexagon/HexagonInstrInfo.cpp | |
parent | 8e34ecb797751925e24c3a006d811c3d28887c59 (diff) | |
download | bcm5719-llvm-35b2f75733c98e5904c5a75f8bcedeb96c4f4eda.tar.gz bcm5719-llvm-35b2f75733c98e5904c5a75f8bcedeb96c4f4eda.zip |
Convert some assert(0) to llvm_unreachable or fold an 'if' condition into the assert.
llvm-svn: 211254
Diffstat (limited to 'llvm/lib/Target/Hexagon/HexagonInstrInfo.cpp')
-rw-r--r-- | llvm/lib/Target/Hexagon/HexagonInstrInfo.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/llvm/lib/Target/Hexagon/HexagonInstrInfo.cpp b/llvm/lib/Target/Hexagon/HexagonInstrInfo.cpp index ea6367a89bc..1c95e06c892 100644 --- a/llvm/lib/Target/Hexagon/HexagonInstrInfo.cpp +++ b/llvm/lib/Target/Hexagon/HexagonInstrInfo.cpp @@ -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; } |