This is an archive of the discontinued LLVM Phabricator instance.

[AMDGPU] Fix emitIfBreak CF lowering: use a temp register to make register coalescer life easier.
ClosedPublic

Authored by vpykhtin on Nov 18 2019, 9:36 AM.

Details

Summary

The change allows the register coalescer to avoid unnecessary register interference and save a move on ifBreak control flow sequence.

I didn't make a test for this as its a bit hard and existing tests covers this functionality - I can see some movs gone.

Diff Detail

Event Timeline

vpykhtin created this revision.Nov 18 2019, 9:36 AM
Herald added a project: Restricted Project. · View Herald TranscriptNov 18 2019, 9:36 AM
vpykhtin updated this revision to Diff 229880.Nov 18 2019, 10:28 AM

added test fix.

rampitec added inline comments.Nov 18 2019, 12:49 PM
llvm/test/CodeGen/AMDGPU/loop_break.ll
45

Probably use of GCN-NEXT here and s_or_b64 above will constitute for the proper testcase.

arsenm accepted this revision.Nov 18 2019, 7:39 PM

LGTM with the -NEXT thing

This revision is now accepted and ready to land.Nov 18 2019, 7:39 PM
vpykhtin updated this revision to Diff 230067.Nov 19 2019, 6:53 AM

updated the diff per comment. Used utils/update_llc_test_checks.py tool to update autogenerated test.

vpykhtin marked 2 inline comments as done.Nov 19 2019, 6:54 AM
vpykhtin added inline comments.
llvm/test/CodeGen/AMDGPU/loop_break.ll
45

Did you mean other places too? It looks like a big change though.

This revision was automatically updated to reflect the committed changes.