1 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2 # RUN: llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx900 -run-pass=machine-scheduler -verify-machineinstrs %s -o - | FileCheck %s
5 declare void @llvm.dbg.value(metadata, metadata, metadata) #0
7 define amdgpu_kernel void @could_not_use_debug_inst_to_query_mi2mimap() #1 {
11 declare hidden float @foo(float, float, float) local_unnamed_addr #1
13 attributes #0 = { nounwind readnone speculatable }
14 attributes #1 = {nounwind }
18 name: could_not_use_debug_inst_to_query_mi2mimap
19 tracksRegLiveness: true
23 ; CHECK-LABEL: name: could_not_use_debug_inst_to_query_mi2mimap
25 ; CHECK: successors: %bb.1(0x80000000)
26 ; CHECK: [[DEF:%[0-9]+]]:vreg_64 = IMPLICIT_DEF
27 ; CHECK: [[DEF1:%[0-9]+]]:vgpr_32 = IMPLICIT_DEF
28 ; CHECK: [[DEF2:%[0-9]+]]:vgpr_32 = IMPLICIT_DEF
29 ; CHECK: [[DEF3:%[0-9]+]]:vgpr_32 = IMPLICIT_DEF
30 ; CHECK: [[DEF4:%[0-9]+]]:vgpr_32 = IMPLICIT_DEF
31 ; CHECK: [[DEF5:%[0-9]+]]:vgpr_32 = IMPLICIT_DEF
32 ; CHECK: [[DEF6:%[0-9]+]]:vgpr_32 = IMPLICIT_DEF
33 ; CHECK: [[DEF7:%[0-9]+]]:vgpr_32 = IMPLICIT_DEF
34 ; CHECK: [[DEF8:%[0-9]+]]:vgpr_32 = IMPLICIT_DEF
35 ; CHECK: [[V_MUL_F32_e32_:%[0-9]+]]:vgpr_32 = V_MUL_F32_e32 1082130432, [[DEF1]], implicit $exec
36 ; CHECK: [[DEF9:%[0-9]+]]:vgpr_32 = IMPLICIT_DEF
37 ; CHECK: [[DEF10:%[0-9]+]]:vgpr_32 = IMPLICIT_DEF
39 ; CHECK: successors: %bb.2(0x80000000)
44 ; CHECK: successors: %bb.3(0x80000000)
45 ; CHECK: S_BRANCH %bb.3
47 ; CHECK: [[V_MOV_B32_e32_:%[0-9]+]]:vgpr_32 = V_MOV_B32_e32 0, implicit $exec
48 ; CHECK: [[DEF11:%[0-9]+]]:vgpr_32 = IMPLICIT_DEF
49 ; CHECK: [[DEF12:%[0-9]+]]:vgpr_32 = IMPLICIT_DEF
50 ; CHECK: [[COPY:%[0-9]+]]:vgpr_32 = COPY [[V_MOV_B32_e32_]]
51 ; CHECK: [[V_MUL_F32_e32_1:%[0-9]+]]:vgpr_32 = V_MUL_F32_e32 [[DEF7]], [[DEF7]], implicit $exec
52 ; CHECK: [[V_MUL_F32_e32_2:%[0-9]+]]:vgpr_32 = V_MUL_F32_e32 [[DEF7]], [[DEF7]], implicit $exec
53 ; CHECK: [[V_MUL_F32_e32_3:%[0-9]+]]:vgpr_32 = V_MUL_F32_e32 [[V_MOV_B32_e32_]], [[V_MOV_B32_e32_]], implicit $exec
54 ; CHECK: [[V_MOV_B32_e32_1:%[0-9]+]]:vgpr_32 = V_MOV_B32_e32 1092616192, implicit $exec
55 ; CHECK: [[DEF13:%[0-9]+]]:vgpr_32 = IMPLICIT_DEF
56 ; CHECK: [[V_ADD_F32_e32_:%[0-9]+]]:vgpr_32 = V_ADD_F32_e32 [[V_MOV_B32_e32_]], [[V_MOV_B32_e32_]], implicit $exec
57 ; CHECK: [[V_MUL_F32_e32_4:%[0-9]+]]:vgpr_32 = V_MUL_F32_e32 [[DEF7]], [[DEF7]], implicit $exec
58 ; CHECK: dead %23:vgpr_32 = V_MUL_F32_e32 [[V_MUL_F32_e32_4]], [[DEF13]], implicit $exec
59 ; CHECK: dead [[V_MOV_B32_e32_1]]:vgpr_32 = V_MAC_F32_e32 [[V_ADD_F32_e32_]], [[COPY]], [[V_MOV_B32_e32_1]], implicit $exec
60 ; CHECK: [[DEF14:%[0-9]+]]:sreg_64 = IMPLICIT_DEF
61 ; CHECK: $sgpr4 = IMPLICIT_DEF
62 ; CHECK: $vgpr0 = COPY [[DEF11]]
63 ; CHECK: $vgpr0 = COPY [[V_MOV_B32_e32_]]
64 ; CHECK: $vgpr1 = COPY [[DEF7]]
65 ; CHECK: $vgpr0 = COPY [[V_MUL_F32_e32_1]]
66 ; CHECK: $vgpr1 = COPY [[V_MUL_F32_e32_2]]
67 ; CHECK: $vgpr2 = COPY [[V_MUL_F32_e32_3]]
68 ; CHECK: dead $sgpr30_sgpr31 = SI_CALL [[DEF14]], @foo, csr_amdgpu_highregs, implicit undef $sgpr0_sgpr1_sgpr2_sgpr3, implicit killed $sgpr4, implicit $vgpr0, implicit $vgpr1, implicit $vgpr2, implicit-def $vgpr0
69 ; CHECK: [[V_ADD_F32_e32_1:%[0-9]+]]:vgpr_32 = V_ADD_F32_e32 [[V_MUL_F32_e32_]], [[DEF8]], implicit $exec
70 ; CHECK: [[V_MAC_F32_e32_:%[0-9]+]]:vgpr_32 = V_MAC_F32_e32 [[DEF12]], [[DEF9]], [[V_MAC_F32_e32_]], implicit $exec
71 ; CHECK: dead %26:vgpr_32 = V_MAD_F32 0, [[V_MAC_F32_e32_]], 0, [[DEF4]], 0, [[DEF1]], 0, 0, implicit $exec
72 ; CHECK: dead %27:vgpr_32 = V_MAD_F32 0, [[V_MAC_F32_e32_]], 0, [[DEF5]], 0, [[DEF2]], 0, 0, implicit $exec
73 ; CHECK: dead %28:vgpr_32 = V_MAD_F32 0, [[V_MAC_F32_e32_]], 0, [[DEF6]], 0, [[DEF3]], 0, 0, implicit $exec
74 ; CHECK: GLOBAL_STORE_DWORD [[DEF]], [[DEF10]], 0, 0, 0, 0, implicit $exec
79 %0:vreg_64 = IMPLICIT_DEF
80 %1:vgpr_32 = IMPLICIT_DEF
81 %2:vgpr_32 = IMPLICIT_DEF
82 %3:vgpr_32 = IMPLICIT_DEF
83 %4:vgpr_32 = IMPLICIT_DEF
84 %5:vgpr_32 = IMPLICIT_DEF
85 %6:vgpr_32 = IMPLICIT_DEF
86 %7:vgpr_32 = IMPLICIT_DEF
87 %8:vgpr_32 = IMPLICIT_DEF
88 %9:vgpr_32 = V_MUL_F32_e32 1082130432, %1, implicit $exec
89 %10:vgpr_32 = IMPLICIT_DEF
90 %11:vgpr_32 = IMPLICIT_DEF
105 %12:vgpr_32 = V_MOV_B32_e32 0, implicit $exec
106 %13:vgpr_32 = COPY %12
107 %14:vgpr_32 = IMPLICIT_DEF
108 %15:vgpr_32 = IMPLICIT_DEF
109 %16:vgpr_32 = V_MUL_F32_e32 %7, %7, implicit $exec
110 %17:vgpr_32 = V_MUL_F32_e32 %7, %7, implicit $exec
111 %18:vgpr_32 = V_MUL_F32_e32 %12, %12, implicit $exec
112 %19:vgpr_32 = V_MOV_B32_e32 1092616192, implicit $exec
113 %20:vgpr_32 = IMPLICIT_DEF
114 %21:vgpr_32 = V_ADD_F32_e32 %12, %12, implicit $exec
115 %22:vgpr_32 = V_MUL_F32_e32 %7, %7, implicit $exec
116 %23:vgpr_32 = V_MUL_F32_e32 %22, %20, implicit $exec
117 %19:vgpr_32 = V_MAC_F32_e32 %21, %13, %19, implicit $exec
118 %24:sreg_64 = IMPLICIT_DEF
125 $sgpr4 = IMPLICIT_DEF
126 dead $sgpr30_sgpr31 = SI_CALL %24, @foo, csr_amdgpu_highregs, implicit undef $sgpr0_sgpr1_sgpr2_sgpr3, implicit killed $sgpr4, implicit killed $vgpr0, implicit killed $vgpr1, implicit killed $vgpr2, implicit-def $vgpr0
127 %25:vgpr_32 = V_ADD_F32_e32 %9, %8, implicit $exec
128 %25:vgpr_32 = V_MAC_F32_e32 %15, %10, %25, implicit $exec
129 %26:vgpr_32 = V_MAD_F32 0, %25, 0, %4, 0, %1, 0, 0, implicit $exec
130 %27:vgpr_32 = V_MAD_F32 0, %25, 0, %5, 0, %2, 0, 0, implicit $exec
131 %28:vgpr_32 = V_MAD_F32 0, %25, 0, %6, 0, %3, 0, 0, implicit $exec
132 GLOBAL_STORE_DWORD %0, %11, 0, 0, 0, 0, implicit $exec