This is an archive of the discontinued LLVM Phabricator instance.

AMDGPU/GlobalISel: Optimize divrem lowering
AbandonedPublic

Authored by cdevadas on May 25 2021, 5:09 AM.

Details

Reviewers
foad
arsenm
Summary

Build the common instructions once and
reuse them for both div and rem.

Diff Detail

Event Timeline

cdevadas created this revision.May 25 2021, 5:09 AM
cdevadas requested review of this revision.May 25 2021, 5:09 AM
Herald added a project: Restricted Project. · View Herald TranscriptMay 25 2021, 5:09 AM
foad added inline comments.May 25 2021, 5:18 AM
llvm/test/CodeGen/AMDGPU/GlobalISel/udiv.i64.ll
492

Looks like this is actually worse codegen because it's forcing the 64-bit encoding of cmp and cndmask? So maybe my suggestion was not a good idea, sorry.

Seems like a scheduling failure, but I don't think this could improve things anyway

cdevadas abandoned this revision.May 26 2021, 5:24 AM

It doesn't bring any improvement in the end.