This is an archive of the discontinued LLVM Phabricator instance.

AMDGPU/GlobalISel: Fix isVCC for uniform s1 with reg class on wave32
ClosedPublic

Authored by Petar.Avramovic on Apr 21 2022, 5:45 AM.

Details

Summary

Fix isVCC for register that was assigned register class during
inst-selection. This happens when register has multiple uses.
For wave32, uniform i1 to vcc copy was selected like vcc to vcc
copy when uniform i1 had assigned register class.
Uniform i1 register with assigned register class will have s1 LLT,
be defined using G_TRUNC and class will be SReg_32RegClass.
Vcc i1 register with assigned register class will have s1 LLT,
class will be SReg_32RegClass for wave32 and SReg_64RegClass for
wave64 and register will not be defined by G_TRUNC.

Diff Detail

Event Timeline

Herald added a project: Restricted Project. · View Herald TranscriptApr 21 2022, 5:45 AM
Petar.Avramovic requested review of this revision.Apr 21 2022, 5:45 AM
Herald added a project: Restricted Project. · View Herald TranscriptApr 21 2022, 5:45 AM

LGTM. I don't like this but I guess this is a natural consequence of needing to special case G_TRUNC

arsenm accepted this revision.Apr 21 2022, 6:26 AM
This revision is now accepted and ready to land.Apr 21 2022, 6:26 AM