This is an archive of the discontinued LLVM Phabricator instance.

AMDGPU: Fix overriding global FP atomic feature predicates
ClosedPublic

Authored by arsenm on Jun 4 2020, 11:51 AM.

Details

Reviewers
rampitec
Summary

Global TableGen let override blocks are pretty dangerous and override
any local special cases. In this case, the broader HasFlatGlobalInsts
was overriding the more specific predicate for
FeatureAtomicFaddInsts. Make sure HasFlatGlobalInsts is implied by
FeatureAtomicFaddInsts, and make sure the right predicate is used.

One issue with independently setting the subtarget features on
incompatible targets is all of the encoding families do not define all
opcodes. This will hit an assert on gfx10 for example, since we set
the encoding independently based on the generation and not based on a
feature.

Diff Detail

Event Timeline

arsenm created this revision.Jun 4 2020, 11:51 AM
Herald added a project: Restricted Project. · View Herald TranscriptJun 4 2020, 11:51 AM
rampitec accepted this revision.Jun 4 2020, 12:14 PM

we set the encoding independently based on the generation and not based on a feature.

I agree with the observation, but another problem is that we have so many features that we will soon run out feature bits.

This revision is now accepted and ready to land.Jun 4 2020, 12:14 PM