This is an archive of the discontinued LLVM Phabricator instance.

AMDGPU: Move MnemonicAlias out of instruction def hierarchy
ClosedPublic

Authored by arsenm on Sep 6 2019, 8:10 PM.

Details

Summary

Unfortunately MnemonicAlias defines a "Predicates" field just like an
instruction or pattern, with a somewhat different interpretation.

This ends up overriding the intended Predicates set by
PredicateControl on the pseudoinstruction defintions with an empty
list. This allowed incorrectly selecting instructions that should have
been rejected due to the SubtargetPredicate from patterns on the
instruction definition.

This does remove the divergent predicate from the 64-bit shift
patterns, which were already not used for the 32-bit shift, so I'm not
sure what the point was. This also removes a second, redundant copy of
the 64-bit divergent patterns.

Diff Detail

Event Timeline

arsenm created this revision.Sep 6 2019, 8:10 PM
vpykhtin accepted this revision.Sep 9 2019, 7:47 AM

LGTM.

This revision is now accepted and ready to land.Sep 9 2019, 7:47 AM
arsenm closed this revision.Sep 9 2019, 10:24 AM

r371427