From b88631b9b97ca8857491d0b8cb904356d5f6b3c4 Mon Sep 17 00:00:00 2001 From: Hideki Saito Date: Mon, 10 Nov 2025 16:56:06 -0600 Subject: [PATCH 1/2] Correct validation for the intended behavior of the test --- llvm/test/CodeGen/AMDGPU/remat-fp64-constants.ll | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/llvm/test/CodeGen/AMDGPU/remat-fp64-constants.ll b/llvm/test/CodeGen/AMDGPU/remat-fp64-constants.ll index c552f9d283597..8e4af81bf9abe 100644 --- a/llvm/test/CodeGen/AMDGPU/remat-fp64-constants.ll +++ b/llvm/test/CodeGen/AMDGPU/remat-fp64-constants.ll @@ -1,10 +1,13 @@ ; RUN: llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx900 --stress-regalloc=10 < %s | FileCheck -check-prefix=GCN %s ; RUN: llc -global-isel -mtriple=amdgcn-amd-amdhsa -mcpu=gfx900 --stress-regalloc=10 < %s | FileCheck -check-prefix=GCN %s +; Rematerializatinon test for fp64 constants (w/ intentionally high register pressure). +; Check to make sure we have at least six constant MOVs, not necessarily consecutive, inside the loop. + ; GCN-LABEL: {{^}}test_remat_sgpr: ; GCN-NOT: v_writelane_b32 -; GCN-COUNT-4: s_mov_b32 s{{[0-9]+}}, 0x ; GCN: {{^}}[[LOOP:.LBB[0-9_]+]]: +; GCN-COUNT-6: {{s_mov_b32|v_mov_b32_e32}} {{[sv]}}{{[0-9]+}}, 0x ; GCN-NOT: v_writelane_b32 ; GCN: s_cbranch_{{[^ ]+}} [[LOOP]] ; GCN: .sgpr_spill_count: 0 From a930edfbb18d1a492817a95890106516d60eff16 Mon Sep 17 00:00:00 2001 From: hidekisaito Date: Mon, 10 Nov 2025 17:03:06 -0800 Subject: [PATCH 2/2] Update llvm/test/CodeGen/AMDGPU/remat-fp64-constants.ll Co-authored-by: Matt Arsenault --- llvm/test/CodeGen/AMDGPU/remat-fp64-constants.ll | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/llvm/test/CodeGen/AMDGPU/remat-fp64-constants.ll b/llvm/test/CodeGen/AMDGPU/remat-fp64-constants.ll index 8e4af81bf9abe..88a51e9ccf04c 100644 --- a/llvm/test/CodeGen/AMDGPU/remat-fp64-constants.ll +++ b/llvm/test/CodeGen/AMDGPU/remat-fp64-constants.ll @@ -1,7 +1,7 @@ ; RUN: llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx900 --stress-regalloc=10 < %s | FileCheck -check-prefix=GCN %s ; RUN: llc -global-isel -mtriple=amdgcn-amd-amdhsa -mcpu=gfx900 --stress-regalloc=10 < %s | FileCheck -check-prefix=GCN %s -; Rematerializatinon test for fp64 constants (w/ intentionally high register pressure). +; Rematerialization test for fp64 constants (w/ intentionally high register pressure). ; Check to make sure we have at least six constant MOVs, not necessarily consecutive, inside the loop. ; GCN-LABEL: {{^}}test_remat_sgpr: