<div dir="ltr">Hello Joerg,<div><br></div><div>by unreachable default you mean something like this?<div><br></div><div><div>int foo(int a) {</div><div> switch (a) {</div><div> case 0:</div><div> return 10;</div><div> case 1:</div>
<div> return 20;</div><div> case 2:</div><div> return 2;</div><div> case 8:</div><div> return 3;</div><div> case 9:</div><div> return 4;</div><div> case 10:</div><div> return 5;</div><div> default:</div>
<div> abort();</div><div> }</div><div>}</div></div><div><br></div><div>If that is the case it seems to behave as expected. Please check the files attached</div><div><br></div><div>Cheers,</div><div>Marcello</div></div>
</div><div class="gmail_extra"><br><br><div class="gmail_quote">2014-06-10 18:37 GMT+01:00 Joerg Sonnenberger <span dir="ltr"><<a href="mailto:joerg@britannica.bec.de" target="_blank">joerg@britannica.bec.de</a>></span>:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="">On Tue, Jun 10, 2014 at 01:26:07PM +0100, Marcello Maggioni wrote:<br>
> switch (a) {<br>
> case 0:<br>
> do0();<br>
> break;<br>
> case 1:<br>
> do1();<br>
> break;<br>
> case 2:<br>
> do2();<br>
> break;<br>
> default:<br>
> break;<br>
> }<br>
<br>
</div>Can you also check what your changes do if default is unreachable?<br>
I don't know if we currently handle exploit that to ignore holes have<br>
have a flat tree, e.g. in this case the trinary check for <,==,> 1.<br>
Actually, depending on the architecture that might be the preferred form<br>
anyway...<br>
<span class="HOEnZb"><font color="#888888"><br>
Joerg<br>
</font></span><div class="HOEnZb"><div class="h5">_______________________________________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@cs.uiuc.edu">llvm-commits@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits</a><br>
</div></div></blockquote></div><br></div>