[llvm] [AMDGPU] selecting v_sat_pk instruction, version 2 (PR #123297)
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Mon Jan 20 08:47:13 PST 2025
================
@@ -957,6 +986,15 @@ define i16 @basic_umax_umin_bit_or(i16 %src0, i16 %src1) {
; GISEL-GFX12-NEXT: v_lshlrev_b16 v1, 8, v1
; GISEL-GFX12-NEXT: v_or_b32_e32 v0, v0, v1
; GISEL-GFX12-NEXT: s_setpc_b64 s[30:31]
+; GFX11-LABEL: basic_umax_umin_bit_or:
+; GFX11: ; %bb.0:
+; GFX11-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
+; GFX11-NEXT: v_min_u16 v1, 0xff, v1
+; GFX11-NEXT: v_min_u16 v0, 0xff, v0
+; GFX11-NEXT: s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_1)
+; GFX11-NEXT: v_lshlrev_b16 v1, 8, v1
+; GFX11-NEXT: v_or_b32_e32 v0, v0, v1
+; GFX11-NEXT: s_setpc_b64 s[30:31]
%src0.max = call i16 @llvm.umax.i16(i16 %src0, i16 0)
----------------
arsenm wrote:
Should test these patterns in more vector types, at least 2 x, 3 x and 4 x cases
https://github.com/llvm/llvm-project/pull/123297
More information about the llvm-commits
mailing list