1 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2 # RUN: llc -march=amdgcn -mcpu=gfx1010 -run-pass=machine-scheduler -o - %s | FileCheck %s
3 # Make sure FP mode is not a hard scheduling boundary
6 name: denorm_mode_not_barrier
7 tracksRegLiveness: true
12 ; CHECK-LABEL: name: denorm_mode_not_barrier
13 ; CHECK: liveins: $vgpr0_vgpr1
14 ; CHECK: [[COPY:%[0-9]+]]:vreg_64 = COPY $vgpr0_vgpr1
15 ; CHECK: [[GLOBAL_LOAD_DWORD:%[0-9]+]]:vgpr_32 = GLOBAL_LOAD_DWORD [[COPY]], 0, 0, implicit $exec :: (load (s32))
16 ; CHECK: [[GLOBAL_LOAD_DWORD1:%[0-9]+]]:vgpr_32 = GLOBAL_LOAD_DWORD [[COPY]], 4, 0, implicit $exec :: (load (s32))
17 ; CHECK: [[V_ADD_U32_e32_:%[0-9]+]]:vgpr_32 = V_ADD_U32_e32 [[GLOBAL_LOAD_DWORD]], [[GLOBAL_LOAD_DWORD1]], implicit $exec
18 ; CHECK: S_DENORM_MODE 0, implicit-def $mode, implicit $mode
19 ; CHECK: S_ENDPGM 0, implicit [[V_ADD_U32_e32_]]
20 %0:vreg_64 = COPY $vgpr0_vgpr1
21 %1:vgpr_32 = GLOBAL_LOAD_DWORD %0, 0, 0, implicit $exec :: (load (s32))
22 S_DENORM_MODE 0, implicit-def $mode, implicit $mode
23 %2:vgpr_32 = GLOBAL_LOAD_DWORD %0, 4, 0, implicit $exec :: (load (s32))
24 %3:vgpr_32 = V_ADD_U32_e32 %1, %2, implicit $exec
25 S_ENDPGM 0, implicit %3
29 name: round_mode_not_barrier
30 tracksRegLiveness: true
35 ; CHECK-LABEL: name: round_mode_not_barrier
36 ; CHECK: liveins: $vgpr0_vgpr1
37 ; CHECK: [[COPY:%[0-9]+]]:vreg_64 = COPY $vgpr0_vgpr1
38 ; CHECK: [[GLOBAL_LOAD_DWORD:%[0-9]+]]:vgpr_32 = GLOBAL_LOAD_DWORD [[COPY]], 0, 0, implicit $exec :: (load (s32))
39 ; CHECK: [[GLOBAL_LOAD_DWORD1:%[0-9]+]]:vgpr_32 = GLOBAL_LOAD_DWORD [[COPY]], 4, 0, implicit $exec :: (load (s32))
40 ; CHECK: [[V_ADD_U32_e32_:%[0-9]+]]:vgpr_32 = V_ADD_U32_e32 [[GLOBAL_LOAD_DWORD]], [[GLOBAL_LOAD_DWORD1]], implicit $exec
41 ; CHECK: S_ROUND_MODE 0, implicit-def $mode, implicit $mode
42 ; CHECK: S_ENDPGM 0, implicit [[V_ADD_U32_e32_]]
43 %0:vreg_64 = COPY $vgpr0_vgpr1
44 %1:vgpr_32 = GLOBAL_LOAD_DWORD %0, 0, 0, implicit $exec :: (load (s32))
45 S_ROUND_MODE 0, implicit-def $mode, implicit $mode
46 %2:vgpr_32 = GLOBAL_LOAD_DWORD %0, 4, 0, implicit $exec :: (load (s32))
47 %3:vgpr_32 = V_ADD_U32_e32 %1, %2, implicit $exec
48 S_ENDPGM 0, implicit %3
52 name: denorm_mode_mode_def_use
53 tracksRegLiveness: true
58 ; CHECK-LABEL: name: denorm_mode_mode_def_use
59 ; CHECK: liveins: $vgpr0_vgpr1
60 ; CHECK: [[COPY:%[0-9]+]]:vreg_64 = COPY $vgpr0_vgpr1
61 ; CHECK: [[GLOBAL_LOAD_DWORD:%[0-9]+]]:vgpr_32 = GLOBAL_LOAD_DWORD [[COPY]], 0, 0, implicit $exec :: (load (s32))
62 ; CHECK: dead %3:vgpr_32 = GLOBAL_LOAD_DWORD [[COPY]], 4, 0, implicit $exec :: (load (s32))
63 ; CHECK: S_DENORM_MODE 0, implicit-def $mode, implicit $mode
64 ; CHECK: [[V_ADD_F32_e32_:%[0-9]+]]:vgpr_32 = V_ADD_F32_e32 0, [[GLOBAL_LOAD_DWORD]], implicit $mode, implicit $exec
65 ; CHECK: [[V_ADD_U32_e32_:%[0-9]+]]:vgpr_32 = V_ADD_U32_e32 [[GLOBAL_LOAD_DWORD]], [[V_ADD_F32_e32_]], implicit $exec
66 ; CHECK: S_ENDPGM 0, implicit [[V_ADD_F32_e32_]], implicit [[V_ADD_U32_e32_]]
67 %0:vreg_64 = COPY $vgpr0_vgpr1
68 %1:vgpr_32 = GLOBAL_LOAD_DWORD %0, 0, 0, implicit $exec :: (load (s32))
69 S_DENORM_MODE 0, implicit-def $mode, implicit $mode
70 %2:vgpr_32 = V_ADD_F32_e32 0, %1, implicit $mode, implicit $exec
71 %3:vgpr_32 = GLOBAL_LOAD_DWORD %0, 4, 0, implicit $exec :: (load (s32))
72 %4:vgpr_32 = V_ADD_U32_e32 %1, %2, implicit $exec
73 S_ENDPGM 0, implicit %2, implicit %4
77 name: round_mode_mode_def_use
78 tracksRegLiveness: true
83 ; CHECK-LABEL: name: round_mode_mode_def_use
84 ; CHECK: liveins: $vgpr0_vgpr1
85 ; CHECK: [[COPY:%[0-9]+]]:vreg_64 = COPY $vgpr0_vgpr1
86 ; CHECK: [[GLOBAL_LOAD_DWORD:%[0-9]+]]:vgpr_32 = GLOBAL_LOAD_DWORD [[COPY]], 0, 0, implicit $exec :: (load (s32))
87 ; CHECK: dead %3:vgpr_32 = GLOBAL_LOAD_DWORD [[COPY]], 4, 0, implicit $exec :: (load (s32))
88 ; CHECK: S_ROUND_MODE 0, implicit-def $mode, implicit $mode
89 ; CHECK: [[V_ADD_F32_e32_:%[0-9]+]]:vgpr_32 = V_ADD_F32_e32 0, [[GLOBAL_LOAD_DWORD]], implicit $mode, implicit $exec
90 ; CHECK: [[V_ADD_U32_e32_:%[0-9]+]]:vgpr_32 = V_ADD_U32_e32 [[GLOBAL_LOAD_DWORD]], [[V_ADD_F32_e32_]], implicit $exec
91 ; CHECK: S_ENDPGM 0, implicit [[V_ADD_F32_e32_]], implicit [[V_ADD_U32_e32_]]
92 %0:vreg_64 = COPY $vgpr0_vgpr1
93 %1:vgpr_32 = GLOBAL_LOAD_DWORD %0, 0, 0, implicit $exec :: (load (s32))
94 S_ROUND_MODE 0, implicit-def $mode, implicit $mode
95 %2:vgpr_32 = V_ADD_F32_e32 0, %1, implicit $mode, implicit $exec
96 %3:vgpr_32 = GLOBAL_LOAD_DWORD %0, 4, 0, implicit $exec :: (load (s32))
97 %4:vgpr_32 = V_ADD_U32_e32 %1, %2, implicit $exec
98 S_ENDPGM 0, implicit %2, implicit %4