This is an archive of the discontinued LLVM Phabricator instance.

AMDGPU/GlobalISel: Fix using unlegalizable values in tests
ClosedPublic

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

Details

Summary

Implicit uses of non-register value types places impossible to satisfy
constraints on the legalizer / artifact combiner. These prevent
writing sensible legalize rules for the artifacts without triggering
infinite loops in the legalizer.

The verifier really needs to enforce this, but I'm not sure what the
exact conditions would look like yet.

Diff Detail

Event Timeline

arsenm created this revision.Aug 24 2020, 6:18 AM
Herald added a project: Restricted Project. · View Herald TranscriptAug 24 2020, 6:18 AM
arsenm requested review of this revision.Aug 24 2020, 6:18 AM
foad added inline comments.Aug 25 2020, 2:55 AM
llvm/test/CodeGen/AMDGPU/GlobalISel/artifact-combiner-unmerge-values.mir
1129–1130

Is this really still testing what it's supposed to test, given that there's no trunc to 2 x s8 in the output?

1282–1283

Likewise.

llvm/test/CodeGen/AMDGPU/GlobalISel/legalize-trunc.mir
394–395

Likewise.

arsenm added inline comments.Aug 25 2020, 6:15 AM
llvm/test/CodeGen/AMDGPU/GlobalISel/artifact-combiner-unmerge-values.mir
1129–1130

The source trunc is the more interesting part here. The result truncs had more to do with this not being satisfiable with legal register values

1282–1283

Same thing

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