diff --git a/lib/Target/AMDGPU/SIInstrInfo.cpp b/lib/Target/AMDGPU/SIInstrInfo.cpp index fc027535c9c..3376082bc4c 100644 --- a/lib/Target/AMDGPU/SIInstrInfo.cpp +++ b/lib/Target/AMDGPU/SIInstrInfo.cpp @@ -107,7 +107,7 @@ static bool nodesHaveSameOperandValue(SDNode *N0, SDNode* N1, unsigned OpName) { bool SIInstrInfo::isReallyTriviallyReMaterializable(const MachineInstr &MI, AAResults *AA) const { - if (isVOP1(MI) || isVOP3(MI) || isSDWA(MI)) { + if (isVOP1(MI) || isVOP2(MI) || isVOP3(MI) || isSDWA(MI)) { // Normally VALU use of exec would block the rematerialization, but that // is OK in this case to have an implicit exec read as all VALU do. // We really want all of the generic logic for this except for this. diff --git a/lib/Target/AMDGPU/VOP2Instructions.td b/lib/Target/AMDGPU/VOP2Instructions.td index 6c58769316c..7860b7e7f8a 100644 --- a/lib/Target/AMDGPU/VOP2Instructions.td +++ b/lib/Target/AMDGPU/VOP2Instructions.td @@ -243,7 +243,9 @@ multiclass VOP2eInst .ret>, - Commutable_REV; + Commutable_REV { + let isReMaterializable = 1; + } } } @@ -483,10 +485,11 @@ def VOP_WRITELANE : VOPProfile<[i32, i32, i32, i32]> { //===----------------------------------------------------------------------===// defm V_CNDMASK_B32 : VOP2eInst <"v_cndmask_b32", VOP2e_I32_I32_I32_I1>; -let SubtargetPredicate = HasMadMacF32Insts in +let SubtargetPredicate = HasMadMacF32Insts, isReMaterializable = 1 in def V_MADMK_F32 : VOP2_Pseudo <"v_madmk_f32", VOP_MADMK_F32, []>; let isCommutable = 1 in { +let isReMaterializable = 1 in { defm V_ADD_F32 : VOP2Inst <"v_add_f32", VOP_F32_F32_F32, any_fadd>; defm V_SUB_F32 : VOP2Inst <"v_sub_f32", VOP_F32_F32_F32, any_fsub>; defm V_SUBREV_F32 : VOP2Inst <"v_subrev_f32", VOP_F32_F32_F32, null_frag, "v_sub_f32">; @@ -508,6 +511,7 @@ defm V_LSHLREV_B32 : VOP2Inst <"v_lshlrev_b32", VOP_I32_I32_I32, lshl_rev, "v_ls defm V_AND_B32 : VOP2Inst <"v_and_b32", VOP_PAT_GEN, and>; defm V_OR_B32 : VOP2Inst <"v_or_b32", VOP_PAT_GEN, or>; defm V_XOR_B32 : VOP2Inst <"v_xor_b32", VOP_PAT_GEN, xor>; +} // End isReMaterializable = 1 let mayRaiseFPException = 0 in { let OtherPredicates = [HasMadMacF32Insts] in { @@ -520,6 +524,7 @@ defm V_MAC_LEGACY_F32 : VOP2Inst <"v_mac_legacy_f32", VOP_MAC_LEGACY_F32>; } // End Constraints = "$vdst = $src2", DisableEncoding="$src2", // isConvertibleToThreeAddress = 1 +let isReMaterializable = 1 in def V_MADAK_F32 : VOP2_Pseudo <"v_madak_f32", VOP_MADAK_F32, []>; } // End OtherPredicates = [HasMadMacF32Insts] } // End mayRaiseFPException = 0 @@ -534,7 +539,7 @@ defm V_SUBB_U32 : VOP2bInst <"v_subb_u32", VOP2b_I32_I1_I32_I32_I1, null_frag, " defm V_SUBBREV_U32 : VOP2bInst <"v_subbrev_u32", VOP2b_I32_I1_I32_I32_I1, null_frag, "v_subb_u32", 1>; -let SubtargetPredicate = HasAddNoCarryInsts in { +let SubtargetPredicate = HasAddNoCarryInsts, isReMaterializable = 1 in { defm V_ADD_U32 : VOP2Inst <"v_add_u32", VOP_I32_I32_I32_ARITH, null_frag, "v_add_u32", 1>; defm V_SUB_U32 : VOP2Inst <"v_sub_u32", VOP_I32_I32_I32_ARITH, null_frag, "v_sub_u32", 1>; defm V_SUBREV_U32 : VOP2Inst <"v_subrev_u32", VOP_I32_I32_I32_ARITH, null_frag, "v_sub_u32", 1>; @@ -553,12 +558,12 @@ def V_WRITELANE_B32 : VOP2_Pseudo<"v_writelane_b32", VOP_WRITELANE, } // End $vdst = $vdst_in, DisableEncoding $vdst_in } // End isConvergent = 1 +let isReMaterializable = 1 in { defm V_BFM_B32 : VOP2Inst <"v_bfm_b32", VOP_NO_EXT>; defm V_BCNT_U32_B32 : VOP2Inst <"v_bcnt_u32_b32", VOP_NO_EXT, add_ctpop>; defm V_MBCNT_LO_U32_B32 : VOP2Inst <"v_mbcnt_lo_u32_b32", VOP_NO_EXT, int_amdgcn_mbcnt_lo>; defm V_MBCNT_HI_U32_B32 : VOP2Inst <"v_mbcnt_hi_u32_b32", VOP_NO_EXT, int_amdgcn_mbcnt_hi>; defm V_LDEXP_F32 : VOP2Inst <"v_ldexp_f32", VOP_NO_EXT, AMDGPUldexp>; -defm V_CVT_PKACCUM_U8_F32 : VOP2Inst <"v_cvt_pkaccum_u8_f32", VOP_NO_EXT>; // TODO: set "Uses = dst" let ReadsModeReg = 0, mayRaiseFPException = 0 in { defm V_CVT_PKNORM_I16_F32 : VOP2Inst <"v_cvt_pknorm_i16_f32", VOP_NO_EXT, AMDGPUpknorm_i16_f32>; @@ -582,7 +587,9 @@ defm V_ASHR_I32 : VOP2Inst <"v_ashr_i32", VOP_PAT_GEN, sra>; defm V_LSHL_B32 : VOP2Inst <"v_lshl_b32", VOP_PAT_GEN, shl>; } // End SubtargetPredicate = isGFX6GFX7 } // End isCommutable = 1 +} // End isReMaterializable = 1 +defm V_CVT_PKACCUM_U8_F32 : VOP2Inst <"v_cvt_pkaccum_u8_f32", VOP_NO_EXT>; // TODO: set "Uses = dst" class DivergentBinOp : GCNPat< @@ -682,6 +689,7 @@ defm V_MAC_F16 : VOP2Inst <"v_mac_f16", VOP_MAC_F16>; let SubtargetPredicate = HasDLInsts in { +let isReMaterializable = 1 in defm V_XNOR_B32 : VOP2Inst <"v_xnor_b32", VOP_I32_I32_I32, xnor>; let Constraints = "$vdst = $src2", @@ -753,7 +761,7 @@ let AddedComplexity = 30 in { } } // End AddedComplexity = 30 -let SubtargetPredicate = HasFmaakFmamkF32Insts in { +let SubtargetPredicate = HasFmaakFmamkF32Insts, isReMaterializable = 1 in { def V_FMAMK_F32 : VOP2_Pseudo<"v_fmamk_f32", VOP_MADMK_F32, [], "">; let isCommutable = 1 in diff --git a/test/CodeGen/AMDGPU/remat-vop.mir b/test/CodeGen/AMDGPU/remat-vop.mir index ee0c51334c7..d656905f2b7 100644 --- a/test/CodeGen/AMDGPU/remat-vop.mir +++ b/test/CodeGen/AMDGPU/remat-vop.mir @@ -1364,3 +1364,1206 @@ body: | S_NOP 0, implicit %2 S_ENDPGM 0 ... +--- +name: test_no_remat_v_cndmask_b32_e32 +tracksRegLiveness: true +machineFunctionInfo: + stackPtrOffsetReg: $sgpr32 +body: | + bb.0: + ; GCN-LABEL: name: test_no_remat_v_cndmask_b32_e32 + ; GCN: renamable $vgpr0 = V_CNDMASK_B32_e32 1, undef $vgpr0, implicit $exec, implicit undef $vcc + ; GCN: SI_SPILL_V32_SAVE killed $vgpr0, %stack.1, $sgpr32, 0, implicit $exec :: (store (s32) into %stack.1, addrspace 5) + ; GCN: renamable $vgpr1 = V_CNDMASK_B32_e32 1, undef $vgpr0, implicit $exec, implicit undef $vcc + ; GCN: renamable $vgpr0 = V_CNDMASK_B32_e32 1, undef $vgpr0, implicit $exec, implicit undef $vcc + ; 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 + %1:vgpr_32 = V_CNDMASK_B32_e32 1, undef %0:vgpr_32, implicit $exec, implicit undef $vcc + %2:vgpr_32 = V_CNDMASK_B32_e32 1, undef %0:vgpr_32, implicit $exec, implicit undef $vcc + %3:vgpr_32 = V_CNDMASK_B32_e32 1, undef %0:vgpr_32, implicit $exec, implicit undef $vcc + S_NOP 0, implicit %1 + S_NOP 0, implicit %2 + S_NOP 0, implicit %3 + S_ENDPGM 0 +... +--- +name: test_no_remat_v_cndmask_b32_sdwa +tracksRegLiveness: true +machineFunctionInfo: + stackPtrOffsetReg: $sgpr32 +body: | + bb.0: + ; GCN-LABEL: name: test_no_remat_v_cndmask_b32_sdwa + ; GCN: renamable $vgpr0 = V_CNDMASK_B32_sdwa 0, undef $vgpr0, 0, undef $vgpr0, 0, 0, 0, 0, 0, implicit $exec, implicit undef $vcc + ; GCN: SI_SPILL_V32_SAVE killed $vgpr0, %stack.1, $sgpr32, 0, implicit $exec :: (store (s32) into %stack.1, addrspace 5) + ; GCN: renamable $vgpr1 = V_CNDMASK_B32_sdwa 0, undef $vgpr0, 0, undef $vgpr0, 0, 0, 0, 0, 0, implicit $exec, implicit undef $vcc + ; GCN: renamable $vgpr0 = V_CNDMASK_B32_sdwa 0, undef $vgpr0, 0, undef $vgpr0, 0, 0, 0, 0, 0, implicit $exec, implicit undef $vcc + ; 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 + %1:vgpr_32 = V_CNDMASK_B32_sdwa 0, undef %0:vgpr_32, 0, undef %0:vgpr_32, 0, 0, 0, 0, 0, implicit $exec, implicit undef $vcc + %2:vgpr_32 = V_CNDMASK_B32_sdwa 0, undef %0:vgpr_32, 0, undef %0:vgpr_32, 0, 0, 0, 0, 0, implicit $exec, implicit undef $vcc + %3:vgpr_32 = V_CNDMASK_B32_sdwa 0, undef %0:vgpr_32, 0, undef %0:vgpr_32, 0, 0, 0, 0, 0, implicit $exec, implicit undef $vcc + S_NOP 0, implicit %1 + S_NOP 0, implicit %2 + S_NOP 0, implicit %3 + S_ENDPGM 0 +... +--- +name: test_no_remat_v_cndmask_b32_dpp +tracksRegLiveness: true +machineFunctionInfo: + stackPtrOffsetReg: $sgpr32 +body: | + bb.0: + ; GCN-LABEL: name: test_no_remat_v_cndmask_b32_dpp + ; GCN: renamable $vgpr0 = V_CNDMASK_B32_dpp undef $vgpr0, 0, undef $vgpr0, 0, undef $vgpr0, 1, 15, 15, 10, implicit $exec, implicit undef $vcc + ; GCN: SI_SPILL_V32_SAVE killed $vgpr0, %stack.1, $sgpr32, 0, implicit $exec :: (store (s32) into %stack.1, addrspace 5) + ; GCN: renamable $vgpr1 = V_CNDMASK_B32_dpp undef $vgpr1, 0, undef $vgpr0, 0, undef $vgpr0, 1, 15, 15, 10, implicit $exec, implicit undef $vcc + ; GCN: renamable $vgpr0 = V_CNDMASK_B32_dpp undef $vgpr0, 0, undef $vgpr0, 0, undef $vgpr0, 1, 15, 15, 10, implicit $exec, implicit undef $vcc + ; 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 + %1:vgpr_32 = V_CNDMASK_B32_dpp undef %1:vgpr_32, 0, undef %0:vgpr_32, 0, undef %0:vgpr_32, 1, 15, 15, 10, implicit $exec, implicit undef $vcc + %2:vgpr_32 = V_CNDMASK_B32_dpp undef %2:vgpr_32, 0, undef %0:vgpr_32, 0, undef %0:vgpr_32, 1, 15, 15, 10, implicit $exec, implicit undef $vcc + %3:vgpr_32 = V_CNDMASK_B32_dpp undef %3:vgpr_32, 0, undef %0:vgpr_32, 0, undef %0:vgpr_32, 1, 15, 15, 10, implicit $exec, implicit undef $vcc + S_NOP 0, implicit %1 + S_NOP 0, implicit %2 + S_NOP 0, implicit %3 + S_ENDPGM 0 +... +--- +name: test_remat_v_cndmask_b32_e64 +tracksRegLiveness: true +body: | + bb.0: + ; GCN-LABEL: name: test_remat_v_cndmask_b32_e64 + ; GCN: renamable $vgpr0 = V_CNDMASK_B32_e64 0, 1, 0, 2, undef $sgpr0_sgpr1, implicit $exec + ; GCN: renamable $vgpr1 = V_CNDMASK_B32_e64 0, 1, 0, 2, undef $sgpr0_sgpr1, implicit $exec + ; GCN: S_NOP 0, implicit killed renamable $vgpr0 + ; GCN: S_NOP 0, implicit killed renamable $vgpr1 + ; GCN: renamable $vgpr0 = V_CNDMASK_B32_e64 0, 1, 0, 2, undef $sgpr0_sgpr1, implicit $exec + ; GCN: S_NOP 0, implicit killed renamable $vgpr0 + ; GCN: S_ENDPGM 0 + %1:vgpr_32 = V_CNDMASK_B32_e64 0, 1, 0, 2, undef %0:sreg_64_xexec, implicit $exec + %2:vgpr_32 = V_CNDMASK_B32_e64 0, 1, 0, 2, undef %0:sreg_64_xexec, implicit $exec + %3:vgpr_32 = V_CNDMASK_B32_e64 0, 1, 0, 2, undef %0:sreg_64_xexec, implicit $exec + S_NOP 0, implicit %1 + S_NOP 0, implicit %2 + S_NOP 0, implicit %3 + S_ENDPGM 0 +... +--- +name: test_remat_v_madmk_f32 +tracksRegLiveness: true +body: | + bb.0: + ; GCN-LABEL: name: test_remat_v_madmk_f32 + ; GCN: renamable $vgpr0 = nofpexcept V_MADMK_F32 1, 1, undef $vgpr0, implicit $exec, implicit $mode + ; GCN: renamable $vgpr1 = nofpexcept V_MADMK_F32 2, 2, undef $vgpr0, 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_MADMK_F32 3, 3, undef $vgpr0, implicit $exec, implicit $mode + ; GCN: S_NOP 0, implicit killed renamable $vgpr0 + ; GCN: S_ENDPGM 0 + %1:vgpr_32 = nofpexcept V_MADMK_F32 1, 1, undef %0:vgpr_32, implicit $exec, implicit $mode + %2:vgpr_32 = nofpexcept V_MADMK_F32 2, 2, undef %0:vgpr_32, implicit $exec, implicit $mode + %3:vgpr_32 = nofpexcept V_MADMK_F32 3, 3, undef %0:vgpr_32, implicit $exec, implicit $mode + S_NOP 0, implicit %1 + S_NOP 0, implicit %2 + S_NOP 0, implicit %3 + S_ENDPGM 0 +... +--- +name: test_remat_v_add_f32_e32 +tracksRegLiveness: true +body: | + bb.0: + ; GCN-LABEL: name: test_remat_v_add_f32_e32 + ; GCN: renamable $vgpr0 = nofpexcept V_ADD_F32_e32 1, undef $vgpr0, implicit $exec, implicit $mode + ; GCN: renamable $vgpr1 = nofpexcept V_ADD_F32_e32 2, undef $vgpr0, 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_ADD_F32_e32 3, undef $vgpr0, implicit $exec, implicit $mode + ; GCN: S_NOP 0, implicit killed renamable $vgpr0 + ; GCN: S_ENDPGM 0 + %1:vgpr_32 = nofpexcept V_ADD_F32_e32 1, undef %0:vgpr_32, implicit $exec, implicit $mode + %2:vgpr_32 = nofpexcept V_ADD_F32_e32 2, undef %0:vgpr_32, implicit $exec, implicit $mode + %3:vgpr_32 = nofpexcept V_ADD_F32_e32 3, undef %0:vgpr_32, implicit $exec, implicit $mode + S_NOP 0, implicit %1 + S_NOP 0, implicit %2 + S_NOP 0, implicit %3 + S_ENDPGM 0 +... +--- +name: test_remat_v_add_f32_e64 +tracksRegLiveness: true +body: | + bb.0: + ; GCN-LABEL: name: test_remat_v_add_f32_e64 + ; GCN: renamable $vgpr0 = nofpexcept V_ADD_F32_e64 0, 1, 0, undef $vgpr0, 0, 0, implicit $exec, implicit $mode + ; GCN: renamable $vgpr1 = nofpexcept V_ADD_F32_e64 0, 2, 0, undef $vgpr0, 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 = nofpexcept V_ADD_F32_e64 0, 3, 0, undef $vgpr0, 0, 0, implicit $exec, implicit $mode + ; GCN: S_NOP 0, implicit killed renamable $vgpr0 + ; GCN: S_ENDPGM 0 + %1:vgpr_32 = nofpexcept V_ADD_F32_e64 0, 1, 0, undef %0:vgpr_32, 0, 0, implicit $exec, implicit $mode + %2:vgpr_32 = nofpexcept V_ADD_F32_e64 0, 2, 0, undef %0:vgpr_32, 0, 0, implicit $exec, implicit $mode + %3:vgpr_32 = nofpexcept V_ADD_F32_e64 0, 3, 0, undef %0:vgpr_32, 0, 0, implicit $exec, implicit $mode + S_NOP 0, implicit %1 + S_NOP 0, implicit %2 + S_NOP 0, implicit %3 + S_ENDPGM 0 +... +--- +name: test_remat_v_add_f32_sdwa +tracksRegLiveness: true +body: | + bb.0: + ; GCN-LABEL: name: test_remat_v_add_f32_sdwa + ; GCN: renamable $vgpr0 = nofpexcept V_ADD_F32_sdwa 0, undef $vgpr0, 0, undef $vgpr0, 0, 0, 0, 0, 0, 0, implicit $exec, implicit $mode + ; GCN: renamable $vgpr1 = nofpexcept V_ADD_F32_sdwa 0, undef $vgpr0, 0, undef $vgpr0, 0, 0, 0, 0, 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 = nofpexcept V_ADD_F32_sdwa 0, undef $vgpr0, 0, undef $vgpr0, 0, 0, 0, 0, 0, 0, implicit $exec, implicit $mode + ; GCN: S_NOP 0, implicit killed renamable $vgpr0 + ; GCN: S_ENDPGM 0 + %1:vgpr_32 = nofpexcept V_ADD_F32_sdwa 0, undef %0:vgpr_32, 0, undef %0:vgpr_32, 0, 0, 0, 0, 0, 0, implicit $exec, implicit $mode + %2:vgpr_32 = nofpexcept V_ADD_F32_sdwa 0, undef %0:vgpr_32, 0, undef %0:vgpr_32, 0, 0, 0, 0, 0, 0, implicit $exec, implicit $mode + %3:vgpr_32 = nofpexcept V_ADD_F32_sdwa 0, undef %0:vgpr_32, 0, undef %0:vgpr_32, 0, 0, 0, 0, 0, 0, implicit $exec, implicit $mode + S_NOP 0, implicit %1 + S_NOP 0, implicit %2 + S_NOP 0, implicit %3 + S_ENDPGM 0 +... +--- +name: test_no_remat_v_add_f32_dpp +tracksRegLiveness: true +machineFunctionInfo: + stackPtrOffsetReg: $sgpr32 +body: | + bb.0: + ; GCN-LABEL: name: test_no_remat_v_add_f32_dpp + ; GCN: renamable $vgpr0 = nofpexcept V_ADD_F32_dpp undef $vgpr0, 0, undef $vgpr0, 0, undef $vgpr0, 1, 15, 15, 10, 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 = nofpexcept V_ADD_F32_dpp undef $vgpr1, 0, undef $vgpr0, 0, undef $vgpr0, 1, 15, 15, 10, implicit $exec, implicit $mode + ; GCN: renamable $vgpr0 = nofpexcept V_ADD_F32_dpp undef $vgpr0, 0, undef $vgpr0, 0, undef $vgpr0, 1, 15, 15, 10, 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 + %1:vgpr_32 = nofpexcept V_ADD_F32_dpp undef %1:vgpr_32, 0, undef %0:vgpr_32, 0, undef %0:vgpr_32, 1, 15, 15, 10, implicit $exec, implicit $mode + %2:vgpr_32 = nofpexcept V_ADD_F32_dpp undef %2:vgpr_32, 0, undef %0:vgpr_32, 0, undef %0:vgpr_32, 1, 15, 15, 10, implicit $exec, implicit $mode + %3:vgpr_32 = nofpexcept V_ADD_F32_dpp undef %3:vgpr_32, 0, undef %0:vgpr_32, 0, undef %0:vgpr_32, 1, 15, 15, 10, implicit $exec, implicit $mode + S_NOP 0, implicit %1 + S_NOP 0, implicit %2 + S_NOP 0, implicit %3 + S_ENDPGM 0 +... +--- +name: test_remat_v_sub_f32_e32 +tracksRegLiveness: true +body: | + bb.0: + ; GCN-LABEL: name: test_remat_v_sub_f32_e32 + ; GCN: renamable $vgpr0 = nofpexcept V_SUB_F32_e32 1, undef $vgpr0, implicit $exec, implicit $mode + ; GCN: renamable $vgpr1 = nofpexcept V_SUB_F32_e32 2, undef $vgpr0, 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_SUB_F32_e32 3, undef $vgpr0, implicit $exec, implicit $mode + ; GCN: S_NOP 0, implicit killed renamable $vgpr0 + ; GCN: S_ENDPGM 0 + %1:vgpr_32 = nofpexcept V_SUB_F32_e32 1, undef %0:vgpr_32, implicit $exec, implicit $mode + %2:vgpr_32 = nofpexcept V_SUB_F32_e32 2, undef %0:vgpr_32, implicit $exec, implicit $mode + %3:vgpr_32 = nofpexcept V_SUB_F32_e32 3, undef %0:vgpr_32, implicit $exec, implicit $mode + S_NOP 0, implicit %1 + S_NOP 0, implicit %2 + S_NOP 0, implicit %3 + S_ENDPGM 0 +... +--- +name: test_remat_v_subrev_f32_e32 +tracksRegLiveness: true +body: | + bb.0: + ; GCN-LABEL: name: test_remat_v_subrev_f32_e32 + ; GCN: renamable $vgpr0 = nofpexcept V_SUBREV_F32_e32 1, undef $vgpr0, implicit $exec, implicit $mode + ; GCN: renamable $vgpr1 = nofpexcept V_SUBREV_F32_e32 2, undef $vgpr0, 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_SUBREV_F32_e32 3, undef $vgpr0, implicit $exec, implicit $mode + ; GCN: S_NOP 0, implicit killed renamable $vgpr0 + ; GCN: S_ENDPGM 0 + %1:vgpr_32 = nofpexcept V_SUBREV_F32_e32 1, undef %0:vgpr_32, implicit $exec, implicit $mode + %2:vgpr_32 = nofpexcept V_SUBREV_F32_e32 2, undef %0:vgpr_32, implicit $exec, implicit $mode + %3:vgpr_32 = nofpexcept V_SUBREV_F32_e32 3, undef %0:vgpr_32, implicit $exec, implicit $mode + S_NOP 0, implicit %1 + S_NOP 0, implicit %2 + S_NOP 0, implicit %3 + S_ENDPGM 0 +... +--- +name: test_remat_v_mul_legacy_f32_e32 +tracksRegLiveness: true +body: | + bb.0: + ; GCN-LABEL: name: test_remat_v_mul_legacy_f32_e32 + ; GCN: renamable $vgpr0 = nofpexcept V_MUL_LEGACY_F32_e32 1, undef $vgpr0, implicit $exec, implicit $mode + ; GCN: renamable $vgpr1 = nofpexcept V_MUL_LEGACY_F32_e32 2, undef $vgpr0, 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_MUL_LEGACY_F32_e32 3, undef $vgpr0, implicit $exec, implicit $mode + ; GCN: S_NOP 0, implicit killed renamable $vgpr0 + ; GCN: S_ENDPGM 0 + %1:vgpr_32 = nofpexcept V_MUL_LEGACY_F32_e32 1, undef %0:vgpr_32, implicit $exec, implicit $mode + %2:vgpr_32 = nofpexcept V_MUL_LEGACY_F32_e32 2, undef %0:vgpr_32, implicit $exec, implicit $mode + %3:vgpr_32 = nofpexcept V_MUL_LEGACY_F32_e32 3, undef %0:vgpr_32, implicit $exec, implicit $mode + S_NOP 0, implicit %1 + S_NOP 0, implicit %2 + S_NOP 0, implicit %3 + S_ENDPGM 0 +... +--- +name: test_remat_v_mul_f32_e32 +tracksRegLiveness: true +body: | + bb.0: + ; GCN-LABEL: name: test_remat_v_mul_f32_e32 + ; GCN: renamable $vgpr0 = nofpexcept V_MUL_F32_e32 1, undef $vgpr0, implicit $exec, implicit $mode + ; GCN: renamable $vgpr1 = nofpexcept V_MUL_F32_e32 2, undef $vgpr0, 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_MUL_F32_e32 3, undef $vgpr0, implicit $exec, implicit $mode + ; GCN: S_NOP 0, implicit killed renamable $vgpr0 + ; GCN: S_ENDPGM 0 + %1:vgpr_32 = nofpexcept V_MUL_F32_e32 1, undef %0:vgpr_32, implicit $exec, implicit $mode + %2:vgpr_32 = nofpexcept V_MUL_F32_e32 2, undef %0:vgpr_32, implicit $exec, implicit $mode + %3:vgpr_32 = nofpexcept V_MUL_F32_e32 3, undef %0:vgpr_32, implicit $exec, implicit $mode + S_NOP 0, implicit %1 + S_NOP 0, implicit %2 + S_NOP 0, implicit %3 + S_ENDPGM 0 +... +--- +name: test_remat_v_mul_i32_i24_e32 +tracksRegLiveness: true +body: | + bb.0: + ; GCN-LABEL: name: test_remat_v_mul_i32_i24_e32 + ; GCN: renamable $vgpr0 = V_MUL_I32_I24_e32 1, undef $vgpr0, implicit $exec + ; GCN: renamable $vgpr1 = V_MUL_I32_I24_e32 2, undef $vgpr0, implicit $exec + ; GCN: S_NOP 0, implicit killed renamable $vgpr0 + ; GCN: S_NOP 0, implicit killed renamable $vgpr1 + ; GCN: renamable $vgpr0 = V_MUL_I32_I24_e32 3, undef $vgpr0, implicit $exec + ; GCN: S_NOP 0, implicit killed renamable $vgpr0 + ; GCN: S_ENDPGM 0 + %1:vgpr_32 = V_MUL_I32_I24_e32 1, undef %0:vgpr_32, implicit $exec + %2:vgpr_32 = V_MUL_I32_I24_e32 2, undef %0:vgpr_32, implicit $exec + %3:vgpr_32 = V_MUL_I32_I24_e32 3, undef %0:vgpr_32, implicit $exec + S_NOP 0, implicit %1 + S_NOP 0, implicit %2 + S_NOP 0, implicit %3 + S_ENDPGM 0 +... +--- +name: test_remat_v_mul_hi_i32_i24_e32 +tracksRegLiveness: true +body: | + bb.0: + ; GCN-LABEL: name: test_remat_v_mul_hi_i32_i24_e32 + ; GCN: renamable $vgpr0 = V_MUL_HI_I32_I24_e32 1, undef $vgpr0, implicit $exec + ; GCN: renamable $vgpr1 = V_MUL_HI_I32_I24_e32 2, undef $vgpr0, implicit $exec + ; GCN: S_NOP 0, implicit killed renamable $vgpr0 + ; GCN: S_NOP 0, implicit killed renamable $vgpr1 + ; GCN: renamable $vgpr0 = V_MUL_HI_I32_I24_e32 3, undef $vgpr0, implicit $exec + ; GCN: S_NOP 0, implicit killed renamable $vgpr0 + ; GCN: S_ENDPGM 0 + %1:vgpr_32 = V_MUL_HI_I32_I24_e32 1, undef %0:vgpr_32, implicit $exec + %2:vgpr_32 = V_MUL_HI_I32_I24_e32 2, undef %0:vgpr_32, implicit $exec + %3:vgpr_32 = V_MUL_HI_I32_I24_e32 3, undef %0:vgpr_32, implicit $exec + S_NOP 0, implicit %1 + S_NOP 0, implicit %2 + S_NOP 0, implicit %3 + S_ENDPGM 0 +... +--- +name: test_remat_v_mul_u32_u24_e32 +tracksRegLiveness: true +body: | + bb.0: + ; GCN-LABEL: name: test_remat_v_mul_u32_u24_e32 + ; GCN: renamable $vgpr0 = V_MUL_U32_U24_e32 1, undef $vgpr0, implicit $exec + ; GCN: renamable $vgpr1 = V_MUL_U32_U24_e32 2, undef $vgpr0, implicit $exec + ; GCN: S_NOP 0, implicit killed renamable $vgpr0 + ; GCN: S_NOP 0, implicit killed renamable $vgpr1 + ; GCN: renamable $vgpr0 = V_MUL_U32_U24_e32 3, undef $vgpr0, implicit $exec + ; GCN: S_NOP 0, implicit killed renamable $vgpr0 + ; GCN: S_ENDPGM 0 + %1:vgpr_32 = V_MUL_U32_U24_e32 1, undef %0:vgpr_32, implicit $exec + %2:vgpr_32 = V_MUL_U32_U24_e32 2, undef %0:vgpr_32, implicit $exec + %3:vgpr_32 = V_MUL_U32_U24_e32 3, undef %0:vgpr_32, implicit $exec + S_NOP 0, implicit %1 + S_NOP 0, implicit %2 + S_NOP 0, implicit %3 + S_ENDPGM 0 +... +--- +name: test_remat_v_mul_hi_u32_u24_e32 +tracksRegLiveness: true +body: | + bb.0: + ; GCN-LABEL: name: test_remat_v_mul_hi_u32_u24_e32 + ; GCN: renamable $vgpr0 = V_MUL_HI_U32_U24_e32 1, undef $vgpr0, implicit $exec + ; GCN: renamable $vgpr1 = V_MUL_HI_U32_U24_e32 2, undef $vgpr0, implicit $exec + ; GCN: S_NOP 0, implicit killed renamable $vgpr0 + ; GCN: S_NOP 0, implicit killed renamable $vgpr1 + ; GCN: renamable $vgpr0 = V_MUL_HI_U32_U24_e32 3, undef $vgpr0, implicit $exec + ; GCN: S_NOP 0, implicit killed renamable $vgpr0 + ; GCN: S_ENDPGM 0 + %1:vgpr_32 = V_MUL_HI_U32_U24_e32 1, undef %0:vgpr_32, implicit $exec + %2:vgpr_32 = V_MUL_HI_U32_U24_e32 2, undef %0:vgpr_32, implicit $exec + %3:vgpr_32 = V_MUL_HI_U32_U24_e32 3, undef %0:vgpr_32, implicit $exec + S_NOP 0, implicit %1 + S_NOP 0, implicit %2 + S_NOP 0, implicit %3 + S_ENDPGM 0 +... +--- +name: test_remat_v_min_f32_e32 +tracksRegLiveness: true +body: | + bb.0: + ; GCN-LABEL: name: test_remat_v_min_f32_e32 + ; GCN: renamable $vgpr0 = nofpexcept V_MIN_F32_e32 1, undef $vgpr0, implicit $exec, implicit $mode + ; GCN: renamable $vgpr1 = nofpexcept V_MIN_F32_e32 2, undef $vgpr0, 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_MIN_F32_e32 3, undef $vgpr0, implicit $exec, implicit $mode + ; GCN: S_NOP 0, implicit killed renamable $vgpr0 + ; GCN: S_ENDPGM 0 + %1:vgpr_32 = nofpexcept V_MIN_F32_e32 1, undef %0:vgpr_32, implicit $exec, implicit $mode + %2:vgpr_32 = nofpexcept V_MIN_F32_e32 2, undef %0:vgpr_32, implicit $exec, implicit $mode + %3:vgpr_32 = nofpexcept V_MIN_F32_e32 3, undef %0:vgpr_32, implicit $exec, implicit $mode + S_NOP 0, implicit %1 + S_NOP 0, implicit %2 + S_NOP 0, implicit %3 + S_ENDPGM 0 +... +--- +name: test_remat_v_max_f32_e32 +tracksRegLiveness: true +body: | + bb.0: + ; GCN-LABEL: name: test_remat_v_max_f32_e32 + ; GCN: renamable $vgpr0 = nofpexcept V_MAX_F32_e32 1, undef $vgpr0, implicit $exec, implicit $mode + ; GCN: renamable $vgpr1 = nofpexcept V_MAX_F32_e32 2, undef $vgpr0, 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_MAX_F32_e32 3, undef $vgpr0, implicit $exec, implicit $mode + ; GCN: S_NOP 0, implicit killed renamable $vgpr0 + ; GCN: S_ENDPGM 0 + %1:vgpr_32 = nofpexcept V_MAX_F32_e32 1, undef %0:vgpr_32, implicit $exec, implicit $mode + %2:vgpr_32 = nofpexcept V_MAX_F32_e32 2, undef %0:vgpr_32, implicit $exec, implicit $mode + %3:vgpr_32 = nofpexcept V_MAX_F32_e32 3, undef %0:vgpr_32, implicit $exec, implicit $mode + S_NOP 0, implicit %1 + S_NOP 0, implicit %2 + S_NOP 0, implicit %3 + S_ENDPGM 0 +... +--- +name: test_remat_v_min_i32_e32 +tracksRegLiveness: true +body: | + bb.0: + ; GCN-LABEL: name: test_remat_v_min_i32_e32 + ; GCN: renamable $vgpr0 = V_MIN_I32_e32 1, undef $vgpr0, implicit $exec + ; GCN: renamable $vgpr1 = V_MIN_I32_e32 2, undef $vgpr0, implicit $exec + ; GCN: S_NOP 0, implicit killed renamable $vgpr0 + ; GCN: S_NOP 0, implicit killed renamable $vgpr1 + ; GCN: renamable $vgpr0 = V_MIN_I32_e32 3, undef $vgpr0, implicit $exec + ; GCN: S_NOP 0, implicit killed renamable $vgpr0 + ; GCN: S_ENDPGM 0 + %1:vgpr_32 = V_MIN_I32_e32 1, undef %0:vgpr_32, implicit $exec + %2:vgpr_32 = V_MIN_I32_e32 2, undef %0:vgpr_32, implicit $exec + %3:vgpr_32 = V_MIN_I32_e32 3, undef %0:vgpr_32, implicit $exec + S_NOP 0, implicit %1 + S_NOP 0, implicit %2 + S_NOP 0, implicit %3 + S_ENDPGM 0 +... +--- +name: test_remat_v_max_i32_e32 +tracksRegLiveness: true +body: | + bb.0: + ; GCN-LABEL: name: test_remat_v_max_i32_e32 + ; GCN: renamable $vgpr0 = V_MAX_I32_e32 1, undef $vgpr0, implicit $exec + ; GCN: renamable $vgpr1 = V_MAX_I32_e32 2, undef $vgpr0, implicit $exec + ; GCN: S_NOP 0, implicit killed renamable $vgpr0 + ; GCN: S_NOP 0, implicit killed renamable $vgpr1 + ; GCN: renamable $vgpr0 = V_MAX_I32_e32 3, undef $vgpr0, implicit $exec + ; GCN: S_NOP 0, implicit killed renamable $vgpr0 + ; GCN: S_ENDPGM 0 + %1:vgpr_32 = V_MAX_I32_e32 1, undef %0:vgpr_32, implicit $exec + %2:vgpr_32 = V_MAX_I32_e32 2, undef %0:vgpr_32, implicit $exec + %3:vgpr_32 = V_MAX_I32_e32 3, undef %0:vgpr_32, implicit $exec + S_NOP 0, implicit %1 + S_NOP 0, implicit %2 + S_NOP 0, implicit %3 + S_ENDPGM 0 +... +--- +name: test_remat_v_min_u32_e32 +tracksRegLiveness: true +body: | + bb.0: + ; GCN-LABEL: name: test_remat_v_min_u32_e32 + ; GCN: renamable $vgpr0 = V_MIN_U32_e32 1, undef $vgpr0, implicit $exec + ; GCN: renamable $vgpr1 = V_MIN_U32_e32 2, undef $vgpr0, implicit $exec + ; GCN: S_NOP 0, implicit killed renamable $vgpr0 + ; GCN: S_NOP 0, implicit killed renamable $vgpr1 + ; GCN: renamable $vgpr0 = V_MIN_U32_e32 3, undef $vgpr0, implicit $exec + ; GCN: S_NOP 0, implicit killed renamable $vgpr0 + ; GCN: S_ENDPGM 0 + %1:vgpr_32 = V_MIN_U32_e32 1, undef %0:vgpr_32, implicit $exec + %2:vgpr_32 = V_MIN_U32_e32 2, undef %0:vgpr_32, implicit $exec + %3:vgpr_32 = V_MIN_U32_e32 3, undef %0:vgpr_32, implicit $exec + S_NOP 0, implicit %1 + S_NOP 0, implicit %2 + S_NOP 0, implicit %3 + S_ENDPGM 0 +... +--- +name: test_remat_v_max_u32_e32 +tracksRegLiveness: true +body: | + bb.0: + ; GCN-LABEL: name: test_remat_v_max_u32_e32 + ; GCN: renamable $vgpr0 = V_MAX_U32_e32 1, undef $vgpr0, implicit $exec + ; GCN: renamable $vgpr1 = V_MAX_U32_e32 2, undef $vgpr0, implicit $exec + ; GCN: S_NOP 0, implicit killed renamable $vgpr0 + ; GCN: S_NOP 0, implicit killed renamable $vgpr1 + ; GCN: renamable $vgpr0 = V_MAX_U32_e32 3, undef $vgpr0, implicit $exec + ; GCN: S_NOP 0, implicit killed renamable $vgpr0 + ; GCN: S_ENDPGM 0 + %1:vgpr_32 = V_MAX_U32_e32 1, undef %0:vgpr_32, implicit $exec + %2:vgpr_32 = V_MAX_U32_e32 2, undef %0:vgpr_32, implicit $exec + %3:vgpr_32 = V_MAX_U32_e32 3, undef %0:vgpr_32, implicit $exec + S_NOP 0, implicit %1 + S_NOP 0, implicit %2 + S_NOP 0, implicit %3 + S_ENDPGM 0 +... +--- +name: test_remat_v_lshrrev_b32_e32 +tracksRegLiveness: true +body: | + bb.0: + ; GCN-LABEL: name: test_remat_v_lshrrev_b32_e32 + ; GCN: renamable $vgpr0 = V_LSHRREV_B32_e32 1, undef $vgpr0, implicit $exec + ; GCN: renamable $vgpr1 = V_LSHRREV_B32_e32 2, undef $vgpr0, implicit $exec + ; GCN: S_NOP 0, implicit killed renamable $vgpr0 + ; GCN: S_NOP 0, implicit killed renamable $vgpr1 + ; GCN: renamable $vgpr0 = V_LSHRREV_B32_e32 3, undef $vgpr0, implicit $exec + ; GCN: S_NOP 0, implicit killed renamable $vgpr0 + ; GCN: S_ENDPGM 0 + %1:vgpr_32 = V_LSHRREV_B32_e32 1, undef %0:vgpr_32, implicit $exec + %2:vgpr_32 = V_LSHRREV_B32_e32 2, undef %0:vgpr_32, implicit $exec + %3:vgpr_32 = V_LSHRREV_B32_e32 3, undef %0:vgpr_32, implicit $exec + S_NOP 0, implicit %1 + S_NOP 0, implicit %2 + S_NOP 0, implicit %3 + S_ENDPGM 0 +... +--- +name: test_remat_v_lshlrev_b32_e32 +tracksRegLiveness: true +body: | + bb.0: + ; GCN-LABEL: name: test_remat_v_lshlrev_b32_e32 + ; GCN: renamable $vgpr0 = V_LSHLREV_B32_e32 1, undef $vgpr0, implicit $exec + ; GCN: renamable $vgpr1 = V_LSHLREV_B32_e32 2, undef $vgpr0, implicit $exec + ; GCN: S_NOP 0, implicit killed renamable $vgpr0 + ; GCN: S_NOP 0, implicit killed renamable $vgpr1 + ; GCN: renamable $vgpr0 = V_LSHLREV_B32_e32 3, undef $vgpr0, implicit $exec + ; GCN: S_NOP 0, implicit killed renamable $vgpr0 + ; GCN: S_ENDPGM 0 + %1:vgpr_32 = V_LSHLREV_B32_e32 1, undef %0:vgpr_32, implicit $exec + %2:vgpr_32 = V_LSHLREV_B32_e32 2, undef %0:vgpr_32, implicit $exec + %3:vgpr_32 = V_LSHLREV_B32_e32 3, undef %0:vgpr_32, implicit $exec + S_NOP 0, implicit %1 + S_NOP 0, implicit %2 + S_NOP 0, implicit %3 + S_ENDPGM 0 +... +--- +name: test_remat_v_ashrrev_i32_e32 +tracksRegLiveness: true +body: | + bb.0: + ; GCN-LABEL: name: test_remat_v_ashrrev_i32_e32 + ; GCN: renamable $vgpr0 = V_ASHRREV_I32_e32 1, undef $vgpr0, implicit $exec + ; GCN: renamable $vgpr1 = V_ASHRREV_I32_e32 2, undef $vgpr0, implicit $exec + ; GCN: S_NOP 0, implicit killed renamable $vgpr0 + ; GCN: S_NOP 0, implicit killed renamable $vgpr1 + ; GCN: renamable $vgpr0 = V_ASHRREV_I32_e32 3, undef $vgpr0, implicit $exec + ; GCN: S_NOP 0, implicit killed renamable $vgpr0 + ; GCN: S_ENDPGM 0 + %1:vgpr_32 = V_ASHRREV_I32_e32 1, undef %0:vgpr_32, implicit $exec + %2:vgpr_32 = V_ASHRREV_I32_e32 2, undef %0:vgpr_32, implicit $exec + %3:vgpr_32 = V_ASHRREV_I32_e32 3, undef %0:vgpr_32, implicit $exec + S_NOP 0, implicit %1 + S_NOP 0, implicit %2 + S_NOP 0, implicit %3 + S_ENDPGM 0 +... +--- +name: test_remat_v_and_b32_e32 +tracksRegLiveness: true +body: | + bb.0: + ; GCN-LABEL: name: test_remat_v_and_b32_e32 + ; GCN: renamable $vgpr0 = V_AND_B32_e32 1, undef $vgpr0, implicit $exec + ; GCN: renamable $vgpr1 = V_AND_B32_e32 2, undef $vgpr0, implicit $exec + ; GCN: S_NOP 0, implicit killed renamable $vgpr0 + ; GCN: S_NOP 0, implicit killed renamable $vgpr1 + ; GCN: renamable $vgpr0 = V_AND_B32_e32 3, undef $vgpr0, implicit $exec + ; GCN: S_NOP 0, implicit killed renamable $vgpr0 + ; GCN: S_ENDPGM 0 + %1:vgpr_32 = V_AND_B32_e32 1, undef %0:vgpr_32, implicit $exec + %2:vgpr_32 = V_AND_B32_e32 2, undef %0:vgpr_32, implicit $exec + %3:vgpr_32 = V_AND_B32_e32 3, undef %0:vgpr_32, implicit $exec + S_NOP 0, implicit %1 + S_NOP 0, implicit %2 + S_NOP 0, implicit %3 + S_ENDPGM 0 +... +--- +name: test_remat_v_or_b32_e32 +tracksRegLiveness: true +body: | + bb.0: + ; GCN-LABEL: name: test_remat_v_or_b32_e32 + ; GCN: renamable $vgpr0 = V_OR_B32_e32 1, undef $vgpr0, implicit $exec + ; GCN: renamable $vgpr1 = V_OR_B32_e32 2, undef $vgpr0, implicit $exec + ; GCN: S_NOP 0, implicit killed renamable $vgpr0 + ; GCN: S_NOP 0, implicit killed renamable $vgpr1 + ; GCN: renamable $vgpr0 = V_OR_B32_e32 3, undef $vgpr0, implicit $exec + ; GCN: S_NOP 0, implicit killed renamable $vgpr0 + ; GCN: S_ENDPGM 0 + %1:vgpr_32 = V_OR_B32_e32 1, undef %0:vgpr_32, implicit $exec + %2:vgpr_32 = V_OR_B32_e32 2, undef %0:vgpr_32, implicit $exec + %3:vgpr_32 = V_OR_B32_e32 3, undef %0:vgpr_32, implicit $exec + S_NOP 0, implicit %1 + S_NOP 0, implicit %2 + S_NOP 0, implicit %3 + S_ENDPGM 0 +... +--- +name: test_remat_v_xor_b32_e32 +tracksRegLiveness: true +body: | + bb.0: + ; GCN-LABEL: name: test_remat_v_xor_b32_e32 + ; GCN: renamable $vgpr0 = V_XOR_B32_e32 1, undef $vgpr0, implicit $exec + ; GCN: renamable $vgpr1 = V_XOR_B32_e32 2, undef $vgpr0, implicit $exec + ; GCN: S_NOP 0, implicit killed renamable $vgpr0 + ; GCN: S_NOP 0, implicit killed renamable $vgpr1 + ; GCN: renamable $vgpr0 = V_XOR_B32_e32 3, undef $vgpr0, implicit $exec + ; GCN: S_NOP 0, implicit killed renamable $vgpr0 + ; GCN: S_ENDPGM 0 + %1:vgpr_32 = V_XOR_B32_e32 1, undef %0:vgpr_32, implicit $exec + %2:vgpr_32 = V_XOR_B32_e32 2, undef %0:vgpr_32, implicit $exec + %3:vgpr_32 = V_XOR_B32_e32 3, undef %0:vgpr_32, implicit $exec + S_NOP 0, implicit %1 + S_NOP 0, implicit %2 + S_NOP 0, implicit %3 + S_ENDPGM 0 +... +--- +name: test_remat_v_madak_f32 +tracksRegLiveness: true +body: | + bb.0: + ; GCN-LABEL: name: test_remat_v_madak_f32 + ; GCN: renamable $vgpr0 = nofpexcept V_MADAK_F32 1, undef $vgpr0, 1, implicit $exec, implicit $mode + ; GCN: renamable $vgpr1 = nofpexcept V_MADAK_F32 2, undef $vgpr0, 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_MADAK_F32 3, undef $vgpr0, 3, implicit $exec, implicit $mode + ; GCN: S_NOP 0, implicit killed renamable $vgpr0 + ; GCN: S_ENDPGM 0 + %1:vgpr_32 = nofpexcept V_MADAK_F32 1, undef %0:vgpr_32, 1, implicit $exec, implicit $mode + %2:vgpr_32 = nofpexcept V_MADAK_F32 2, undef %0:vgpr_32, 2, implicit $exec, implicit $mode + %3:vgpr_32 = nofpexcept V_MADAK_F32 3, undef %0:vgpr_32, 3, implicit $exec, implicit $mode + S_NOP 0, implicit %1 + S_NOP 0, implicit %2 + S_NOP 0, implicit %3 + S_ENDPGM 0 +... +--- +name: test_remat_v_add_u32_e32 +tracksRegLiveness: true +body: | + bb.0: + ; GCN-LABEL: name: test_remat_v_add_u32_e32 + ; GCN: renamable $vgpr0 = V_ADD_U32_e32 1, undef $vgpr0, implicit $exec + ; GCN: renamable $vgpr1 = V_ADD_U32_e32 2, undef $vgpr0, implicit $exec + ; GCN: S_NOP 0, implicit killed renamable $vgpr0 + ; GCN: S_NOP 0, implicit killed renamable $vgpr1 + ; GCN: renamable $vgpr0 = V_ADD_U32_e32 3, undef $vgpr0, implicit $exec + ; GCN: S_NOP 0, implicit killed renamable $vgpr0 + ; GCN: S_ENDPGM 0 + %1:vgpr_32 = V_ADD_U32_e32 1, undef %0:vgpr_32, implicit $exec + %2:vgpr_32 = V_ADD_U32_e32 2, undef %0:vgpr_32, implicit $exec + %3:vgpr_32 = V_ADD_U32_e32 3, undef %0:vgpr_32, implicit $exec + S_NOP 0, implicit %1 + S_NOP 0, implicit %2 + S_NOP 0, implicit %3 + S_ENDPGM 0 +... +--- +name: test_remat_v_sub_u32_e32 +tracksRegLiveness: true +body: | + bb.0: + ; GCN-LABEL: name: test_remat_v_sub_u32_e32 + ; GCN: renamable $vgpr0 = V_SUB_U32_e32 1, undef $vgpr0, implicit $exec + ; GCN: renamable $vgpr1 = V_SUB_U32_e32 2, undef $vgpr0, implicit $exec + ; GCN: S_NOP 0, implicit killed renamable $vgpr0 + ; GCN: S_NOP 0, implicit killed renamable $vgpr1 + ; GCN: renamable $vgpr0 = V_SUB_U32_e32 3, undef $vgpr0, implicit $exec + ; GCN: S_NOP 0, implicit killed renamable $vgpr0 + ; GCN: S_ENDPGM 0 + %1:vgpr_32 = V_SUB_U32_e32 1, undef %0:vgpr_32, implicit $exec + %2:vgpr_32 = V_SUB_U32_e32 2, undef %0:vgpr_32, implicit $exec + %3:vgpr_32 = V_SUB_U32_e32 3, undef %0:vgpr_32, implicit $exec + S_NOP 0, implicit %1 + S_NOP 0, implicit %2 + S_NOP 0, implicit %3 + S_ENDPGM 0 +... +--- +name: test_remat_v_subrev_u32_e32 +tracksRegLiveness: true +body: | + bb.0: + ; GCN-LABEL: name: test_remat_v_subrev_u32_e32 + ; GCN: renamable $vgpr0 = V_SUBREV_U32_e32 1, undef $vgpr0, implicit $exec + ; GCN: renamable $vgpr1 = V_SUBREV_U32_e32 2, undef $vgpr0, implicit $exec + ; GCN: S_NOP 0, implicit killed renamable $vgpr0 + ; GCN: S_NOP 0, implicit killed renamable $vgpr1 + ; GCN: renamable $vgpr0 = V_SUBREV_U32_e32 3, undef $vgpr0, implicit $exec + ; GCN: S_NOP 0, implicit killed renamable $vgpr0 + ; GCN: S_ENDPGM 0 + %1:vgpr_32 = V_SUBREV_U32_e32 1, undef %0:vgpr_32, implicit $exec + %2:vgpr_32 = V_SUBREV_U32_e32 2, undef %0:vgpr_32, implicit $exec + %3:vgpr_32 = V_SUBREV_U32_e32 3, undef %0:vgpr_32, implicit $exec + S_NOP 0, implicit %1 + S_NOP 0, implicit %2 + S_NOP 0, implicit %3 + S_ENDPGM 0 +... +--- +name: test_remat_v_bfm_b32_e32 +tracksRegLiveness: true +body: | + bb.0: + ; GCN-LABEL: name: test_remat_v_bfm_b32_e32 + ; GCN: renamable $vgpr0 = V_BFM_B32_e32 1, undef $vgpr0, implicit $exec + ; GCN: renamable $vgpr1 = V_BFM_B32_e32 2, undef $vgpr0, implicit $exec + ; GCN: S_NOP 0, implicit killed renamable $vgpr0 + ; GCN: S_NOP 0, implicit killed renamable $vgpr1 + ; GCN: renamable $vgpr0 = V_BFM_B32_e32 3, undef $vgpr0, implicit $exec + ; GCN: S_NOP 0, implicit killed renamable $vgpr0 + ; GCN: S_ENDPGM 0 + %1:vgpr_32 = V_BFM_B32_e32 1, undef %0:vgpr_32, implicit $exec + %2:vgpr_32 = V_BFM_B32_e32 2, undef %0:vgpr_32, implicit $exec + %3:vgpr_32 = V_BFM_B32_e32 3, undef %0:vgpr_32, implicit $exec + S_NOP 0, implicit %1 + S_NOP 0, implicit %2 + S_NOP 0, implicit %3 + S_ENDPGM 0 +... +--- +name: test_remat_v_bcnt_u32_b32_e32 +tracksRegLiveness: true +body: | + bb.0: + ; GCN-LABEL: name: test_remat_v_bcnt_u32_b32_e32 + ; GCN: renamable $vgpr0 = V_BCNT_U32_B32_e32 1, undef $vgpr0, implicit $exec + ; GCN: renamable $vgpr1 = V_BCNT_U32_B32_e32 2, undef $vgpr0, implicit $exec + ; GCN: S_NOP 0, implicit killed renamable $vgpr0 + ; GCN: S_NOP 0, implicit killed renamable $vgpr1 + ; GCN: renamable $vgpr0 = V_BCNT_U32_B32_e32 3, undef $vgpr0, implicit $exec + ; GCN: S_NOP 0, implicit killed renamable $vgpr0 + ; GCN: S_ENDPGM 0 + %1:vgpr_32 = V_BCNT_U32_B32_e32 1, undef %0:vgpr_32, implicit $exec + %2:vgpr_32 = V_BCNT_U32_B32_e32 2, undef %0:vgpr_32, implicit $exec + %3:vgpr_32 = V_BCNT_U32_B32_e32 3, undef %0:vgpr_32, implicit $exec + S_NOP 0, implicit %1 + S_NOP 0, implicit %2 + S_NOP 0, implicit %3 + S_ENDPGM 0 +... +--- +name: test_remat_v_mbcnt_lo_u32_b32_e32 +tracksRegLiveness: true +body: | + bb.0: + ; GCN-LABEL: name: test_remat_v_mbcnt_lo_u32_b32_e32 + ; GCN: renamable $vgpr0 = V_MBCNT_LO_U32_B32_e32 1, undef $vgpr0, implicit $exec + ; GCN: renamable $vgpr1 = V_MBCNT_LO_U32_B32_e32 2, undef $vgpr0, implicit $exec + ; GCN: S_NOP 0, implicit killed renamable $vgpr0 + ; GCN: S_NOP 0, implicit killed renamable $vgpr1 + ; GCN: renamable $vgpr0 = V_MBCNT_LO_U32_B32_e32 3, undef $vgpr0, implicit $exec + ; GCN: S_NOP 0, implicit killed renamable $vgpr0 + ; GCN: S_ENDPGM 0 + %1:vgpr_32 = V_MBCNT_LO_U32_B32_e32 1, undef %0:vgpr_32, implicit $exec + %2:vgpr_32 = V_MBCNT_LO_U32_B32_e32 2, undef %0:vgpr_32, implicit $exec + %3:vgpr_32 = V_MBCNT_LO_U32_B32_e32 3, undef %0:vgpr_32, implicit $exec + S_NOP 0, implicit %1 + S_NOP 0, implicit %2 + S_NOP 0, implicit %3 + S_ENDPGM 0 +... +--- +name: test_remat_v_mbcnt_hi_u32_b32_e32 +tracksRegLiveness: true +body: | + bb.0: + ; GCN-LABEL: name: test_remat_v_mbcnt_hi_u32_b32_e32 + ; GCN: renamable $vgpr0 = V_MBCNT_HI_U32_B32_e32 1, undef $vgpr0, implicit $exec + ; GCN: renamable $vgpr1 = V_MBCNT_HI_U32_B32_e32 2, undef $vgpr0, implicit $exec + ; GCN: S_NOP 0, implicit killed renamable $vgpr0 + ; GCN: S_NOP 0, implicit killed renamable $vgpr1 + ; GCN: renamable $vgpr0 = V_MBCNT_HI_U32_B32_e32 3, undef $vgpr0, implicit $exec + ; GCN: S_NOP 0, implicit killed renamable $vgpr0 + ; GCN: S_ENDPGM 0 + %1:vgpr_32 = V_MBCNT_HI_U32_B32_e32 1, undef %0:vgpr_32, implicit $exec + %2:vgpr_32 = V_MBCNT_HI_U32_B32_e32 2, undef %0:vgpr_32, implicit $exec + %3:vgpr_32 = V_MBCNT_HI_U32_B32_e32 3, undef %0:vgpr_32, implicit $exec + S_NOP 0, implicit %1 + S_NOP 0, implicit %2 + S_NOP 0, implicit %3 + S_ENDPGM 0 +... +--- +name: test_remat_v_ldexp_f32_e32 +tracksRegLiveness: true +body: | + bb.0: + ; GCN-LABEL: name: test_remat_v_ldexp_f32_e32 + ; GCN: renamable $vgpr0 = nofpexcept V_LDEXP_F32_e32 1, undef $vgpr0, implicit $exec, implicit $mode + ; GCN: renamable $vgpr1 = nofpexcept V_LDEXP_F32_e32 2, undef $vgpr0, 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_LDEXP_F32_e32 3, undef $vgpr0, implicit $exec, implicit $mode + ; GCN: S_NOP 0, implicit killed renamable $vgpr0 + ; GCN: S_ENDPGM 0 + %1:vgpr_32 = nofpexcept V_LDEXP_F32_e32 1, undef %0:vgpr_32, implicit $exec, implicit $mode + %2:vgpr_32 = nofpexcept V_LDEXP_F32_e32 2, undef %0:vgpr_32, implicit $exec, implicit $mode + %3:vgpr_32 = nofpexcept V_LDEXP_F32_e32 3, undef %0:vgpr_32, implicit $exec, implicit $mode + S_NOP 0, implicit %1 + S_NOP 0, implicit %2 + S_NOP 0, implicit %3 + S_ENDPGM 0 +... +--- +name: test_remat_v_cvt_pknorm_i16_f32_e32 +tracksRegLiveness: true +body: | + bb.0: + ; GCN-LABEL: name: test_remat_v_cvt_pknorm_i16_f32_e32 + ; GCN: renamable $vgpr0 = V_CVT_PKNORM_I16_F32_e32 1, undef $vgpr0, implicit $exec + ; GCN: renamable $vgpr1 = V_CVT_PKNORM_I16_F32_e32 2, undef $vgpr0, implicit $exec + ; GCN: S_NOP 0, implicit killed renamable $vgpr0 + ; GCN: S_NOP 0, implicit killed renamable $vgpr1 + ; GCN: renamable $vgpr0 = V_CVT_PKNORM_I16_F32_e32 3, undef $vgpr0, implicit $exec + ; GCN: S_NOP 0, implicit killed renamable $vgpr0 + ; GCN: S_ENDPGM 0 + %1:vgpr_32 = V_CVT_PKNORM_I16_F32_e32 1, undef %0:vgpr_32, implicit $exec + %2:vgpr_32 = V_CVT_PKNORM_I16_F32_e32 2, undef %0:vgpr_32, implicit $exec + %3:vgpr_32 = V_CVT_PKNORM_I16_F32_e32 3, undef %0:vgpr_32, implicit $exec + S_NOP 0, implicit %1 + S_NOP 0, implicit %2 + S_NOP 0, implicit %3 + S_ENDPGM 0 +... +--- +name: test_remat_v_cvt_pknorm_u16_f32_e32 +tracksRegLiveness: true +body: | + bb.0: + ; GCN-LABEL: name: test_remat_v_cvt_pknorm_u16_f32_e32 + ; GCN: renamable $vgpr0 = V_CVT_PKNORM_U16_F32_e32 1, undef $vgpr0, implicit $exec + ; GCN: renamable $vgpr1 = V_CVT_PKNORM_U16_F32_e32 2, undef $vgpr0, implicit $exec + ; GCN: S_NOP 0, implicit killed renamable $vgpr0 + ; GCN: S_NOP 0, implicit killed renamable $vgpr1 + ; GCN: renamable $vgpr0 = V_CVT_PKNORM_U16_F32_e32 3, undef $vgpr0, implicit $exec + ; GCN: S_NOP 0, implicit killed renamable $vgpr0 + ; GCN: S_ENDPGM 0 + %1:vgpr_32 = V_CVT_PKNORM_U16_F32_e32 1, undef %0:vgpr_32, implicit $exec + %2:vgpr_32 = V_CVT_PKNORM_U16_F32_e32 2, undef %0:vgpr_32, implicit $exec + %3:vgpr_32 = V_CVT_PKNORM_U16_F32_e32 3, undef %0:vgpr_32, implicit $exec + S_NOP 0, implicit %1 + S_NOP 0, implicit %2 + S_NOP 0, implicit %3 + S_ENDPGM 0 +... +--- +name: test_remat_v_cvt_pkrtz_f16_f32_e32 +tracksRegLiveness: true +body: | + bb.0: + ; GCN-LABEL: name: test_remat_v_cvt_pkrtz_f16_f32_e32 + ; GCN: renamable $vgpr0 = nofpexcept V_CVT_PKRTZ_F16_F32_e32 1, undef $vgpr0, implicit $exec, implicit $mode + ; GCN: renamable $vgpr1 = nofpexcept V_CVT_PKRTZ_F16_F32_e32 2, undef $vgpr0, 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_PKRTZ_F16_F32_e32 3, undef $vgpr0, implicit $exec, implicit $mode + ; GCN: S_NOP 0, implicit killed renamable $vgpr0 + ; GCN: S_ENDPGM 0 + %1:vgpr_32 = nofpexcept V_CVT_PKRTZ_F16_F32_e32 1, undef %0:vgpr_32, implicit $exec, implicit $mode + %2:vgpr_32 = nofpexcept V_CVT_PKRTZ_F16_F32_e32 2, undef %0:vgpr_32, implicit $exec, implicit $mode + %3:vgpr_32 = nofpexcept V_CVT_PKRTZ_F16_F32_e32 3, undef %0:vgpr_32, implicit $exec, implicit $mode + S_NOP 0, implicit %1 + S_NOP 0, implicit %2 + S_NOP 0, implicit %3 + S_ENDPGM 0 +... +--- +name: test_remat_v_cvt_pk_u16_u32_e32 +tracksRegLiveness: true +body: | + bb.0: + ; GCN-LABEL: name: test_remat_v_cvt_pk_u16_u32_e32 + ; GCN: renamable $vgpr0 = V_CVT_PK_U16_U32_e32 1, undef $vgpr0, implicit $exec + ; GCN: renamable $vgpr1 = V_CVT_PK_U16_U32_e32 2, undef $vgpr0, implicit $exec + ; GCN: S_NOP 0, implicit killed renamable $vgpr0 + ; GCN: S_NOP 0, implicit killed renamable $vgpr1 + ; GCN: renamable $vgpr0 = V_CVT_PK_U16_U32_e32 3, undef $vgpr0, implicit $exec + ; GCN: S_NOP 0, implicit killed renamable $vgpr0 + ; GCN: S_ENDPGM 0 + %1:vgpr_32 = V_CVT_PK_U16_U32_e32 1, undef %0:vgpr_32, implicit $exec + %2:vgpr_32 = V_CVT_PK_U16_U32_e32 2, undef %0:vgpr_32, implicit $exec + %3:vgpr_32 = V_CVT_PK_U16_U32_e32 3, undef %0:vgpr_32, implicit $exec + S_NOP 0, implicit %1 + S_NOP 0, implicit %2 + S_NOP 0, implicit %3 + S_ENDPGM 0 +... +--- +name: test_remat_v_cvt_pk_i16_i32_e32 +tracksRegLiveness: true +body: | + bb.0: + ; GCN-LABEL: name: test_remat_v_cvt_pk_i16_i32_e32 + ; GCN: renamable $vgpr0 = V_CVT_PK_I16_I32_e32 1, undef $vgpr0, implicit $exec + ; GCN: renamable $vgpr1 = V_CVT_PK_I16_I32_e32 2, undef $vgpr0, implicit $exec + ; GCN: S_NOP 0, implicit killed renamable $vgpr0 + ; GCN: S_NOP 0, implicit killed renamable $vgpr1 + ; GCN: renamable $vgpr0 = V_CVT_PK_I16_I32_e32 3, undef $vgpr0, implicit $exec + ; GCN: S_NOP 0, implicit killed renamable $vgpr0 + ; GCN: S_ENDPGM 0 + %1:vgpr_32 = V_CVT_PK_I16_I32_e32 1, undef %0:vgpr_32, implicit $exec + %2:vgpr_32 = V_CVT_PK_I16_I32_e32 2, undef %0:vgpr_32, implicit $exec + %3:vgpr_32 = V_CVT_PK_I16_I32_e32 3, undef %0:vgpr_32, implicit $exec + S_NOP 0, implicit %1 + S_NOP 0, implicit %2 + S_NOP 0, implicit %3 + S_ENDPGM 0 +... +--- +name: test_remat_v_min_legacy_f32_e32 +tracksRegLiveness: true +body: | + bb.0: + ; GCN-LABEL: name: test_remat_v_min_legacy_f32_e32 + ; GCN: renamable $vgpr0 = nofpexcept V_MIN_LEGACY_F32_e32 1, undef $vgpr0, implicit $exec, implicit $mode + ; GCN: renamable $vgpr1 = nofpexcept V_MIN_LEGACY_F32_e32 2, undef $vgpr0, 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_MIN_LEGACY_F32_e32 3, undef $vgpr0, implicit $exec, implicit $mode + ; GCN: S_NOP 0, implicit killed renamable $vgpr0 + ; GCN: S_ENDPGM 0 + %1:vgpr_32 = nofpexcept V_MIN_LEGACY_F32_e32 1, undef %0:vgpr_32, implicit $exec, implicit $mode + %2:vgpr_32 = nofpexcept V_MIN_LEGACY_F32_e32 2, undef %0:vgpr_32, implicit $exec, implicit $mode + %3:vgpr_32 = nofpexcept V_MIN_LEGACY_F32_e32 3, undef %0:vgpr_32, implicit $exec, implicit $mode + S_NOP 0, implicit %1 + S_NOP 0, implicit %2 + S_NOP 0, implicit %3 + S_ENDPGM 0 +... +--- +name: test_remat_v_max_legacy_f32_e32 +tracksRegLiveness: true +body: | + bb.0: + ; GCN-LABEL: name: test_remat_v_max_legacy_f32_e32 + ; GCN: renamable $vgpr0 = nofpexcept V_MAX_LEGACY_F32_e32 1, undef $vgpr0, implicit $exec, implicit $mode + ; GCN: renamable $vgpr1 = nofpexcept V_MAX_LEGACY_F32_e32 2, undef $vgpr0, 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_MAX_LEGACY_F32_e32 3, undef $vgpr0, implicit $exec, implicit $mode + ; GCN: S_NOP 0, implicit killed renamable $vgpr0 + ; GCN: S_ENDPGM 0 + %1:vgpr_32 = nofpexcept V_MAX_LEGACY_F32_e32 1, undef %0:vgpr_32, implicit $exec, implicit $mode + %2:vgpr_32 = nofpexcept V_MAX_LEGACY_F32_e32 2, undef %0:vgpr_32, implicit $exec, implicit $mode + %3:vgpr_32 = nofpexcept V_MAX_LEGACY_F32_e32 3, undef %0:vgpr_32, implicit $exec, implicit $mode + S_NOP 0, implicit %1 + S_NOP 0, implicit %2 + S_NOP 0, implicit %3 + S_ENDPGM 0 +... +--- +name: test_remat_v_lshr_b32_e32 +tracksRegLiveness: true +body: | + bb.0: + ; GCN-LABEL: name: test_remat_v_lshr_b32_e32 + ; GCN: renamable $vgpr0 = V_LSHR_B32_e32 1, undef $vgpr0, implicit $exec + ; GCN: renamable $vgpr1 = V_LSHR_B32_e32 2, undef $vgpr0, implicit $exec + ; GCN: S_NOP 0, implicit killed renamable $vgpr0 + ; GCN: S_NOP 0, implicit killed renamable $vgpr1 + ; GCN: renamable $vgpr0 = V_LSHR_B32_e32 3, undef $vgpr0, implicit $exec + ; GCN: S_NOP 0, implicit killed renamable $vgpr0 + ; GCN: S_ENDPGM 0 + %1:vgpr_32 = V_LSHR_B32_e32 1, undef %0:vgpr_32, implicit $exec + %2:vgpr_32 = V_LSHR_B32_e32 2, undef %0:vgpr_32, implicit $exec + %3:vgpr_32 = V_LSHR_B32_e32 3, undef %0:vgpr_32, implicit $exec + S_NOP 0, implicit %1 + S_NOP 0, implicit %2 + S_NOP 0, implicit %3 + S_ENDPGM 0 +... +--- +name: test_remat_v_lshl_b32_e32 +tracksRegLiveness: true +body: | + bb.0: + ; GCN-LABEL: name: test_remat_v_lshl_b32_e32 + ; GCN: renamable $vgpr0 = V_LSHL_B32_e32 1, undef $vgpr0, implicit $exec + ; GCN: renamable $vgpr1 = V_LSHL_B32_e32 2, undef $vgpr0, implicit $exec + ; GCN: S_NOP 0, implicit killed renamable $vgpr0 + ; GCN: S_NOP 0, implicit killed renamable $vgpr1 + ; GCN: renamable $vgpr0 = V_LSHL_B32_e32 3, undef $vgpr0, implicit $exec + ; GCN: S_NOP 0, implicit killed renamable $vgpr0 + ; GCN: S_ENDPGM 0 + %1:vgpr_32 = V_LSHL_B32_e32 1, undef %0:vgpr_32, implicit $exec + %2:vgpr_32 = V_LSHL_B32_e32 2, undef %0:vgpr_32, implicit $exec + %3:vgpr_32 = V_LSHL_B32_e32 3, undef %0:vgpr_32, implicit $exec + S_NOP 0, implicit %1 + S_NOP 0, implicit %2 + S_NOP 0, implicit %3 + S_ENDPGM 0 +... +--- +name: test_remat_v_ashr_i32_e32 +tracksRegLiveness: true +body: | + bb.0: + ; GCN-LABEL: name: test_remat_v_ashr_i32_e32 + ; GCN: renamable $vgpr0 = V_ASHR_I32_e32 1, undef $vgpr0, implicit $exec + ; GCN: renamable $vgpr1 = V_ASHR_I32_e32 2, undef $vgpr0, implicit $exec + ; GCN: S_NOP 0, implicit killed renamable $vgpr0 + ; GCN: S_NOP 0, implicit killed renamable $vgpr1 + ; GCN: renamable $vgpr0 = V_ASHR_I32_e32 3, undef $vgpr0, implicit $exec + ; GCN: S_NOP 0, implicit killed renamable $vgpr0 + ; GCN: S_ENDPGM 0 + %1:vgpr_32 = V_ASHR_I32_e32 1, undef %0:vgpr_32, implicit $exec + %2:vgpr_32 = V_ASHR_I32_e32 2, undef %0:vgpr_32, implicit $exec + %3:vgpr_32 = V_ASHR_I32_e32 3, undef %0:vgpr_32, implicit $exec + S_NOP 0, implicit %1 + S_NOP 0, implicit %2 + S_NOP 0, implicit %3 + S_ENDPGM 0 +... +--- +name: test_no_remat_v_ldexp_f16_e32 +tracksRegLiveness: true +machineFunctionInfo: + stackPtrOffsetReg: $sgpr32 +body: | + bb.0: + ; GCN-LABEL: name: test_no_remat_v_ldexp_f16_e32 + ; GCN: renamable $vgpr0 = nofpexcept V_LDEXP_F16_e32 1, undef $vgpr0, 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 = nofpexcept V_LDEXP_F16_e32 2, undef $vgpr0, implicit $exec, implicit $mode + ; GCN: renamable $vgpr0 = nofpexcept V_LDEXP_F16_e32 3, undef $vgpr0, 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 + %1:vgpr_32 = nofpexcept V_LDEXP_F16_e32 1, undef %0:vgpr_32, implicit $exec, implicit $mode + %2:vgpr_32 = nofpexcept V_LDEXP_F16_e32 2, undef %0:vgpr_32, implicit $exec, implicit $mode + %3:vgpr_32 = nofpexcept V_LDEXP_F16_e32 3, undef %0:vgpr_32, implicit $exec, implicit $mode + S_NOP 0, implicit %1 + S_NOP 0, implicit %2 + S_NOP 0, implicit %3 + S_ENDPGM 0 +... +--- +name: test_no_remat_v_lshrrev_b16_e32 +tracksRegLiveness: true +machineFunctionInfo: + stackPtrOffsetReg: $sgpr32 +body: | + bb.0: + ; GCN-LABEL: name: test_no_remat_v_lshrrev_b16_e32 + ; GCN: renamable $vgpr0 = V_LSHRREV_B16_e32 1, undef $vgpr0, implicit $exec + ; GCN: SI_SPILL_V32_SAVE killed $vgpr0, %stack.1, $sgpr32, 0, implicit $exec :: (store (s32) into %stack.1, addrspace 5) + ; GCN: renamable $vgpr1 = V_LSHRREV_B16_e32 2, undef $vgpr0, implicit $exec + ; GCN: renamable $vgpr0 = V_LSHRREV_B16_e32 3, undef $vgpr0, implicit $exec + ; 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 + %1:vgpr_32 = V_LSHRREV_B16_e32 1, undef %0:vgpr_32, implicit $exec + %2:vgpr_32 = V_LSHRREV_B16_e32 2, undef %0:vgpr_32, implicit $exec + %3:vgpr_32 = V_LSHRREV_B16_e32 3, undef %0:vgpr_32, implicit $exec + S_NOP 0, implicit %1 + S_NOP 0, implicit %2 + S_NOP 0, implicit %3 + S_ENDPGM 0 +... +--- +name: test_no_remat_v_lshlrev_b16_e32 +tracksRegLiveness: true +machineFunctionInfo: + stackPtrOffsetReg: $sgpr32 +body: | + bb.0: + ; GCN-LABEL: name: test_no_remat_v_lshlrev_b16_e32 + ; GCN: renamable $vgpr0 = V_LSHLREV_B16_e32 1, undef $vgpr0, implicit $exec + ; GCN: SI_SPILL_V32_SAVE killed $vgpr0, %stack.1, $sgpr32, 0, implicit $exec :: (store (s32) into %stack.1, addrspace 5) + ; GCN: renamable $vgpr1 = V_LSHLREV_B16_e32 2, undef $vgpr0, implicit $exec + ; GCN: renamable $vgpr0 = V_LSHLREV_B16_e32 3, undef $vgpr0, implicit $exec + ; 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 + %1:vgpr_32 = V_LSHLREV_B16_e32 1, undef %0:vgpr_32, implicit $exec + %2:vgpr_32 = V_LSHLREV_B16_e32 2, undef %0:vgpr_32, implicit $exec + %3:vgpr_32 = V_LSHLREV_B16_e32 3, undef %0:vgpr_32, implicit $exec + S_NOP 0, implicit %1 + S_NOP 0, implicit %2 + S_NOP 0, implicit %3 + S_ENDPGM 0 +... +--- +name: test_no_remat_v_ashrrev_i16_e32 +tracksRegLiveness: true +machineFunctionInfo: + stackPtrOffsetReg: $sgpr32 +body: | + bb.0: + ; GCN-LABEL: name: test_no_remat_v_ashrrev_i16_e32 + ; GCN: renamable $vgpr0 = V_ASHRREV_I16_e32 1, undef $vgpr0, implicit $exec + ; GCN: SI_SPILL_V32_SAVE killed $vgpr0, %stack.1, $sgpr32, 0, implicit $exec :: (store (s32) into %stack.1, addrspace 5) + ; GCN: renamable $vgpr1 = V_ASHRREV_I16_e32 2, undef $vgpr0, implicit $exec + ; GCN: renamable $vgpr0 = V_ASHRREV_I16_e32 3, undef $vgpr0, implicit $exec + ; 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 + %1:vgpr_32 = V_ASHRREV_I16_e32 1, undef %0:vgpr_32, implicit $exec + %2:vgpr_32 = V_ASHRREV_I16_e32 2, undef %0:vgpr_32, implicit $exec + %3:vgpr_32 = V_ASHRREV_I16_e32 3, undef %0:vgpr_32, implicit $exec + S_NOP 0, implicit %1 + S_NOP 0, implicit %2 + S_NOP 0, implicit %3 + S_ENDPGM 0 +... +--- +name: test_remat_v_xnor_b32_e32 +tracksRegLiveness: true +body: | + bb.0: + ; GCN-LABEL: name: test_remat_v_xnor_b32_e32 + ; GCN: renamable $vgpr0 = V_XNOR_B32_e32 1, undef $vgpr0, implicit $exec + ; GCN: renamable $vgpr1 = V_XNOR_B32_e32 2, undef $vgpr0, implicit $exec + ; GCN: S_NOP 0, implicit killed renamable $vgpr0 + ; GCN: S_NOP 0, implicit killed renamable $vgpr1 + ; GCN: renamable $vgpr0 = V_XNOR_B32_e32 3, undef $vgpr0, implicit $exec + ; GCN: S_NOP 0, implicit killed renamable $vgpr0 + ; GCN: S_ENDPGM 0 + %1:vgpr_32 = V_XNOR_B32_e32 1, undef %0:vgpr_32, implicit $exec + %2:vgpr_32 = V_XNOR_B32_e32 2, undef %0:vgpr_32, implicit $exec + %3:vgpr_32 = V_XNOR_B32_e32 3, undef %0:vgpr_32, implicit $exec + S_NOP 0, implicit %1 + S_NOP 0, implicit %2 + S_NOP 0, implicit %3 + S_ENDPGM 0 +... +--- +name: test_remat_v_fmamk_f32 +tracksRegLiveness: true +body: | + bb.0: + ; GCN-LABEL: name: test_remat_v_fmamk_f32 + ; GCN: renamable $vgpr0 = nofpexcept V_FMAMK_F32 1, 1, undef $vgpr0, implicit $exec, implicit $mode + ; GCN: renamable $vgpr1 = nofpexcept V_FMAMK_F32 2, 2, undef $vgpr0, 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_FMAMK_F32 3, 3, undef $vgpr0, implicit $exec, implicit $mode + ; GCN: S_NOP 0, implicit killed renamable $vgpr0 + ; GCN: S_ENDPGM 0 + %1:vgpr_32 = nofpexcept V_FMAMK_F32 1, 1, undef %0:vgpr_32, implicit $exec, implicit $mode + %2:vgpr_32 = nofpexcept V_FMAMK_F32 2, 2, undef %0:vgpr_32, implicit $exec, implicit $mode + %3:vgpr_32 = nofpexcept V_FMAMK_F32 3, 3, undef %0:vgpr_32, implicit $exec, implicit $mode + S_NOP 0, implicit %1 + S_NOP 0, implicit %2 + S_NOP 0, implicit %3 + S_ENDPGM 0 +... +--- +name: test_remat_v_fmaak_f32 +tracksRegLiveness: true +body: | + bb.0: + ; GCN-LABEL: name: test_remat_v_fmaak_f32 + ; GCN: renamable $vgpr0 = nofpexcept V_FMAAK_F32 1, undef $vgpr0, 1, implicit $exec, implicit $mode + ; GCN: renamable $vgpr1 = nofpexcept V_FMAAK_F32 2, undef $vgpr0, 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_FMAAK_F32 3, undef $vgpr0, 3, implicit $exec, implicit $mode + ; GCN: S_NOP 0, implicit killed renamable $vgpr0 + ; GCN: S_ENDPGM 0 + %1:vgpr_32 = nofpexcept V_FMAAK_F32 1, undef %0:vgpr_32, 1, implicit $exec, implicit $mode + %2:vgpr_32 = nofpexcept V_FMAAK_F32 2, undef %0:vgpr_32, 2, implicit $exec, implicit $mode + %3:vgpr_32 = nofpexcept V_FMAAK_F32 3, undef %0:vgpr_32, 3, implicit $exec, implicit $mode + S_NOP 0, implicit %1 + S_NOP 0, implicit %2 + S_NOP 0, implicit %3 + S_ENDPGM 0 +...