This is an archive of the discontinued LLVM Phabricator instance.

AMDGPU: M0 operands to spill/restore opcodes are dead
ClosedPublic

Authored by nhaehnle on May 18 2017, 8:10 AM.

Details

Summary

With scalar stores, M0 is clobbered and therefore marked as implicitly
defined. However, it is also dead.

This fixes an assertion when the Greedy Register Allocator decides to
optimize a spill/restore pair away again (via tryHintsRecoloring).

Event Timeline

nhaehnle created this revision.May 18 2017, 8:10 AM
arsenm accepted this revision.May 23 2017, 10:16 AM

LGTM, although I thought it now saves/restores m0's value so it might be OK to just remove the m0 operand entirely

This revision is now accepted and ready to land.May 23 2017, 10:16 AM

Are you actually trying to use the scalar store path

Nikolai, is there anything wrong with this patch? Do you plan to submit it anytime soon?

This revision was automatically updated to reflect the committed changes.