This is an archive of the discontinued LLVM Phabricator instance.

AMDGPU: Use ReversePostOrder when fixing i1 copies
AbandonedPublic

Authored by arsenm on Jun 18 2019, 3:09 PM.

Details

Diff Detail

Event Timeline

david-salinas created this revision.Jun 18 2019, 3:09 PM
Herald added a project: Restricted Project. · View Herald TranscriptJun 18 2019, 3:09 PM
arsenm added inline comments.Jun 18 2019, 4:34 PM
lib/Target/AMDGPU/SILowerI1Copies.cpp
697–698

I don't see where the physical register check is coming from. If SrcReg is a virtual register (which it should be), this should crash?

test/CodeGen/AMDGPU/si-lower-i1-copies-vgpr.mir
2 ↗(On Diff #205445)

This isn't really checking anything. Generated checks with update_mir_test_checks are probably OK

david-salinas marked an inline comment as done.

original fix was incorrect. This update forces the RegClass if the destination operand is VReg_1, to SReg_32. And then removes the attempt to change the new MI Operand(1).

Diff looks wrong and is missing test

arsenm commandeered this revision.Jun 25 2019, 4:27 PM
arsenm updated this revision to Diff 206548.
arsenm edited reviewers, added: david-salinas; removed: arsenm.
arsenm retitled this revision from correct SILowerI1Copies for vgprs to AMDGPU: Use ReversePostOrder when fixing i1 copies.

I'd prefer the alternative fix at D63871, since it doesn't require RPOT.

arsenm abandoned this revision.Jul 1 2019, 3:11 PM