This is an archive of the discontinued LLVM Phabricator instance.

AMDGPU/GlobalISel: Select V_ADD3_U32/V_XOR3_B32
ClosedPublic

Authored by arsenm on Jan 22 2020, 6:14 PM.

Details

Summary

The other 3-op patterns should also be theoretically handled, but
currently there's a bug in the inferred pattern complexity.

I'm not sure what the error handling strategy should be for potential
constant bus violations. I think the correct strategy is to never
produce mixed SGPR and VGPR operands in a typical VOP instruction,
which will trivially them. However, it's possible to still have hand
written MIR (or erroneously transforms) with these operands. When
these fold, the restriction will be violated. We currently don't have
any verifiers for reg bank legality. For now, just ignore the
restriction.

It might be worth triggering a DAG fallback on verifier error.

Diff Detail

Event Timeline

arsenm created this revision.Jan 22 2020, 6:14 PM
Herald added a project: Restricted Project. · View Herald TranscriptJan 22 2020, 6:14 PM
arsenm updated this revision to Diff 239762.Jan 22 2020, 6:45 PM

Fixed pattern that blocked or3 formation

This revision is now accepted and ready to land.Jan 22 2020, 10:05 PM