[llvm] [AMDGPU] Add type-generic llvm.amdgcn.readfirstlane2 intrinsic (PR #87334)

Jay Foad via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 2 04:08:29 PDT 2024


jayfoad wrote:

Prior art:
https://reviews.llvm.org/D84639
https://reviews.llvm.org/D86154
https://reviews.llvm.org/D147732

TODO:
- GlobalISel
-  readlane, writelane, others?

This patch tries to legalize readfirstlane2 for all legal types, but it should probably work on illegal types like `i999` too. Is there a way to implement that for a target intrinsic in SelectionDAG? The only way I could see was with a pre-legalization combine, but I am not sure if it is OK to rely on a combine for legalization.

https://github.com/llvm/llvm-project/pull/87334


More information about the llvm-commits mailing list