Index: llvm/lib/Target/AMDGPU/SIInstrInfo.cpp =================================================================== --- llvm/lib/Target/AMDGPU/SIInstrInfo.cpp +++ llvm/lib/Target/AMDGPU/SIInstrInfo.cpp @@ -116,7 +116,8 @@ // the RA will not attempt rematerialization if mode is set anywhere // in the function, otherwise it is safe since mode is not changed. return !MI.hasImplicitDef() && - MI.getNumImplicitOperands() == MI.getDesc().getNumImplicitUses(); + MI.getNumImplicitOperands() == MI.getDesc().getNumImplicitUses() && + !MI.mayRaiseFPException(); } return false; Index: llvm/lib/Target/AMDGPU/VOP1Instructions.td =================================================================== --- llvm/lib/Target/AMDGPU/VOP1Instructions.td +++ llvm/lib/Target/AMDGPU/VOP1Instructions.td @@ -247,7 +247,6 @@ defm V_CVT_OFF_F32_I4 : VOP1Inst <"v_cvt_off_f32_i4", VOP1_F32_I32>; } // End ReadsModeReg = 0, mayRaiseFPException = 0 } // End SchedRW = [WriteFloatCvt] -} // End isReMaterializable = 1 let ReadsModeReg = 0, mayRaiseFPException = 0 in { defm V_CVT_F32_UBYTE0 : VOP1Inst <"v_cvt_f32_ubyte0", VOP1_F32_I32, AMDGPUcvt_f32_ubyte0>; @@ -298,6 +297,7 @@ defm V_FREXP_EXP_I32_F32 : VOP1Inst <"v_frexp_exp_i32_f32", VOP_I32_F32, int_amdgcn_frexp_exp>; defm V_FREXP_MANT_F32 : VOP1Inst <"v_frexp_mant_f32", VOP_F32_F32, int_amdgcn_frexp_mant>; +} // End isReMaterializable = 1 let VOPAsmPrefer32Bit = 1 in { defm V_CLREXCP : VOP1Inst <"v_clrexcp", VOP_NO_EXT>; @@ -358,6 +358,7 @@ defm V_MOVRELSD_B32 : VOP1Inst <"v_movrelsd_b32", VOP_MOVRELSD>; } // End Uses = [M0, EXEC] +let isReMaterializable = 1 in { let SubtargetPredicate = isGFX6GFX7 in { let TRANS = 1, SchedRW = [WriteTrans32] in { defm V_LOG_CLAMP_F32 : @@ -425,6 +426,7 @@ } // End FPDPRounding = 1 } +} // End isReMaterializable = 1 let OtherPredicates = [Has16BitInsts] in { @@ -456,12 +458,14 @@ let SchedRW = [Write64Bit, Write64Bit]; } - defm V_SAT_PK_U8_I16 : VOP1Inst<"v_sat_pk_u8_i16", VOP_I32_I32>; + let isReMaterializable = 1 in { + defm V_SAT_PK_U8_I16 : VOP1Inst<"v_sat_pk_u8_i16", VOP_I32_I32>; - let mayRaiseFPException = 0 in { - defm V_CVT_NORM_I16_F16 : VOP1Inst<"v_cvt_norm_i16_f16", VOP_I16_F16_SPECIAL_OMOD>; - defm V_CVT_NORM_U16_F16 : VOP1Inst<"v_cvt_norm_u16_f16", VOP_I16_F16_SPECIAL_OMOD>; - } // End mayRaiseFPException = 0 + let mayRaiseFPException = 0 in { + defm V_CVT_NORM_I16_F16 : VOP1Inst<"v_cvt_norm_i16_f16", VOP_I16_F16_SPECIAL_OMOD>; + defm V_CVT_NORM_U16_F16 : VOP1Inst<"v_cvt_norm_u16_f16", VOP_I16_F16_SPECIAL_OMOD>; + } // End mayRaiseFPException = 0 + } // End isReMaterializable = 1 } // End SubtargetPredicate = isGFX9Plus let SubtargetPredicate = isGFX9Only in { Index: llvm/test/CodeGen/AMDGPU/remat-vop.mir =================================================================== --- llvm/test/CodeGen/AMDGPU/remat-vop.mir +++ llvm/test/CodeGen/AMDGPU/remat-vop.mir @@ -168,13 +168,38 @@ body: | bb.0: ; GCN-LABEL: name: test_remat_v_cvt_i32_f64_e32 - ; GCN: dead renamable $vgpr0 = V_CVT_I32_F64_e32 1, implicit $exec, implicit $mode - ; GCN: renamable $vgpr1 = V_CVT_I32_F64_e32 2, implicit $exec, implicit $mode - ; GCN: dead renamable $vgpr0 = V_CVT_I32_F64_e32 3, implicit $exec, implicit $mode - ; GCN: renamable $vgpr0 = V_CVT_I32_F64_e32 1, implicit $exec, implicit $mode + ; GCN: renamable $vgpr0 = nofpexcept V_CVT_I32_F64_e32 1, implicit $exec, implicit $mode + ; GCN: renamable $vgpr1 = nofpexcept V_CVT_I32_F64_e32 2, implicit $exec, implicit $mode ; GCN: S_NOP 0, implicit killed renamable $vgpr0 ; GCN: S_NOP 0, implicit killed renamable $vgpr1 + ; GCN: renamable $vgpr0 = nofpexcept V_CVT_I32_F64_e32 3, implicit $exec, implicit $mode + ; GCN: S_NOP 0, implicit killed renamable $vgpr0 + ; GCN: S_ENDPGM 0 + %0:vgpr_32 = nofpexcept V_CVT_I32_F64_e32 1, implicit $exec, implicit $mode + %1:vgpr_32 = nofpexcept V_CVT_I32_F64_e32 2, implicit $exec, implicit $mode + %2:vgpr_32 = nofpexcept V_CVT_I32_F64_e32 3, implicit $exec, implicit $mode + S_NOP 0, implicit %0 + S_NOP 0, implicit %1 + S_NOP 0, implicit %2 + S_ENDPGM 0 +... +--- +machineFunctionInfo: + stackPtrOffsetReg: $sgpr32 +name: test_no_remat_v_cvt_i32_f64_e32_fp_except +tracksRegLiveness: true +body: | + bb.0: + ; GCN-LABEL: name: test_no_remat_v_cvt_i32_f64_e32_fp_except + ; GCN: renamable $vgpr0 = V_CVT_I32_F64_e32 1, implicit $exec, implicit $mode + ; GCN: SI_SPILL_V32_SAVE killed $vgpr0, %stack.1, $sgpr32, 0, implicit $exec :: (store (s32) into %stack.1, addrspace 5) + ; GCN: renamable $vgpr1 = V_CVT_I32_F64_e32 2, implicit $exec, implicit $mode ; GCN: renamable $vgpr0 = V_CVT_I32_F64_e32 3, implicit $exec, implicit $mode + ; GCN: SI_SPILL_V32_SAVE killed $vgpr0, %stack.0, $sgpr32, 0, implicit $exec :: (store (s32) into %stack.0, addrspace 5) + ; GCN: renamable $vgpr0 = SI_SPILL_V32_RESTORE %stack.1, $sgpr32, 0, implicit $exec :: (load (s32) from %stack.1, addrspace 5) + ; GCN: S_NOP 0, implicit killed renamable $vgpr0 + ; GCN: S_NOP 0, implicit killed renamable $vgpr1 + ; GCN: renamable $vgpr0 = SI_SPILL_V32_RESTORE %stack.0, $sgpr32, 0, implicit $exec :: (load (s32) from %stack.0, addrspace 5) ; GCN: S_NOP 0, implicit killed renamable $vgpr0 ; GCN: S_ENDPGM 0 %0:vgpr_32 = V_CVT_I32_F64_e32 1, implicit $exec, implicit $mode @@ -195,10 +220,10 @@ bb.0: ; GCN-LABEL: name: test_no_remat_v_cvt_i32_f64_e32_mode_def ; GCN: $mode = IMPLICIT_DEF - ; GCN: renamable $vgpr0 = V_CVT_I32_F64_e32 1, implicit $exec, implicit $mode + ; GCN: renamable $vgpr0 = nofpexcept V_CVT_I32_F64_e32 1, implicit $exec, implicit $mode ; GCN: SI_SPILL_V32_SAVE killed $vgpr0, %stack.1, $sgpr32, 0, implicit $exec :: (store (s32) into %stack.1, addrspace 5) - ; GCN: renamable $vgpr1 = V_CVT_I32_F64_e32 2, implicit $exec, implicit $mode - ; GCN: renamable $vgpr0 = V_CVT_I32_F64_e32 3, implicit $exec, implicit $mode + ; GCN: renamable $vgpr1 = nofpexcept V_CVT_I32_F64_e32 2, implicit $exec, implicit $mode + ; GCN: renamable $vgpr0 = nofpexcept V_CVT_I32_F64_e32 3, implicit $exec, implicit $mode ; GCN: SI_SPILL_V32_SAVE killed $vgpr0, %stack.0, $sgpr32, 0, implicit $exec :: (store (s32) into %stack.0, addrspace 5) ; GCN: renamable $vgpr0 = SI_SPILL_V32_RESTORE %stack.1, $sgpr32, 0, implicit $exec :: (load (s32) from %stack.1, addrspace 5) ; GCN: S_NOP 0, implicit killed renamable $vgpr0 @@ -207,9 +232,9 @@ ; GCN: S_NOP 0, implicit killed renamable $vgpr0 ; GCN: S_ENDPGM 0 $mode = IMPLICIT_DEF - %0:vgpr_32 = V_CVT_I32_F64_e32 1, implicit $exec, implicit $mode - %1:vgpr_32 = V_CVT_I32_F64_e32 2, implicit $exec, implicit $mode - %2:vgpr_32 = V_CVT_I32_F64_e32 3, implicit $exec, implicit $mode + %0:vgpr_32 = nofpexcept V_CVT_I32_F64_e32 1, implicit $exec, implicit $mode + %1:vgpr_32 = nofpexcept V_CVT_I32_F64_e32 2, implicit $exec, implicit $mode + %2:vgpr_32 = nofpexcept V_CVT_I32_F64_e32 3, implicit $exec, implicit $mode S_NOP 0, implicit %0 S_NOP 0, implicit %1 S_NOP 0, implicit %2 @@ -221,18 +246,16 @@ body: | bb.0: ; GCN-LABEL: name: test_remat_v_cvt_i32_f64_e64 - ; GCN: dead renamable $vgpr0 = V_CVT_I32_F64_e64 0, 1, 0, 0, implicit $exec, implicit $mode - ; GCN: renamable $vgpr1 = V_CVT_I32_F64_e64 0, 2, 0, 0, implicit $exec, implicit $mode - ; GCN: dead renamable $vgpr0 = V_CVT_I32_F64_e64 0, 3, 0, 0, implicit $exec, implicit $mode - ; GCN: renamable $vgpr0 = V_CVT_I32_F64_e64 0, 1, 0, 0, implicit $exec, implicit $mode + ; GCN: renamable $vgpr0 = nofpexcept V_CVT_I32_F64_e64 0, 1, 0, 0, implicit $exec, implicit $mode + ; GCN: renamable $vgpr1 = nofpexcept V_CVT_I32_F64_e64 0, 2, 0, 0, implicit $exec, implicit $mode ; GCN: S_NOP 0, implicit killed renamable $vgpr0 ; GCN: S_NOP 0, implicit killed renamable $vgpr1 - ; GCN: renamable $vgpr0 = V_CVT_I32_F64_e64 0, 3, 0, 0, implicit $exec, implicit $mode + ; GCN: renamable $vgpr0 = nofpexcept V_CVT_I32_F64_e64 0, 3, 0, 0, implicit $exec, implicit $mode ; GCN: S_NOP 0, implicit killed renamable $vgpr0 ; GCN: S_ENDPGM 0 - %0:vgpr_32 = V_CVT_I32_F64_e64 0, 1, 0, 0, implicit $exec, implicit $mode - %1:vgpr_32 = V_CVT_I32_F64_e64 0, 2, 0, 0, implicit $exec, implicit $mode - %2:vgpr_32 = V_CVT_I32_F64_e64 0, 3, 0, 0, implicit $exec, implicit $mode + %0:vgpr_32 = nofpexcept V_CVT_I32_F64_e64 0, 1, 0, 0, implicit $exec, implicit $mode + %1:vgpr_32 = nofpexcept V_CVT_I32_F64_e64 0, 2, 0, 0, implicit $exec, implicit $mode + %2:vgpr_32 = nofpexcept V_CVT_I32_F64_e64 0, 3, 0, 0, implicit $exec, implicit $mode S_NOP 0, implicit %0 S_NOP 0, implicit %1 S_NOP 0, implicit %2 @@ -246,18 +269,16 @@ body: | bb.0: ; GCN-LABEL: name: test_remat_v_cvt_i32_f64_e64_undef - ; GCN: dead renamable $vgpr0 = V_CVT_I32_F64_e64 0, undef $vgpr0_vgpr1, 0, 0, implicit $exec, implicit $mode - ; GCN: renamable $vgpr1 = V_CVT_I32_F64_e64 0, undef $vgpr0_vgpr1, 0, 0, implicit $exec, implicit $mode - ; GCN: dead renamable $vgpr0 = V_CVT_I32_F64_e64 0, undef $vgpr0_vgpr1, 0, 0, implicit $exec, implicit $mode - ; GCN: renamable $vgpr0 = V_CVT_I32_F64_e64 0, undef $vgpr0_vgpr1, 0, 0, implicit $exec, implicit $mode + ; GCN: renamable $vgpr0 = nofpexcept V_CVT_I32_F64_e64 0, undef $vgpr0_vgpr1, 0, 0, implicit $exec, implicit $mode + ; GCN: renamable $vgpr1 = nofpexcept V_CVT_I32_F64_e64 0, undef $vgpr0_vgpr1, 0, 0, implicit $exec, implicit $mode ; GCN: S_NOP 0, implicit killed renamable $vgpr0 ; GCN: S_NOP 0, implicit killed renamable $vgpr1 - ; GCN: renamable $vgpr0 = V_CVT_I32_F64_e64 0, undef $vgpr0_vgpr1, 0, 0, implicit $exec, implicit $mode + ; GCN: renamable $vgpr0 = nofpexcept V_CVT_I32_F64_e64 0, undef $vgpr0_vgpr1, 0, 0, implicit $exec, implicit $mode ; GCN: S_NOP 0, implicit killed renamable $vgpr0 ; GCN: S_ENDPGM 0 - %1:vgpr_32 = V_CVT_I32_F64_e64 0, undef %0:vreg_64, 0, 0, implicit $exec, implicit $mode - %2:vgpr_32 = V_CVT_I32_F64_e64 0, undef %0:vreg_64, 0, 0, implicit $exec, implicit $mode - %3:vgpr_32 = V_CVT_I32_F64_e64 0, undef %0:vreg_64, 0, 0, implicit $exec, implicit $mode + %1:vgpr_32 = nofpexcept V_CVT_I32_F64_e64 0, undef %0:vreg_64, 0, 0, implicit $exec, implicit $mode + %2:vgpr_32 = nofpexcept V_CVT_I32_F64_e64 0, undef %0:vreg_64, 0, 0, implicit $exec, implicit $mode + %3:vgpr_32 = nofpexcept V_CVT_I32_F64_e64 0, undef %0:vreg_64, 0, 0, implicit $exec, implicit $mode S_NOP 0, implicit %1 S_NOP 0, implicit %2 S_NOP 0, implicit %3 @@ -371,18 +392,16 @@ body: | bb.0: ; GCN-LABEL: name: test_remat_v_cvt_f32_f64_e32 - ; GCN: dead renamable $vgpr0 = V_CVT_F32_F64_e32 1, implicit $exec, implicit $mode - ; GCN: renamable $vgpr1 = V_CVT_F32_F64_e32 2, implicit $exec, implicit $mode - ; GCN: dead renamable $vgpr0 = V_CVT_F32_F64_e32 3, implicit $exec, implicit $mode - ; GCN: renamable $vgpr0 = V_CVT_F32_F64_e32 1, implicit $exec, implicit $mode + ; GCN: renamable $vgpr0 = nofpexcept V_CVT_F32_F64_e32 1, implicit $exec, implicit $mode + ; GCN: renamable $vgpr1 = nofpexcept V_CVT_F32_F64_e32 2, implicit $exec, implicit $mode ; GCN: S_NOP 0, implicit killed renamable $vgpr0 ; GCN: S_NOP 0, implicit killed renamable $vgpr1 - ; GCN: renamable $vgpr0 = V_CVT_F32_F64_e32 3, implicit $exec, implicit $mode + ; GCN: renamable $vgpr0 = nofpexcept V_CVT_F32_F64_e32 3, implicit $exec, implicit $mode ; GCN: S_NOP 0, implicit killed renamable $vgpr0 ; GCN: S_ENDPGM 0 - %0:vgpr_32 = V_CVT_F32_F64_e32 1, implicit $exec, implicit $mode - %1:vgpr_32 = V_CVT_F32_F64_e32 2, implicit $exec, implicit $mode - %2:vgpr_32 = V_CVT_F32_F64_e32 3, implicit $exec, implicit $mode + %0:vgpr_32 = nofpexcept V_CVT_F32_F64_e32 1, implicit $exec, implicit $mode + %1:vgpr_32 = nofpexcept V_CVT_F32_F64_e32 2, implicit $exec, implicit $mode + %2:vgpr_32 = nofpexcept V_CVT_F32_F64_e32 3, implicit $exec, implicit $mode S_NOP 0, implicit %0 S_NOP 0, implicit %1 S_NOP 0, implicit %2 @@ -394,18 +413,16 @@ body: | bb.0: ; GCN-LABEL: name: test_remat_v_cvt_f64_f32_e32 - ; GCN: dead renamable $vgpr0_vgpr1 = V_CVT_F64_F32_e32 1, implicit $exec, implicit $mode - ; GCN: renamable $vgpr2_vgpr3 = V_CVT_F64_F32_e32 2, implicit $exec, implicit $mode - ; GCN: dead renamable $vgpr0_vgpr1 = V_CVT_F64_F32_e32 3, implicit $exec, implicit $mode - ; GCN: renamable $vgpr0_vgpr1 = V_CVT_F64_F32_e32 1, implicit $exec, implicit $mode + ; GCN: renamable $vgpr0_vgpr1 = nofpexcept V_CVT_F64_F32_e32 1, implicit $exec, implicit $mode + ; GCN: renamable $vgpr2_vgpr3 = nofpexcept V_CVT_F64_F32_e32 2, implicit $exec, implicit $mode ; GCN: S_NOP 0, implicit killed renamable $vgpr0_vgpr1 ; GCN: S_NOP 0, implicit killed renamable $vgpr2_vgpr3 - ; GCN: renamable $vgpr0_vgpr1 = V_CVT_F64_F32_e32 3, implicit $exec, implicit $mode + ; GCN: renamable $vgpr0_vgpr1 = nofpexcept V_CVT_F64_F32_e32 3, implicit $exec, implicit $mode ; GCN: S_NOP 0, implicit killed renamable $vgpr0_vgpr1 ; GCN: S_ENDPGM 0 - %0:vreg_64_align2 = V_CVT_F64_F32_e32 1, implicit $exec, implicit $mode - %1:vreg_64_align2 = V_CVT_F64_F32_e32 2, implicit $exec, implicit $mode - %2:vreg_64_align2 = V_CVT_F64_F32_e32 3, implicit $exec, implicit $mode + %0:vreg_64_align2 = nofpexcept V_CVT_F64_F32_e32 1, implicit $exec, implicit $mode + %1:vreg_64_align2 = nofpexcept V_CVT_F64_F32_e32 2, implicit $exec, implicit $mode + %2:vreg_64_align2 = nofpexcept V_CVT_F64_F32_e32 3, implicit $exec, implicit $mode S_NOP 0, implicit %0 S_NOP 0, implicit %1 S_NOP 0, implicit %2 @@ -417,18 +434,16 @@ body: | bb.0: ; GCN-LABEL: name: test_remat_v_cvt_u32_f64_e32 - ; GCN: dead renamable $vgpr0 = V_CVT_U32_F64_e32 1, implicit $exec, implicit $mode - ; GCN: renamable $vgpr1 = V_CVT_U32_F64_e32 2, implicit $exec, implicit $mode - ; GCN: dead renamable $vgpr0 = V_CVT_U32_F64_e32 3, implicit $exec, implicit $mode - ; GCN: renamable $vgpr0 = V_CVT_U32_F64_e32 1, implicit $exec, implicit $mode + ; GCN: renamable $vgpr0 = nofpexcept V_CVT_U32_F64_e32 1, implicit $exec, implicit $mode + ; GCN: renamable $vgpr1 = nofpexcept V_CVT_U32_F64_e32 2, implicit $exec, implicit $mode ; GCN: S_NOP 0, implicit killed renamable $vgpr0 ; GCN: S_NOP 0, implicit killed renamable $vgpr1 - ; GCN: renamable $vgpr0 = V_CVT_U32_F64_e32 3, implicit $exec, implicit $mode + ; GCN: renamable $vgpr0 = nofpexcept V_CVT_U32_F64_e32 3, implicit $exec, implicit $mode ; GCN: S_NOP 0, implicit killed renamable $vgpr0 ; GCN: S_ENDPGM 0 - %0:vgpr_32 = V_CVT_U32_F64_e32 1, implicit $exec, implicit $mode - %1:vgpr_32 = V_CVT_U32_F64_e32 2, implicit $exec, implicit $mode - %2:vgpr_32 = V_CVT_U32_F64_e32 3, implicit $exec, implicit $mode + %0:vgpr_32 = nofpexcept V_CVT_U32_F64_e32 1, implicit $exec, implicit $mode + %1:vgpr_32 = nofpexcept V_CVT_U32_F64_e32 2, implicit $exec, implicit $mode + %2:vgpr_32 = nofpexcept V_CVT_U32_F64_e32 3, implicit $exec, implicit $mode S_NOP 0, implicit %0 S_NOP 0, implicit %1 S_NOP 0, implicit %2 @@ -553,18 +568,16 @@ body: | bb.0: ; GCN-LABEL: name: test_remat_v_cvt_u32_f32_e32 - ; GCN: dead renamable $vgpr0 = V_CVT_U32_F32_e32 1, implicit $exec, implicit $mode - ; GCN: renamable $vgpr1 = V_CVT_U32_F32_e32 2, implicit $exec, implicit $mode - ; GCN: dead renamable $vgpr0 = V_CVT_U32_F32_e32 3, implicit $exec, implicit $mode - ; GCN: renamable $vgpr0 = V_CVT_U32_F32_e32 1, implicit $exec, implicit $mode + ; GCN: renamable $vgpr0 = nofpexcept V_CVT_U32_F32_e32 1, implicit $exec, implicit $mode + ; GCN: renamable $vgpr1 = nofpexcept V_CVT_U32_F32_e32 2, implicit $exec, implicit $mode ; GCN: S_NOP 0, implicit killed renamable $vgpr0 ; GCN: S_NOP 0, implicit killed renamable $vgpr1 - ; GCN: renamable $vgpr0 = V_CVT_U32_F32_e32 3, implicit $exec, implicit $mode + ; GCN: renamable $vgpr0 = nofpexcept V_CVT_U32_F32_e32 3, implicit $exec, implicit $mode ; GCN: S_NOP 0, implicit killed renamable $vgpr0 ; GCN: S_ENDPGM 0 - %0:vgpr_32 = V_CVT_U32_F32_e32 1, implicit $exec, implicit $mode - %1:vgpr_32 = V_CVT_U32_F32_e32 2, implicit $exec, implicit $mode - %2:vgpr_32 = V_CVT_U32_F32_e32 3, implicit $exec, implicit $mode + %0:vgpr_32 = nofpexcept V_CVT_U32_F32_e32 1, implicit $exec, implicit $mode + %1:vgpr_32 = nofpexcept V_CVT_U32_F32_e32 2, implicit $exec, implicit $mode + %2:vgpr_32 = nofpexcept V_CVT_U32_F32_e32 3, implicit $exec, implicit $mode S_NOP 0, implicit %0 S_NOP 0, implicit %1 S_NOP 0, implicit %2 @@ -576,18 +589,16 @@ body: | bb.0: ; GCN-LABEL: name: test_remat_v_cvt_i32_f32_e32 - ; GCN: dead renamable $vgpr0 = V_CVT_I32_F32_e32 1, implicit $exec, implicit $mode - ; GCN: renamable $vgpr1 = V_CVT_I32_F32_e32 2, implicit $exec, implicit $mode - ; GCN: dead renamable $vgpr0 = V_CVT_I32_F32_e32 3, implicit $exec, implicit $mode - ; GCN: renamable $vgpr0 = V_CVT_I32_F32_e32 1, implicit $exec, implicit $mode + ; GCN: renamable $vgpr0 = nofpexcept V_CVT_I32_F32_e32 1, implicit $exec, implicit $mode + ; GCN: renamable $vgpr1 = nofpexcept V_CVT_I32_F32_e32 2, implicit $exec, implicit $mode ; GCN: S_NOP 0, implicit killed renamable $vgpr0 ; GCN: S_NOP 0, implicit killed renamable $vgpr1 - ; GCN: renamable $vgpr0 = V_CVT_I32_F32_e32 3, implicit $exec, implicit $mode + ; GCN: renamable $vgpr0 = nofpexcept V_CVT_I32_F32_e32 3, implicit $exec, implicit $mode ; GCN: S_NOP 0, implicit killed renamable $vgpr0 ; GCN: S_ENDPGM 0 - %0:vgpr_32 = V_CVT_I32_F32_e32 1, implicit $exec, implicit $mode - %1:vgpr_32 = V_CVT_I32_F32_e32 2, implicit $exec, implicit $mode - %2:vgpr_32 = V_CVT_I32_F32_e32 3, implicit $exec, implicit $mode + %0:vgpr_32 = nofpexcept V_CVT_I32_F32_e32 1, implicit $exec, implicit $mode + %1:vgpr_32 = nofpexcept V_CVT_I32_F32_e32 2, implicit $exec, implicit $mode + %2:vgpr_32 = nofpexcept V_CVT_I32_F32_e32 3, implicit $exec, implicit $mode S_NOP 0, implicit %0 S_NOP 0, implicit %1 S_NOP 0, implicit %2 @@ -599,18 +610,16 @@ body: | bb.0: ; GCN-LABEL: name: test_remat_v_cvt_f16_f32_e32 - ; GCN: dead renamable $vgpr0 = V_CVT_F16_F32_e32 1, implicit $exec, implicit $mode - ; GCN: renamable $vgpr1 = V_CVT_F16_F32_e32 2, implicit $exec, implicit $mode - ; GCN: dead renamable $vgpr0 = V_CVT_F16_F32_e32 3, implicit $exec, implicit $mode - ; GCN: renamable $vgpr0 = V_CVT_F16_F32_e32 1, implicit $exec, implicit $mode + ; GCN: renamable $vgpr0 = nofpexcept V_CVT_F16_F32_e32 1, implicit $exec, implicit $mode + ; GCN: renamable $vgpr1 = nofpexcept V_CVT_F16_F32_e32 2, implicit $exec, implicit $mode ; GCN: S_NOP 0, implicit killed renamable $vgpr0 ; GCN: S_NOP 0, implicit killed renamable $vgpr1 - ; GCN: renamable $vgpr0 = V_CVT_F16_F32_e32 3, implicit $exec, implicit $mode + ; GCN: renamable $vgpr0 = nofpexcept V_CVT_F16_F32_e32 3, implicit $exec, implicit $mode ; GCN: S_NOP 0, implicit killed renamable $vgpr0 ; GCN: S_ENDPGM 0 - %0:vgpr_32 = V_CVT_F16_F32_e32 1, implicit $exec, implicit $mode - %1:vgpr_32 = V_CVT_F16_F32_e32 2, implicit $exec, implicit $mode - %2:vgpr_32 = V_CVT_F16_F32_e32 3, implicit $exec, implicit $mode + %0:vgpr_32 = nofpexcept V_CVT_F16_F32_e32 1, implicit $exec, implicit $mode + %1:vgpr_32 = nofpexcept V_CVT_F16_F32_e32 2, implicit $exec, implicit $mode + %2:vgpr_32 = nofpexcept V_CVT_F16_F32_e32 3, implicit $exec, implicit $mode S_NOP 0, implicit %0 S_NOP 0, implicit %1 S_NOP 0, implicit %2 @@ -622,18 +631,16 @@ body: | bb.0: ; GCN-LABEL: name: test_remat_v_cvt_f32_f16_e32 - ; GCN: dead renamable $vgpr0 = V_CVT_F32_F16_e32 1, implicit $exec, implicit $mode - ; GCN: renamable $vgpr1 = V_CVT_F32_F16_e32 2, implicit $exec, implicit $mode - ; GCN: dead renamable $vgpr0 = V_CVT_F32_F16_e32 3, implicit $exec, implicit $mode - ; GCN: renamable $vgpr0 = V_CVT_F32_F16_e32 1, implicit $exec, implicit $mode + ; GCN: renamable $vgpr0 = nofpexcept V_CVT_F32_F16_e32 1, implicit $exec, implicit $mode + ; GCN: renamable $vgpr1 = nofpexcept V_CVT_F32_F16_e32 2, implicit $exec, implicit $mode ; GCN: S_NOP 0, implicit killed renamable $vgpr0 ; GCN: S_NOP 0, implicit killed renamable $vgpr1 - ; GCN: renamable $vgpr0 = V_CVT_F32_F16_e32 3, implicit $exec, implicit $mode + ; GCN: renamable $vgpr0 = nofpexcept V_CVT_F32_F16_e32 3, implicit $exec, implicit $mode ; GCN: S_NOP 0, implicit killed renamable $vgpr0 ; GCN: S_ENDPGM 0 - %0:vgpr_32 = V_CVT_F32_F16_e32 1, implicit $exec, implicit $mode - %1:vgpr_32 = V_CVT_F32_F16_e32 2, implicit $exec, implicit $mode - %2:vgpr_32 = V_CVT_F32_F16_e32 3, implicit $exec, implicit $mode + %0:vgpr_32 = nofpexcept V_CVT_F32_F16_e32 1, implicit $exec, implicit $mode + %1:vgpr_32 = nofpexcept V_CVT_F32_F16_e32 2, implicit $exec, implicit $mode + %2:vgpr_32 = nofpexcept V_CVT_F32_F16_e32 3, implicit $exec, implicit $mode S_NOP 0, implicit %0 S_NOP 0, implicit %1 S_NOP 0, implicit %2 @@ -702,3 +709,1074 @@ S_NOP 0, implicit %2 S_ENDPGM 0 ... +--- +name: test_remat_v_cvt_f32_ubyte0_e32 +tracksRegLiveness: true +body: | + bb.0: + ; GCN-LABEL: name: test_remat_v_cvt_f32_ubyte0_e32 + ; GCN: renamable $vgpr0 = V_CVT_F32_UBYTE0_e32 1, implicit $exec, implicit $mode + ; GCN: renamable $vgpr1 = V_CVT_F32_UBYTE0_e32 2, implicit $exec, implicit $mode + ; GCN: S_NOP 0, implicit killed renamable $vgpr0 + ; GCN: S_NOP 0, implicit killed renamable $vgpr1 + ; GCN: renamable $vgpr0 = V_CVT_F32_UBYTE0_e32 3, implicit $exec, implicit $mode + ; GCN: S_NOP 0, implicit killed renamable $vgpr0 + ; GCN: S_ENDPGM 0 + %0:vgpr_32 = V_CVT_F32_UBYTE0_e32 1, implicit $exec, implicit $mode + %1:vgpr_32 = V_CVT_F32_UBYTE0_e32 2, implicit $exec, implicit $mode + %2:vgpr_32 = V_CVT_F32_UBYTE0_e32 3, implicit $exec, implicit $mode + S_NOP 0, implicit %0 + S_NOP 0, implicit %1 + S_NOP 0, implicit %2 + S_ENDPGM 0 +... +--- +name: test_remat_v_fract_f32_e32 +tracksRegLiveness: true +body: | + bb.0: + ; GCN-LABEL: name: test_remat_v_fract_f32_e32 + ; GCN: renamable $vgpr0 = nofpexcept V_FRACT_F32_e32 1, implicit $exec, implicit $mode + ; GCN: renamable $vgpr1 = nofpexcept V_FRACT_F32_e32 2, implicit $exec, implicit $mode + ; GCN: S_NOP 0, implicit killed renamable $vgpr0 + ; GCN: S_NOP 0, implicit killed renamable $vgpr1 + ; GCN: renamable $vgpr0 = nofpexcept V_FRACT_F32_e32 3, implicit $exec, implicit $mode + ; GCN: S_NOP 0, implicit killed renamable $vgpr0 + ; GCN: S_ENDPGM 0 + %0:vgpr_32 = nofpexcept V_FRACT_F32_e32 1, implicit $exec, implicit $mode + %1:vgpr_32 = nofpexcept V_FRACT_F32_e32 2, implicit $exec, implicit $mode + %2:vgpr_32 = nofpexcept V_FRACT_F32_e32 3, implicit $exec, implicit $mode + S_NOP 0, implicit %0 + S_NOP 0, implicit %1 + S_NOP 0, implicit %2 + S_ENDPGM 0 +... +--- +name: test_remat_v_trunc_f32_e32 +tracksRegLiveness: true +body: | + bb.0: + ; GCN-LABEL: name: test_remat_v_trunc_f32_e32 + ; GCN: renamable $vgpr0 = nofpexcept V_TRUNC_F32_e32 1, implicit $exec, implicit $mode + ; GCN: renamable $vgpr1 = nofpexcept V_TRUNC_F32_e32 2, implicit $exec, implicit $mode + ; GCN: S_NOP 0, implicit killed renamable $vgpr0 + ; GCN: S_NOP 0, implicit killed renamable $vgpr1 + ; GCN: renamable $vgpr0 = nofpexcept V_TRUNC_F32_e32 3, implicit $exec, implicit $mode + ; GCN: S_NOP 0, implicit killed renamable $vgpr0 + ; GCN: S_ENDPGM 0 + %0:vgpr_32 = nofpexcept V_TRUNC_F32_e32 1, implicit $exec, implicit $mode + %1:vgpr_32 = nofpexcept V_TRUNC_F32_e32 2, implicit $exec, implicit $mode + %2:vgpr_32 = nofpexcept V_TRUNC_F32_e32 3, implicit $exec, implicit $mode + S_NOP 0, implicit %0 + S_NOP 0, implicit %1 + S_NOP 0, implicit %2 + S_ENDPGM 0 +... +--- +name: test_remat_v_ceil_f32_e32 +tracksRegLiveness: true +body: | + bb.0: + ; GCN-LABEL: name: test_remat_v_ceil_f32_e32 + ; GCN: renamable $vgpr0 = nofpexcept V_CEIL_F32_e32 1, implicit $exec, implicit $mode + ; GCN: renamable $vgpr1 = nofpexcept V_CEIL_F32_e32 2, implicit $exec, implicit $mode + ; GCN: S_NOP 0, implicit killed renamable $vgpr0 + ; GCN: S_NOP 0, implicit killed renamable $vgpr1 + ; GCN: renamable $vgpr0 = nofpexcept V_CEIL_F32_e32 3, implicit $exec, implicit $mode + ; GCN: S_NOP 0, implicit killed renamable $vgpr0 + ; GCN: S_ENDPGM 0 + %0:vgpr_32 = nofpexcept V_CEIL_F32_e32 1, implicit $exec, implicit $mode + %1:vgpr_32 = nofpexcept V_CEIL_F32_e32 2, implicit $exec, implicit $mode + %2:vgpr_32 = nofpexcept V_CEIL_F32_e32 3, implicit $exec, implicit $mode + S_NOP 0, implicit %0 + S_NOP 0, implicit %1 + S_NOP 0, implicit %2 + S_ENDPGM 0 +... +--- +name: test_remat_v_rndne_f32_e32 +tracksRegLiveness: true +body: | + bb.0: + ; GCN-LABEL: name: test_remat_v_rndne_f32_e32 + ; GCN: renamable $vgpr0 = nofpexcept V_RNDNE_F32_e32 1, implicit $exec, implicit $mode + ; GCN: renamable $vgpr1 = nofpexcept V_RNDNE_F32_e32 2, implicit $exec, implicit $mode + ; GCN: S_NOP 0, implicit killed renamable $vgpr0 + ; GCN: S_NOP 0, implicit killed renamable $vgpr1 + ; GCN: renamable $vgpr0 = nofpexcept V_RNDNE_F32_e32 3, implicit $exec, implicit $mode + ; GCN: S_NOP 0, implicit killed renamable $vgpr0 + ; GCN: S_ENDPGM 0 + %0:vgpr_32 = nofpexcept V_RNDNE_F32_e32 1, implicit $exec, implicit $mode + %1:vgpr_32 = nofpexcept V_RNDNE_F32_e32 2, implicit $exec, implicit $mode + %2:vgpr_32 = nofpexcept V_RNDNE_F32_e32 3, implicit $exec, implicit $mode + S_NOP 0, implicit %0 + S_NOP 0, implicit %1 + S_NOP 0, implicit %2 + S_ENDPGM 0 +... +--- +name: test_remat_v_floor_f32_e32 +tracksRegLiveness: true +body: | + bb.0: + ; GCN-LABEL: name: test_remat_v_floor_f32_e32 + ; GCN: renamable $vgpr0 = nofpexcept V_FLOOR_F32_e32 1, implicit $exec, implicit $mode + ; GCN: renamable $vgpr1 = nofpexcept V_FLOOR_F32_e32 2, implicit $exec, implicit $mode + ; GCN: S_NOP 0, implicit killed renamable $vgpr0 + ; GCN: S_NOP 0, implicit killed renamable $vgpr1 + ; GCN: renamable $vgpr0 = nofpexcept V_FLOOR_F32_e32 3, implicit $exec, implicit $mode + ; GCN: S_NOP 0, implicit killed renamable $vgpr0 + ; GCN: S_ENDPGM 0 + %0:vgpr_32 = nofpexcept V_FLOOR_F32_e32 1, implicit $exec, implicit $mode + %1:vgpr_32 = nofpexcept V_FLOOR_F32_e32 2, implicit $exec, implicit $mode + %2:vgpr_32 = nofpexcept V_FLOOR_F32_e32 3, implicit $exec, implicit $mode + S_NOP 0, implicit %0 + S_NOP 0, implicit %1 + S_NOP 0, implicit %2 + S_ENDPGM 0 +... +--- +name: test_remat_v_exp_f32_e32 +tracksRegLiveness: true +body: | + bb.0: + ; GCN-LABEL: name: test_remat_v_exp_f32_e32 + ; GCN: renamable $vgpr0 = nofpexcept V_EXP_F32_e32 1, implicit $exec, implicit $mode + ; GCN: renamable $vgpr1 = nofpexcept V_EXP_F32_e32 2, implicit $exec, implicit $mode + ; GCN: S_NOP 0, implicit killed renamable $vgpr0 + ; GCN: S_NOP 0, implicit killed renamable $vgpr1 + ; GCN: renamable $vgpr0 = nofpexcept V_EXP_F32_e32 3, implicit $exec, implicit $mode + ; GCN: S_NOP 0, implicit killed renamable $vgpr0 + ; GCN: S_ENDPGM 0 + %0:vgpr_32 = nofpexcept V_EXP_F32_e32 1, implicit $exec, implicit $mode + %1:vgpr_32 = nofpexcept V_EXP_F32_e32 2, implicit $exec, implicit $mode + %2:vgpr_32 = nofpexcept V_EXP_F32_e32 3, implicit $exec, implicit $mode + S_NOP 0, implicit %0 + S_NOP 0, implicit %1 + S_NOP 0, implicit %2 + S_ENDPGM 0 +... +--- +name: test_remat_v_log_f32_e32 +tracksRegLiveness: true +body: | + bb.0: + ; GCN-LABEL: name: test_remat_v_log_f32_e32 + ; GCN: renamable $vgpr0 = nofpexcept V_LOG_F32_e32 1, implicit $exec, implicit $mode + ; GCN: renamable $vgpr1 = nofpexcept V_LOG_F32_e32 2, implicit $exec, implicit $mode + ; GCN: S_NOP 0, implicit killed renamable $vgpr0 + ; GCN: S_NOP 0, implicit killed renamable $vgpr1 + ; GCN: renamable $vgpr0 = nofpexcept V_LOG_F32_e32 3, implicit $exec, implicit $mode + ; GCN: S_NOP 0, implicit killed renamable $vgpr0 + ; GCN: S_ENDPGM 0 + %0:vgpr_32 = nofpexcept V_LOG_F32_e32 1, implicit $exec, implicit $mode + %1:vgpr_32 = nofpexcept V_LOG_F32_e32 2, implicit $exec, implicit $mode + %2:vgpr_32 = nofpexcept V_LOG_F32_e32 3, implicit $exec, implicit $mode + S_NOP 0, implicit %0 + S_NOP 0, implicit %1 + S_NOP 0, implicit %2 + S_ENDPGM 0 +... +--- +name: test_remat_v_rcp_f32_e32 +tracksRegLiveness: true +body: | + bb.0: + ; GCN-LABEL: name: test_remat_v_rcp_f32_e32 + ; GCN: renamable $vgpr0 = nofpexcept V_RCP_F32_e32 1, implicit $exec, implicit $mode + ; GCN: renamable $vgpr1 = nofpexcept V_RCP_F32_e32 2, implicit $exec, implicit $mode + ; GCN: S_NOP 0, implicit killed renamable $vgpr0 + ; GCN: S_NOP 0, implicit killed renamable $vgpr1 + ; GCN: renamable $vgpr0 = nofpexcept V_RCP_F32_e32 3, implicit $exec, implicit $mode + ; GCN: S_NOP 0, implicit killed renamable $vgpr0 + ; GCN: S_ENDPGM 0 + %0:vgpr_32 = nofpexcept V_RCP_F32_e32 1, implicit $exec, implicit $mode + %1:vgpr_32 = nofpexcept V_RCP_F32_e32 2, implicit $exec, implicit $mode + %2:vgpr_32 = nofpexcept V_RCP_F32_e32 3, implicit $exec, implicit $mode + S_NOP 0, implicit %0 + S_NOP 0, implicit %1 + S_NOP 0, implicit %2 + S_ENDPGM 0 +... +--- +name: test_remat_v_rcp_iflag_f32_e32 +tracksRegLiveness: true +body: | + bb.0: + ; GCN-LABEL: name: test_remat_v_rcp_iflag_f32_e32 + ; GCN: renamable $vgpr0 = nofpexcept V_RCP_IFLAG_F32_e32 1, implicit $exec, implicit $mode + ; GCN: renamable $vgpr1 = nofpexcept V_RCP_IFLAG_F32_e32 2, implicit $exec, implicit $mode + ; GCN: S_NOP 0, implicit killed renamable $vgpr0 + ; GCN: S_NOP 0, implicit killed renamable $vgpr1 + ; GCN: renamable $vgpr0 = nofpexcept V_RCP_IFLAG_F32_e32 3, implicit $exec, implicit $mode + ; GCN: S_NOP 0, implicit killed renamable $vgpr0 + ; GCN: S_ENDPGM 0 + %0:vgpr_32 = nofpexcept V_RCP_IFLAG_F32_e32 1, implicit $exec, implicit $mode + %1:vgpr_32 = nofpexcept V_RCP_IFLAG_F32_e32 2, implicit $exec, implicit $mode + %2:vgpr_32 = nofpexcept V_RCP_IFLAG_F32_e32 3, implicit $exec, implicit $mode + S_NOP 0, implicit %0 + S_NOP 0, implicit %1 + S_NOP 0, implicit %2 + S_ENDPGM 0 +... +--- +name: test_remat_v_rsq_f32_e32 +tracksRegLiveness: true +body: | + bb.0: + ; GCN-LABEL: name: test_remat_v_rsq_f32_e32 + ; GCN: renamable $vgpr0 = nofpexcept V_RSQ_F32_e32 1, implicit $exec, implicit $mode + ; GCN: renamable $vgpr1 = nofpexcept V_RSQ_F32_e32 2, implicit $exec, implicit $mode + ; GCN: S_NOP 0, implicit killed renamable $vgpr0 + ; GCN: S_NOP 0, implicit killed renamable $vgpr1 + ; GCN: renamable $vgpr0 = nofpexcept V_RSQ_F32_e32 3, implicit $exec, implicit $mode + ; GCN: S_NOP 0, implicit killed renamable $vgpr0 + ; GCN: S_ENDPGM 0 + %0:vgpr_32 = nofpexcept V_RSQ_F32_e32 1, implicit $exec, implicit $mode + %1:vgpr_32 = nofpexcept V_RSQ_F32_e32 2, implicit $exec, implicit $mode + %2:vgpr_32 = nofpexcept V_RSQ_F32_e32 3, implicit $exec, implicit $mode + S_NOP 0, implicit %0 + S_NOP 0, implicit %1 + S_NOP 0, implicit %2 + S_ENDPGM 0 +... +--- +name: test_remat_v_sqrt_f32_e32 +tracksRegLiveness: true +body: | + bb.0: + ; GCN-LABEL: name: test_remat_v_sqrt_f32_e32 + ; GCN: renamable $vgpr0 = nofpexcept V_SQRT_F32_e32 1, implicit $exec, implicit $mode + ; GCN: renamable $vgpr1 = nofpexcept V_SQRT_F32_e32 2, implicit $exec, implicit $mode + ; GCN: S_NOP 0, implicit killed renamable $vgpr0 + ; GCN: S_NOP 0, implicit killed renamable $vgpr1 + ; GCN: renamable $vgpr0 = nofpexcept V_SQRT_F32_e32 3, implicit $exec, implicit $mode + ; GCN: S_NOP 0, implicit killed renamable $vgpr0 + ; GCN: S_ENDPGM 0 + %0:vgpr_32 = nofpexcept V_SQRT_F32_e32 1, implicit $exec, implicit $mode + %1:vgpr_32 = nofpexcept V_SQRT_F32_e32 2, implicit $exec, implicit $mode + %2:vgpr_32 = nofpexcept V_SQRT_F32_e32 3, implicit $exec, implicit $mode + S_NOP 0, implicit %0 + S_NOP 0, implicit %1 + S_NOP 0, implicit %2 + S_ENDPGM 0 +... +--- +name: test_remat_v_rcp_f64_e32 +tracksRegLiveness: true +body: | + bb.0: + ; GCN-LABEL: name: test_remat_v_rcp_f64_e32 + ; GCN: renamable $vgpr0_vgpr1 = nofpexcept V_RCP_F64_e32 1, implicit $exec, implicit $mode + ; GCN: renamable $vgpr2_vgpr3 = nofpexcept V_RCP_F64_e32 2, implicit $exec, implicit $mode + ; GCN: S_NOP 0, implicit killed renamable $vgpr0_vgpr1 + ; GCN: S_NOP 0, implicit killed renamable $vgpr2_vgpr3 + ; GCN: renamable $vgpr0_vgpr1 = nofpexcept V_RCP_F64_e32 3, implicit $exec, implicit $mode + ; GCN: S_NOP 0, implicit killed renamable $vgpr0_vgpr1 + ; GCN: S_ENDPGM 0 + %0:vreg_64_align2 = nofpexcept V_RCP_F64_e32 1, implicit $exec, implicit $mode + %1:vreg_64_align2 = nofpexcept V_RCP_F64_e32 2, implicit $exec, implicit $mode + %2:vreg_64_align2 = nofpexcept V_RCP_F64_e32 3, implicit $exec, implicit $mode + S_NOP 0, implicit %0 + S_NOP 0, implicit %1 + S_NOP 0, implicit %2 + S_ENDPGM 0 +... +--- +name: test_remat_v_rsq_f64_e32 +tracksRegLiveness: true +body: | + bb.0: + ; GCN-LABEL: name: test_remat_v_rsq_f64_e32 + ; GCN: renamable $vgpr0_vgpr1 = nofpexcept V_RSQ_F64_e32 1, implicit $exec, implicit $mode + ; GCN: renamable $vgpr2_vgpr3 = nofpexcept V_RSQ_F64_e32 2, implicit $exec, implicit $mode + ; GCN: S_NOP 0, implicit killed renamable $vgpr0_vgpr1 + ; GCN: S_NOP 0, implicit killed renamable $vgpr2_vgpr3 + ; GCN: renamable $vgpr0_vgpr1 = nofpexcept V_RSQ_F64_e32 3, implicit $exec, implicit $mode + ; GCN: S_NOP 0, implicit killed renamable $vgpr0_vgpr1 + ; GCN: S_ENDPGM 0 + %0:vreg_64_align2 = nofpexcept V_RSQ_F64_e32 1, implicit $exec, implicit $mode + %1:vreg_64_align2 = nofpexcept V_RSQ_F64_e32 2, implicit $exec, implicit $mode + %2:vreg_64_align2 = nofpexcept V_RSQ_F64_e32 3, implicit $exec, implicit $mode + S_NOP 0, implicit %0 + S_NOP 0, implicit %1 + S_NOP 0, implicit %2 + S_ENDPGM 0 +... +--- +name: test_remat_v_sqrt_f64_e32 +tracksRegLiveness: true +body: | + bb.0: + ; GCN-LABEL: name: test_remat_v_sqrt_f64_e32 + ; GCN: renamable $vgpr0_vgpr1 = nofpexcept V_SQRT_F64_e32 1, implicit $exec, implicit $mode + ; GCN: renamable $vgpr2_vgpr3 = nofpexcept V_SQRT_F64_e32 2, implicit $exec, implicit $mode + ; GCN: S_NOP 0, implicit killed renamable $vgpr0_vgpr1 + ; GCN: S_NOP 0, implicit killed renamable $vgpr2_vgpr3 + ; GCN: renamable $vgpr0_vgpr1 = nofpexcept V_SQRT_F64_e32 3, implicit $exec, implicit $mode + ; GCN: S_NOP 0, implicit killed renamable $vgpr0_vgpr1 + ; GCN: S_ENDPGM 0 + %0:vreg_64_align2 = nofpexcept V_SQRT_F64_e32 1, implicit $exec, implicit $mode + %1:vreg_64_align2 = nofpexcept V_SQRT_F64_e32 2, implicit $exec, implicit $mode + %2:vreg_64_align2 = nofpexcept V_SQRT_F64_e32 3, implicit $exec, implicit $mode + S_NOP 0, implicit %0 + S_NOP 0, implicit %1 + S_NOP 0, implicit %2 + S_ENDPGM 0 +... +--- +name: test_remat_v_sin_f32_e32 +tracksRegLiveness: true +body: | + bb.0: + ; GCN-LABEL: name: test_remat_v_sin_f32_e32 + ; GCN: renamable $vgpr0 = nofpexcept V_SIN_F32_e32 1, implicit $exec, implicit $mode + ; GCN: renamable $vgpr1 = nofpexcept V_SIN_F32_e32 2, implicit $exec, implicit $mode + ; GCN: S_NOP 0, implicit killed renamable $vgpr0 + ; GCN: S_NOP 0, implicit killed renamable $vgpr1 + ; GCN: renamable $vgpr0 = nofpexcept V_SIN_F32_e32 3, implicit $exec, implicit $mode + ; GCN: S_NOP 0, implicit killed renamable $vgpr0 + ; GCN: S_ENDPGM 0 + %0:vgpr_32 = nofpexcept V_SIN_F32_e32 1, implicit $exec, implicit $mode + %1:vgpr_32 = nofpexcept V_SIN_F32_e32 2, implicit $exec, implicit $mode + %2:vgpr_32 = nofpexcept V_SIN_F32_e32 3, implicit $exec, implicit $mode + S_NOP 0, implicit %0 + S_NOP 0, implicit %1 + S_NOP 0, implicit %2 + S_ENDPGM 0 +... +--- +name: test_remat_v_cos_f32_e32 +tracksRegLiveness: true +body: | + bb.0: + ; GCN-LABEL: name: test_remat_v_cos_f32_e32 + ; GCN: renamable $vgpr0 = nofpexcept V_COS_F32_e32 1, implicit $exec, implicit $mode + ; GCN: renamable $vgpr1 = nofpexcept V_COS_F32_e32 2, implicit $exec, implicit $mode + ; GCN: S_NOP 0, implicit killed renamable $vgpr0 + ; GCN: S_NOP 0, implicit killed renamable $vgpr1 + ; GCN: renamable $vgpr0 = nofpexcept V_COS_F32_e32 3, implicit $exec, implicit $mode + ; GCN: S_NOP 0, implicit killed renamable $vgpr0 + ; GCN: S_ENDPGM 0 + %0:vgpr_32 = nofpexcept V_COS_F32_e32 1, implicit $exec, implicit $mode + %1:vgpr_32 = nofpexcept V_COS_F32_e32 2, implicit $exec, implicit $mode + %2:vgpr_32 = nofpexcept V_COS_F32_e32 3, implicit $exec, implicit $mode + S_NOP 0, implicit %0 + S_NOP 0, implicit %1 + S_NOP 0, implicit %2 + S_ENDPGM 0 +... +--- +name: test_remat_v_not_b32_e32 +tracksRegLiveness: true +body: | + bb.0: + ; GCN-LABEL: name: test_remat_v_not_b32_e32 + ; GCN: renamable $vgpr0 = V_NOT_B32_e32 1, implicit $exec, implicit $mode + ; GCN: renamable $vgpr1 = V_NOT_B32_e32 2, implicit $exec, implicit $mode + ; GCN: S_NOP 0, implicit killed renamable $vgpr0 + ; GCN: S_NOP 0, implicit killed renamable $vgpr1 + ; GCN: renamable $vgpr0 = V_NOT_B32_e32 3, implicit $exec, implicit $mode + ; GCN: S_NOP 0, implicit killed renamable $vgpr0 + ; GCN: S_ENDPGM 0 + %0:vgpr_32 = V_NOT_B32_e32 1, implicit $exec, implicit $mode + %1:vgpr_32 = V_NOT_B32_e32 2, implicit $exec, implicit $mode + %2:vgpr_32 = V_NOT_B32_e32 3, implicit $exec, implicit $mode + S_NOP 0, implicit %0 + S_NOP 0, implicit %1 + S_NOP 0, implicit %2 + S_ENDPGM 0 +... +--- +name: test_remat_v_bfrev_b32_e32 +tracksRegLiveness: true +body: | + bb.0: + ; GCN-LABEL: name: test_remat_v_bfrev_b32_e32 + ; GCN: renamable $vgpr0 = V_BFREV_B32_e32 1, implicit $exec, implicit $mode + ; GCN: renamable $vgpr1 = V_BFREV_B32_e32 2, implicit $exec, implicit $mode + ; GCN: S_NOP 0, implicit killed renamable $vgpr0 + ; GCN: S_NOP 0, implicit killed renamable $vgpr1 + ; GCN: renamable $vgpr0 = V_BFREV_B32_e32 3, implicit $exec, implicit $mode + ; GCN: S_NOP 0, implicit killed renamable $vgpr0 + ; GCN: S_ENDPGM 0 + %0:vgpr_32 = V_BFREV_B32_e32 1, implicit $exec, implicit $mode + %1:vgpr_32 = V_BFREV_B32_e32 2, implicit $exec, implicit $mode + %2:vgpr_32 = V_BFREV_B32_e32 3, implicit $exec, implicit $mode + S_NOP 0, implicit %0 + S_NOP 0, implicit %1 + S_NOP 0, implicit %2 + S_ENDPGM 0 +... +--- +name: test_remat_v_ffbh_u32_e32 +tracksRegLiveness: true +body: | + bb.0: + ; GCN-LABEL: name: test_remat_v_ffbh_u32_e32 + ; GCN: renamable $vgpr0 = V_FFBH_U32_e32 1, implicit $exec, implicit $mode + ; GCN: renamable $vgpr1 = V_FFBH_U32_e32 2, implicit $exec, implicit $mode + ; GCN: S_NOP 0, implicit killed renamable $vgpr0 + ; GCN: S_NOP 0, implicit killed renamable $vgpr1 + ; GCN: renamable $vgpr0 = V_FFBH_U32_e32 3, implicit $exec, implicit $mode + ; GCN: S_NOP 0, implicit killed renamable $vgpr0 + ; GCN: S_ENDPGM 0 + %0:vgpr_32 = V_FFBH_U32_e32 1, implicit $exec, implicit $mode + %1:vgpr_32 = V_FFBH_U32_e32 2, implicit $exec, implicit $mode + %2:vgpr_32 = V_FFBH_U32_e32 3, implicit $exec, implicit $mode + S_NOP 0, implicit %0 + S_NOP 0, implicit %1 + S_NOP 0, implicit %2 + S_ENDPGM 0 +... +--- +name: test_remat_v_ffbl_b32_e32 +tracksRegLiveness: true +body: | + bb.0: + ; GCN-LABEL: name: test_remat_v_ffbl_b32_e32 + ; GCN: renamable $vgpr0 = V_FFBL_B32_e32 1, implicit $exec, implicit $mode + ; GCN: renamable $vgpr1 = V_FFBL_B32_e32 2, implicit $exec, implicit $mode + ; GCN: S_NOP 0, implicit killed renamable $vgpr0 + ; GCN: S_NOP 0, implicit killed renamable $vgpr1 + ; GCN: renamable $vgpr0 = V_FFBL_B32_e32 3, implicit $exec, implicit $mode + ; GCN: S_NOP 0, implicit killed renamable $vgpr0 + ; GCN: S_ENDPGM 0 + %0:vgpr_32 = V_FFBL_B32_e32 1, implicit $exec, implicit $mode + %1:vgpr_32 = V_FFBL_B32_e32 2, implicit $exec, implicit $mode + %2:vgpr_32 = V_FFBL_B32_e32 3, implicit $exec, implicit $mode + S_NOP 0, implicit %0 + S_NOP 0, implicit %1 + S_NOP 0, implicit %2 + S_ENDPGM 0 +... +--- +name: test_remat_v_ffbh_i32_e32 +tracksRegLiveness: true +body: | + bb.0: + ; GCN-LABEL: name: test_remat_v_ffbh_i32_e32 + ; GCN: renamable $vgpr0 = V_FFBH_I32_e32 1, implicit $exec, implicit $mode + ; GCN: renamable $vgpr1 = V_FFBH_I32_e32 2, implicit $exec, implicit $mode + ; GCN: S_NOP 0, implicit killed renamable $vgpr0 + ; GCN: S_NOP 0, implicit killed renamable $vgpr1 + ; GCN: renamable $vgpr0 = V_FFBH_I32_e32 3, implicit $exec, implicit $mode + ; GCN: S_NOP 0, implicit killed renamable $vgpr0 + ; GCN: S_ENDPGM 0 + %0:vgpr_32 = V_FFBH_I32_e32 1, implicit $exec, implicit $mode + %1:vgpr_32 = V_FFBH_I32_e32 2, implicit $exec, implicit $mode + %2:vgpr_32 = V_FFBH_I32_e32 3, implicit $exec, implicit $mode + S_NOP 0, implicit %0 + S_NOP 0, implicit %1 + S_NOP 0, implicit %2 + S_ENDPGM 0 +... +--- +name: test_remat_v_frexp_exp_i32_f64_e32 +tracksRegLiveness: true +body: | + bb.0: + ; GCN-LABEL: name: test_remat_v_frexp_exp_i32_f64_e32 + ; GCN: renamable $vgpr0 = nofpexcept V_FREXP_EXP_I32_F64_e32 1, implicit $exec, implicit $mode + ; GCN: renamable $vgpr1 = nofpexcept V_FREXP_EXP_I32_F64_e32 2, implicit $exec, implicit $mode + ; GCN: S_NOP 0, implicit killed renamable $vgpr0 + ; GCN: S_NOP 0, implicit killed renamable $vgpr1 + ; GCN: renamable $vgpr0 = nofpexcept V_FREXP_EXP_I32_F64_e32 3, implicit $exec, implicit $mode + ; GCN: S_NOP 0, implicit killed renamable $vgpr0 + ; GCN: S_ENDPGM 0 + %0:vgpr_32 = nofpexcept V_FREXP_EXP_I32_F64_e32 1, implicit $exec, implicit $mode + %1:vgpr_32 = nofpexcept V_FREXP_EXP_I32_F64_e32 2, implicit $exec, implicit $mode + %2:vgpr_32 = nofpexcept V_FREXP_EXP_I32_F64_e32 3, implicit $exec, implicit $mode + S_NOP 0, implicit %0 + S_NOP 0, implicit %1 + S_NOP 0, implicit %2 + S_ENDPGM 0 +... +--- +name: test_remat_v_frexp_mant_f64_e32 +tracksRegLiveness: true +body: | + bb.0: + ; GCN-LABEL: name: test_remat_v_frexp_mant_f64_e32 + ; GCN: renamable $vgpr0_vgpr1 = nofpexcept V_FREXP_MANT_F64_e32 1, implicit $exec, implicit $mode + ; GCN: renamable $vgpr2_vgpr3 = nofpexcept V_FREXP_MANT_F64_e32 2, implicit $exec, implicit $mode + ; GCN: S_NOP 0, implicit killed renamable $vgpr0_vgpr1 + ; GCN: S_NOP 0, implicit killed renamable $vgpr2_vgpr3 + ; GCN: renamable $vgpr0_vgpr1 = nofpexcept V_FREXP_MANT_F64_e32 3, implicit $exec, implicit $mode + ; GCN: S_NOP 0, implicit killed renamable $vgpr0_vgpr1 + ; GCN: S_ENDPGM 0 + %0:vreg_64_align2 = nofpexcept V_FREXP_MANT_F64_e32 1, implicit $exec, implicit $mode + %1:vreg_64_align2 = nofpexcept V_FREXP_MANT_F64_e32 2, implicit $exec, implicit $mode + %2:vreg_64_align2 = nofpexcept V_FREXP_MANT_F64_e32 3, implicit $exec, implicit $mode + S_NOP 0, implicit %0 + S_NOP 0, implicit %1 + S_NOP 0, implicit %2 + S_ENDPGM 0 +... +--- +name: test_remat_v_fract_f64_e32 +tracksRegLiveness: true +body: | + bb.0: + ; GCN-LABEL: name: test_remat_v_fract_f64_e32 + ; GCN: renamable $vgpr0_vgpr1 = nofpexcept V_FRACT_F64_e32 1, implicit $exec, implicit $mode + ; GCN: renamable $vgpr2_vgpr3 = nofpexcept V_FRACT_F64_e32 2, implicit $exec, implicit $mode + ; GCN: S_NOP 0, implicit killed renamable $vgpr0_vgpr1 + ; GCN: S_NOP 0, implicit killed renamable $vgpr2_vgpr3 + ; GCN: renamable $vgpr0_vgpr1 = nofpexcept V_FRACT_F64_e32 3, implicit $exec, implicit $mode + ; GCN: S_NOP 0, implicit killed renamable $vgpr0_vgpr1 + ; GCN: S_ENDPGM 0 + %0:vreg_64_align2 = nofpexcept V_FRACT_F64_e32 1, implicit $exec, implicit $mode + %1:vreg_64_align2 = nofpexcept V_FRACT_F64_e32 2, implicit $exec, implicit $mode + %2:vreg_64_align2 = nofpexcept V_FRACT_F64_e32 3, implicit $exec, implicit $mode + S_NOP 0, implicit %0 + S_NOP 0, implicit %1 + S_NOP 0, implicit %2 + S_ENDPGM 0 +... +--- +name: test_remat_v_frexp_exp_i32_f32_e32 +tracksRegLiveness: true +body: | + bb.0: + ; GCN-LABEL: name: test_remat_v_frexp_exp_i32_f32_e32 + ; GCN: renamable $vgpr0 = nofpexcept V_FREXP_EXP_I32_F32_e32 1, implicit $exec, implicit $mode + ; GCN: renamable $vgpr1 = nofpexcept V_FREXP_EXP_I32_F32_e32 2, implicit $exec, implicit $mode + ; GCN: S_NOP 0, implicit killed renamable $vgpr0 + ; GCN: S_NOP 0, implicit killed renamable $vgpr1 + ; GCN: renamable $vgpr0 = nofpexcept V_FREXP_EXP_I32_F32_e32 3, implicit $exec, implicit $mode + ; GCN: S_NOP 0, implicit killed renamable $vgpr0 + ; GCN: S_ENDPGM 0 + %0:vgpr_32 = nofpexcept V_FREXP_EXP_I32_F32_e32 1, implicit $exec, implicit $mode + %1:vgpr_32 = nofpexcept V_FREXP_EXP_I32_F32_e32 2, implicit $exec, implicit $mode + %2:vgpr_32 = nofpexcept V_FREXP_EXP_I32_F32_e32 3, implicit $exec, implicit $mode + S_NOP 0, implicit %0 + S_NOP 0, implicit %1 + S_NOP 0, implicit %2 + S_ENDPGM 0 +... +--- +name: test_remat_v_frexp_mant_f32_e32 +tracksRegLiveness: true +body: | + bb.0: + ; GCN-LABEL: name: test_remat_v_frexp_mant_f32_e32 + ; GCN: renamable $vgpr0 = nofpexcept V_FREXP_MANT_F32_e32 1, implicit $exec, implicit $mode + ; GCN: renamable $vgpr1 = nofpexcept V_FREXP_MANT_F32_e32 2, implicit $exec, implicit $mode + ; GCN: S_NOP 0, implicit killed renamable $vgpr0 + ; GCN: S_NOP 0, implicit killed renamable $vgpr1 + ; GCN: renamable $vgpr0 = nofpexcept V_FREXP_MANT_F32_e32 3, implicit $exec, implicit $mode + ; GCN: S_NOP 0, implicit killed renamable $vgpr0 + ; GCN: S_ENDPGM 0 + %0:vgpr_32 = nofpexcept V_FREXP_MANT_F32_e32 1, implicit $exec, implicit $mode + %1:vgpr_32 = nofpexcept V_FREXP_MANT_F32_e32 2, implicit $exec, implicit $mode + %2:vgpr_32 = nofpexcept V_FREXP_MANT_F32_e32 3, implicit $exec, implicit $mode + S_NOP 0, implicit %0 + S_NOP 0, implicit %1 + S_NOP 0, implicit %2 + S_ENDPGM 0 +... +--- +name: test_remat_v_exp_legacy_f32_e32 +tracksRegLiveness: true +body: | + bb.0: + ; GCN-LABEL: name: test_remat_v_exp_legacy_f32_e32 + ; GCN: renamable $vgpr0 = nofpexcept V_EXP_LEGACY_F32_e32 1, implicit $exec, implicit $mode + ; GCN: renamable $vgpr1 = nofpexcept V_EXP_LEGACY_F32_e32 2, implicit $exec, implicit $mode + ; GCN: S_NOP 0, implicit killed renamable $vgpr0 + ; GCN: S_NOP 0, implicit killed renamable $vgpr1 + ; GCN: renamable $vgpr0 = nofpexcept V_EXP_LEGACY_F32_e32 3, implicit $exec, implicit $mode + ; GCN: S_NOP 0, implicit killed renamable $vgpr0 + ; GCN: S_ENDPGM 0 + %0:vgpr_32 = nofpexcept V_EXP_LEGACY_F32_e32 1, implicit $exec, implicit $mode + %1:vgpr_32 = nofpexcept V_EXP_LEGACY_F32_e32 2, implicit $exec, implicit $mode + %2:vgpr_32 = nofpexcept V_EXP_LEGACY_F32_e32 3, implicit $exec, implicit $mode + S_NOP 0, implicit %0 + S_NOP 0, implicit %1 + S_NOP 0, implicit %2 + S_ENDPGM 0 +... +--- +name: test_remat_v_log_legacy_f32_e32 +tracksRegLiveness: true +body: | + bb.0: + ; GCN-LABEL: name: test_remat_v_log_legacy_f32_e32 + ; GCN: renamable $vgpr0 = nofpexcept V_LOG_LEGACY_F32_e32 1, implicit $exec, implicit $mode + ; GCN: renamable $vgpr1 = nofpexcept V_LOG_LEGACY_F32_e32 2, implicit $exec, implicit $mode + ; GCN: S_NOP 0, implicit killed renamable $vgpr0 + ; GCN: S_NOP 0, implicit killed renamable $vgpr1 + ; GCN: renamable $vgpr0 = nofpexcept V_LOG_LEGACY_F32_e32 3, implicit $exec, implicit $mode + ; GCN: S_NOP 0, implicit killed renamable $vgpr0 + ; GCN: S_ENDPGM 0 + %0:vgpr_32 = nofpexcept V_LOG_LEGACY_F32_e32 1, implicit $exec, implicit $mode + %1:vgpr_32 = nofpexcept V_LOG_LEGACY_F32_e32 2, implicit $exec, implicit $mode + %2:vgpr_32 = nofpexcept V_LOG_LEGACY_F32_e32 3, implicit $exec, implicit $mode + S_NOP 0, implicit %0 + S_NOP 0, implicit %1 + S_NOP 0, implicit %2 + S_ENDPGM 0 +... +--- +name: test_remat_v_cvt_f16_u16_e32 +tracksRegLiveness: true +body: | + bb.0: + ; GCN-LABEL: name: test_remat_v_cvt_f16_u16_e32 + ; GCN: renamable $vgpr0 = nofpexcept V_CVT_F16_U16_e32 1, implicit $exec, implicit $mode + ; GCN: renamable $vgpr1 = nofpexcept V_CVT_F16_U16_e32 2, implicit $exec, implicit $mode + ; GCN: S_NOP 0, implicit killed renamable $vgpr0 + ; GCN: S_NOP 0, implicit killed renamable $vgpr1 + ; GCN: renamable $vgpr0 = nofpexcept V_CVT_F16_U16_e32 3, implicit $exec, implicit $mode + ; GCN: S_NOP 0, implicit killed renamable $vgpr0 + ; GCN: S_ENDPGM 0 + %0:vgpr_32 = nofpexcept V_CVT_F16_U16_e32 1, implicit $exec, implicit $mode + %1:vgpr_32 = nofpexcept V_CVT_F16_U16_e32 2, implicit $exec, implicit $mode + %2:vgpr_32 = nofpexcept V_CVT_F16_U16_e32 3, implicit $exec, implicit $mode + S_NOP 0, implicit %0 + S_NOP 0, implicit %1 + S_NOP 0, implicit %2 + S_ENDPGM 0 +... +--- +name: test_remat_v_cvt_f16_i16_e32 +tracksRegLiveness: true +body: | + bb.0: + ; GCN-LABEL: name: test_remat_v_cvt_f16_i16_e32 + ; GCN: renamable $vgpr0 = nofpexcept V_CVT_F16_I16_e32 1, implicit $exec, implicit $mode + ; GCN: renamable $vgpr1 = nofpexcept V_CVT_F16_I16_e32 2, implicit $exec, implicit $mode + ; GCN: S_NOP 0, implicit killed renamable $vgpr0 + ; GCN: S_NOP 0, implicit killed renamable $vgpr1 + ; GCN: renamable $vgpr0 = nofpexcept V_CVT_F16_I16_e32 3, implicit $exec, implicit $mode + ; GCN: S_NOP 0, implicit killed renamable $vgpr0 + ; GCN: S_ENDPGM 0 + %0:vgpr_32 = nofpexcept V_CVT_F16_I16_e32 1, implicit $exec, implicit $mode + %1:vgpr_32 = nofpexcept V_CVT_F16_I16_e32 2, implicit $exec, implicit $mode + %2:vgpr_32 = nofpexcept V_CVT_F16_I16_e32 3, implicit $exec, implicit $mode + S_NOP 0, implicit %0 + S_NOP 0, implicit %1 + S_NOP 0, implicit %2 + S_ENDPGM 0 +... +--- +name: test_remat_v_cvt_u16_f16_e32 +tracksRegLiveness: true +body: | + bb.0: + ; GCN-LABEL: name: test_remat_v_cvt_u16_f16_e32 + ; GCN: renamable $vgpr0 = nofpexcept V_CVT_U16_F16_e32 1, implicit $exec, implicit $mode + ; GCN: renamable $vgpr1 = nofpexcept V_CVT_U16_F16_e32 2, implicit $exec, implicit $mode + ; GCN: S_NOP 0, implicit killed renamable $vgpr0 + ; GCN: S_NOP 0, implicit killed renamable $vgpr1 + ; GCN: renamable $vgpr0 = nofpexcept V_CVT_U16_F16_e32 3, implicit $exec, implicit $mode + ; GCN: S_NOP 0, implicit killed renamable $vgpr0 + ; GCN: S_ENDPGM 0 + %0:vgpr_32 = nofpexcept V_CVT_U16_F16_e32 1, implicit $exec, implicit $mode + %1:vgpr_32 = nofpexcept V_CVT_U16_F16_e32 2, implicit $exec, implicit $mode + %2:vgpr_32 = nofpexcept V_CVT_U16_F16_e32 3, implicit $exec, implicit $mode + S_NOP 0, implicit %0 + S_NOP 0, implicit %1 + S_NOP 0, implicit %2 + S_ENDPGM 0 +... +--- +name: test_remat_v_cvt_i16_f16_e32 +tracksRegLiveness: true +body: | + bb.0: + ; GCN-LABEL: name: test_remat_v_cvt_i16_f16_e32 + ; GCN: renamable $vgpr0 = nofpexcept V_CVT_I16_F16_e32 1, implicit $exec, implicit $mode + ; GCN: renamable $vgpr1 = nofpexcept V_CVT_I16_F16_e32 2, implicit $exec, implicit $mode + ; GCN: S_NOP 0, implicit killed renamable $vgpr0 + ; GCN: S_NOP 0, implicit killed renamable $vgpr1 + ; GCN: renamable $vgpr0 = nofpexcept V_CVT_I16_F16_e32 3, implicit $exec, implicit $mode + ; GCN: S_NOP 0, implicit killed renamable $vgpr0 + ; GCN: S_ENDPGM 0 + %0:vgpr_32 = nofpexcept V_CVT_I16_F16_e32 1, implicit $exec, implicit $mode + %1:vgpr_32 = nofpexcept V_CVT_I16_F16_e32 2, implicit $exec, implicit $mode + %2:vgpr_32 = nofpexcept V_CVT_I16_F16_e32 3, implicit $exec, implicit $mode + S_NOP 0, implicit %0 + S_NOP 0, implicit %1 + S_NOP 0, implicit %2 + S_ENDPGM 0 +... +--- +name: test_remat_v_rcp_f16_e32 +tracksRegLiveness: true +body: | + bb.0: + ; GCN-LABEL: name: test_remat_v_rcp_f16_e32 + ; GCN: renamable $vgpr0 = nofpexcept V_RCP_F16_e32 1, implicit $exec, implicit $mode + ; GCN: renamable $vgpr1 = nofpexcept V_RCP_F16_e32 2, implicit $exec, implicit $mode + ; GCN: S_NOP 0, implicit killed renamable $vgpr0 + ; GCN: S_NOP 0, implicit killed renamable $vgpr1 + ; GCN: renamable $vgpr0 = nofpexcept V_RCP_F16_e32 3, implicit $exec, implicit $mode + ; GCN: S_NOP 0, implicit killed renamable $vgpr0 + ; GCN: S_ENDPGM 0 + %0:vgpr_32 = nofpexcept V_RCP_F16_e32 1, implicit $exec, implicit $mode + %1:vgpr_32 = nofpexcept V_RCP_F16_e32 2, implicit $exec, implicit $mode + %2:vgpr_32 = nofpexcept V_RCP_F16_e32 3, implicit $exec, implicit $mode + S_NOP 0, implicit %0 + S_NOP 0, implicit %1 + S_NOP 0, implicit %2 + S_ENDPGM 0 +... +--- +name: test_remat_v_sqrt_f16_e32 +tracksRegLiveness: true +body: | + bb.0: + ; GCN-LABEL: name: test_remat_v_sqrt_f16_e32 + ; GCN: renamable $vgpr0 = nofpexcept V_SQRT_F16_e32 1, implicit $exec, implicit $mode + ; GCN: renamable $vgpr1 = nofpexcept V_SQRT_F16_e32 2, implicit $exec, implicit $mode + ; GCN: S_NOP 0, implicit killed renamable $vgpr0 + ; GCN: S_NOP 0, implicit killed renamable $vgpr1 + ; GCN: renamable $vgpr0 = nofpexcept V_SQRT_F16_e32 3, implicit $exec, implicit $mode + ; GCN: S_NOP 0, implicit killed renamable $vgpr0 + ; GCN: S_ENDPGM 0 + %0:vgpr_32 = nofpexcept V_SQRT_F16_e32 1, implicit $exec, implicit $mode + %1:vgpr_32 = nofpexcept V_SQRT_F16_e32 2, implicit $exec, implicit $mode + %2:vgpr_32 = nofpexcept V_SQRT_F16_e32 3, implicit $exec, implicit $mode + S_NOP 0, implicit %0 + S_NOP 0, implicit %1 + S_NOP 0, implicit %2 + S_ENDPGM 0 +... +--- +name: test_remat_v_rsq_f16_e32 +tracksRegLiveness: true +body: | + bb.0: + ; GCN-LABEL: name: test_remat_v_rsq_f16_e32 + ; GCN: renamable $vgpr0 = nofpexcept V_RSQ_F16_e32 1, implicit $exec, implicit $mode + ; GCN: renamable $vgpr1 = nofpexcept V_RSQ_F16_e32 2, implicit $exec, implicit $mode + ; GCN: S_NOP 0, implicit killed renamable $vgpr0 + ; GCN: S_NOP 0, implicit killed renamable $vgpr1 + ; GCN: renamable $vgpr0 = nofpexcept V_RSQ_F16_e32 3, implicit $exec, implicit $mode + ; GCN: S_NOP 0, implicit killed renamable $vgpr0 + ; GCN: S_ENDPGM 0 + %0:vgpr_32 = nofpexcept V_RSQ_F16_e32 1, implicit $exec, implicit $mode + %1:vgpr_32 = nofpexcept V_RSQ_F16_e32 2, implicit $exec, implicit $mode + %2:vgpr_32 = nofpexcept V_RSQ_F16_e32 3, implicit $exec, implicit $mode + S_NOP 0, implicit %0 + S_NOP 0, implicit %1 + S_NOP 0, implicit %2 + S_ENDPGM 0 +... +--- +name: test_remat_v_log_f16_e32 +tracksRegLiveness: true +body: | + bb.0: + ; GCN-LABEL: name: test_remat_v_log_f16_e32 + ; GCN: renamable $vgpr0 = nofpexcept V_LOG_F16_e32 1, implicit $exec, implicit $mode + ; GCN: renamable $vgpr1 = nofpexcept V_LOG_F16_e32 2, implicit $exec, implicit $mode + ; GCN: S_NOP 0, implicit killed renamable $vgpr0 + ; GCN: S_NOP 0, implicit killed renamable $vgpr1 + ; GCN: renamable $vgpr0 = nofpexcept V_LOG_F16_e32 3, implicit $exec, implicit $mode + ; GCN: S_NOP 0, implicit killed renamable $vgpr0 + ; GCN: S_ENDPGM 0 + %0:vgpr_32 = nofpexcept V_LOG_F16_e32 1, implicit $exec, implicit $mode + %1:vgpr_32 = nofpexcept V_LOG_F16_e32 2, implicit $exec, implicit $mode + %2:vgpr_32 = nofpexcept V_LOG_F16_e32 3, implicit $exec, implicit $mode + S_NOP 0, implicit %0 + S_NOP 0, implicit %1 + S_NOP 0, implicit %2 + S_ENDPGM 0 +... +--- +name: test_remat_v_exp_f16_e32 +tracksRegLiveness: true +body: | + bb.0: + ; GCN-LABEL: name: test_remat_v_exp_f16_e32 + ; GCN: renamable $vgpr0 = nofpexcept V_EXP_F16_e32 1, implicit $exec, implicit $mode + ; GCN: renamable $vgpr1 = nofpexcept V_EXP_F16_e32 2, implicit $exec, implicit $mode + ; GCN: S_NOP 0, implicit killed renamable $vgpr0 + ; GCN: S_NOP 0, implicit killed renamable $vgpr1 + ; GCN: renamable $vgpr0 = nofpexcept V_EXP_F16_e32 3, implicit $exec, implicit $mode + ; GCN: S_NOP 0, implicit killed renamable $vgpr0 + ; GCN: S_ENDPGM 0 + %0:vgpr_32 = nofpexcept V_EXP_F16_e32 1, implicit $exec, implicit $mode + %1:vgpr_32 = nofpexcept V_EXP_F16_e32 2, implicit $exec, implicit $mode + %2:vgpr_32 = nofpexcept V_EXP_F16_e32 3, implicit $exec, implicit $mode + S_NOP 0, implicit %0 + S_NOP 0, implicit %1 + S_NOP 0, implicit %2 + S_ENDPGM 0 +... +--- +name: test_remat_v_sin_f16_e32 +tracksRegLiveness: true +body: | + bb.0: + ; GCN-LABEL: name: test_remat_v_sin_f16_e32 + ; GCN: renamable $vgpr0 = nofpexcept V_SIN_F16_e32 1, implicit $exec, implicit $mode + ; GCN: renamable $vgpr1 = nofpexcept V_SIN_F16_e32 2, implicit $exec, implicit $mode + ; GCN: S_NOP 0, implicit killed renamable $vgpr0 + ; GCN: S_NOP 0, implicit killed renamable $vgpr1 + ; GCN: renamable $vgpr0 = nofpexcept V_SIN_F16_e32 3, implicit $exec, implicit $mode + ; GCN: S_NOP 0, implicit killed renamable $vgpr0 + ; GCN: S_ENDPGM 0 + %0:vgpr_32 = nofpexcept V_SIN_F16_e32 1, implicit $exec, implicit $mode + %1:vgpr_32 = nofpexcept V_SIN_F16_e32 2, implicit $exec, implicit $mode + %2:vgpr_32 = nofpexcept V_SIN_F16_e32 3, implicit $exec, implicit $mode + S_NOP 0, implicit %0 + S_NOP 0, implicit %1 + S_NOP 0, implicit %2 + S_ENDPGM 0 +... +--- +name: test_remat_v_cos_f16_e32 +tracksRegLiveness: true +body: | + bb.0: + ; GCN-LABEL: name: test_remat_v_cos_f16_e32 + ; GCN: renamable $vgpr0 = nofpexcept V_COS_F16_e32 1, implicit $exec, implicit $mode + ; GCN: renamable $vgpr1 = nofpexcept V_COS_F16_e32 2, implicit $exec, implicit $mode + ; GCN: S_NOP 0, implicit killed renamable $vgpr0 + ; GCN: S_NOP 0, implicit killed renamable $vgpr1 + ; GCN: renamable $vgpr0 = nofpexcept V_COS_F16_e32 3, implicit $exec, implicit $mode + ; GCN: S_NOP 0, implicit killed renamable $vgpr0 + ; GCN: S_ENDPGM 0 + %0:vgpr_32 = nofpexcept V_COS_F16_e32 1, implicit $exec, implicit $mode + %1:vgpr_32 = nofpexcept V_COS_F16_e32 2, implicit $exec, implicit $mode + %2:vgpr_32 = nofpexcept V_COS_F16_e32 3, implicit $exec, implicit $mode + S_NOP 0, implicit %0 + S_NOP 0, implicit %1 + S_NOP 0, implicit %2 + S_ENDPGM 0 +... +--- +name: test_remat_v_frexp_exp_i16_f16_e32 +tracksRegLiveness: true +body: | + bb.0: + ; GCN-LABEL: name: test_remat_v_frexp_exp_i16_f16_e32 + ; GCN: renamable $vgpr0 = nofpexcept V_FREXP_EXP_I16_F16_e32 1, implicit $exec, implicit $mode + ; GCN: renamable $vgpr1 = nofpexcept V_FREXP_EXP_I16_F16_e32 2, implicit $exec, implicit $mode + ; GCN: S_NOP 0, implicit killed renamable $vgpr0 + ; GCN: S_NOP 0, implicit killed renamable $vgpr1 + ; GCN: renamable $vgpr0 = nofpexcept V_FREXP_EXP_I16_F16_e32 3, implicit $exec, implicit $mode + ; GCN: S_NOP 0, implicit killed renamable $vgpr0 + ; GCN: S_ENDPGM 0 + %0:vgpr_32 = nofpexcept V_FREXP_EXP_I16_F16_e32 1, implicit $exec, implicit $mode + %1:vgpr_32 = nofpexcept V_FREXP_EXP_I16_F16_e32 2, implicit $exec, implicit $mode + %2:vgpr_32 = nofpexcept V_FREXP_EXP_I16_F16_e32 3, implicit $exec, implicit $mode + S_NOP 0, implicit %0 + S_NOP 0, implicit %1 + S_NOP 0, implicit %2 + S_ENDPGM 0 +... +--- +name: test_remat_v_frexp_mant_f16_e32 +tracksRegLiveness: true +body: | + bb.0: + ; GCN-LABEL: name: test_remat_v_frexp_mant_f16_e32 + ; GCN: renamable $vgpr0 = nofpexcept V_FREXP_MANT_F16_e32 1, implicit $exec, implicit $mode + ; GCN: renamable $vgpr1 = nofpexcept V_FREXP_MANT_F16_e32 2, implicit $exec, implicit $mode + ; GCN: S_NOP 0, implicit killed renamable $vgpr0 + ; GCN: S_NOP 0, implicit killed renamable $vgpr1 + ; GCN: renamable $vgpr0 = nofpexcept V_FREXP_MANT_F16_e32 3, implicit $exec, implicit $mode + ; GCN: S_NOP 0, implicit killed renamable $vgpr0 + ; GCN: S_ENDPGM 0 + %0:vgpr_32 = nofpexcept V_FREXP_MANT_F16_e32 1, implicit $exec, implicit $mode + %1:vgpr_32 = nofpexcept V_FREXP_MANT_F16_e32 2, implicit $exec, implicit $mode + %2:vgpr_32 = nofpexcept V_FREXP_MANT_F16_e32 3, implicit $exec, implicit $mode + S_NOP 0, implicit %0 + S_NOP 0, implicit %1 + S_NOP 0, implicit %2 + S_ENDPGM 0 +... +--- +name: test_remat_v_floor_f16_e32 +tracksRegLiveness: true +body: | + bb.0: + ; GCN-LABEL: name: test_remat_v_floor_f16_e32 + ; GCN: renamable $vgpr0 = nofpexcept V_FLOOR_F16_e32 1, implicit $exec, implicit $mode + ; GCN: renamable $vgpr1 = nofpexcept V_FLOOR_F16_e32 2, implicit $exec, implicit $mode + ; GCN: S_NOP 0, implicit killed renamable $vgpr0 + ; GCN: S_NOP 0, implicit killed renamable $vgpr1 + ; GCN: renamable $vgpr0 = nofpexcept V_FLOOR_F16_e32 3, implicit $exec, implicit $mode + ; GCN: S_NOP 0, implicit killed renamable $vgpr0 + ; GCN: S_ENDPGM 0 + %0:vgpr_32 = nofpexcept V_FLOOR_F16_e32 1, implicit $exec, implicit $mode + %1:vgpr_32 = nofpexcept V_FLOOR_F16_e32 2, implicit $exec, implicit $mode + %2:vgpr_32 = nofpexcept V_FLOOR_F16_e32 3, implicit $exec, implicit $mode + S_NOP 0, implicit %0 + S_NOP 0, implicit %1 + S_NOP 0, implicit %2 + S_ENDPGM 0 +... +--- +name: test_remat_v_ceil_f16_e32 +tracksRegLiveness: true +body: | + bb.0: + ; GCN-LABEL: name: test_remat_v_ceil_f16_e32 + ; GCN: renamable $vgpr0 = nofpexcept V_CEIL_F16_e32 1, implicit $exec, implicit $mode + ; GCN: renamable $vgpr1 = nofpexcept V_CEIL_F16_e32 2, implicit $exec, implicit $mode + ; GCN: S_NOP 0, implicit killed renamable $vgpr0 + ; GCN: S_NOP 0, implicit killed renamable $vgpr1 + ; GCN: renamable $vgpr0 = nofpexcept V_CEIL_F16_e32 3, implicit $exec, implicit $mode + ; GCN: S_NOP 0, implicit killed renamable $vgpr0 + ; GCN: S_ENDPGM 0 + %0:vgpr_32 = nofpexcept V_CEIL_F16_e32 1, implicit $exec, implicit $mode + %1:vgpr_32 = nofpexcept V_CEIL_F16_e32 2, implicit $exec, implicit $mode + %2:vgpr_32 = nofpexcept V_CEIL_F16_e32 3, implicit $exec, implicit $mode + S_NOP 0, implicit %0 + S_NOP 0, implicit %1 + S_NOP 0, implicit %2 + S_ENDPGM 0 +... +--- +name: test_remat_v_trunc_f16_e32 +tracksRegLiveness: true +body: | + bb.0: + ; GCN-LABEL: name: test_remat_v_trunc_f16_e32 + ; GCN: renamable $vgpr0 = nofpexcept V_TRUNC_F16_e32 1, implicit $exec, implicit $mode + ; GCN: renamable $vgpr1 = nofpexcept V_TRUNC_F16_e32 2, implicit $exec, implicit $mode + ; GCN: S_NOP 0, implicit killed renamable $vgpr0 + ; GCN: S_NOP 0, implicit killed renamable $vgpr1 + ; GCN: renamable $vgpr0 = nofpexcept V_TRUNC_F16_e32 3, implicit $exec, implicit $mode + ; GCN: S_NOP 0, implicit killed renamable $vgpr0 + ; GCN: S_ENDPGM 0 + %0:vgpr_32 = nofpexcept V_TRUNC_F16_e32 1, implicit $exec, implicit $mode + %1:vgpr_32 = nofpexcept V_TRUNC_F16_e32 2, implicit $exec, implicit $mode + %2:vgpr_32 = nofpexcept V_TRUNC_F16_e32 3, implicit $exec, implicit $mode + S_NOP 0, implicit %0 + S_NOP 0, implicit %1 + S_NOP 0, implicit %2 + S_ENDPGM 0 +... +--- +name: test_remat_v_rndne_f16_e32 +tracksRegLiveness: true +body: | + bb.0: + ; GCN-LABEL: name: test_remat_v_rndne_f16_e32 + ; GCN: renamable $vgpr0 = nofpexcept V_RNDNE_F16_e32 1, implicit $exec, implicit $mode + ; GCN: renamable $vgpr1 = nofpexcept V_RNDNE_F16_e32 2, implicit $exec, implicit $mode + ; GCN: S_NOP 0, implicit killed renamable $vgpr0 + ; GCN: S_NOP 0, implicit killed renamable $vgpr1 + ; GCN: renamable $vgpr0 = nofpexcept V_RNDNE_F16_e32 3, implicit $exec, implicit $mode + ; GCN: S_NOP 0, implicit killed renamable $vgpr0 + ; GCN: S_ENDPGM 0 + %0:vgpr_32 = nofpexcept V_RNDNE_F16_e32 1, implicit $exec, implicit $mode + %1:vgpr_32 = nofpexcept V_RNDNE_F16_e32 2, implicit $exec, implicit $mode + %2:vgpr_32 = nofpexcept V_RNDNE_F16_e32 3, implicit $exec, implicit $mode + S_NOP 0, implicit %0 + S_NOP 0, implicit %1 + S_NOP 0, implicit %2 + S_ENDPGM 0 +... +--- +name: test_remat_v_fract_f16_e32 +tracksRegLiveness: true +body: | + bb.0: + ; GCN-LABEL: name: test_remat_v_fract_f16_e32 + ; GCN: renamable $vgpr0 = nofpexcept V_FRACT_F16_e32 1, implicit $exec, implicit $mode + ; GCN: renamable $vgpr1 = nofpexcept V_FRACT_F16_e32 2, implicit $exec, implicit $mode + ; GCN: S_NOP 0, implicit killed renamable $vgpr0 + ; GCN: S_NOP 0, implicit killed renamable $vgpr1 + ; GCN: renamable $vgpr0 = nofpexcept V_FRACT_F16_e32 3, implicit $exec, implicit $mode + ; GCN: S_NOP 0, implicit killed renamable $vgpr0 + ; GCN: S_ENDPGM 0 + %0:vgpr_32 = nofpexcept V_FRACT_F16_e32 1, implicit $exec, implicit $mode + %1:vgpr_32 = nofpexcept V_FRACT_F16_e32 2, implicit $exec, implicit $mode + %2:vgpr_32 = nofpexcept V_FRACT_F16_e32 3, implicit $exec, implicit $mode + S_NOP 0, implicit %0 + S_NOP 0, implicit %1 + S_NOP 0, implicit %2 + S_ENDPGM 0 +... +--- +name: test_remat_v_sat_pk_u8_i16_e32 +tracksRegLiveness: true +body: | + bb.0: + ; GCN-LABEL: name: test_remat_v_sat_pk_u8_i16_e32 + ; GCN: renamable $vgpr0 = V_SAT_PK_U8_I16_e32 1, implicit $exec, implicit $mode + ; GCN: renamable $vgpr1 = V_SAT_PK_U8_I16_e32 2, implicit $exec, implicit $mode + ; GCN: S_NOP 0, implicit killed renamable $vgpr0 + ; GCN: S_NOP 0, implicit killed renamable $vgpr1 + ; GCN: renamable $vgpr0 = V_SAT_PK_U8_I16_e32 3, implicit $exec, implicit $mode + ; GCN: S_NOP 0, implicit killed renamable $vgpr0 + ; GCN: S_ENDPGM 0 + %0:vgpr_32 = V_SAT_PK_U8_I16_e32 1, implicit $exec, implicit $mode + %1:vgpr_32 = V_SAT_PK_U8_I16_e32 2, implicit $exec, implicit $mode + %2:vgpr_32 = V_SAT_PK_U8_I16_e32 3, implicit $exec, implicit $mode + S_NOP 0, implicit %0 + S_NOP 0, implicit %1 + S_NOP 0, implicit %2 + S_ENDPGM 0 +... +--- +name: test_remat_v_cvt_norm_i16_f16_e32 +tracksRegLiveness: true +body: | + bb.0: + ; GCN-LABEL: name: test_remat_v_cvt_norm_i16_f16_e32 + ; GCN: renamable $vgpr0 = V_CVT_NORM_I16_F16_e32 1, implicit $exec, implicit $mode + ; GCN: renamable $vgpr1 = V_CVT_NORM_I16_F16_e32 2, implicit $exec, implicit $mode + ; GCN: S_NOP 0, implicit killed renamable $vgpr0 + ; GCN: S_NOP 0, implicit killed renamable $vgpr1 + ; GCN: renamable $vgpr0 = V_CVT_NORM_I16_F16_e32 3, implicit $exec, implicit $mode + ; GCN: S_NOP 0, implicit killed renamable $vgpr0 + ; GCN: S_ENDPGM 0 + %0:vgpr_32 = V_CVT_NORM_I16_F16_e32 1, implicit $exec, implicit $mode + %1:vgpr_32 = V_CVT_NORM_I16_F16_e32 2, implicit $exec, implicit $mode + %2:vgpr_32 = V_CVT_NORM_I16_F16_e32 3, implicit $exec, implicit $mode + S_NOP 0, implicit %0 + S_NOP 0, implicit %1 + S_NOP 0, implicit %2 + S_ENDPGM 0 +... +--- +name: test_remat_v_cvt_norm_u16_f16_e32 +tracksRegLiveness: true +body: | + bb.0: + ; GCN-LABEL: name: test_remat_v_cvt_norm_u16_f16_e32 + ; GCN: renamable $vgpr0 = V_CVT_NORM_U16_F16_e32 1, implicit $exec, implicit $mode + ; GCN: renamable $vgpr1 = V_CVT_NORM_U16_F16_e32 2, implicit $exec, implicit $mode + ; GCN: S_NOP 0, implicit killed renamable $vgpr0 + ; GCN: S_NOP 0, implicit killed renamable $vgpr1 + ; GCN: renamable $vgpr0 = V_CVT_NORM_U16_F16_e32 3, implicit $exec, implicit $mode + ; GCN: S_NOP 0, implicit killed renamable $vgpr0 + ; GCN: S_ENDPGM 0 + %0:vgpr_32 = V_CVT_NORM_U16_F16_e32 1, implicit $exec, implicit $mode + %1:vgpr_32 = V_CVT_NORM_U16_F16_e32 2, implicit $exec, implicit $mode + %2:vgpr_32 = V_CVT_NORM_U16_F16_e32 3, implicit $exec, implicit $mode + S_NOP 0, implicit %0 + S_NOP 0, implicit %1 + S_NOP 0, implicit %2 + S_ENDPGM 0 +... +--- +name: test_remat_v_accvgpr_mov_b32 +tracksRegLiveness: true +body: | + bb.0: + ; GCN-LABEL: name: test_remat_v_accvgpr_mov_b32 + ; GCN: renamable $agpr0 = V_ACCVGPR_MOV_B32 undef $agpr0, implicit $exec + ; GCN: renamable $agpr1 = V_ACCVGPR_MOV_B32 undef $agpr0, implicit $exec + ; GCN: S_NOP 0, implicit killed renamable $agpr0 + ; GCN: S_NOP 0, implicit killed renamable $agpr1 + ; GCN: renamable $agpr0 = V_ACCVGPR_MOV_B32 undef $agpr0, implicit $exec + ; GCN: S_NOP 0, implicit killed renamable $agpr0 + ; GCN: S_ENDPGM 0 + %0:agpr_32 = V_ACCVGPR_MOV_B32 undef $agpr0, implicit $exec + %1:agpr_32 = V_ACCVGPR_MOV_B32 undef $agpr0, implicit $exec + %2:agpr_32 = V_ACCVGPR_MOV_B32 undef $agpr0, implicit $exec + S_NOP 0, implicit %0 + S_NOP 0, implicit %1 + S_NOP 0, implicit %2 + S_ENDPGM 0 +...