llvm.org GIT mirror llvm / 964343c
X86: remove a dead store (NFC) The SP was always unconditionally assigned to later, but initialised early. This delays the initialisation, and avoids the dead store. Identified by clang static analysis. No functional change intended. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244423 91177308-0d34-0410-b5e6-96231b3b80d8 Saleem Abdulrasool 4 years ago
1 changed file(s) with 2 addition(s) and 2 deletion(s). Raw diff Collapse all Expand all
303303 // transformation.
304304 const X86RegisterInfo &RegInfo = *static_cast(
305305 MF.getSubtarget().getRegisterInfo());
306 unsigned StackPtr = RegInfo.getStackRegister();
307306 unsigned FrameDestroyOpcode = TII->getCallFrameDestroyOpcode();
308307
309308 // We expect to enter this at the beginning of a call sequence
333332 if (!I->isCopy() || !I->getOperand(0).isReg())
334333 return;
335334 Context.SPCopy = I++;
336 StackPtr = Context.SPCopy->getOperand(0).getReg();
335
336 unsigned StackPtr = Context.SPCopy->getOperand(0).getReg();
337337
338338 // Scan the call setup sequence for the pattern we're looking for.
339339 // We only handle a simple case - a sequence of MOV32mi or MOV32mr