This is an archive of the discontinued LLVM Phabricator instance.

[AMDGPU] Add llvm.amdgcn.set.inactive.chain.arg intrinsic
ClosedPublic

Authored by rovka on Aug 23 2023, 5:41 AM.

Details

Reviewers
None
Group Reviewers
Restricted Project
Commits
rG9d4094ae80f6: [AMDGPU] Add llvm.amdgcn.set.inactive.chain.arg intrinsic (#71530)
Summary

Add a new intrinsic, similar to llvm.amdgcn.set.inactive, but used only
in functions with the amdgpu_cs_chain or amdgpu_cs_chain_preserve
calling conventions. It allows setting the inactive lanes to those of
a value received as a VGPR argument.

Diff Detail

Event Timeline

rovka created this revision.Aug 23 2023, 5:41 AM
Herald added a project: Restricted Project. · View Herald TranscriptAug 23 2023, 5:41 AM
rovka requested review of this revision.Aug 23 2023, 5:41 AM
Herald added a project: Restricted Project. · View Herald TranscriptAug 23 2023, 5:41 AM
arsenm added a subscriber: arsenm.Aug 24 2023, 2:32 PM
arsenm added inline comments.
llvm/include/llvm/IR/IntrinsicsAMDGPU.td
2138

why can't you just use set_inactive for this?

rovka added inline comments.Aug 25 2023, 12:39 AM
llvm/include/llvm/IR/IntrinsicsAMDGPU.td
2138

You can, we just didn't want to overload the meaning of that intrinsic. IIUC set.inactive only expects constants for the value of the inactive lanes (admittedly this is just word of mouth, a quick grep through existing tests, and the fact that the docs leave out the second source in "the instruction and the first source will be computed in WQM").

This revision was not accepted when it landed; it landed in state Needs Review.Nov 7 2023, 11:44 PM
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.