summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target
diff options
context:
space:
mode:
authorNAKAMURA Takumi <geek4civic@gmail.com>2016-08-02 11:59:16 +0000
committerNAKAMURA Takumi <geek4civic@gmail.com>2016-08-02 11:59:16 +0000
commit3f704497fa409aba387a75770e1be9198b5796e4 (patch)
tree8963708a2dd32afd14c3e6b99ceb3480a8738407 /llvm/lib/Target
parent45eb3b94d4e1327a9538fdb9536abc6659626928 (diff)
downloadbcm5719-llvm-3f704497fa409aba387a75770e1be9198b5796e4.tar.gz
bcm5719-llvm-3f704497fa409aba387a75770e1be9198b5796e4.zip
HexagonVectorPrint.cpp: Fix r277370. Don't use getInstrVecReg() in the expression of assert(). It has side effects.
llvm-svn: 277448
Diffstat (limited to 'llvm/lib/Target')
-rw-r--r--llvm/lib/Target/Hexagon/HexagonVectorPrint.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/Target/Hexagon/HexagonVectorPrint.cpp b/llvm/lib/Target/Hexagon/HexagonVectorPrint.cpp
index 785f581a670..250f6f8d591 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());
OpenPOWER on IntegriCloud