diff options
author | Craig Topper <craig.topper@sifive.com> | 2024-03-26 16:23:26 -0700 |
---|---|---|
committer | Craig Topper <craig.topper@sifive.com> | 2024-03-26 16:25:24 -0700 |
commit | 09155ac290b0906ac8011c87ee43d7c7a2710387 (patch) | |
tree | df69f29a7b1dff959011bdb34ceb35fa0e66703e | |
parent | d31278896208d856b277e34bd7e2a63899f0b57b (diff) | |
download | llvm-09155ac290b0906ac8011c87ee43d7c7a2710387.zip llvm-09155ac290b0906ac8011c87ee43d7c7a2710387.tar.gz llvm-09155ac290b0906ac8011c87ee43d7c7a2710387.tar.bz2 |
[LegalizeDAG] Remove unneeded temporary SDValues from PerformInsertVectorEltInMemory. NFC
There were 3 temporaries that just renamed the 3 well name arguments to the
function to Tmp1-3. Looks like this was done when the code was extracted from
elsewhere into a separate function 15 years ago.
-rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp b/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp index 808e3c6..b1f6fd6 100644 --- a/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp @@ -386,17 +386,13 @@ SDValue SelectionDAGLegalize::PerformInsertVectorEltInMemory(SDValue Vec, SDValue Val, SDValue Idx, const SDLoc &dl) { - SDValue Tmp1 = Vec; - SDValue Tmp2 = Val; - SDValue Tmp3 = Idx; - // If the target doesn't support this, we have to spill the input vector // to a temporary stack slot, update the element, then reload it. This is // badness. We could also load the value into a vector register (either // with a "move to register" or "extload into register" instruction, then // permute it into place, if the idx is a constant and if the idx is // supported by the target. - EVT VT = Tmp1.getValueType(); + EVT VT = Vec.getValueType(); EVT EltVT = VT.getVectorElementType(); SDValue StackPtr = DAG.CreateStackTemporary(VT); @@ -404,14 +400,14 @@ SDValue SelectionDAGLegalize::PerformInsertVectorEltInMemory(SDValue Vec, // Store the vector. SDValue Ch = DAG.getStore( - DAG.getEntryNode(), dl, Tmp1, StackPtr, + DAG.getEntryNode(), dl, Vec, StackPtr, MachinePointerInfo::getFixedStack(DAG.getMachineFunction(), SPFI)); - SDValue StackPtr2 = TLI.getVectorElementPointer(DAG, StackPtr, VT, Tmp3); + SDValue StackPtr2 = TLI.getVectorElementPointer(DAG, StackPtr, VT, Idx); // Store the scalar value. Ch = DAG.getTruncStore( - Ch, dl, Tmp2, StackPtr2, + Ch, dl, Val, StackPtr2, MachinePointerInfo::getUnknownStack(DAG.getMachineFunction()), EltVT); // Load the updated vector. return DAG.getLoad(VT, dl, Ch, StackPtr, MachinePointerInfo::getFixedStack( |