All conditional branches are disallowed in IT blocks, not just CBZ/CBNZ.
llvm-svn: 139329
diff --git a/llvm/lib/Target/ARM/Disassembler/ARMDisassembler.cpp b/llvm/lib/Target/ARM/Disassembler/ARMDisassembler.cpp
index d361a60..2791350 100644
--- a/llvm/lib/Target/ARM/Disassembler/ARMDisassembler.cpp
+++ b/llvm/lib/Target/ARM/Disassembler/ARMDisassembler.cpp
@@ -429,12 +429,13 @@
switch (MI.getOpcode()) {
case ARM::tBcc:
case ARM::t2Bcc:
- return Success;
case ARM::tCBZ:
case ARM::tCBNZ:
- // Some instructions are not allowed in IT blocks.
+ // Some instructions (mostly conditional branches) are not
+ // allowed in IT blocks.
if (!ITBlock.empty())
return SoftFail;
+ return Success;
break;
default:
break;