From: NAKAMURA Takumi Date: Tue, 2 Aug 2016 11:59:16 +0000 (+0000) Subject: HexagonVectorPrint.cpp: Fix r277370. Don't use getInstrVecReg() in the expression... X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=3f704497fa409aba387a75770e1be9198b5796e4;p=platform%2Fupstream%2Fllvm.git HexagonVectorPrint.cpp: Fix r277370. Don't use getInstrVecReg() in the expression of assert(). It has side effects. llvm-svn: 277448 --- diff --git a/llvm/lib/Target/Hexagon/HexagonVectorPrint.cpp b/llvm/lib/Target/Hexagon/HexagonVectorPrint.cpp index 785f581..250f6f8 100644 --- a/llvm/lib/Target/Hexagon/HexagonVectorPrint.cpp +++ b/llvm/lib/Target/Hexagon/HexagonVectorPrint.cpp @@ -141,7 +141,8 @@ bool HexagonVectorPrint::runOnMachineFunction(MachineFunction &Fn) { MachineBasicBlock *MBB = I->getParent(); DEBUG(dbgs() << "Evaluating V MI\n"; I->dump()); unsigned Reg = 0; - assert(getInstrVecReg(*I, Reg) && "Need a vector reg"); + if (!getInstrVecReg(*I, Reg)) + assert(!"Need a vector reg"); MachineBasicBlock::instr_iterator MII = I->getIterator(); if (I->isInsideBundle()) { DEBUG(dbgs() << "add to end of bundle\n"; I->dump());