HomePhabricator

[AMDGPU] prevent hitting Assertion `isReg() && "Wrong MachineOperand accessor"'

Description

[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