This is an archive of the discontinued LLVM Phabricator instance.

AMDGPU/GlobalISel: Handle llvm.amdgcn.ds.{fadd|fmin|fmax}
ClosedPublic

Authored by arsenm on Jul 27 2020, 5:24 AM.

Details

Summary

These intrinsics are missing mangling for both the pointer and data
type.

Diff Detail

Event Timeline

arsenm created this revision.Jul 27 2020, 5:24 AM
Herald added a project: Restricted Project. · View Herald TranscriptJul 27 2020, 5:24 AM
madhur13490 added inline comments.Aug 5 2020, 10:20 PM
llvm/lib/Target/AMDGPU/AMDGPULegalizerInfo.cpp
3225

"Helper" can be marked as "const"?

3232

You could probably push this inside loop, run loop from 1 to 5 and skip 2 with a comment. That way it would be readable. If its possible then an uptick loop, please.

llvm/test/CodeGen/AMDGPU/GlobalISel/llvm.amdgcn.ds.fadd.ll
3

Why just mesa3d? No implication on hsa?

foad accepted this revision.Aug 6 2020, 1:21 AM

Looks obviously fine to me once @madhur13490 is happy.

This revision is now accepted and ready to land.Aug 6 2020, 1:21 AM
arsenm added inline comments.Aug 6 2020, 7:13 AM
llvm/lib/Target/AMDGPU/AMDGPULegalizerInfo.cpp
3225

It wouldn't be if it were used as normal

3232

removing an operand in the middle of an instruction will force the instruction to shift all of its operands down each time, so it's much less efficient

llvm/test/CodeGen/AMDGPU/GlobalISel/llvm.amdgcn.ds.fadd.ll
3

The triple is irrelevant, but we error on the graphics shader conventions for HSA. We use the shaders for the simplest way to get sample SGPRs

arsenm updated this revision to Diff 283601.Aug 6 2020, 7:21 AM

Reorder a RemoveOperand

madhur13490 accepted this revision.Aug 6 2020, 7:45 AM
llvm/test/CodeGen/AMDGPU/GlobalISel/llvm.amdgcn.ds.fmin.ll