1 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2 # RUN: llc -mtriple=amdgcn -mcpu=gfx1010 -run-pass=machine-scheduler -o - %s | FileCheck %s
3 # RUN: llc -mtriple=amdgcn -mcpu=gfx1100 -run-pass=machine-scheduler -o - %s | FileCheck %s
4 # Make sure FP mode is not a hard scheduling boundary
7 name: denorm_mode_not_barrier
8 tracksRegLiveness: true
13 ; CHECK-LABEL: name: denorm_mode_not_barrier
14 ; CHECK: liveins: $vgpr0_vgpr1
16 ; CHECK-NEXT: [[COPY:%[0-9]+]]:vreg_64 = COPY $vgpr0_vgpr1
17 ; CHECK-NEXT: [[GLOBAL_LOAD_DWORD:%[0-9]+]]:vgpr_32 = GLOBAL_LOAD_DWORD [[COPY]], 0, 0, implicit $exec :: (load (s32))
18 ; CHECK-NEXT: [[GLOBAL_LOAD_DWORD1:%[0-9]+]]:vgpr_32 = GLOBAL_LOAD_DWORD [[COPY]], 4, 0, implicit $exec :: (load (s32))
19 ; CHECK-NEXT: [[V_ADD_U32_e32_:%[0-9]+]]:vgpr_32 = V_ADD_U32_e32 [[GLOBAL_LOAD_DWORD]], [[GLOBAL_LOAD_DWORD1]], implicit $exec
20 ; CHECK-NEXT: S_DENORM_MODE 0, implicit-def $mode, implicit $mode
21 ; CHECK-NEXT: S_ENDPGM 0, implicit [[V_ADD_U32_e32_]]
22 %0:vreg_64 = COPY $vgpr0_vgpr1
23 %1:vgpr_32 = GLOBAL_LOAD_DWORD %0, 0, 0, implicit $exec :: (load (s32))
24 S_DENORM_MODE 0, implicit-def $mode, implicit $mode
25 %2:vgpr_32 = GLOBAL_LOAD_DWORD %0, 4, 0, implicit $exec :: (load (s32))
26 %3:vgpr_32 = V_ADD_U32_e32 %1, %2, implicit $exec
27 S_ENDPGM 0, implicit %3
31 name: round_mode_not_barrier
32 tracksRegLiveness: true
37 ; CHECK-LABEL: name: round_mode_not_barrier
38 ; CHECK: liveins: $vgpr0_vgpr1
40 ; CHECK-NEXT: [[COPY:%[0-9]+]]:vreg_64 = COPY $vgpr0_vgpr1
41 ; CHECK-NEXT: [[GLOBAL_LOAD_DWORD:%[0-9]+]]:vgpr_32 = GLOBAL_LOAD_DWORD [[COPY]], 0, 0, implicit $exec :: (load (s32))
42 ; CHECK-NEXT: [[GLOBAL_LOAD_DWORD1:%[0-9]+]]:vgpr_32 = GLOBAL_LOAD_DWORD [[COPY]], 4, 0, implicit $exec :: (load (s32))
43 ; CHECK-NEXT: [[V_ADD_U32_e32_:%[0-9]+]]:vgpr_32 = V_ADD_U32_e32 [[GLOBAL_LOAD_DWORD]], [[GLOBAL_LOAD_DWORD1]], implicit $exec
44 ; CHECK-NEXT: S_ROUND_MODE 0, implicit-def $mode, implicit $mode
45 ; CHECK-NEXT: S_ENDPGM 0, implicit [[V_ADD_U32_e32_]]
46 %0:vreg_64 = COPY $vgpr0_vgpr1
47 %1:vgpr_32 = GLOBAL_LOAD_DWORD %0, 0, 0, implicit $exec :: (load (s32))
48 S_ROUND_MODE 0, implicit-def $mode, implicit $mode
49 %2:vgpr_32 = GLOBAL_LOAD_DWORD %0, 4, 0, implicit $exec :: (load (s32))
50 %3:vgpr_32 = V_ADD_U32_e32 %1, %2, implicit $exec
51 S_ENDPGM 0, implicit %3
55 name: denorm_mode_mode_def_use
56 tracksRegLiveness: true
61 ; CHECK-LABEL: name: denorm_mode_mode_def_use
62 ; CHECK: liveins: $vgpr0_vgpr1
64 ; CHECK-NEXT: [[COPY:%[0-9]+]]:vreg_64 = COPY $vgpr0_vgpr1
65 ; CHECK-NEXT: [[GLOBAL_LOAD_DWORD:%[0-9]+]]:vgpr_32 = GLOBAL_LOAD_DWORD [[COPY]], 0, 0, implicit $exec :: (load (s32))
66 ; CHECK-NEXT: dead [[GLOBAL_LOAD_DWORD1:%[0-9]+]]:vgpr_32 = GLOBAL_LOAD_DWORD [[COPY]], 4, 0, implicit $exec :: (load (s32))
67 ; CHECK-NEXT: S_DENORM_MODE 0, implicit-def $mode, implicit $mode
68 ; CHECK-NEXT: [[V_ADD_F32_e32_:%[0-9]+]]:vgpr_32 = V_ADD_F32_e32 0, [[GLOBAL_LOAD_DWORD]], implicit $mode, implicit $exec
69 ; CHECK-NEXT: [[V_ADD_U32_e32_:%[0-9]+]]:vgpr_32 = V_ADD_U32_e32 [[GLOBAL_LOAD_DWORD]], [[V_ADD_F32_e32_]], implicit $exec
70 ; CHECK-NEXT: S_ENDPGM 0, implicit [[V_ADD_F32_e32_]], implicit [[V_ADD_U32_e32_]]
71 %0:vreg_64 = COPY $vgpr0_vgpr1
72 %1:vgpr_32 = GLOBAL_LOAD_DWORD %0, 0, 0, implicit $exec :: (load (s32))
73 S_DENORM_MODE 0, implicit-def $mode, implicit $mode
74 %2:vgpr_32 = V_ADD_F32_e32 0, %1, implicit $mode, implicit $exec
75 %3:vgpr_32 = GLOBAL_LOAD_DWORD %0, 4, 0, implicit $exec :: (load (s32))
76 %4:vgpr_32 = V_ADD_U32_e32 %1, %2, implicit $exec
77 S_ENDPGM 0, implicit %2, implicit %4
81 name: round_mode_mode_def_use
82 tracksRegLiveness: true
87 ; CHECK-LABEL: name: round_mode_mode_def_use
88 ; CHECK: liveins: $vgpr0_vgpr1
90 ; CHECK-NEXT: [[COPY:%[0-9]+]]:vreg_64 = COPY $vgpr0_vgpr1
91 ; CHECK-NEXT: [[GLOBAL_LOAD_DWORD:%[0-9]+]]:vgpr_32 = GLOBAL_LOAD_DWORD [[COPY]], 0, 0, implicit $exec :: (load (s32))
92 ; CHECK-NEXT: dead [[GLOBAL_LOAD_DWORD1:%[0-9]+]]:vgpr_32 = GLOBAL_LOAD_DWORD [[COPY]], 4, 0, implicit $exec :: (load (s32))
93 ; CHECK-NEXT: S_ROUND_MODE 0, implicit-def $mode, implicit $mode
94 ; CHECK-NEXT: [[V_ADD_F32_e32_:%[0-9]+]]:vgpr_32 = V_ADD_F32_e32 0, [[GLOBAL_LOAD_DWORD]], implicit $mode, implicit $exec
95 ; CHECK-NEXT: [[V_ADD_U32_e32_:%[0-9]+]]:vgpr_32 = V_ADD_U32_e32 [[GLOBAL_LOAD_DWORD]], [[V_ADD_F32_e32_]], implicit $exec
96 ; CHECK-NEXT: S_ENDPGM 0, implicit [[V_ADD_F32_e32_]], implicit [[V_ADD_U32_e32_]]
97 %0:vreg_64 = COPY $vgpr0_vgpr1
98 %1:vgpr_32 = GLOBAL_LOAD_DWORD %0, 0, 0, implicit $exec :: (load (s32))
99 S_ROUND_MODE 0, implicit-def $mode, implicit $mode
100 %2:vgpr_32 = V_ADD_F32_e32 0, %1, implicit $mode, implicit $exec
101 %3:vgpr_32 = GLOBAL_LOAD_DWORD %0, 4, 0, implicit $exec :: (load (s32))
102 %4:vgpr_32 = V_ADD_U32_e32 %1, %2, implicit $exec
103 S_ENDPGM 0, implicit %2, implicit %4