This is an archive of the discontinued LLVM Phabricator instance.

AMDGPU: Implement llvm.get.fpmode
ClosedPublic

Authored by arsenm on Jun 12 2023, 7:44 AM.

Details

Reviewers
foad
rampitec
Pierre-vh
cdevadas
b-sumner
Group Reviewers
Restricted Project
Summary

Currently s_getreg_b32 is missing the possible mode use. Really we
need separate pseudos for mode-only accesses, but leave this as a
pre-existing issue.

Diff Detail

Event Timeline

arsenm created this revision.Jun 12 2023, 7:44 AM
Herald added a project: Restricted Project. · View Herald TranscriptJun 12 2023, 7:44 AM
arsenm requested review of this revision.Jun 12 2023, 7:44 AM
Herald added a project: Restricted Project. · View Herald TranscriptJun 12 2023, 7:44 AM
Herald added a subscriber: wdng. · View Herald Transcript
rampitec added inline comments.Jun 12 2023, 10:36 AM
llvm/lib/Target/AMDGPU/SOPInstructions.td
884

Old formatting was more readable.

llvm/test/CodeGen/AMDGPU/llvm.get.fpenv.ll
169 ↗(On Diff #530507)

These 2 ands can be simplified.

arsenm added inline comments.Jun 12 2023, 10:41 AM
llvm/test/CodeGen/AMDGPU/llvm.get.fpenv.ll
169 ↗(On Diff #530507)

That’s what the todo about custom lowering is about

foad added a comment.Jun 13 2023, 12:17 AM

AMDGPU: Implement llvm.get.fpenv.ll

Remove ".ll" from description?

arsenm retitled this revision from AMDGPU: Implement llvm.get.fpenv.ll to AMDGPU: Implement llvm.get.fpenv.Jun 13 2023, 5:26 AM
arsenm planned changes to this revision.Jul 11 2023, 12:30 PM

This is the wrong function, this is really llvm.get.fpmode from D82525

arsenm updated this revision to Diff 553077.Aug 24 2023, 4:41 AM
arsenm retitled this revision from AMDGPU: Implement llvm.get.fpenv to AMDGPU: Implement llvm.get.fpmode.

Implement correct intrinsic

cdevadas accepted this revision.Sep 5 2023, 8:47 AM

LGTM. Assuming there is a future patch to combine the two and instructions.

llvm/docs/AMDGPUUsage.rst
968

Nitpick: This is implemented

This revision is now accepted and ready to land.Sep 5 2023, 8:47 AM