From: Simon Pilgrim Date: Sun, 12 Feb 2017 16:46:41 +0000 (+0000) Subject: [X86][SSE] Update argument names to match function name. NFCI. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=a654726bd93daa9c3731b04f8e8cc301c86cb0bd;p=llvm [X86][SSE] Update argument names to match function name. NFCI. The target shuffle match function arguments were using the term 'Ops' but the function names referred to them as 'Inputs' - use 'Inputs' consistently. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294900 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Target/X86/X86ISelLowering.cpp b/lib/Target/X86/X86ISelLowering.cpp index 2a0ea9cfeae..4331225fc1a 100644 --- a/lib/Target/X86/X86ISelLowering.cpp +++ b/lib/Target/X86/X86ISelLowering.cpp @@ -5791,37 +5791,38 @@ static bool getFauxShuffleMask(SDValue N, SmallVectorImpl &Mask, return false; } -/// Removes unused shuffle source ops and adjusts the shuffle mask accordingly. -static void resolveTargetShuffleInputsAndMask(SmallVectorImpl &Ops, +/// Removes unused shuffle source inputs and adjusts the shuffle mask accordingly. +static void resolveTargetShuffleInputsAndMask(SmallVectorImpl &Inputs, SmallVectorImpl &Mask) { int MaskWidth = Mask.size(); - SmallVector UsedOps; - for (int i = 0, e = Ops.size(); i < e; ++i) { - int lo = UsedOps.size() * MaskWidth; + SmallVector UsedInputs; + for (int i = 0, e = Inputs.size(); i < e; ++i) { + int lo = UsedInputs.size() * MaskWidth; int hi = lo + MaskWidth; if (any_of(Mask, [lo, hi](int i) { return (lo <= i) && (i < hi); })) { - UsedOps.push_back(Ops[i]); + UsedInputs.push_back(Inputs[i]); continue; } for (int &M : Mask) if (lo <= M) M -= MaskWidth; } - Ops = UsedOps; + Inputs = UsedInputs; } /// Calls setTargetShuffleZeroElements to resolve a target shuffle mask's inputs /// and set the SM_SentinelUndef and SM_SentinelZero values. Then check the /// remaining input indices in case we now have a unary shuffle and adjust the -/// Op0/Op1 inputs accordingly. +/// inputs accordingly. /// Returns true if the target shuffle mask was decoded. -static bool resolveTargetShuffleInputs(SDValue Op, SmallVectorImpl &Ops, +static bool resolveTargetShuffleInputs(SDValue Op, + SmallVectorImpl &Inputs, SmallVectorImpl &Mask) { - if (!setTargetShuffleZeroElements(Op, Mask, Ops)) - if (!getFauxShuffleMask(Op, Mask, Ops)) + if (!setTargetShuffleZeroElements(Op, Mask, Inputs)) + if (!getFauxShuffleMask(Op, Mask, Inputs)) return false; - resolveTargetShuffleInputsAndMask(Ops, Mask); + resolveTargetShuffleInputsAndMask(Inputs, Mask); return true; }