<div dir="ltr">Thanks!<div><br></div><div>I don't have commit access; could one of you please commit for me?</div><div><br></div><div>Tom</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Sep 12, 2013 at 2:14 PM, Joe Abbey <span dir="ltr"><<a href="mailto:joe.abbey@gmail.com" target="_blank">joe.abbey@gmail.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Tom,<br>
<br>
This all looks good please review my updates to your patch for LLVM coding style.<br>
<span class="HOEnZb"><font color="#888888"><br>
Joe<br>
<br>
</font></span><br><br>
<br>
On Sep 12, 2013, at 5:10 PM, Tobias Grosser <<a href="mailto:tobias@grosser.es">tobias@grosser.es</a>> wrote:<br>
<br>
> On 09/12/2013 11:03 PM, Tom Roeder wrote:<br>
>> Here's a version with a comment and the fixed CHECK statement.<br>
><br>
> Nice.<br>
><br>
> Just a tiny comment I overlooked before:<br>
><br>
>> Index: lib/Bitcode/Reader/BitcodeReader.cpp<br>
>> ===================================================================<br>
>> --- lib/Bitcode/Reader/BitcodeReader.cpp     (revision 190562)<br>
>> +++ lib/Bitcode/Reader/BitcodeReader.cpp     (working copy)<br>
>> @@ -1389,11 +1389,23 @@<br>
>>      }<br>
>>      case bitc::CST_CODE_CE_SELECT:  // CE_SELECT: [opval#, opval#, opval#]<br>
>>        if (Record.size() < 3) return Error("Invalid CE_SELECT record");<br>
>> -      V = ConstantExpr::getSelect(<br>
>> -                          ValueList.getConstantFwdRef(Record[0],<br>
>> -                                                      Type::getInt1Ty(Context)),<br>
>> -                          ValueList.getConstantFwdRef(Record[1],CurTy),<br>
>> -                          ValueList.getConstantFwdRef(Record[2],CurTy));<br>
>> +<br>
>> +      // If CurTy is a vector of length n, then Record[0] must be a <n x i1><br>
>> +      // vector. Otherwise, it must be a single bit.<br>
>> +      if (VectorType *VTy = dyn_cast<VectorType>(CurTy)) {<br>
>> +        unsigned int EltCount = VTy->getNumElements();<br>
>> +        Type *SelectorTy = VectorType::get(Type::getInt1Ty(Context), EltCount);<br>
>> +<br>
>> +        V = ConstantExpr::getSelect(ValueList.getConstantFwdRef(Record[0],<br>
>> +                                                                SelectorTy),<br>
>> +                                    ValueList.getConstantFwdRef(Record[1],CurTy),<br>
>> +                                    ValueList.getConstantFwdRef(Record[2],CurTy));<br>
>> +      } else {<br>
>> +        V = ConstantExpr::getSelect(ValueList.getConstantFwdRef(Record[0],<br>
>> +                                                                Type::getInt1Ty(Context)),<br>
>> +                                  ValueList.getConstantFwdRef(Record[1],CurTy),<br>
>> +                                  ValueList.getConstantFwdRef(Record[2],CurTy));<br>
><br>
>                                     ^^ Those lines are not properly<br>
>                                        aligned.<br>
><br>
> Otherwise, the patch looks good. Can you commit this patch yourself or do you need me to commit it?<br>
><br>
> Cheers,<br>
> Tobias<br>
> _______________________________________________<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>
<br>
<br></blockquote></div><br></div>