[llvm] [AMDGPU][test] Make test more targeted with -stop-after (PR #125524)

Emma Pilkington via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 3 08:05:14 PST 2025


https://github.com/epilk created https://github.com/llvm/llvm-project/pull/125524

None

>From 7692576b731ca11785a18dca16eea9e10033f77d Mon Sep 17 00:00:00 2001
From: Emma Pilkington <emma.pilkington95 at gmail.com>
Date: Mon, 3 Feb 2025 09:30:14 -0500
Subject: [PATCH] [AMDGPU][test] Make test more targeted with -stop-after

---
 llvm/test/DebugInfo/AMDGPU/debug-loc-copy.ll | 64 +++++++++-----------
 1 file changed, 29 insertions(+), 35 deletions(-)

diff --git a/llvm/test/DebugInfo/AMDGPU/debug-loc-copy.ll b/llvm/test/DebugInfo/AMDGPU/debug-loc-copy.ll
index 8b54f709eec7a6..27a44817f4af52 100644
--- a/llvm/test/DebugInfo/AMDGPU/debug-loc-copy.ll
+++ b/llvm/test/DebugInfo/AMDGPU/debug-loc-copy.ll
@@ -1,43 +1,37 @@
-; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 5
-; RUN: llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx1030 < %s | FileCheck -check-prefix=GCN %s
+; NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py UTC_ARGS: --version 5
+; RUN: llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx1030 -stop-after=amdgpu-isel < %s | FileCheck -check-prefix=GCN %s
 
 ; Verify that the debug locations in this function are correct, in particular
 ; that the location for %cast doesn't appear in the block of %lab.
 
 define void @_Z12lane_pc_testj() #0 !dbg !9 {
-; GCN-LABEL: _Z12lane_pc_testj:
-; GCN:       .Lfunc_begin0:
-; GCN-NEXT:    .file 0 "/" "t.cpp"
-; GCN-NEXT:    .loc 0 3 0 ; t.cpp:3:0
-; GCN-NEXT:    .cfi_sections .debug_frame
-; GCN-NEXT:    .cfi_startproc
-; GCN-NEXT:  ; %bb.0:
-; GCN-NEXT:    s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
-; GCN-NEXT:  ; %bb.1: ; %lab
-; GCN-NEXT:  .Ltmp0:
-; GCN-NEXT:    .loc 0 12 1 prologue_end ; t.cpp:12:1
-; GCN-NEXT:    s_mov_b64 s[4:5], src_private_base
-; GCN-NEXT:    s_mov_b32 s6, 32
-; GCN-NEXT:    s_lshr_b64 s[4:5], s[4:5], s6
-; GCN-NEXT:    s_mov_b64 s[6:7], 0
-; GCN-NEXT:    s_mov_b32 s5, -1
-; GCN-NEXT:    s_lshr_b32 s8, s32, 5
-; GCN-NEXT:    s_cmp_lg_u32 s8, s5
-; GCN-NEXT:    s_cselect_b32 s5, s4, s7
-; GCN-NEXT:    s_cselect_b32 s4, s8, s6
-; GCN-NEXT:    v_mov_b32_e32 v2, 0
-; GCN-NEXT:    .loc 0 13 1 ; t.cpp:13:1
-; GCN-NEXT:    v_mov_b32_e32 v0, s4
-; GCN-NEXT:    v_mov_b32_e32 v1, s5
-; GCN-NEXT:    flat_store_dword v[0:1], v2
-; GCN-NEXT:    v_mov_b32_e32 v2, 1
-; GCN-NEXT:    .loc 0 14 1 ; t.cpp:14:1
-; GCN-NEXT:    v_mov_b32_e32 v0, s4
-; GCN-NEXT:    v_mov_b32_e32 v1, s5
-; GCN-NEXT:    flat_store_dword v[0:1], v2
-; GCN-NEXT:    s_waitcnt lgkmcnt(0)
-; GCN-NEXT:    s_setpc_b64 s[30:31]
-; GCN-NEXT:  .Ltmp1:
+  ; GCN-LABEL: name: _Z12lane_pc_testj
+  ; GCN: bb.0 (%ir-block.0):
+  ; GCN-NEXT:   successors: %bb.1(0x80000000)
+  ; GCN-NEXT: {{  $}}
+  ; GCN-NEXT:   S_BRANCH %bb.1
+  ; GCN-NEXT: {{  $}}
+  ; GCN-NEXT: bb.1.lab:
+  ; GCN-NEXT:   [[S_MOV_B64_:%[0-9]+]]:sreg_64 = S_MOV_B64 $src_private_base, debug-location !12
+  ; GCN-NEXT:   [[S_MOV_B32_:%[0-9]+]]:sreg_32 = S_MOV_B32 32
+  ; GCN-NEXT:   [[S_LSHR_B64_:%[0-9]+]]:sreg_64 = S_LSHR_B64 killed [[S_MOV_B64_]], killed [[S_MOV_B32_]], implicit-def dead $scc, debug-location !12
+  ; GCN-NEXT:   [[COPY:%[0-9]+]]:sreg_32 = COPY [[S_LSHR_B64_]].sub0, debug-location !12
+  ; GCN-NEXT:   [[S_MOV_B64_1:%[0-9]+]]:sreg_64 = S_MOV_B64 0
+  ; GCN-NEXT:   [[COPY1:%[0-9]+]]:sreg_32 = COPY [[S_MOV_B64_1]].sub1, debug-location !12
+  ; GCN-NEXT:   [[S_MOV_B32_1:%[0-9]+]]:sreg_32 = S_MOV_B32 -1
+  ; GCN-NEXT:   [[S_MOV_B32_2:%[0-9]+]]:sreg_32 = S_MOV_B32 %stack.0.alloc
+  ; GCN-NEXT:   S_CMP_LG_U32 [[S_MOV_B32_2]], killed [[S_MOV_B32_1]], implicit-def $scc, debug-location !12
+  ; GCN-NEXT:   [[S_CSELECT_B32_:%[0-9]+]]:sreg_32 = S_CSELECT_B32 killed [[COPY]], killed [[COPY1]], implicit $scc, debug-location !12
+  ; GCN-NEXT:   [[COPY2:%[0-9]+]]:sreg_32 = COPY [[S_MOV_B64_1]].sub0, debug-location !12
+  ; GCN-NEXT:   [[S_CSELECT_B32_1:%[0-9]+]]:sreg_32 = S_CSELECT_B32 [[S_MOV_B32_2]], killed [[COPY2]], implicit $scc, debug-location !12
+  ; GCN-NEXT:   [[REG_SEQUENCE:%[0-9]+]]:sreg_64 = REG_SEQUENCE killed [[S_CSELECT_B32_1]], %subreg.sub0, killed [[S_CSELECT_B32_]], %subreg.sub1, debug-location !12
+  ; GCN-NEXT:   [[V_MOV_B32_e32_:%[0-9]+]]:vgpr_32 = V_MOV_B32_e32 0, implicit $exec
+  ; GCN-NEXT:   [[COPY3:%[0-9]+]]:vreg_64 = COPY [[REG_SEQUENCE]], debug-location !13
+  ; GCN-NEXT:   FLAT_STORE_DWORD [[COPY3]], killed [[V_MOV_B32_e32_]], 0, 0, implicit $exec, implicit $flat_scr, debug-location !13 :: (store (s32) into %ir.cast)
+  ; GCN-NEXT:   [[V_MOV_B32_e32_1:%[0-9]+]]:vgpr_32 = V_MOV_B32_e32 1, implicit $exec
+  ; GCN-NEXT:   [[COPY4:%[0-9]+]]:vreg_64 = COPY [[REG_SEQUENCE]], debug-location !14
+  ; GCN-NEXT:   FLAT_STORE_DWORD [[COPY4]], killed [[V_MOV_B32_e32_1]], 0, 0, implicit $exec, implicit $flat_scr, debug-location !14 :: (store (s32) into %ir.cast)
+  ; GCN-NEXT:   SI_RETURN
   %alloc = alloca i32, align 4, addrspace(5)
   %cast = addrspacecast ptr addrspace(5) %alloc to ptr, !dbg !12
   br label %lab



More information about the llvm-commits mailing list