This is an archive of the discontinued LLVM Phabricator instance.

GlobalISel: Start defining strict FP instructions
ClosedPublic

Authored by arsenm on Jun 1 2020, 6:17 AM.

Details

Summary

The AMDGPU lowering for unconstrained G_FDIV sometimes needs to
introduce a mode switch in the middle, so it's helpful to have
constrained instructions available to legalize this. Right now nothing
is preventing reordering of the mode switch with the other
instructions in the expansion.

Diff Detail

Event Timeline

arsenm created this revision.Jun 1 2020, 6:17 AM
Herald added a project: Restricted Project. · View Herald TranscriptJun 1 2020, 6:17 AM
aemerson added inline comments.Jun 2 2020, 5:44 PM
llvm/lib/CodeGen/GlobalISel/IRTranslator.cpp
1349

Why do we have to do this? Can't we somehow loop over the non-metadata operands?

arsenm marked an inline comment as done.Jun 2 2020, 6:13 PM
arsenm added inline comments.
llvm/lib/CodeGen/GlobalISel/IRTranslator.cpp
1349

I'm not sure. I expected ConstrainedFPIntrinsic to provide a nicer way to figure out the operands, but this is what's there and what SelectionDAGBuilder does.

aemerson accepted this revision.Jun 3 2020, 3:05 PM

Ok then.

This revision is now accepted and ready to land.Jun 3 2020, 3:05 PM