Fold Opcode into assert uses to fix an unused variable warning without asserts.
authorEric Christopher <echristo@gmail.com>
Tue, 11 Aug 2020 16:30:51 +0000 (09:30 -0700)
committerEric Christopher <echristo@gmail.com>
Tue, 11 Aug 2020 16:30:51 +0000 (09:30 -0700)
llvm/lib/Target/X86/X86ISelLowering.cpp

index 3a2dadb..210d04b 100644 (file)
@@ -42207,9 +42207,8 @@ static SDValue combineVectorPack(SDNode *N, SelectionDAG &DAG,
 static SDValue combineVectorHADDSUB(SDNode *N, SelectionDAG &DAG,
                                     TargetLowering::DAGCombinerInfo &DCI,
                                     const X86Subtarget &Subtarget) {
-  unsigned Opcode = N->getOpcode();
-  assert((X86ISD::HADD == Opcode || X86ISD::FHADD == Opcode ||
-          X86ISD::HSUB == Opcode || X86ISD::FHSUB == Opcode) &&
+  assert((X86ISD::HADD == N->getOpcode() || X86ISD::FHADD == N->getOpcode() ||
+          X86ISD::HSUB == N->getOpcode() || X86ISD::FHSUB == N->getOpcode()) &&
          "Unexpected horizontal add/sub opcode");
 
   // Try to fold HOP(SHUFFLE(),SHUFFLE()) -> SHUFFLE(HOP()).