[PATCH] D154858: [WIP] [AMDGPU] Add llvm.amdgcn.wave.reduce.umin Intrinsic.

Pravin Jagtap via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 12 04:07:11 PDT 2023


pravinjagtap added inline comments.


================
Comment at: llvm/include/llvm/IR/IntrinsicsAMDGPU.td:1929
+def int_amdgcn_reduce_add :
+  Intrinsic<[llvm_i32_ty], [llvm_i32_ty],
+            [IntrNoMem, IntrConvergent, IntrWillReturn, IntrNoCallback, IntrNoFree]>;
----------------
arsenm wrote:
> Should have a mangled type. I also think it should have an immarg operand for the preferred lowering strategy to use. Also, wave_reduce?
> 
> Also umin would be a better choice for a first one, given that we want it for dynamic alloca handling
>  I also think it should have an immarg operand for the preferred lowering strategy to use

In that case, we need to create two different intrinsics and two pesudo operations, one for immediate operand and other for non-immediate operand. Also, reduction of scalar value of immediate value is that value itself, so do we really need lowering for this ?




Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D154858/new/

https://reviews.llvm.org/D154858



More information about the llvm-commits mailing list