[llvm] 5eec049 - [X86] No need to determine pointer when the type is already a MachineInstr*. NFCI.

Simon Pilgrim via llvm-commits llvm-commits at lists.llvm.org
Sat Oct 31 04:34:45 PDT 2020


Author: Simon Pilgrim
Date: 2020-10-31T11:26:25Z
New Revision: 5eec049689c2dc19ad7c2b3446b2584c87e86f94

URL: https://github.com/llvm/llvm-project/commit/5eec049689c2dc19ad7c2b3446b2584c87e86f94
DIFF: https://github.com/llvm/llvm-project/commit/5eec049689c2dc19ad7c2b3446b2584c87e86f94.diff

LOG: [X86] No need to determine pointer when the type is already a MachineInstr*. NFCI.

Caught by cppcheck - appears to be a copy+paste typo as the other var is an iterator that does need the &* pointer operation.

Added: 
    

Modified: 
    llvm/lib/Target/X86/X86CallFrameOptimization.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Target/X86/X86CallFrameOptimization.cpp b/llvm/lib/Target/X86/X86CallFrameOptimization.cpp
index 6125845a337f..8e749d5bc4db 100644
--- a/llvm/lib/Target/X86/X86CallFrameOptimization.cpp
+++ b/llvm/lib/Target/X86/X86CallFrameOptimization.cpp
@@ -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;


        


More information about the llvm-commits mailing list