[X86] No need to determine pointer when the type is already a MachineInstr*. NFCI.
authorSimon Pilgrim <llvm-dev@redking.me.uk>
Sat, 31 Oct 2020 11:26:25 +0000 (11:26 +0000)
committerSimon Pilgrim <llvm-dev@redking.me.uk>
Sat, 31 Oct 2020 11:26:25 +0000 (11:26 +0000)
Caught by cppcheck - appears to be a copy+paste typo as the other var is an iterator that does need the &* pointer operation.

llvm/lib/Target/X86/X86CallFrameOptimization.cpp

index 6125845..8e749d5 100644 (file)
@@ -563,8 +563,7 @@ void X86CallFrameOptimization::adjustCallSequence(MachineFunction &MF,
         unsigned NumOps = DefMov->getDesc().getNumOperands();
         for (unsigned i = NumOps - X86::AddrNumOperands; i != NumOps; ++i)
           Push->addOperand(DefMov->getOperand(i));
-        Push->cloneMergedMemRefs(MF, {&*DefMov, &*Store});
-
+        Push->cloneMergedMemRefs(MF, {DefMov, &*Store});
         DefMov->eraseFromParent();
       } else {
         PushOpcode = Is64Bit ? X86::PUSH64r : X86::PUSH32r;