[llvm] AMDGPU: Make s_wait_samplecnt(_bvhcnt) dependent on hasImageInsts, NFC (PR #83932)
Changpeng Fang via llvm-commits
llvm-commits at lists.llvm.org
Mon Mar 4 16:43:52 PST 2024
https://github.com/changpeng created https://github.com/llvm/llvm-project/pull/83932
None
>From 7170b994e9fedeec85192bbaa9ac72d1c9ac38d3 Mon Sep 17 00:00:00 2001
From: Changpeng Fang <changpeng.fang at amd.com>
Date: Mon, 4 Mar 2024 16:36:35 -0800
Subject: [PATCH] AMDGPU: Make s_wait_samplecnt(_bvhcnt) dependent on
hasImageInsts, NFC
---
llvm/lib/Target/AMDGPU/SOPInstructions.td | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/llvm/lib/Target/AMDGPU/SOPInstructions.td b/llvm/lib/Target/AMDGPU/SOPInstructions.td
index b5de311f8c58ce..ff79538a86ae18 100644
--- a/llvm/lib/Target/AMDGPU/SOPInstructions.td
+++ b/llvm/lib/Target/AMDGPU/SOPInstructions.td
@@ -1598,8 +1598,10 @@ def S_WAITCNT_VSCNT_soft : SOPK_WAITCNT<"s_soft_waitcnt_vscnt">;
let SubtargetPredicate = isGFX12Plus in {
def S_WAIT_LOADCNT_soft : SOPP_Pseudo <"s_soft_wait_loadcnt", (ins s16imm:$simm16), "$simm16">;
def S_WAIT_STORECNT_soft : SOPP_Pseudo <"s_soft_wait_storecnt", (ins s16imm:$simm16), "$simm16">;
+let OtherPredicates = [HasImageInsts] in {
def S_WAIT_SAMPLECNT_soft : SOPP_Pseudo <"s_soft_wait_samplecnt", (ins s16imm:$simm16), "$simm16">;
def S_WAIT_BVHCNT_soft : SOPP_Pseudo <"s_soft_wait_bvhcnt", (ins s16imm:$simm16), "$simm16">;
+} // End OtherPredicates = [HasImageInsts].
def S_WAIT_DSCNT_soft : SOPP_Pseudo <"s_soft_wait_dscnt", (ins s16imm:$simm16), "$simm16">;
def S_WAIT_KMCNT_soft : SOPP_Pseudo <"s_soft_wait_kmcnt", (ins s16imm:$simm16), "$simm16">;
}
@@ -1727,12 +1729,14 @@ let SubtargetPredicate = isGFX12Plus, hasSideEffects = 1 in {
[(int_amdgcn_s_wait_storecnt timm:$simm16)]>;
def S_WAIT_STORECNT_DSCNT :
SOPP_Pseudo<"s_wait_storecnt_dscnt", (ins s16imm:$simm16), "$simm16">;
+let OtherPredicates = [HasImageInsts] in {
def S_WAIT_SAMPLECNT :
SOPP_Pseudo<"s_wait_samplecnt", (ins s16imm:$simm16), "$simm16",
[(int_amdgcn_s_wait_samplecnt timm:$simm16)]>;
def S_WAIT_BVHCNT :
SOPP_Pseudo<"s_wait_bvhcnt", (ins s16imm:$simm16), "$simm16",
[(int_amdgcn_s_wait_bvhcnt timm:$simm16)]>;
+} // End OtherPredicates = [HasImageInsts].
def S_WAIT_EXPCNT :
SOPP_Pseudo<"s_wait_expcnt", (ins s16imm:$simm16), "$simm16",
[(int_amdgcn_s_wait_expcnt timm:$simm16)]>;
More information about the llvm-commits
mailing list