[llvm] [AMDGPU] Use LSH for lowering ctlz_zero_undef.i8/i16 (PR #88512)

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Fri May 17 14:08:31 PDT 2024


================
@@ -2621,13 +2579,11 @@ define <2 x i7> @v_ctlz_zero_undef_v2i7(<2 x i7> %val) {
 ; GFX9-GISEL-LABEL: v_ctlz_zero_undef_v2i7:
 ; GFX9-GISEL:       ; %bb.0:
 ; GFX9-GISEL-NEXT:    s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
-; GFX9-GISEL-NEXT:    v_and_b32_e32 v0, 0x7f, v0
-; GFX9-GISEL-NEXT:    v_and_b32_e32 v1, 0x7f, v1
-; GFX9-GISEL-NEXT:    v_ffbh_u32_e32 v0, v0
-; GFX9-GISEL-NEXT:    v_ffbh_u32_e32 v1, v1
-; GFX9-GISEL-NEXT:    v_subrev_u32_e32 v0, 25, v0
-; GFX9-GISEL-NEXT:    v_subrev_u32_e32 v1, 25, v1
-; GFX9-GISEL-NEXT:    s_setpc_b64 s[30:31]
+; GFX9-GISEL-NEXT:    v_lshrrev_b32_e32 v0, 25, v0
+; GFX9-GISEL-NEXT:  	v_lshrrev_b32_e32 v1, 25, v1
+; GFX9-GISEL-NEXT:  	v_ffbh_u32_e32 v0, v0
+; GFX9-GISEL-NEXT:  	v_ffbh_u32_e32 v1, v1
+; GFX9-GISEL-NEXT:  	s_setpc_b64 s[30:31]
----------------
arsenm wrote:

Something weird happened with the indentation in some of these functions, no idea how that's possible 

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


More information about the llvm-commits mailing list