<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Oct 9, 2017 at 3:10 AM, Gaël Jobin via llvm-dev <span dir="ltr"><<a href="mailto:llvm-dev@lists.llvm.org" target="_blank" class="gmail-cremed cremed">llvm-dev@lists.llvm.org</a>></span> wrote:<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div style="font-size:10pt;font-family:Verdana,Geneva,sans-serif">
<p><span>My current fix is the following:</span></p>
<blockquote type="cite" style="padding:0px 0.4em;border-left:2px solid rgb(16,16,255);margin:0px">
<p><span>@@ -408,7 +408,8 @@ unsigned ARMBaseInstrInfo::<wbr>removeBranch(MachineBasicBlock &MBB,<br> return 0;<br> <br> if (!isUncondBranchOpcode(I-><wbr>getOpcode()) &&<br>- !isCondBranchOpcode(I-><wbr>getOpcode()))<br>+ !isCondBranchOpcode(I-><wbr>getOpcode()) &&<br>+ !isIndirectBranchOpcode(I-><wbr>getOpcode()))<br> return 0;<br></span></p>
</blockquote>
<p><span>Does that makes sense?</span></p>
<p><br></p></div></blockquote><div>Independent of anything else, that looks like a bug in ARMBaseInstrInfo::removeBranch</div><div><br></div><div>It probably has escaped unnoticed because there aren't many code paths that will try to remove an indirect branch.</div><div>I'll let ARM folks chime in, but it looks correct to me.</div><div><br></div><div>Kyle.</div></div></div></div>