upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
path: root/tools/wave64_emulate_opt.py
diff options
context:
space:
mode:
authoredwin042331-hue <edwin042331@gmail.com>2026-11-22 12:32:18 -0400
committeredwin042331-hue <edwin042331@gmail.com>2026-11-22 12:32:41 -0400
commit5131dece32d542c8b0b8d5b8e32248856d3cb2f4 (patch)
treede1a369679ec505f6e056b0612e4ff491776b445 /tools/wave64_emulate_opt.py
parentb2497541e6ab81b489f0f1567cb4720609b37e6e (diff)
wave64-emulate: track implicit SCC read in s_cmovk_i32 and M0 read in v_movrel/v_swaprel
Diffstat (limited to 'tools/wave64_emulate_opt.py')
-rw-r--r--tools/wave64_emulate_opt.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/wave64_emulate_opt.py b/tools/wave64_emulate_opt.py
index 06c200c11..60b50b05f 100644
--- a/tools/wave64_emulate_opt.py
+++ b/tools/wave64_emulate_opt.py
@@ -45,7 +45,7 @@ BRANCHES = frozenset({
45_SCC_IMPLICIT_READS = frozenset({ 45_SCC_IMPLICIT_READS = frozenset({
46 "s_cbranch_scc0", "s_cbranch_scc1", 46 "s_cbranch_scc0", "s_cbranch_scc1",
47 "s_cselect_b32", "s_cselect_b64", 47 "s_cselect_b32", "s_cselect_b64",
48 "s_cmov_b32", "s_cmov_b64", 48 "s_cmov_b32", "s_cmov_b64", "s_cmovk_i32",
49 "s_addc_u32", "s_subb_u32", 49 "s_addc_u32", "s_subb_u32",
50}) 50})
51 51
@@ -258,7 +258,7 @@ def _scalar_rw(ins):
258 rd |= 1 << _BIT_VCC 258 rd |= 1 << _BIT_VCC
259 if reads_scc(ins): 259 if reads_scc(ins):
260 rd |= 1 << _BIT_SCC 260 rd |= 1 << _BIT_SCC
261 if op.startswith(("ds_", "s_sendmsg", "v_interp")): 261 if op.startswith(("ds_", "s_sendmsg", "v_interp", "v_movrel", "v_swaprel")):
262 rd |= 1 << _BIT_M0 262 rd |= 1 << _BIT_M0
263 if op == "s_cmov_b32" or op == "s_cmov_b64": 263 if op == "s_cmov_b32" or op == "s_cmov_b64":
264 # Conditional move preserves destination when SCC == 0, so it also reads destination. 264 # Conditional move preserves destination when SCC == 0, so it also reads destination.