This is an archive of the discontinued LLVM Phabricator instance.

AMDGPU/GlobalISel: Fix misuse of div_scale intrinsics
ClosedPublic

Authored by arsenm on Dec 21 2019, 1:09 AM.

Details

Reviewers
kerbowa
Summary

Confusingly, the intrinsic operands do not match the
instruction/custom node. The order is shuffled, and the 3rd operand is
an immediate to select operands.

I'm not 100% sure I did this right, but fdiv still doesn't select end
to end and it will be easier to tell when it does. This at least
avoids an assertion in RegBankSelect and allows hitting the fallback
on selection.

Diff Detail

Event Timeline

arsenm created this revision.Dec 21 2019, 1:09 AM
kerbowa accepted this revision.Dec 21 2019, 1:17 AM

LGTM

This revision is now accepted and ready to land.Dec 21 2019, 1:17 AM