From: Craig Topper Date: Fri, 25 Aug 2017 05:36:29 +0000 (+0000) Subject: [X86] Use SDValue::getOpcode instead of calling getNode and calling getOpcode on... X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=bbcf25671b69042f4bbbffa38b0daa08b65f99fe;p=llvm [X86] Use SDValue::getOpcode instead of calling getNode and calling getOpcode on that. NFC git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@311765 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Target/X86/X86ISelDAGToDAG.cpp b/lib/Target/X86/X86ISelDAGToDAG.cpp index ab1eca01d8a..60fc8d1205b 100644 --- a/lib/Target/X86/X86ISelDAGToDAG.cpp +++ b/lib/Target/X86/X86ISelDAGToDAG.cpp @@ -2638,8 +2638,8 @@ void X86DAGToDAGISel::Select(SDNode *Node) { // Look for (X86cmp (and $op, $imm), 0) and see if we can convert it to // use a smaller encoding. // Look past the truncate if CMP is the only use of it. - if ((N0.getNode()->getOpcode() == ISD::AND || - (N0.getResNo() == 0 && N0.getNode()->getOpcode() == X86ISD::AND)) && + if ((N0.getOpcode() == ISD::AND || + (N0.getResNo() == 0 && N0.getOpcode() == X86ISD::AND)) && N0.getNode()->hasOneUse() && N0.getValueType() != MVT::i8 && X86::isZeroNode(N1)) {