[AMDGPU] Add llvm.amdgcn.wave.reduce.umin/umax Intrinsic.
When input to intrinsic is uniform value, reduced value is same as input whereas if input value is divergent we need to iterate over all active lanes of WaveFront to perform the reduction. The control flow for a `loop` has been set up, which iterates over `only` active lanes to perform reduction. Introduced WAVE_REDUCE_UMIN_PSEUDO_U32 and WAVE_REDUCE_UMAX_PSEUDO_U32 Pseudos which are lowered Post-ISel (in `EmitInstrWithCustomInserter `). Reviewed By: arsenm, #amdgpu Differential Revision: https://reviews.llvm.org/D154858
Loading
Please sign in to comment