OSDN Git Service

Move getOpcode() call into if statement. NFCI.
authorSimon Pilgrim <llvm-dev@redking.me.uk>
Sun, 5 May 2019 18:34:38 +0000 (18:34 +0000)
committerSimon Pilgrim <llvm-dev@redking.me.uk>
Sun, 5 May 2019 18:34:38 +0000 (18:34 +0000)
Avoids a cppcheck "Local variable name shadows outer variable" warning.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@359991 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/X86/X86ISelLowering.cpp

index ef47991..053fe90 100644 (file)
@@ -20630,7 +20630,6 @@ SDValue X86TargetLowering::LowerSELECT(SDValue Op, SelectionDAG &DAG) const {
     CC = Cond.getOperand(0);
 
     SDValue Cmp = Cond.getOperand(1);
-    unsigned Opc = Cmp.getOpcode();
     MVT VT = Op.getSimpleValueType();
 
     bool IllegalFPCMov = false;
@@ -20639,7 +20638,7 @@ SDValue X86TargetLowering::LowerSELECT(SDValue Op, SelectionDAG &DAG) const {
       IllegalFPCMov = !hasFPCMov(cast<ConstantSDNode>(CC)->getSExtValue());
 
     if ((isX86LogicalCmp(Cmp) && !IllegalFPCMov) ||
-        Opc == X86ISD::BT) { // FIXME
+        Cmp.getOpcode() == X86ISD::BT) { // FIXME
       Cond = Cmp;
       AddTest = false;
     }