HexagonVectorPrint.cpp: Fix r277370. Don't use getInstrVecReg() in the expression of assert(). It has side effects.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@277448 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
NAKAMURA Takumi 2016-08-02 11:59:16 +00:00
parent b48427578b
commit 02c2861750

View File

@ -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());