[Hexagon] Return 0 from getDotNewPredOp when .new opcode does not exist
This allows using this function to test if an instruction can be converted
to a .new form.
llvm-svn: 304549
diff --git a/llvm/lib/Target/Hexagon/HexagonInstrInfo.cpp b/llvm/lib/Target/Hexagon/HexagonInstrInfo.cpp
index 0fef91e..b76da72 100644
--- a/llvm/lib/Target/Hexagon/HexagonInstrInfo.cpp
+++ b/llvm/lib/Target/Hexagon/HexagonInstrInfo.cpp
@@ -3419,9 +3419,7 @@
int NewOpcode = Hexagon::getPredNewOpcode(MI.getOpcode());
if (NewOpcode >= 0)
return NewOpcode;
-
- dbgs() << "Cannot convert to .new: " << getName(MI.getOpcode()) << '\n';
- llvm_unreachable(nullptr);
+ return 0;
}
int HexagonInstrInfo::getDotOldOp(const MachineInstr &MI) const {