@@ -2008,6 +2008,15 @@ multiclass SOP1_IMM_Real_gfx12<bits<8> op> {
20082008multiclass SOP1_Real_gfx11_gfx12<bits<8> op, string name = !tolower(NAME)> :
20092009 SOP1_Real_gfx11<op, name>, SOP1_Real_gfx12<op, name>;
20102010
2011+ multiclass SOP1_Real_gfx1250<bits<8> op, string name = !tolower(NAME)> {
2012+ defvar ps = !cast<SOP1_Pseudo>(NAME);
2013+ def _gfx1250 : SOP1_Real<op, ps, name>,
2014+ Select<GFX1250Gen, ps.PseudoInstr>;
2015+ if !ne(ps.Mnemonic, name) then
2016+ let AssemblerPredicate = isGFX1250Plus in
2017+ def : AMDGPUMnemonicAlias<ps.Mnemonic, name>;
2018+ }
2019+
20112020defm S_MOV_B32 : SOP1_Real_gfx11_gfx12<0x000>;
20122021defm S_MOV_B64 : SOP1_Real_gfx11_gfx12<0x001>;
20132022defm S_CMOV_B32 : SOP1_Real_gfx11_gfx12<0x002>;
@@ -2066,10 +2075,16 @@ defm S_MOVRELS_B64 : SOP1_Real_gfx11_gfx12<0x041>;
20662075defm S_MOVRELD_B32 : SOP1_Real_gfx11_gfx12<0x042>;
20672076defm S_MOVRELD_B64 : SOP1_Real_gfx11_gfx12<0x043>;
20682077defm S_MOVRELSD_2_B32 : SOP1_Real_gfx11_gfx12<0x044>;
2078+ let OtherPredicates = [isNotGFX1250Plus] in {
20692079defm S_GETPC_B64 : SOP1_Real_gfx11_gfx12<0x047>;
20702080defm S_SETPC_B64 : SOP1_Real_gfx11_gfx12<0x048>;
20712081defm S_SWAPPC_B64 : SOP1_Real_gfx11_gfx12<0x049>;
20722082defm S_RFE_B64 : SOP1_Real_gfx11_gfx12<0x04a>;
2083+ }
2084+ defm S_GETPC_B64 : SOP1_Real_gfx1250<0x047, "s_get_pc_i64">;
2085+ defm S_SETPC_B64 : SOP1_Real_gfx1250<0x048, "s_set_pc_i64">;
2086+ defm S_SWAPPC_B64 : SOP1_Real_gfx1250<0x049, "s_swap_pc_i64">;
2087+ defm S_RFE_B64 : SOP1_Real_gfx1250<0x04a, "s_rfe_i64">;
20732088defm S_SENDMSG_RTN_B32 : SOP1_Real_gfx11_gfx12<0x04c>;
20742089defm S_SENDMSG_RTN_B64 : SOP1_Real_gfx11_gfx12<0x04d>;
20752090defm S_BARRIER_SIGNAL_M0 : SOP1_M0_Real_gfx12<0x04e>;
@@ -2444,10 +2459,21 @@ multiclass SOPK_Real32_gfx11_gfx12<bits<5> op> :
24442459multiclass SOPK_Real64_gfx11_gfx12<bits<5> op> :
24452460 SOPK_Real64_gfx11<op>, SOPK_Real64_gfx12<op>;
24462461
2462+ multiclass SOPK_Real32_gfx1250<bits<5> op, string name = !tolower(NAME)> {
2463+ defvar ps = !cast<SOPK_Pseudo>(NAME);
2464+ def _gfx1250 : SOPK_Real32<op, ps, name>,
2465+ Select<GFX1250Gen, ps.PseudoInstr>;
2466+ if !ne(ps.Mnemonic, name) then
2467+ let AssemblerPredicate = isGFX1250Plus in
2468+ def : AMDGPUMnemonicAlias<ps.Mnemonic, name>;
2469+ }
2470+
24472471defm S_GETREG_B32 : SOPK_Real32_gfx11_gfx12<0x011>;
24482472defm S_SETREG_B32 : SOPK_Real32_gfx11_gfx12<0x012>;
24492473defm S_SETREG_IMM32_B32 : SOPK_Real64_gfx11_gfx12<0x013>;
2474+ let OtherPredicates = [isNotGFX1250Plus] in
24502475defm S_CALL_B64 : SOPK_Real32_gfx11_gfx12<0x014>;
2476+ defm S_CALL_B64 : SOPK_Real32_gfx1250<0x014, "s_call_i64">;
24512477defm S_SUBVECTOR_LOOP_BEGIN : SOPK_Real32_gfx11<0x016>;
24522478defm S_SUBVECTOR_LOOP_END : SOPK_Real32_gfx11<0x017>;
24532479defm S_WAITCNT_VSCNT : SOPK_Real32_gfx11<0x018>;
0 commit comments