This is an archive of the discontinued LLVM Phabricator instance.

[AMDGPU] Extend f32 support for llvm.amdgcn.update.dpp intrinsic
ClosedPublic

Authored by pravinjagtap on Jul 31 2023, 12:04 AM.

Details

Summary

This will be useful to avoid the bit-casting noise
required to extend support for Floating Point
Operations in atomic optimizer for DPP in D156301

Diff Detail

Event Timeline

pravinjagtap created this revision.Jul 31 2023, 12:04 AM
Herald added a project: Restricted Project. · View Herald TranscriptJul 31 2023, 12:04 AM
pravinjagtap requested review of this revision.Jul 31 2023, 12:04 AM
Herald added a project: Restricted Project. · View Herald TranscriptJul 31 2023, 12:04 AM
pravinjagtap edited the summary of this revision. (Show Details)Jul 31 2023, 12:07 AM
pravinjagtap added reviewers: foad, b-sumner, yassingh.
arsenm requested changes to this revision.Jul 31 2023, 1:45 PM

Did you run the clang tests? I expect this would break the builtin test

llvm/test/CodeGen/AMDGPU/llvm.amdgcn.update.dpp.ll
114

Add tests with the different immediate operands exercised

This revision now requires changes to proceed.Jul 31 2023, 1:45 PM
arsenm added inline comments.Jul 31 2023, 1:46 PM
llvm/lib/Target/AMDGPU/VOP1Instructions.td
1215–1221

Can factor this into a pattern class and just instantiate twice

Did you run the clang tests? I expect this would break the builtin test

Yes, Clang tests are clean with this change.

Addressed review comments & added few more test points.

arsenm accepted this revision.Aug 15 2023, 4:46 PM
arsenm added inline comments.
llvm/lib/Target/AMDGPU/VOP1Instructions.td
1215–1216

In a follow on, can/should handle all the legal types (v2i16 and v2f16 are easy, i16/f16 are potentially a little more work)

llvm/test/CodeGen/AMDGPU/llvm.amdgcn.update.dpp.ll
219

Nit: drop the call site attributes and use true/false instead of i1 0/1

This revision is now accepted and ready to land.Aug 15 2023, 4:46 PM

As a follow on could have AMDGPUInstCombineIntrinsic try to fold bitcasts in

llvm/include/llvm/IR/IntrinsicsAMDGPU.td
2180

this shouldn't break any existing clients, a name mangling param was needed anyway

pravinjagtap added inline comments.Aug 15 2023, 8:58 PM
llvm/include/llvm/IR/IntrinsicsAMDGPU.td
2180

Are you referring to clients like LLPC ? Is there any way to make sure that its not breaking any of the clients ?

If there are no objections, I will go ahead and push this patch.

llvm/include/llvm/IR/IntrinsicsAMDGPU.td
2180

I ran LLPC pipeline, its clean. @foad

pravinjagtap added a reviewer: Restricted Project.Aug 16 2023, 10:53 PM
arsenm accepted this revision.Aug 17 2023, 6:50 AM
arsenm added inline comments.
llvm/test/CodeGen/AMDGPU/llvm.amdgcn.update.dpp.ll
219

test nit not done

Addressed reveiw comments

This revision was landed with ongoing or failed builds.Aug 17 2023, 7:45 AM
This revision was automatically updated to reflect the committed changes.