This is an archive of the discontinued LLVM Phabricator instance.

AMDGPU: Don't expand more special div cases in IR
ClosedPublic

Authored by arsenm on Feb 11 2020, 12:15 PM.

Details

Summary

These have nicer expansions implemented in the DAG. Ideally we would
either directly implement all of these special expansions, or stop
expanding division in the IR.

Diff Detail

Event Timeline

arsenm created this revision.Feb 11 2020, 12:15 PM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 11 2020, 12:15 PM
rampitec accepted this revision.Feb 11 2020, 1:00 PM

LGTM, but do not you want to handle it in the IR right away instead of TODO?

This revision is now accepted and ready to land.Feb 11 2020, 1:00 PM

LGTM, but do not you want to handle it in the IR right away instead of TODO?

There are a lot of them to sort through, and I'm worried we don't have tests everywhere for all the special cases. Longer term, I would rather just eliminate the IR expansion altogether. In GlobalISel we can run MachineLICM on the legalized, pre-selected MIR which could be potentially avoid the need for this anyway