# RUN: llc -march=amdgcn -mcpu=gfx1010 -verify-machineinstrs -run-pass post-RA-hazard-rec -o - %s | FileCheck -check-prefix=GCN %s # RUN: llc -march=amdgcn -mcpu=gfx1100 -verify-machineinstrs -run-pass post-RA-hazard-rec -o - %s | FileCheck -check-prefix=GCN %s # GCN-LABEL: name: flat_atomic_fcmpswap_to_s_denorm_mode # GCN: FLAT_ATOMIC_FCMPSWAP # GCN-NEXT: S_NOP 2 # GCN-NEXT: S_DENORM_MODE --- name: flat_atomic_fcmpswap_to_s_denorm_mode body: | bb.0: FLAT_ATOMIC_FCMPSWAP undef %0:vreg_64, undef %1:vreg_64, 0, 0, implicit $exec, implicit $flat_scr :: (volatile load store seq_cst seq_cst (s32) on `float addrspace(1)* undef`) S_DENORM_MODE 0, implicit-def $mode, implicit $mode ... # GCN-LABEL: name: flat_atomic_fcmpswap_x2_to_s_denorm_mode # GCN: FLAT_ATOMIC_FCMPSWAP_X2 # GCN-NEXT: S_NOP 2 # GCN-NEXT: S_DENORM_MODE --- name: flat_atomic_fcmpswap_x2_to_s_denorm_mode body: | bb.0: FLAT_ATOMIC_FCMPSWAP_X2 undef %0:vreg_64, undef %1:vreg_128, 0, 0, implicit $exec, implicit $flat_scr :: (volatile load store seq_cst seq_cst (s32) on `float addrspace(1)* undef`) S_DENORM_MODE 0, implicit-def $mode, implicit $mode ... # GCN-LABEL: name: flat_atomic_fmax_to_s_denorm_mode # GCN: FLAT_ATOMIC_FMAX # GCN-NEXT: S_NOP 2 # GCN-NEXT: S_DENORM_MODE --- name: flat_atomic_fmax_to_s_denorm_mode body: | bb.0: FLAT_ATOMIC_FMAX undef %0:vreg_64, undef %1:vgpr_32, 0, 0, implicit $exec, implicit $flat_scr :: (volatile load store seq_cst seq_cst (s32) on `float addrspace(1)* undef`) S_DENORM_MODE 0, implicit-def $mode, implicit $mode ... # GCN-LABEL: name: flat_atomic_fmax_x2_to_s_denorm_mode # GCN: FLAT_ATOMIC_FMAX_X2 # GCN-NEXT: S_NOP 2 # GCN-NEXT: S_DENORM_MODE --- name: flat_atomic_fmax_x2_to_s_denorm_mode body: | bb.0: FLAT_ATOMIC_FMAX_X2 undef %0:vreg_64, undef %1:vreg_64, 0, 0, implicit $exec, implicit $flat_scr :: (volatile load store seq_cst seq_cst (s32) on `float addrspace(1)* undef`) S_DENORM_MODE 0, implicit-def $mode, implicit $mode ... # GCN-LABEL: name: flat_atomic_fmin_to_s_denorm_mode # GCN: FLAT_ATOMIC_FMIN # GCN-NEXT: S_NOP 2 # GCN-NEXT: S_DENORM_MODE --- name: flat_atomic_fmin_to_s_denorm_mode body: | bb.0: FLAT_ATOMIC_FMIN undef %0:vreg_64, undef %1:vgpr_32, 0, 0, implicit $exec, implicit $flat_scr :: (volatile load store seq_cst seq_cst (s32) on `float addrspace(1)* undef`) S_DENORM_MODE 0, implicit-def $mode, implicit $mode ... # GCN-LABEL: name: flat_atomic_fmin_x2_to_s_denorm_mode # GCN: FLAT_ATOMIC_FMIN_X2 # GCN-NEXT: S_NOP 2 # GCN-NEXT: S_DENORM_MODE --- name: flat_atomic_fmin_x2_to_s_denorm_mode body: | bb.0: FLAT_ATOMIC_FMIN_X2 undef %0:vreg_64, undef %1:vreg_64, 0, 0, implicit $exec, implicit $flat_scr :: (volatile load store seq_cst seq_cst (s32) on `float addrspace(1)* undef`) S_DENORM_MODE 0, implicit-def $mode, implicit $mode ... # GCN-LABEL: name: flat_atomic_fcmpswap_x2_rtn_to_s_denorm_mode # GCN: FLAT_ATOMIC_FCMPSWAP_X2_RTN # GCN-NEXT: S_NOP 2 # GCN-NEXT: S_DENORM_MODE --- name: flat_atomic_fcmpswap_x2_rtn_to_s_denorm_mode body: | bb.0: %2:vreg_64 = FLAT_ATOMIC_FCMPSWAP_X2_RTN undef %0:vreg_64, undef %1:vreg_128, 0, 1, implicit $exec, implicit $flat_scr :: (volatile load store seq_cst seq_cst (s32) on `float addrspace(1)* undef`) S_DENORM_MODE 0, implicit-def $mode, implicit $mode ... # GCN-LABEL: name: flat_atomic_fmax_rtn_to_s_denorm_mode # GCN: FLAT_ATOMIC_FMAX_RTN # GCN-NEXT: S_NOP 2 # GCN-NEXT: S_DENORM_MODE --- name: flat_atomic_fmax_rtn_to_s_denorm_mode body: | bb.0: %2:vgpr_32 = FLAT_ATOMIC_FMAX_RTN undef %0:vreg_64, undef %1:vgpr_32, 0, 1, implicit $exec, implicit $flat_scr :: (volatile load store seq_cst seq_cst (s32) on `float addrspace(1)* undef`) S_DENORM_MODE 0, implicit-def $mode, implicit $mode ... # GCN-LABEL: name: flat_atomic_fmax_x2_rtn_to_s_denorm_mode # GCN: FLAT_ATOMIC_FMAX_X2_RTN # GCN-NEXT: S_NOP 2 # GCN-NEXT: S_DENORM_MODE --- name: flat_atomic_fmax_x2_rtn_to_s_denorm_mode body: | bb.0: %2:vreg_64 = FLAT_ATOMIC_FMAX_X2_RTN undef %0:vreg_64, undef %1:vreg_64, 0, 1, implicit $exec, implicit $flat_scr :: (volatile load store seq_cst seq_cst (s32) on `float addrspace(1)* undef`) S_DENORM_MODE 0, implicit-def $mode, implicit $mode ... # GCN-LABEL: name: flat_atomic_fmin_rtn_to_s_denorm_mode # GCN: FLAT_ATOMIC_FMIN_RTN # GCN-NEXT: S_NOP 2 # GCN-NEXT: S_DENORM_MODE --- name: flat_atomic_fmin_rtn_to_s_denorm_mode body: | bb.0: %2:vgpr_32 = FLAT_ATOMIC_FMIN_RTN undef %0:vreg_64, undef %1:vgpr_32, 0, 1, implicit $exec, implicit $flat_scr :: (volatile load store seq_cst seq_cst (s32) on `float addrspace(1)* undef`) S_DENORM_MODE 0, implicit-def $mode, implicit $mode ... # GCN-LABEL: name: flat_atomic_fmin_x2_rtn_to_s_denorm_mode # GCN: FLAT_ATOMIC_FMIN_X2_RTN # GCN-NEXT: S_NOP 2 # GCN-NEXT: S_DENORM_MODE --- name: flat_atomic_fmin_x2_rtn_to_s_denorm_mode body: | bb.0: %2:vreg_64 = FLAT_ATOMIC_FMIN_X2_RTN undef %0:vreg_64, undef %1:vreg_64, 0, 1, implicit $exec, implicit $flat_scr :: (volatile load store seq_cst seq_cst (s32) on `float addrspace(1)* undef`) S_DENORM_MODE 0, implicit-def $mode, implicit $mode ... # GCN-LABEL: name: flat_atomic_fcmpswap_rtn_to_s_denorm_mode # GCN: FLAT_ATOMIC_FCMPSWAP_RTN # GCN-NEXT: S_NOP 2 # GCN-NEXT: S_DENORM_MODE --- name: flat_atomic_fcmpswap_rtn_to_s_denorm_mode body: | bb.0: %2:vgpr_32 = FLAT_ATOMIC_FCMPSWAP_RTN undef %0:vreg_64, undef %1:vreg_64, 0, 1, implicit $exec, implicit $flat_scr :: (volatile load store seq_cst seq_cst (s32) on `float addrspace(1)* undef`) S_DENORM_MODE 0, implicit-def $mode, implicit $mode ... # GCN-LABEL: name: global_atomic_fcmpswap_to_s_denorm_mode # GCN: GLOBAL_ATOMIC_FCMPSWAP # GCN-NEXT: S_NOP 2 # GCN-NEXT: S_DENORM_MODE --- name: global_atomic_fcmpswap_to_s_denorm_mode body: | bb.0: GLOBAL_ATOMIC_FCMPSWAP undef %0:vreg_64, undef %1:vreg_64, 0, 0, implicit $exec :: (volatile load store seq_cst seq_cst (s32) on `float addrspace(1)* undef`) S_DENORM_MODE 0, implicit-def $mode, implicit $mode ... # GCN-LABEL: name: global_atomic_fcmpswap_x2_to_s_denorm_mode # GCN: GLOBAL_ATOMIC_FCMPSWAP_X2 # GCN-NEXT: S_NOP 2 # GCN-NEXT: S_DENORM_MODE --- name: global_atomic_fcmpswap_x2_to_s_denorm_mode body: | bb.0: GLOBAL_ATOMIC_FCMPSWAP_X2 undef %0:vreg_64, undef %1:vreg_128, 0, 0, implicit $exec :: (volatile load store seq_cst seq_cst (s32) on `float addrspace(1)* undef`) S_DENORM_MODE 0, implicit-def $mode, implicit $mode ... # GCN-LABEL: name: global_atomic_fmax_to_s_denorm_mode # GCN: GLOBAL_ATOMIC_FMAX # GCN-NEXT: S_NOP 2 # GCN-NEXT: S_DENORM_MODE --- name: global_atomic_fmax_to_s_denorm_mode body: | bb.0: GLOBAL_ATOMIC_FMAX undef %0:vreg_64, undef %1:vgpr_32, 0, 0, implicit $exec :: (volatile load store seq_cst seq_cst (s32) on `float addrspace(1)* undef`) S_DENORM_MODE 0, implicit-def $mode, implicit $mode ... # GCN-LABEL: name: global_atomic_fmax_x2_to_s_denorm_mode # GCN: GLOBAL_ATOMIC_FMAX_X2 # GCN-NEXT: S_NOP 2 # GCN-NEXT: S_DENORM_MODE --- name: global_atomic_fmax_x2_to_s_denorm_mode body: | bb.0: GLOBAL_ATOMIC_FMAX_X2 undef %0:vreg_64, undef %1:vreg_64, 0, 0, implicit $exec :: (volatile load store seq_cst seq_cst (s32) on `float addrspace(1)* undef`) S_DENORM_MODE 0, implicit-def $mode, implicit $mode ... # GCN-LABEL: name: global_atomic_fmin_to_s_denorm_mode # GCN: GLOBAL_ATOMIC_FMIN # GCN-NEXT: S_NOP 2 # GCN-NEXT: S_DENORM_MODE --- name: global_atomic_fmin_to_s_denorm_mode body: | bb.0: GLOBAL_ATOMIC_FMIN undef %0:vreg_64, undef %1:vgpr_32, 0, 0, implicit $exec :: (volatile load store seq_cst seq_cst (s32) on `float addrspace(1)* undef`) S_DENORM_MODE 0, implicit-def $mode, implicit $mode ... # GCN-LABEL: name: global_atomic_fmin_x2_to_s_denorm_mode # GCN: GLOBAL_ATOMIC_FMIN_X2 # GCN-NEXT: S_NOP 2 # GCN-NEXT: S_DENORM_MODE --- name: global_atomic_fmin_x2_to_s_denorm_mode body: | bb.0: GLOBAL_ATOMIC_FMIN_X2 undef %0:vreg_64, undef %1:vreg_64, 0, 0, implicit $exec :: (volatile load store seq_cst seq_cst (s32) on `float addrspace(1)* undef`) S_DENORM_MODE 0, implicit-def $mode, implicit $mode ... # GCN-LABEL: name: global_atomic_fcmpswap_rtn_to_s_denorm_mode # GCN: GLOBAL_ATOMIC_FCMPSWAP_RTN # GCN-NEXT: S_NOP 2 # GCN-NEXT: S_DENORM_MODE --- name: global_atomic_fcmpswap_rtn_to_s_denorm_mode body: | bb.0: %2:vgpr_32 = GLOBAL_ATOMIC_FCMPSWAP_RTN undef %0:vreg_64, undef %1:vreg_64, 0, 1, implicit $exec :: (volatile load store seq_cst seq_cst (s32) on `float addrspace(1)* undef`) S_DENORM_MODE 0, implicit-def $mode, implicit $mode ... # GCN-LABEL: name: global_atomic_fcmpswap_x2_rtn_to_s_denorm_mode # GCN: GLOBAL_ATOMIC_FCMPSWAP_X2_RTN # GCN-NEXT: S_NOP 2 # GCN-NEXT: S_DENORM_MODE --- name: global_atomic_fcmpswap_x2_rtn_to_s_denorm_mode body: | bb.0: %2:vreg_64 = GLOBAL_ATOMIC_FCMPSWAP_X2_RTN undef %0:vreg_64, undef %1:vreg_128, 0, 1, implicit $exec :: (volatile load store seq_cst seq_cst (s32) on `float addrspace(1)* undef`) S_DENORM_MODE 0, implicit-def $mode, implicit $mode ... # GCN-LABEL: name: global_atomic_fmax_rtn_to_s_denorm_mode # GCN: GLOBAL_ATOMIC_FMAX_RTN # GCN-NEXT: S_NOP 2 # GCN-NEXT: S_DENORM_MODE --- name: global_atomic_fmax_rtn_to_s_denorm_mode body: | bb.0: %2:vgpr_32 = GLOBAL_ATOMIC_FMAX_RTN undef %0:vreg_64, undef %1:vgpr_32, 0, 1, implicit $exec :: (volatile load store seq_cst seq_cst (s32) on `float addrspace(1)* undef`) S_DENORM_MODE 0, implicit-def $mode, implicit $mode ... # GCN-LABEL: name: global_atomic_fmax_x2_rtn_to_s_denorm_mode # GCN: GLOBAL_ATOMIC_FMAX_X2_RTN # GCN-NEXT: S_NOP 2 # GCN-NEXT: S_DENORM_MODE --- name: global_atomic_fmax_x2_rtn_to_s_denorm_mode body: | bb.0: %2:vreg_64 = GLOBAL_ATOMIC_FMAX_X2_RTN undef %0:vreg_64, undef %1:vreg_64, 0, 1, implicit $exec :: (volatile load store seq_cst seq_cst (s32) on `float addrspace(1)* undef`) S_DENORM_MODE 0, implicit-def $mode, implicit $mode ... # GCN-LABEL: name: global_atomic_fmin_rtn_to_s_denorm_mode # GCN: GLOBAL_ATOMIC_FMIN_RTN # GCN-NEXT: S_NOP 2 # GCN-NEXT: S_DENORM_MODE --- name: global_atomic_fmin_rtn_to_s_denorm_mode body: | bb.0: %2:vgpr_32 = GLOBAL_ATOMIC_FMIN_RTN undef %0:vreg_64, undef %1:vgpr_32, 0, 1, implicit $exec :: (volatile load store seq_cst seq_cst (s32) on `float addrspace(1)* undef`) S_DENORM_MODE 0, implicit-def $mode, implicit $mode ... # GCN-LABEL: name: global_atomic_fmin_x2_rtn_to_s_denorm_mode # GCN: GLOBAL_ATOMIC_FMIN_X2_RTN # GCN-NEXT: S_NOP 2 # GCN-NEXT: S_DENORM_MODE --- name: global_atomic_fmin_x2_rtn_to_s_denorm_mode body: | bb.0: %2:vreg_64 = GLOBAL_ATOMIC_FMIN_X2_RTN undef %0:vreg_64, undef %1:vreg_64, 0, 1, implicit $exec :: (volatile load store seq_cst seq_cst (s32) on `float addrspace(1)* undef`) S_DENORM_MODE 0, implicit-def $mode, implicit $mode ... # GCN-LABEL: name: global_atomic_fcmpswap_saddr_to_s_denorm_mode # GCN: GLOBAL_ATOMIC_FCMPSWAP_SADDR # GCN-NEXT: S_NOP 2 # GCN-NEXT: S_DENORM_MODE --- name: global_atomic_fcmpswap_saddr_to_s_denorm_mode body: | bb.0: GLOBAL_ATOMIC_FCMPSWAP_SADDR undef %0:vgpr_32, undef %1:vreg_64, undef %3:sgpr_64, 0, 0, implicit $exec :: (volatile load store seq_cst seq_cst (s32) on `float addrspace(1)* undef`) S_DENORM_MODE 0, implicit-def $mode, implicit $mode ... # GCN-LABEL: name: global_atomic_fcmpswap_x2_saddr_rtn_to_s_denorm_mode # GCN: GLOBAL_ATOMIC_FCMPSWAP_X2_SADDR_RTN # GCN-NEXT: S_NOP 2 # GCN-NEXT: S_DENORM_MODE --- name: global_atomic_fcmpswap_x2_saddr_rtn_to_s_denorm_mode body: | bb.0: %2:vreg_64 = GLOBAL_ATOMIC_FCMPSWAP_X2_SADDR_RTN undef %0:vgpr_32, undef %1:vreg_128, undef %3:sgpr_64, 0, 1, implicit $exec :: (volatile load store seq_cst seq_cst (s32) on `float addrspace(1)* undef`) S_DENORM_MODE 0, implicit-def $mode, implicit $mode ... # GCN-LABEL: name: global_atomic_fmax_saddr_rtn_to_s_denorm_mode # GCN: GLOBAL_ATOMIC_FMAX_SADDR_RTN # GCN-NEXT: S_NOP 2 # GCN-NEXT: S_DENORM_MODE --- name: global_atomic_fmax_saddr_rtn_to_s_denorm_mode body: | bb.0: %2:vgpr_32 = GLOBAL_ATOMIC_FMAX_SADDR_RTN undef %0:vgpr_32, undef %1:vgpr_32, undef %3:sgpr_64, 0, 1, implicit $exec :: (volatile load store seq_cst seq_cst (s32) on `float addrspace(1)* undef`) S_DENORM_MODE 0, implicit-def $mode, implicit $mode ... # GCN-LABEL: name: global_atomic_fmax_x2_saddr_rtn_to_s_denorm_mode # GCN: GLOBAL_ATOMIC_FMAX_X2_SADDR_RTN # GCN-NEXT: S_NOP 2 # GCN-NEXT: S_DENORM_MODE --- name: global_atomic_fmax_x2_saddr_rtn_to_s_denorm_mode body: | bb.0: %2:vreg_64 = GLOBAL_ATOMIC_FMAX_X2_SADDR_RTN undef %0:vgpr_32, undef %1:vreg_64, undef %3:sgpr_64, 0, 1, implicit $exec :: (volatile load store seq_cst seq_cst (s32) on `float addrspace(1)* undef`) S_DENORM_MODE 0, implicit-def $mode, implicit $mode ... # GCN-LABEL: name: global_atomic_fmin_saddr_rtn_to_s_denorm_mode # GCN: GLOBAL_ATOMIC_FMIN_SADDR_RTN # GCN-NEXT: S_NOP 2 # GCN-NEXT: S_DENORM_MODE --- name: global_atomic_fmin_saddr_rtn_to_s_denorm_mode body: | bb.0: %2:vgpr_32 = GLOBAL_ATOMIC_FMIN_SADDR_RTN undef %0:vgpr_32, undef %1:vgpr_32, undef %3:sgpr_64, 0, 1, implicit $exec :: (volatile load store seq_cst seq_cst (s32) on `float addrspace(1)* undef`) S_DENORM_MODE 0, implicit-def $mode, implicit $mode ... # GCN-LABEL: name: global_atomic_fmin_x2_saddr_rtn_to_s_denorm_mode # GCN: GLOBAL_ATOMIC_FMIN_X2_SADDR_RTN # GCN-NEXT: S_NOP 2 # GCN-NEXT: S_DENORM_MODE --- name: global_atomic_fmin_x2_saddr_rtn_to_s_denorm_mode body: | bb.0: %2:vreg_64 = GLOBAL_ATOMIC_FMIN_X2_SADDR_RTN undef %0:vgpr_32, undef %1:vreg_64, undef %3:sgpr_64, 0, 1, implicit $exec :: (volatile load store seq_cst seq_cst (s32) on `float addrspace(1)* undef`) S_DENORM_MODE 0, implicit-def $mode, implicit $mode ... # GCN-LABEL: name: flat_fp_atomic_to_s_denorm_mode_waitcnt # GCN: FLAT_ATOMIC_FMIN # GCN-NEXT: S_WAITCNT # GCN-NEXT: S_DENORM_MODE --- name: flat_fp_atomic_to_s_denorm_mode_waitcnt body: | bb.0: FLAT_ATOMIC_FMIN undef %0:vreg_64, undef %1:vgpr_32, 0, 0, implicit $exec, implicit $flat_scr :: (volatile load store seq_cst seq_cst (s32) on `float addrspace(1)* undef`) S_WAITCNT 0 S_DENORM_MODE 0, implicit-def $mode, implicit $mode ... # GCN-LABEL: name: flat_fp_atomic_to_s_denorm_mode_valu # GCN: FLAT_ATOMIC_FMIN # GCN-NEXT: V_ADD_F32_e32 # GCN-NEXT: S_DENORM_MODE --- name: flat_fp_atomic_to_s_denorm_mode_valu body: | bb.0: FLAT_ATOMIC_FMIN undef %0:vreg_64, undef %1:vgpr_32, 0, 0, implicit $exec, implicit $flat_scr :: (volatile load store seq_cst seq_cst (s32) on `float addrspace(1)* undef`) %2:vgpr_32 = V_ADD_F32_e32 undef %1:vgpr_32, undef %1:vgpr_32, implicit $mode, implicit $exec S_DENORM_MODE 0, implicit-def $mode, implicit $mode ...