From: Craig Topper Date: Thu, 25 Apr 2019 06:08:02 +0000 (+0000) Subject: [X86] Remove part of an if condition that should always be true. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=c0edd71cfffa10bcd928c54d4ee4ec2062a5203f;p=llvm [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 --- diff --git a/lib/Target/X86/X86ISelDAGToDAG.cpp b/lib/Target/X86/X86ISelDAGToDAG.cpp index 6cf7833e180..c01bf4db303 100644 --- a/lib/Target/X86/X86ISelDAGToDAG.cpp +++ b/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.