Browse Source

[X86] Remove part of an if condition that should always be true.

The IndexReg will always be non-null at this point. Earlier in the function, if
IndexReg was null we set it to CurDAG->getRegister(0, VT) which made it
non-null.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@359170 91177308-0d34-0410-b5e6-96231b3b80d8
Craig Topper 6 years ago
parent
commit
c0edd71cff
1 changed files with 1 additions and 1 deletions
  1. 1 1
      lib/Target/X86/X86ISelDAGToDAG.cpp

+ 1 - 1
lib/Target/X86/X86ISelDAGToDAG.cpp

@@ -2293,7 +2293,7 @@ bool X86DAGToDAGISel::selectLEAAddr(SDValue N,
       Complexity += 2;
   }
 
-  if (AM.Disp && (AM.Base_Reg.getNode() || AM.IndexReg.getNode()))
+  if (AM.Disp)
     Complexity++;
 
   // If it isn't worth using an LEA, reject it.