This is an archive of the discontinued LLVM Phabricator instance.

AMDGPU/GlobalISel: Legalize FDIV32
ClosedPublic

Authored by kerbowa on Oct 29 2019, 1:07 PM.

Event Timeline

kerbowa created this revision.Oct 29 2019, 1:07 PM
arsenm added inline comments.Oct 29 2019, 1:14 PM
llvm/lib/Target/AMDGPU/AMDGPULegalizerInfo.cpp
2024

You shouldn't need the {} around the types, same goes for the rest of the function

2044

Can you add a FIXME here since this doesn't correctly model the FP mode switch, and the FP operations aren't modeled as reading it?

arsenm added inline comments.Oct 29 2019, 1:17 PM
llvm/lib/Target/AMDGPU/AMDGPULegalizerInfo.cpp
1977

You don't need to propagate the flags here. You should remove the argument and not bother setting it on the instructions. These don't actually do anything with FP values

1993

This is an immediate field. You shouldn't be materializing it in a register

2006

Ditto

kerbowa updated this revision to Diff 226964.Oct 29 2019, 2:09 PM

Address comments.

kerbowa marked 5 inline comments as done.Oct 29 2019, 2:09 PM
arsenm added inline comments.Oct 29 2019, 2:56 PM
llvm/lib/Target/AMDGPU/AMDGPULegalizerInfo.cpp
2001

This is also an immediate field. You could alternatively use S_SETREG_B32 which does use the register

kerbowa updated this revision to Diff 226986.Oct 29 2019, 3:46 PM

Address comments.

kerbowa marked an inline comment as done.Oct 29 2019, 3:46 PM
arsenm accepted this revision.Oct 29 2019, 3:48 PM

LGTM

This revision is now accepted and ready to land.Oct 29 2019, 3:48 PM
This revision was automatically updated to reflect the committed changes.