This is an archive of the discontinued LLVM Phabricator instance.

AMDGPU/GlobalISel: Legalize 64-bit G_SDIV/G_SREM
ClosedPublic

Authored by arsenm on Jun 16 2020, 7:46 PM.

Details

Summary

Now all the divisions should be complete, although we should fix
emitting the entire common part for div/rem when you use both.

Diff Detail

Event Timeline

arsenm created this revision.Jun 16 2020, 7:46 PM
Herald added a project: Restricted Project. · View Herald TranscriptJun 16 2020, 7:46 PM
foad accepted this revision.Jun 24 2020, 3:13 AM
foad added inline comments.
llvm/lib/Target/AMDGPU/AMDGPULegalizerInfo.cpp
2777

I'd prefer to put an un-negated condition here, given that there's an "else".

2851–2852

Unrelated but it seems a bit silly to duplicate these lines from 2847-2848.

llvm/lib/Target/AMDGPU/AMDGPULegalizerInfo.h
118

Parameter names Num and Den don't match the definition.

This revision is now accepted and ready to land.Jun 24 2020, 3:13 AM
llvm/test/CodeGen/AMDGPU/GlobalISel/legalize-srem.mir