<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Sun, Apr 24, 2016 at 9:30 PM, Craig Topper via llvm-commits <span dir="ltr"><<a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-commits@lists.llvm.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Author: ctopper<br>
Date: Sun Apr 24 23:30:29 2016<br>
New Revision: 267377<br>
<br>
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=267377&view=rev" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project?rev=267377&view=rev</a><br>
Log:<br>
[X86] Replace a SmallVector used to pass 2 values to an ArrayRef parameter with a fixed size array. NFC<br>
<br>
Modified:<br>
    llvm/trunk/lib/Target/X86/X86ISelLowering.cpp<br>
<br>
Modified: llvm/trunk/lib/Target/X86/X86ISelLowering.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86ISelLowering.cpp?rev=267377&r1=267376&r2=267377&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86ISelLowering.cpp?rev=267377&r1=267376&r2=267377&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/lib/Target/X86/X86ISelLowering.cpp (original)<br>
+++ llvm/trunk/lib/Target/X86/X86ISelLowering.cpp Sun Apr 24 23:30:29 2016<br>
@@ -18112,7 +18112,6 @@ static SDValue LowerINTRINSIC_W_CHAIN(SD<br>
   }<br>
   // ADC/ADCX/SBB<br>
   case ADX: {<br>
-    SmallVector<SDValue, 2> Results;<br>
     SDVTList CFVTs = DAG.getVTList(Op->getValueType(0), MVT::Other);<br>
     SDVTList VTs = DAG.getVTList(Op.getOperand(3)->getValueType(0), MVT::Other);<br>
     SDValue GenCF = DAG.getNode(X86ISD::ADD, dl, CFVTs, Op.getOperand(2),<br>
@@ -18125,8 +18124,7 @@ static SDValue LowerINTRINSIC_W_CHAIN(SD<br>
     SDValue SetCC = DAG.getNode(X86ISD::SETCC, dl, MVT::i8,<br>
                                 DAG.getConstant(X86::COND_B, dl, MVT::i8),<br>
                                 Res.getValue(1));<br>
-    Results.push_back(SetCC);<br>
-    Results.push_back(Store);<br>
+    SDValue Results[] = { SetCC, Store };<br>
     return DAG.getMergeValues(Results, dl);<br></blockquote><div><br></div><div>I forget, can you just use an initializer_list?<br><br>return DAG.getMergeValues({SetCC, Store}, dl);<br><br>Or does MSVC have issues with that? (I imagine there should be a test case for ArrayRef converting ctor from initializer_list if this does work (& if it doesn't, we probably don't need/shouldn't have that ctor))</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
   }<br>
   case COMPRESS_TO_MEM: {<br>
<br>
<br>
_______________________________________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@lists.llvm.org">llvm-commits@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits</a><br>
</blockquote></div><br></div></div>