This is an archive of the discontinued LLVM Phabricator instance.

AMDGPU/GlobalISel: Use more accurate legality rules for merge/unmerge
ClosedPublic

Authored by arsenm on Aug 24 2020, 6:19 AM.

Details

Summary

Most notably, we were incorrectly reporting <3 x s16> as a legal type
for these. Make sure these aren't legal to help make progress on
fixing the artifact combiner and vector legalizer
rules. Unfortunately, this means spreading the -global-isel-abort=0
hack, although this doesn't change the legalizer result in any
situation.

Diff Detail

Event Timeline

arsenm created this revision.Aug 24 2020, 6:19 AM
Herald added a project: Restricted Project. · View Herald TranscriptAug 24 2020, 6:19 AM
arsenm requested review of this revision.Aug 24 2020, 6:19 AM
foad added a comment.Aug 25 2020, 5:05 AM

Unfortunately, this means spreading the -global-isel-abort=0 hack

What's the proper fix for this? Is there some (generic?) work to do on legalizing merge/unmerge?

Unfortunately, this means spreading the -global-isel-abort=0 hack

What's the proper fix for this? Is there some (generic?) work to do on legalizing merge/unmerge?

Legalizing the artifacts is tricky because you end up producing the original operation to copy back to the original registers. The rules for legalize rules as written in the documentation I also think make no sense for vectors. D86458 is my attempt at fixing this (although a few more parts may still need fixing)

foad accepted this revision.Aug 25 2020, 6:26 AM
This revision is now accepted and ready to land.Aug 25 2020, 6:26 AM