[llvm] [AMDGPU] Prefer packed minimum/maximum ops for two-input ops (PR #215449)

Yaxun Liu via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 17 21:02:59 PDT 2026


yxsamliu wrote:

@krzysz00 Re: bf16 and f32

f32 already handles this based on the available instructions. gfx1170 and gfx12+ prefer the two-input form, while nested operations use the three-input form. gfx950 only has the three-input form, so duplicating an operand is required. Older GPUs use `v_min_f32`/`v_max_f32` with NaN handling.

bf16 has no corresponding IEEE minimum/maximum instructions, so this issue does not apply there.

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


More information about the llvm-commits mailing list