This is an archive of the discontinued LLVM Phabricator instance.

TableGen/GlobalISel: Fix constraining REG_SEQUENCE operands
ClosedPublic

Authored by arsenm on Apr 7 2020, 7:55 AM.

Details

Summary

This was hitting the default instruction constraint code which uses
the register classes in the instruction def, which REG_SEQUENCE does
not have.

Fixes not constraining the register class for AMDGPU fneg/fabs
patterns, which would fail when the use was another generic,
unconstrained instruction.

Another oddity I noticed is that the temporary registers are created
with an unnecessary, but incorrect 16-bit LLT but this shouldn't
matter.

I'm also still unclear why root and sub-instructions have to be
handled differently.

Diff Detail

Event Timeline

arsenm created this revision.Apr 7 2020, 7:55 AM
aemerson accepted this revision.Apr 14 2020, 5:52 PM

LGTM.

This revision is now accepted and ready to land.Apr 14 2020, 5:52 PM