[llvm] r308083 - bpf: fix a compilation bug due to unused variable for release build

Yonghong Song via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 14 23:08:08 PDT 2017


Author: yhs
Date: Fri Jul 14 23:08:08 2017
New Revision: 308083

URL: http://llvm.org/viewvc/llvm-project?rev=308083&view=rev
Log:
bpf: fix a compilation bug due to unused variable for release build

Signed-off-by: Yonghong Song <yhs at fb.com>

Modified:
    llvm/trunk/lib/Target/BPF/BPFISelLowering.cpp

Modified: llvm/trunk/lib/Target/BPF/BPFISelLowering.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/BPF/BPFISelLowering.cpp?rev=308083&r1=308082&r2=308083&view=diff
==============================================================================
--- llvm/trunk/lib/Target/BPF/BPFISelLowering.cpp (original)
+++ llvm/trunk/lib/Target/BPF/BPFISelLowering.cpp Fri Jul 14 23:08:08 2017
@@ -516,9 +516,8 @@ BPFTargetLowering::EmitInstrWithCustomIn
   const TargetInstrInfo &TII = *BB->getParent()->getSubtarget().getInstrInfo();
   DebugLoc DL = MI.getDebugLoc();
   bool isSelectOp = MI.getOpcode() == BPF::Select;
-  bool isSelectRiOp = MI.getOpcode() == BPF::Select_Ri;
 
-  assert((isSelectOp || isSelectRiOp) && "Unexpected instr type to insert");
+  assert((isSelectOp || MI.getOpcode() == BPF::Select_Ri) && "Unexpected instr type to insert");
 
   // To "insert" a SELECT instruction, we actually have to insert the diamond
   // control-flow pattern.  The incoming instruction knows the destination vreg




More information about the llvm-commits mailing list