OSDN Git Service

[AMDGPU] prevent hitting Assertion `isReg() && "Wrong MachineOperand accessor"'
authorMark Searles <m.c.searles@gmail.com>
Tue, 12 Jun 2018 00:41:26 +0000 (00:41 +0000)
committerMark Searles <m.c.searles@gmail.com>
Tue, 12 Jun 2018 00:41:26 +0000 (00:41 +0000)
commit8f93b43810b56256d63a1dc7856b8d09aa8cad88
tree4e0c899973ce661bc8b5104dfd41738fb40ee00e
parentb54c4f871a3e376e0e7bbd006f9abca591eea514
[AMDGPU] prevent hitting Assertion `isReg() && "Wrong MachineOperand accessor"'

The use iterator, used within findMaskOperands(), can return anything which is
not a def. isUse() requires a register, so check isReg() before calling isUse().

Differential Revision: https://reviews.llvm.org/D48047

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@334459 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/AMDGPU/SILowerControlFlow.cpp
test/CodeGen/AMDGPU/si-lower-control-flow.mir [new file with mode: 0644]