[llvm] [AMDGPU] Use subtarget feature for v_lshl_add_u64 pattern. NFC. (PR #144544)
Jay Foad via llvm-commits
llvm-commits at lists.llvm.org
Tue Jun 17 08:11:48 PDT 2025
https://github.com/jayfoad created https://github.com/llvm/llvm-project/pull/144544
Following on from #133723, use the new subtarget feature for the
selection pattern as well as for the instruction definition.
>From 0418367683614199a04e506ac7e096bcc775962e Mon Sep 17 00:00:00 2001
From: Jay Foad <jay.foad at amd.com>
Date: Tue, 17 Jun 2025 15:59:34 +0100
Subject: [PATCH] [AMDGPU] Use subtarget feature for v_lshl_add_u64 pattern.
NFC.
Following on from #133723, use the new subtarget feature for the
selection pattern as well as for the instruction definition.
---
llvm/lib/Target/AMDGPU/VOP3Instructions.td | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/llvm/lib/Target/AMDGPU/VOP3Instructions.td b/llvm/lib/Target/AMDGPU/VOP3Instructions.td
index a005e0245b8ff..f372101cb7b77 100644
--- a/llvm/lib/Target/AMDGPU/VOP3Instructions.td
+++ b/llvm/lib/Target/AMDGPU/VOP3Instructions.td
@@ -806,7 +806,7 @@ def : GCNPat<
(DivergentBinFrag<mul> i32:$src0, IsPow2Plus1:$src1),
(V_LSHL_ADD_U32_e64 i32:$src0, (i32 (Log2_32 imm:$src1)), i32:$src0)>;
-let SubtargetPredicate = isGFX940Plus in
+let SubtargetPredicate = HasLshlAddU64Inst in
def : GCNPat<
(ThreeOpFrag<shl_0_to_4, add> i64:$src0, i32:$src1, i64:$src2),
(V_LSHL_ADD_U64_e64 VSrc_b64:$src0, VSrc_b32:$src1, VSrc_b64:$src2)
More information about the llvm-commits
mailing list