If we couldn't analyze a terminator (i.e., it's an indirectbr, or some other weirdness), we can't safely re-if-convert a predicated block, because we can't tell whether the predicated terminator can fallthrough (it does).
Currently, we would completely ignore the fallthrough successor. In the added testcase, this means we used to generate:
... @ %entry: cmp r5, #21 ittt ne @ %cc1f: cmpne r7, #42 @ %cc2t: strne.w r5, [r8] movne pc, r10 @ %cc1t: ...
Whereas the successor of %cc1f was originally %bb1. With the fix, we get the correct:
... @ %entry: cmp r5, #21 itt eq @ %cc1t: streq.w r5, [r11] moveq pc, r0 @ %cc1f: cmp r7, #42 itt ne @ %cc2t: strne.w r5, [r8] movne pc, r10 @ %bb1: ...
I'll admit the testcase is very contrived, as usual for these parts.
Thanks!
-Ahmed