[llvm] [AMDGPU][SDAG] Legalise v2i32 or/xor/and instructions to make use of 64-bit wide instructions (PR #140694)
Chris Jackson via llvm-commits
llvm-commits at lists.llvm.org
Fri Jun 6 05:36:39 PDT 2025
================
@@ -78,8 +78,10 @@ define <2 x i64> @shl_v2_metadata(<2 x i64> %arg0, ptr %arg1.ptr) {
; CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
; CHECK-NEXT: flat_load_dwordx4 v[3:6], v[4:5]
; CHECK-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0)
-; CHECK-NEXT: v_lshlrev_b32_e32 v1, v3, v0
-; CHECK-NEXT: v_lshlrev_b32_e32 v3, v5, v2
+; CHECK-NEXT: v_and_b32_e32 v4, 31, v5
+; CHECK-NEXT: v_and_b32_e32 v1, 31, v3
+; CHECK-NEXT: v_lshlrev_b32_e32 v1, v1, v0
+; CHECK-NEXT: v_lshlrev_b32_e32 v3, v4, v2
----------------
chrisjbris wrote:
I'm working on this now, https://ontrack-internal.amd.com/browse/SWDEV-536328, looks like there is a pattern that maps a scalar lshr of scalar and directly to vlslrev_, but this functionality is missing for v2i32 and. Of Course.
https://github.com/llvm/llvm-project/pull/140694
More information about the llvm-commits
mailing list