VOPDstS64orS32)))); // else VT == i1
}
+// Returns true if VT is floating point.
+class getIsFP<ValueType VT> {
+ bit ret = !if(!eq(VT.Value, f16.Value), 1,
+ !if(!eq(VT.Value, v2f16.Value), 1,
+ !if(!eq(VT.Value, f32.Value), 1,
+ !if(!eq(VT.Value, v2f32.Value), 1,
+ !if(!eq(VT.Value, f64.Value), 1,
+ !if(!eq(VT.Value, v2f64.Value), 1,
+ 0))))));
+}
+
// Returns the register class to use for the destination of VOP[12C]
// instructions with SDWA extension
class getSDWADstForVT<ValueType VT> {
// Returns the register class to use for source 0 of VOP[12C]
// instructions for the given VT.
class getVOPSrc0ForVT<ValueType VT> {
- bit isFP = !if(!eq(VT.Value, f16.Value), 1,
- !if(!eq(VT.Value, v2f16.Value), 1,
- !if(!eq(VT.Value, f32.Value), 1,
- !if(!eq(VT.Value, f64.Value), 1,
- 0))));
+ bit isFP = getIsFP<VT>.ret;
RegisterOperand ret =
!if(isFP,
}
class getSDWASrcForVT <ValueType VT> {
- bit isFP = !if(!eq(VT.Value, f16.Value), 1,
- !if(!eq(VT.Value, f32.Value), 1,
- 0));
+ bit isFP = getIsFP<VT>.ret;
RegisterOperand retFlt = !if(!eq(VT.Size, 16), SDWASrc_f16, SDWASrc_f32);
RegisterOperand retInt = !if(!eq(VT.Size, 16), SDWASrc_i16, SDWASrc_i32);
RegisterOperand ret = !if(isFP, retFlt, retInt);
// Returns the register class to use for sources of VOP3 instructions for the
// given VT.
class getVOP3SrcForVT<ValueType VT> {
- bit isFP = !if(!eq(VT.Value, f16.Value), 1,
- !if(!eq(VT.Value, v2f16.Value), 1,
- !if(!eq(VT.Value, f32.Value), 1,
- !if(!eq(VT.Value, f64.Value), 1,
- 0))));
+ bit isFP = getIsFP<VT>.ret;
RegisterOperand ret =
!if(!eq(VT.Size, 128),
VSrc_128,
// Return type of input modifiers operand for specified input operand
class getSrcMod <ValueType VT, bit EnableF32SrcMods> {
- bit isFP = !if(!eq(VT.Value, f16.Value), 1,
- !if(!eq(VT.Value, f32.Value), 1,
- !if(!eq(VT.Value, f64.Value), 1,
- 0)));
+ bit isFP = getIsFP<VT>.ret;
bit isPacked = isPackedType<VT>.ret;
Operand ret = !if(!eq(VT.Size, 64),
!if(isFP, FP64InputMods, Int64InputMods),
// Return type of input modifiers operand specified input operand for DPP
class getSrcModExt <ValueType VT> {
- bit isFP = !if(!eq(VT.Value, f16.Value), 1,
- !if(!eq(VT.Value, f32.Value), 1,
- !if(!eq(VT.Value, f64.Value), 1,
- 0)));
+ bit isFP = getIsFP<VT>.ret;
Operand ret = !if(isFP, FPVRegInputMods, IntVRegInputMods);
}
--- /dev/null
+# RUN: llc -march=amdgcn -mcpu=gfx1010 -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 0
+# GCN-NEXT: S_NOP 0
+# GCN-NEXT: S_NOP 0
+# 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 4 on `float addrspace(1)* undef`)
+ S_DENORM_MODE 0
+...
+
+# GCN-LABEL: name: flat_atomic_fcmpswap_x2_to_s_denorm_mode
+# GCN: FLAT_ATOMIC_FCMPSWAP_X2
+# GCN-NEXT: S_NOP 0
+# GCN-NEXT: S_NOP 0
+# GCN-NEXT: S_NOP 0
+# 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 4 on `float addrspace(1)* undef`)
+ S_DENORM_MODE 0
+...
+
+# GCN-LABEL: name: flat_atomic_fmax_to_s_denorm_mode
+# GCN: FLAT_ATOMIC_FMAX
+# GCN-NEXT: S_NOP 0
+# GCN-NEXT: S_NOP 0
+# GCN-NEXT: S_NOP 0
+# 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 4 on `float addrspace(1)* undef`)
+ S_DENORM_MODE 0
+...
+
+# GCN-LABEL: name: flat_atomic_fmax_x2_to_s_denorm_mode
+# GCN: FLAT_ATOMIC_FMAX_X2
+# GCN-NEXT: S_NOP 0
+# GCN-NEXT: S_NOP 0
+# GCN-NEXT: S_NOP 0
+# 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 4 on `float addrspace(1)* undef`)
+ S_DENORM_MODE 0
+...
+
+# GCN-LABEL: name: flat_atomic_fmin_to_s_denorm_mode
+# GCN: FLAT_ATOMIC_FMIN
+# GCN-NEXT: S_NOP 0
+# GCN-NEXT: S_NOP 0
+# GCN-NEXT: S_NOP 0
+# 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 4 on `float addrspace(1)* undef`)
+ S_DENORM_MODE 0
+...
+
+# GCN-LABEL: name: flat_atomic_fmin_x2_to_s_denorm_mode
+# GCN: FLAT_ATOMIC_FMIN_X2
+# GCN-NEXT: S_NOP 0
+# GCN-NEXT: S_NOP 0
+# GCN-NEXT: S_NOP 0
+# 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 4 on `float addrspace(1)* undef`)
+ S_DENORM_MODE 0
+...
+
+# GCN-LABEL: name: flat_atomic_fcmpswap_x2_rtn_to_s_denorm_mode
+# GCN: FLAT_ATOMIC_FCMPSWAP_X2_RTN
+# GCN-NEXT: S_NOP 0
+# GCN-NEXT: S_NOP 0
+# GCN-NEXT: S_NOP 0
+# 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, 0, implicit $exec, implicit $flat_scr :: (volatile load store seq_cst seq_cst 4 on `float addrspace(1)* undef`)
+ S_DENORM_MODE 0
+...
+
+# GCN-LABEL: name: flat_atomic_fmax_rtn_to_s_denorm_mode
+# GCN: FLAT_ATOMIC_FMAX_RTN
+# GCN-NEXT: S_NOP 0
+# GCN-NEXT: S_NOP 0
+# GCN-NEXT: S_NOP 0
+# 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, 0, implicit $exec, implicit $flat_scr :: (volatile load store seq_cst seq_cst 4 on `float addrspace(1)* undef`)
+ S_DENORM_MODE 0
+...
+
+# GCN-LABEL: name: flat_atomic_fmax_x2_rtn_to_s_denorm_mode
+# GCN: FLAT_ATOMIC_FMAX_X2_RTN
+# GCN-NEXT: S_NOP 0
+# GCN-NEXT: S_NOP 0
+# GCN-NEXT: S_NOP 0
+# 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, 0, implicit $exec, implicit $flat_scr :: (volatile load store seq_cst seq_cst 4 on `float addrspace(1)* undef`)
+ S_DENORM_MODE 0
+...
+
+# GCN-LABEL: name: flat_atomic_fmin_rtn_to_s_denorm_mode
+# GCN: FLAT_ATOMIC_FMIN_RTN
+# GCN-NEXT: S_NOP 0
+# GCN-NEXT: S_NOP 0
+# GCN-NEXT: S_NOP 0
+# 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, 0, implicit $exec, implicit $flat_scr :: (volatile load store seq_cst seq_cst 4 on `float addrspace(1)* undef`)
+ S_DENORM_MODE 0
+...
+
+# GCN-LABEL: name: flat_atomic_fmin_x2_rtn_to_s_denorm_mode
+# GCN: FLAT_ATOMIC_FMIN_X2_RTN
+# GCN-NEXT: S_NOP 0
+# GCN-NEXT: S_NOP 0
+# GCN-NEXT: S_NOP 0
+# 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, 0, implicit $exec, implicit $flat_scr :: (volatile load store seq_cst seq_cst 4 on `float addrspace(1)* undef`)
+ S_DENORM_MODE 0
+...
+
+# GCN-LABEL: name: flat_atomic_fcmpswap_rtn_to_s_denorm_mode
+# GCN: FLAT_ATOMIC_FCMPSWAP_RTN
+# GCN-NEXT: S_NOP 0
+# GCN-NEXT: S_NOP 0
+# GCN-NEXT: S_NOP 0
+# 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, 0, implicit $exec, implicit $flat_scr :: (volatile load store seq_cst seq_cst 4 on `float addrspace(1)* undef`)
+ S_DENORM_MODE 0
+...
+
+# GCN-LABEL: name: global_atomic_fcmpswap_to_s_denorm_mode
+# GCN: GLOBAL_ATOMIC_FCMPSWAP
+# GCN-NEXT: S_NOP 0
+# GCN-NEXT: S_NOP 0
+# GCN-NEXT: S_NOP 0
+# 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:vgpr_32, 0, 0, implicit $exec :: (volatile load store seq_cst seq_cst 4 on `float addrspace(1)* undef`)
+ S_DENORM_MODE 0
+...
+
+# GCN-LABEL: name: global_atomic_fcmpswap_x2_to_s_denorm_mode
+# GCN: GLOBAL_ATOMIC_FCMPSWAP_X2
+# GCN-NEXT: S_NOP 0
+# GCN-NEXT: S_NOP 0
+# GCN-NEXT: S_NOP 0
+# 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_64, 0, 0, implicit $exec :: (volatile load store seq_cst seq_cst 4 on `float addrspace(1)* undef`)
+ S_DENORM_MODE 0
+...
+
+# GCN-LABEL: name: global_atomic_fmax_to_s_denorm_mode
+# GCN: GLOBAL_ATOMIC_FMAX
+# GCN-NEXT: S_NOP 0
+# GCN-NEXT: S_NOP 0
+# GCN-NEXT: S_NOP 0
+# 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 4 on `float addrspace(1)* undef`)
+ S_DENORM_MODE 0
+...
+
+# GCN-LABEL: name: global_atomic_fmax_x2_to_s_denorm_mode
+# GCN: GLOBAL_ATOMIC_FMAX_X2
+# GCN-NEXT: S_NOP 0
+# GCN-NEXT: S_NOP 0
+# GCN-NEXT: S_NOP 0
+# 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 4 on `float addrspace(1)* undef`)
+ S_DENORM_MODE 0
+...
+
+# GCN-LABEL: name: global_atomic_fmin_to_s_denorm_mode
+# GCN: GLOBAL_ATOMIC_FMIN
+# GCN-NEXT: S_NOP 0
+# GCN-NEXT: S_NOP 0
+# GCN-NEXT: S_NOP 0
+# 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 4 on `float addrspace(1)* undef`)
+ S_DENORM_MODE 0
+...
+
+# GCN-LABEL: name: global_atomic_fmin_x2_to_s_denorm_mode
+# GCN: GLOBAL_ATOMIC_FMIN_X2
+# GCN-NEXT: S_NOP 0
+# GCN-NEXT: S_NOP 0
+# GCN-NEXT: S_NOP 0
+# 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 4 on `float addrspace(1)* undef`)
+ S_DENORM_MODE 0
+...
+
+# GCN-LABEL: name: global_atomic_fcmpswap_rtn_to_s_denorm_mode
+# GCN: GLOBAL_ATOMIC_FCMPSWAP_RTN
+# GCN-NEXT: S_NOP 0
+# GCN-NEXT: S_NOP 0
+# GCN-NEXT: S_NOP 0
+# 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:vgpr_32, 0, 0, implicit $exec :: (volatile load store seq_cst seq_cst 4 on `float addrspace(1)* undef`)
+ S_DENORM_MODE 0
+...
+
+# GCN-LABEL: name: global_atomic_fcmpswap_x2_rtn_to_s_denorm_mode
+# GCN: GLOBAL_ATOMIC_FCMPSWAP_X2_RTN
+# GCN-NEXT: S_NOP 0
+# GCN-NEXT: S_NOP 0
+# GCN-NEXT: S_NOP 0
+# 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_64, 0, 0, implicit $exec :: (volatile load store seq_cst seq_cst 4 on `float addrspace(1)* undef`)
+ S_DENORM_MODE 0
+...
+
+# GCN-LABEL: name: global_atomic_fmax_rtn_to_s_denorm_mode
+# GCN: GLOBAL_ATOMIC_FMAX_RTN
+# GCN-NEXT: S_NOP 0
+# GCN-NEXT: S_NOP 0
+# GCN-NEXT: S_NOP 0
+# 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, 0, implicit $exec :: (volatile load store seq_cst seq_cst 4 on `float addrspace(1)* undef`)
+ S_DENORM_MODE 0
+...
+
+# GCN-LABEL: name: global_atomic_fmax_x2_rtn_to_s_denorm_mode
+# GCN: GLOBAL_ATOMIC_FMAX_X2_RTN
+# GCN-NEXT: S_NOP 0
+# GCN-NEXT: S_NOP 0
+# GCN-NEXT: S_NOP 0
+# 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, 0, implicit $exec :: (volatile load store seq_cst seq_cst 4 on `float addrspace(1)* undef`)
+ S_DENORM_MODE 0
+...
+
+# GCN-LABEL: name: global_atomic_fmin_rtn_to_s_denorm_mode
+# GCN: GLOBAL_ATOMIC_FMIN_RTN
+# GCN-NEXT: S_NOP 0
+# GCN-NEXT: S_NOP 0
+# GCN-NEXT: S_NOP 0
+# 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, 0, implicit $exec :: (volatile load store seq_cst seq_cst 4 on `float addrspace(1)* undef`)
+ S_DENORM_MODE 0
+...
+
+# GCN-LABEL: name: global_atomic_fmin_x2_rtn_to_s_denorm_mode
+# GCN: GLOBAL_ATOMIC_FMIN_X2_RTN
+# GCN-NEXT: S_NOP 0
+# GCN-NEXT: S_NOP 0
+# GCN-NEXT: S_NOP 0
+# 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, 0, implicit $exec :: (volatile load store seq_cst seq_cst 4 on `float addrspace(1)* undef`)
+ S_DENORM_MODE 0
+...
+
+# GCN-LABEL: name: global_atomic_fcmpswap_saddr_to_s_denorm_mode
+# GCN: GLOBAL_ATOMIC_FCMPSWAP_SADDR
+# GCN-NEXT: S_NOP 0
+# GCN-NEXT: S_NOP 0
+# GCN-NEXT: S_NOP 0
+# GCN-NEXT: S_DENORM_MODE
+---
+name: global_atomic_fcmpswap_saddr_to_s_denorm_mode
+body: |
+ bb.0:
+ GLOBAL_ATOMIC_FCMPSWAP_SADDR undef %0:vreg_64, undef %1:vgpr_32, undef %3:sgpr_64, 0, 0, implicit $exec :: (volatile load store seq_cst seq_cst 4 on `float addrspace(1)* undef`)
+ S_DENORM_MODE 0
+...
+
+# GCN-LABEL: name: global_atomic_fcmpswap_x2_saddr_rtn_to_s_denorm_mode
+# GCN: GLOBAL_ATOMIC_FCMPSWAP_X2_SADDR_RTN
+# GCN-NEXT: S_NOP 0
+# GCN-NEXT: S_NOP 0
+# GCN-NEXT: S_NOP 0
+# 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:vreg_64, undef %1:vreg_64, undef %3:sgpr_64, 0, 0, implicit $exec :: (volatile load store seq_cst seq_cst 4 on `float addrspace(1)* undef`)
+ S_DENORM_MODE 0
+...
+
+# GCN-LABEL: name: global_atomic_fmax_saddr_rtn_to_s_denorm_mode
+# GCN: GLOBAL_ATOMIC_FMAX_SADDR_RTN
+# GCN-NEXT: S_NOP 0
+# GCN-NEXT: S_NOP 0
+# GCN-NEXT: S_NOP 0
+# 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:vreg_64, undef %1:vgpr_32, undef %3:sgpr_64, 0, 0, implicit $exec :: (volatile load store seq_cst seq_cst 4 on `float addrspace(1)* undef`)
+ S_DENORM_MODE 0
+...
+
+# GCN-LABEL: name: global_atomic_fmax_x2_saddr_rtn_to_s_denorm_mode
+# GCN: GLOBAL_ATOMIC_FMAX_X2_SADDR_RTN
+# GCN-NEXT: S_NOP 0
+# GCN-NEXT: S_NOP 0
+# GCN-NEXT: S_NOP 0
+# 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:vreg_64, undef %1:vreg_64, undef %3:sgpr_64, 0, 0, implicit $exec :: (volatile load store seq_cst seq_cst 4 on `float addrspace(1)* undef`)
+ S_DENORM_MODE 0
+...
+
+# GCN-LABEL: name: global_atomic_fmin_saddr_rtn_to_s_denorm_mode
+# GCN: GLOBAL_ATOMIC_FMIN_SADDR_RTN
+# GCN-NEXT: S_NOP 0
+# GCN-NEXT: S_NOP 0
+# GCN-NEXT: S_NOP 0
+# 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:vreg_64, undef %1:vgpr_32, undef %3:sgpr_64, 0, 0, implicit $exec :: (volatile load store seq_cst seq_cst 4 on `float addrspace(1)* undef`)
+ S_DENORM_MODE 0
+...
+
+# GCN-LABEL: name: global_atomic_fmin_x2_saddr_rtn_to_s_denorm_mode
+# GCN: GLOBAL_ATOMIC_FMIN_X2_SADDR_RTN
+# GCN-NEXT: S_NOP 0
+# GCN-NEXT: S_NOP 0
+# GCN-NEXT: S_NOP 0
+# 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:vreg_64, undef %1:vreg_64, undef %3:sgpr_64, 0, 0, implicit $exec :: (volatile load store seq_cst seq_cst 4 on `float addrspace(1)* undef`)
+ S_DENORM_MODE 0
+...
+
+# 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 4 on `float addrspace(1)* undef`)
+ S_WAITCNT 0
+ S_DENORM_MODE 0
+...
+
+# 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 4 on `float addrspace(1)* undef`)
+ %2:vgpr_32 = V_ADD_F32_e32 undef %1:vgpr_32, undef %1:vgpr_32, implicit $exec
+ S_DENORM_MODE 0
+...