[llvm] r267377 - [X86] Replace a SmallVector used to pass 2 values to an ArrayRef parameter with a fixed size array. NFC
David Blaikie via llvm-commits
llvm-commits at lists.llvm.org
Mon Apr 25 10:20:48 PDT 2016
On Sun, Apr 24, 2016 at 9:30 PM, Craig Topper via llvm-commits <
llvm-commits at lists.llvm.org> wrote:
> Author: ctopper
> Date: Sun Apr 24 23:30:29 2016
> New Revision: 267377
>
> URL: http://llvm.org/viewvc/llvm-project?rev=267377&view=rev
> Log:
> [X86] Replace a SmallVector used to pass 2 values to an ArrayRef parameter
> with a fixed size array. NFC
>
> Modified:
> llvm/trunk/lib/Target/X86/X86ISelLowering.cpp
>
> Modified: llvm/trunk/lib/Target/X86/X86ISelLowering.cpp
> URL:
> http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86ISelLowering.cpp?rev=267377&r1=267376&r2=267377&view=diff
>
> ==============================================================================
> --- llvm/trunk/lib/Target/X86/X86ISelLowering.cpp (original)
> +++ llvm/trunk/lib/Target/X86/X86ISelLowering.cpp Sun Apr 24 23:30:29 2016
> @@ -18112,7 +18112,6 @@ static SDValue LowerINTRINSIC_W_CHAIN(SD
> }
> // ADC/ADCX/SBB
> case ADX: {
> - SmallVector<SDValue, 2> Results;
> SDVTList CFVTs = DAG.getVTList(Op->getValueType(0), MVT::Other);
> SDVTList VTs = DAG.getVTList(Op.getOperand(3)->getValueType(0),
> MVT::Other);
> SDValue GenCF = DAG.getNode(X86ISD::ADD, dl, CFVTs, Op.getOperand(2),
> @@ -18125,8 +18124,7 @@ static SDValue LowerINTRINSIC_W_CHAIN(SD
> SDValue SetCC = DAG.getNode(X86ISD::SETCC, dl, MVT::i8,
> DAG.getConstant(X86::COND_B, dl, MVT::i8),
> Res.getValue(1));
> - Results.push_back(SetCC);
> - Results.push_back(Store);
> + SDValue Results[] = { SetCC, Store };
> return DAG.getMergeValues(Results, dl);
>
I forget, can you just use an initializer_list?
return DAG.getMergeValues({SetCC, Store}, dl);
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))
> }
> case COMPRESS_TO_MEM: {
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160425/98524957/attachment.html>
More information about the llvm-commits
mailing list