[llvm] r311765 - [X86] Use SDValue::getOpcode instead of calling getNode and calling getOpcode on that. NFC
Craig Topper via llvm-commits
llvm-commits at lists.llvm.org
Thu Aug 24 22:36:29 PDT 2017
Author: ctopper
Date: Thu Aug 24 22:36:29 2017
New Revision: 311765
URL: http://llvm.org/viewvc/llvm-project?rev=311765&view=rev
Log:
[X86] Use SDValue::getOpcode instead of calling getNode and calling getOpcode on that. NFC
Modified:
llvm/trunk/lib/Target/X86/X86ISelDAGToDAG.cpp
Modified: llvm/trunk/lib/Target/X86/X86ISelDAGToDAG.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86ISelDAGToDAG.cpp?rev=311765&r1=311764&r2=311765&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86ISelDAGToDAG.cpp (original)
+++ llvm/trunk/lib/Target/X86/X86ISelDAGToDAG.cpp Thu Aug 24 22:36:29 2017
@@ -2638,8 +2638,8 @@ void X86DAGToDAGISel::Select(SDNode *Nod
// 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)) {
More information about the llvm-commits
mailing list