[llvm] b2c931e - [X86] EmitInstrWithCustomInserter - remove redundant getDebugLoc() calls. NFCI.

Simon Pilgrim via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 16 08:30:20 PDT 2020


Author: Simon Pilgrim
Date: 2020-09-16T16:29:56+01:00
New Revision: b2c931eff3cd6f88426ef26d233fab1fabaa0b7e

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

LOG: [X86] EmitInstrWithCustomInserter - remove redundant getDebugLoc() calls. NFCI.

Use the same DebugLoc that is called at the top of the method.

Fixes some Wshadow static analyzer warnings.

Added: 
    

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

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Target/X86/X86ISelLowering.cpp b/llvm/lib/Target/X86/X86ISelLowering.cpp
index 6b316a3e5a71..f0c4206b012c 100644
--- a/llvm/lib/Target/X86/X86ISelLowering.cpp
+++ b/llvm/lib/Target/X86/X86ISelLowering.cpp
@@ -33717,7 +33717,6 @@ X86TargetLowering::EmitInstrWithCustomInserter(MachineInstr &MI,
   case X86::PTDPBUSD:
   case X86::PTDPBUUD:
   case X86::PTDPBF16PS: {
-    const DebugLoc &DL = MI.getDebugLoc();
     unsigned Opc;
     switch (MI.getOpcode()) {
     case X86::PTDPBSSD: Opc = X86::TDPBSSD; break;
@@ -33737,7 +33736,6 @@ X86TargetLowering::EmitInstrWithCustomInserter(MachineInstr &MI,
     return BB;
   }
   case X86::PTILEZERO: {
-    const DebugLoc &DL = MI.getDebugLoc();
     unsigned Imm = MI.getOperand(0).getImm();
     BuildMI(*BB, MI, DL, TII->get(X86::TILEZERO), TMMImmToTMMReg(Imm));
     MI.eraseFromParent(); // The pseudo is gone now.
@@ -33746,7 +33744,6 @@ X86TargetLowering::EmitInstrWithCustomInserter(MachineInstr &MI,
   case X86::PTILELOADD:
   case X86::PTILELOADDT1:
   case X86::PTILESTORED: {
-    const DebugLoc &DL = MI.getDebugLoc();
     unsigned Opc;
     switch (MI.getOpcode()) {
     case X86::PTILELOADD:   Opc = X86::TILELOADD;   break;


        


More information about the llvm-commits mailing list