Page MenuHomePhabricator

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

Authored by msearles on Jun 11 2018, 1:11 PM.

Details

Summary

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

Diff Detail

Repository
rL LLVM

Event Timeline

msearles created this revision.Jun 11 2018, 1:11 PM
This revision is now accepted and ready to land.Jun 11 2018, 1:17 PM
msearles updated this revision to Diff 150825.Jun 11 2018, 1:22 PM

Added a test

arsenm added inline comments.Jun 11 2018, 1:28 PM
test/CodeGen/AMDGPU/si-lower-control-flow.mir
1 ↗(On Diff #150825)

Nothing about this requires asserts?

msearles updated this revision to Diff 150829.Jun 11 2018, 1:37 PM

Removed # REQUIRES: asserts in test

msearles marked an inline comment as done.Jun 11 2018, 1:37 PM
msearles added inline comments.
test/CodeGen/AMDGPU/si-lower-control-flow.mir
1 ↗(On Diff #150825)

removed # REQUIRES: asserts

arsenm accepted this revision.Jun 11 2018, 2:30 PM

LGTM

This revision was automatically updated to reflect the committed changes.
msearles marked an inline comment as done.