The change looks okay.  Can you please format the patch and the test case in a single file and use the FileCheck tool for testing the test case ?<div><br /></div><div>Thanks,</div><div>Nadav<br /><br /><span>On 03/27/13, <b class="name">Akira Hatanaka </b> <ahatanak@gmail.com> wrote:</span><blockquote cite="mid:CAB297Qx338=vFKUJmMUYHWH3BHURmke7H6hBXQs7sDpAO72U1w@mail.gmail.com" class="iwcQuote" style="border-left: 1px solid #00F; padding-left: 13px; margin-left: 0;" type="cite"><div class="mimepart text html">The attached patch adds code in InstCombiner::FoldSelectOpOp that checks if a Type is a vector before calling function Type::getVectorNumElements.<br />Without this fix, the following command asserts:<br /><br />$ opt instcombine1.ll -o instcombine1.bc -O3<br />

<br />Please review.<br />
</div></blockquote></div>