<div dir="ltr">Performing the select as a regular instruction (%a = select ...) doesn't trigger the bug. It has to end up with a CE_SELECT in the CONSTANTS block of the bitcode file. However, I'm far from an expert in LLVM bitcode, so if there's a smaller test case, I'd be happy to switch to it.</div>

<div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Sep 12, 2013 at 12:52 PM, Tobias Grosser <span dir="ltr"><<a href="mailto:tobias@grosser.es" target="_blank">tobias@grosser.es</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5">On 09/12/2013 06:36 PM, Tom Roeder wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi,<br>
<br>
Here is a patch that fixes decoding of CE_SELECT in BitcodeReader,<br>
along with a simple test case. The problem in the current code is that<br>
it generates but doesn't accept bitcode that uses vectors for the<br>
first element of a select in this context.  Please let me know what<br>
you think.<br>
</blockquote>
<br></div></div>
Hi Tom,<br>
<br>
nice catch!<br>
<br>
The test case does not seem minimal. Is there a reason to not just perform the select and return the result? Also, it might be nice to check that the disassembler decodes the result correctly. Otherwise this test may pass even if it prints out something incorrect, but something that does not crash.<br>


<br>
Otherwise, the patch looks good to me.<span class="HOEnZb"><font color="#888888"><br>
<br>
Tobias<br>
</font></span></blockquote></div><br></div>