<div dir="ltr"><div><div>I've looked through LLVM codegen code and found that SelectionDAGBuilder::visitUnreachable() is basically a no-op.  So I don't see how it could have generated anything...<br><br></div>What would be the right way to go about adding this functionality?    Right now I am thinking to add 'EmitTargetCodeForUnreachable()' method to TargetSelectionDAGInfo class, so that targets can emit code for 'unreachable', if they need that.   Does that sound right?<br>
<br></div>Vadim<br><div><div><div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Apr 14, 2014 at 1:53 PM, Vadim <span dir="ltr"><<a href="mailto:vadimcn@gmail.com" target="_blank">vadimcn@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">I am not seeing this happening, at least not for unreachables that<br>
follow calls to 'noreturn' functions.<br>
<div class=""><div class="h5"><br>
On Apr 14, 2014, at 3:48 AM, Anton Korobeynikov <<a href="mailto:anton@korobeynikov.info">anton@korobeynikov.info</a>> wrote:<br>
<br>
> Hello<br>
><br>
> x86 backend emits ud2 instruction in this case<br>
><br>
> On Mon, Apr 14, 2014 at 1:46 PM, Vadim Chugunov <<a href="mailto:vadimcn@gmail.com">vadimcn@gmail.com</a>> wrote:<br>
>> Hi,<br>
>> Is it somehow possible to have LLVM emit machine code for the 'unreachable'<br>
>> IR instruction, which would assert that it indeed never gets reached?<br>
>><br>
>> Vadim<br></div></div></blockquote></div><br></div></div></div></div></div>