]> granicus.if.org Git - llvm/commitdiff
[X86] Remove part of an if condition that should always be true.
authorCraig Topper <craig.topper@intel.com>
Thu, 25 Apr 2019 06:08:02 +0000 (06:08 +0000)
committerCraig Topper <craig.topper@intel.com>
Thu, 25 Apr 2019 06:08:02 +0000 (06:08 +0000)
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

lib/Target/X86/X86ISelDAGToDAG.cpp

index 6cf7833e180d8a418132ecfeb32ffc4509e83042..c01bf4db303c60855ff3587e6ca93bf8fe6279bf 100644 (file)
@@ -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.